[go: nahoru, domu]

WO2021238376A1 - Function pack loading method and apparatus, and server and electronic device - Google Patents

Function pack loading method and apparatus, and server and electronic device Download PDF

Info

Publication number
WO2021238376A1
WO2021238376A1 PCT/CN2021/083177 CN2021083177W WO2021238376A1 WO 2021238376 A1 WO2021238376 A1 WO 2021238376A1 CN 2021083177 W CN2021083177 W CN 2021083177W WO 2021238376 A1 WO2021238376 A1 WO 2021238376A1
Authority
WO
WIPO (PCT)
Prior art keywords
function
package
information
electronic device
matching
Prior art date
Application number
PCT/CN2021/083177
Other languages
French (fr)
Chinese (zh)
Inventor
李国强
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021238376A1 publication Critical patent/WO2021238376A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Definitions

  • the embodiments of the present application relate to the technical field of smart terminals, and in particular to a method, device, server, and electronic equipment for loading a function package.
  • the design of applications is becoming more and more complicated, which leads to more and more App installation packages.
  • the App will use redundant lib libraries (x86, arm32 and/ (Or arm64, etc.) files and/or resource files are packaged in an application installation package.
  • the user has to download a complete installation package when using a certain function of the App, redundant functions, redundant lib libraries and/or resource files will cause a waste of user traffic, and the waiting time for users to download and install the App is longer Long, the App installation package takes up more storage space.
  • the existing related technology provides an on-demand resource download solution, that is, according to the specific conditions of the operating device, only the resources required to run the App on the device are downloaded.
  • the embodiment of the application provides a method, device, server, and electronic device for loading a function package.
  • the embodiment of the application also provides a computer-readable storage medium to implement the description of the functions required by the electronic device according to the currently running application. Information download function package.
  • the present application provides a method for loading a function package, including: the electronic device detects the first operation information of the user in the interface displayed by the first application program currently running; wherein, the above-mentioned first operation information may be The user's click, double-click, long-press or draw a specific graphic in the interface displayed by the first application, or the above-mentioned first operation information may be the user's click, double-click or long-click on a specific icon in the interface displayed by the first application. In terms of operation, this embodiment does not limit the operation form of the first operation information.
  • the electronic device displays the function selection interface in response to the above-mentioned first operation information.
  • the electronic device detects the second operation information for the user to select the first function, where the second operation information may be the user's click, double-click, or long-press operation on the function icon in the function selection interface.
  • the operation form of the second operation information is not limited.
  • the second operation information is the user's clicking operation of the function icon as an example for description.
  • the electronic device obtains the description information of the first function in response to the foregoing second operation information; in specific implementation, the electronic device may obtain the description information of the first function selected by the user from the local data of the first application.
  • the electronic device searches for a function package whose matching identifier matches the description information among the function packages that have been installed on the above-mentioned electronic device.
  • the description information is sent to the server, and the download information sent by the server is received.
  • the download information includes the information of the function package and the information of the dependency package of the function package.
  • the function package includes the matching identifier and the above The function package that matches the description information.
  • the electronic device downloads the above-mentioned function package and the dependency package of the above-mentioned function package, silently installs and loads the above-mentioned function package.
  • the information of the above-mentioned function package may include the matching identifier and download address of the above-mentioned function package.
  • the information of the above-mentioned function package may also include other information, such as version information and/or manufacturer information of the function package. This is not limited.
  • the information of the dependent package of the above-mentioned function package may include the matching identifier and download address of the dependent package of the above-mentioned function package.
  • the function selection interface is displayed; the user selection is detected
  • the description information of the first function is obtained, and then, among the function packages installed in the above electronic device, the function package whose matching identifier matches the above description information is searched for, When it is not found, send the above description information to the server, and receive the download information sent by the above server.
  • the above download information includes the information of the function package whose matching identifier matches the above description information and the information of the dependency package of the above function package.
  • the electronic device downloads the above-mentioned function package and the dependency package of the above-mentioned function package, silently installs and loads the above-mentioned function package, so that the electronic device can download the function package according to the description information of the function required by the currently running application.
  • the storage space is small, so the waiting time for users to download and install the function package can be shortened, and the storage space of the electronic device can be saved.
  • downloading the above-mentioned function package and the dependency package of the above-mentioned function package, silently installing and loading the above-mentioned function package includes: the electronic device determines which to download according to the above-mentioned download information and the function package installed by the above-mentioned electronic device The dependent package, and then the electronic device downloads the above-mentioned function package and the above-mentioned dependent package to be downloaded, silently installs and loads the above-mentioned function package. Specifically, the electronic device may obtain the dependent package that is not installed in the download information according to the matching identifier of the dependent package in the download information and the functional package that the electronic device has installed, and the uninstalled dependent package is the dependent package to be downloaded.
  • the electronic device can determine the dependent package to be downloaded based on the download information and the functional package that the electronic device has installed, and then only need to download the functional package and the dependent package to be downloaded, and load the functional package, thereby further reducing
  • the installation package required to be downloaded by the electronic device is further shortened, and the waiting time of the user is further shortened, and the storage space of the electronic device is saved.
  • the description information includes: the function category code of the function corresponding to the function icon, and the matching identifier includes: the function category code of the function provided by the function package;
  • searching for the function package whose matching identifier matches the above description information includes: in the function package installed in the above electronic device, search according to the function category code in the above description information, and obtain the function category code and the function category code in the matching identifier.
  • the function package that matches the function category code in the above description information includes: the function category code of the function corresponding to the function icon, and the matching identifier includes: the function category code of the function provided by the function package;
  • the above-mentioned matching function package is loaded in the above-mentioned first application, and the above-mentioned matching function package is the function package that has been installed by the second application, and the above-mentioned second application is installed in In the above-mentioned electronic equipment.
  • the function package whose matching identifier found by the electronic device matches the above description information may be a function package installed by the second application program, and it is not restricted that the function package found must be a function package in the first application program , And after finding the matching function package, you can directly load the matching function package in the first application without jumping to the second application.
  • the description information also includes the manufacturer information and/or version information of the first application;
  • the matching identifier also includes the manufacturer information and/or version information of the function package;
  • the found matching function package includes at least two function packages installed in the above-mentioned electronic device, then according to the above-mentioned manufacturer information and/or version information, Determining the degree of matching between the matching function package and the first application program; in this way, loading the matching function package in the first application program may be: loading the function package with the highest matching degree in the first application program.
  • searching for a function package whose matching identifier matches the description information may be: in the installed function list of the electronic device, searching for the matching identifier and The function package that matches the description information; wherein, in the installed function list, an entry corresponding to the application program installed by the electronic device is stored, and the entry includes a matching identifier of the function package installed by the application program.
  • the download information includes the application to which the function package belongs, downloads the function package and the dependent package of the function package, silently installs and loads the function package, and can also download the function package in the electronic device.
  • the installed function list the entry corresponding to the application to which the loaded function package belongs is obtained, and the matching identifier of the loaded function package is added to the obtained entry.
  • an embodiment of the present application provides a method for loading a function package, including: a server receives description information sent by an electronic device, where the description information is the description information of the first function selected by the user by the electronic device, and the electronic device In the installed function package, it is sent after the function package whose matching identifier matches the above description information is not found; in the function package matching table, the information of the function package whose matching identifier matches the above description information is searched; The device sends download information, and the download information includes the information of the function package and the information of the dependency package of the function package, so that the electronic device downloads the function package and the dependency package of the function package according to the download information.
  • the server after receiving the description information sent by the electronic device, the server searches the function package matching table for the information of the function package whose matching identifier matches the description information, and then sends the download information to the electronic device.
  • the download information includes the information of the matching function package and the information of the dependent package of the matching function package, so that the electronic device can download the matching function package and the dependent package of the matching function package according to the above download information, thereby realizing electronic
  • the device downloads the function package according to the description information of the function required by the currently running application. Since the storage space occupied by the function package is small, the waiting time for the user to download and install the function package can be shortened, and the storage space of the electronic device can be saved.
  • the server before the server searches the function package matching table for the information of the function package whose matching identifier matches the above description information, it also includes: the server receives the application package uploaded by the developer; Split to obtain the function package included in the above application package; parse each function package included in the above application package to obtain the matching identifier of the dependent package of the above function package and the matching identifier of the above function package; record the above in the above function package matching table The application package to which the function package belongs, and the matching identifier of the above-mentioned function package and the matching identifier of the above-mentioned function package's dependent package.
  • the above-mentioned matching identifier includes: the function category code of the function provided by the function package; the above-mentioned function package matching table records the application package to which the function package belongs, the matching identifier of the above-mentioned function package, the information of the function package, and The above-mentioned function package dependent package information; the above-mentioned description information includes: the function category code of the function corresponding to the above-mentioned function icon; in this way, in the function package matching table, the information of the function package whose matching identifier matches the above-mentioned description information includes: In the function package matching table, search is performed according to the function category code in the above description information to obtain the function package whose function category code in the matching identifier matches the function category code in the above description information.
  • the description information further includes: manufacturer information and/or version information of the first application; the matching identifier also includes manufacturer information and/or version information of the function package;
  • the package matching table after searching for the information of the function package whose matching identifier matches the above description information, it also includes: if the found matching function package includes at least two in the above function package matching table, the server will act according to the above Manufacturer information and/or version information to determine the degree of matching between the above-mentioned matching function package and the above-mentioned first application; then the above-mentioned download information includes the information of the function package with the highest matching degree and the dependency package of the above-mentioned function package with the highest matching degree Information.
  • an embodiment of the present application provides a device for loading a function package.
  • the device is included in an electronic device, and the device has the function of realizing the behavior of the electronic device in the first aspect and the possible implementation of the first aspect.
  • the function can be realized by hardware, or the corresponding software can be executed by hardware.
  • the hardware or software includes one or more modules or units corresponding to the above-mentioned functions. For example, a receiving module or unit, a processing module or unit, a sending module or unit, and so on.
  • an embodiment of the present application provides a device for loading a function package, the device is included in a server, and the device has a function of realizing the server behavior in the second aspect and possible implementation manners of the second aspect.
  • the function can be realized by hardware, or the corresponding software can be executed by hardware.
  • the hardware or software includes one or more modules or units corresponding to the above-mentioned functions. For example, a receiving module or unit, a processing module or unit, a sending module or unit, and so on.
  • an electronic device including:
  • the function package includes the function package whose matching identifier matches the description information
  • the electronic device when the above instruction is executed by the above electronic device, the electronic device is caused to download the above function package and the dependent package of the above function package.
  • the step of loading the above function package includes: according to the above download information and the above electronic device. For the functional packages that have been installed on the device, determine the dependent packages to be downloaded; download the above functional packages and the dependent packages to be downloaded, silently install and load the above functional packages.
  • the description information includes: the function category code of the function corresponding to the function icon, and the matching identifier includes: the function category code of the function provided by the function package; when the instruction is executed by the electronic device , Causing the electronic device to execute the function package that has been installed in the above-mentioned electronic device, and the step of searching for a function package whose matching identifier matches the above-mentioned description information includes: in the function package that has been installed in the above-mentioned electronic device, according to the function in the above-mentioned description information The category code is searched, and a function package whose function category code in the matching identifier matches the function category code in the description information is obtained.
  • the electronic device when the above instructions are executed by the above electronic device, the electronic device is caused to execute after the step of searching for a function package whose matching identifier matches the above description information among the function packages installed in the above electronic device, The following steps are also performed: if a function package with a matching identifier that matches the description information is found among the function packages that have been installed on the above electronic device, then the above-mentioned matching function package is loaded in the above-mentioned first application, and the above-mentioned matching function package is matched.
  • the function package of is a function package that has been installed by the second application, and the second application is installed in the electronic device.
  • the description information also includes the manufacturer information and/or version information of the first application;
  • the matching identifier also includes the manufacturer information and/or version information of the function package; when the instruction When executed by the above-mentioned electronic device, before the electronic device executes the step of loading the above-mentioned matching function package in the above-mentioned first application, the following steps are also performed:
  • the matching function package includes at least two, then the matching degree between the matching function package and the first application program is determined according to the manufacturer information and/or version information; then the matching function package is loaded into the first application program.
  • the function package includes: loading the function package with the highest matching degree in the above-mentioned first application.
  • the above electronic device when the above instruction is executed by an electronic device, the above electronic device is caused to execute in the function package installed in the above electronic device, and the step of searching for a function package whose matching identifier matches the above description information may be : In the installed function list of the above electronic device, search for the function package whose matching identifier matches the above description information; wherein, the above installed function list saves the entry corresponding to the application installed on the above electronic device, the above entry Include the matching identifiers of the feature packs installed by the above-mentioned application.
  • the download information includes the application to which the function package belongs, and when the instruction is executed by the electronic device, the electronic device is made to download the function package and the dependent package of the function package, and load the function After the package step, the following steps are also performed: in the installed function list of the above electronic device, obtain the entry corresponding to the application to which the loaded function package belongs, and add the above loaded function package to the obtained entry The matching ID.
  • an embodiment of the present application provides a server, including: one or more processors; a memory; multiple application programs; and one or more computer programs, wherein the one or more computer programs are stored in the memory
  • the above-mentioned one or more computer programs include instructions.
  • the server executes the following steps: receiving the description information sent by the electronic device.
  • the function package matching table the function package whose matching identifier matches the above description information is searched
  • the above-mentioned download information includes the information of the above-mentioned function package and the information of the dependency package of the above-mentioned function package, so that the above-mentioned electronic device downloads according to the above-mentioned download information and the function package installed by the above-mentioned electronic device.
  • the server executes the following steps before the step of searching for the information of the function package whose matching identifier matches the above description information in the function package matching table : Receive the application package uploaded by the developer; split the above application package to obtain the function package included in the above application package; parse each function package included in the above application package to obtain the matching identifier of the dependent package of the above function package and the above function
  • the matching identifier of the package; the application package to which the function package belongs, and the matching identifier of the function package and the matching identifier of the dependent package of the function package are recorded in the function package matching table.
  • the above-mentioned matching identifier includes: the function category code of the function provided by the function package; the above-mentioned function package matching table records the application package to which the function package belongs, the matching identifier of the above-mentioned function package, the information of the function package, and The dependency package information of the above function package; the above description information includes: the function category code of the function corresponding to the above function icon; when the above instruction is executed by the above server, the server executes the above function package matching table, searching for the matching identifier and the above
  • the step of describing the information of the function package that matches the description information includes: in the function package matching table, searching according to the function category code in the above description information, and obtaining the function category code in the matching identifier and the function category code in the above description information. Matching function package.
  • the description information further includes: manufacturer information and/or version information of the first application; the matching identifier also includes manufacturer information and/or version information of the function package;
  • the server executes the step of searching for the information of the function package whose matching identifier matches the above-mentioned description information in the function package matching table, and then executes the following steps: If in the above-mentioned function package matching table, search The received matching function package includes at least two, then the matching degree between the matching function package and the first application program is determined based on the manufacturer information and/or version information; then the download information includes the highest matching degree The information of the function package and the information of the dependency package of the above-mentioned function package with the highest matching degree.
  • the present application provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, which when running on a computer, causes the computer to execute the method provided in the first aspect.
  • the present application provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, which when run on a computer, causes the computer to execute the method provided in the second aspect.
  • this application provides a computer program, which is used to execute the method provided in the first aspect when the computer program is executed by a computer.
  • this application provides a computer program, which is used to execute the method provided in the second aspect when the computer program is executed by a computer.
  • the programs in the ninth aspect and the tenth aspect may be stored in whole or in part on a storage medium that is packaged with the processor, or may be stored in part or all in a storage medium that is not packaged with the processor. On the memory.
  • Figure 1 is a schematic diagram of a file uploaded by a developer in the related art
  • Figure 2 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • FIG. 3 is a block diagram of the software structure of the electronic device 100 provided by an embodiment of the application.
  • FIG. 4 is a schematic structural diagram of a server provided by an embodiment of this application.
  • FIG. 5 is a schematic diagram of adding a matching identifier to a function package according to an embodiment of the application
  • FIG. 6 is a schematic diagram of a server unpacking a full application package according to an embodiment of the application
  • FIG. 7 is a schematic diagram of an electronic device search function package provided by an embodiment of the application.
  • FIG. 8 is a flowchart of a method for loading a function package provided by an embodiment of the application.
  • FIG. 9 is a schematic diagram of an interface displayed by a first application program provided by an embodiment of this application.
  • FIG. 10 is a schematic diagram of a function selection interface provided by an embodiment of this application.
  • FIG. 11 is a flowchart of a method for loading a function package provided by another embodiment of the application.
  • FIG. 12 is a flowchart of a method for loading a function package provided by still another embodiment of the application.
  • FIG. 13 is a flowchart of a method for loading a function package provided by another embodiment of this application.
  • FIG. 14 is a flowchart of another embodiment of a method for loading a function package of this application.
  • 15 is a schematic structural diagram of an electronic device provided by another embodiment of this application.
  • FIG. 16 is a schematic structural diagram of a server provided by another embodiment of this application.
  • the App installation package becomes larger and larger, and the user has to download the complete installation package when using a certain function of the App, which leads to a waste of user traffic, and the user downloads and installs the App
  • the waiting time is longer, and the App installation package takes up more storage space.
  • the App Bundle is a step further than the above solution. It not only solves the problems of redundant resources and redundant lib libraries, but also proposes a subcontracting solution that allows App developers to follow
  • the function module splits the App into multiple sub-function packages. When users download and install the App, they can only install some high-frequency function packages, specific lib libraries and resource packages, thereby reducing the data size of the first download of the App and reducing the waste of user traffic. Other function packages can be downloaded and installed according to user needs.
  • Step 1 The developer creates a project in Android Studio and references the dependency package (com.google.android.play:core:xxx) of Google Mobile Service (GMS), and determines to dynamically install and download the sub-module development
  • the function module Foo is written in the main function module Base to download the logic code of the function module Foo, which can trigger the download in the user interface C; then, the above logic code is compiled to generate the bundle.aab file.
  • Step 2 The developer uploads the bundle.aab file to the Google Play application market.
  • Figure 1 is a schematic diagram of a file uploaded by a developer in the existing related technology. As shown in Figure 1, the file uploaded by the developer is bundle.aab.
  • the application contains two functional modules, Base and Foo. Foo needs to be dynamically loaded on demand Module.
  • the Play application market uses tools to split the application into multiple Android application packages (Apk), where the execution logic code of Base is in base_master.apk, and the execution logic code of Foo is in foo_master.apk.
  • Step 3 The user downloads the application in the Play Store and runs the main function Base, and triggers the download of the code of the package foo_master.apk corresponding to the function module Foo in the user interface C in the Base.
  • the logic of downloading and installing Foo is done together on the client side of GMS and the Play Store.
  • an embodiment of the present application provides a method for loading a function package, which can realize that the electronic device downloads the function package according to the description information of the function required by the currently running application program.
  • the method for loading function packages provided by the embodiments of the present application can be applied to electronic devices, where the above-mentioned electronic devices can be smart phones, tablet computers, wearable devices, in-vehicle devices, augmented reality (AR)/virtual reality (virtual reality).
  • AR augmented reality
  • VR virtual reality
  • laptops laptops
  • ultra-mobile personal computers UMPC
  • netbooks personal digital assistants
  • PDAs personal digital assistants
  • FIG. 2 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, and a universal serial bus (universal serial bus).
  • serial bus universal serial bus
  • USB universal serial bus
  • charging management module 140 power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, Earphone interface 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, subscriber identification module (SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the different processing units may be independent devices or integrated in one or more processors.
  • the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may include one or more interfaces.
  • the interface can include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter (universal asynchronous transmitter) interface.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the I2C interface is a bidirectional synchronous serial bus, which includes a serial data line (SDA) and a serial clock line (DCL).
  • the processor 110 may include multiple sets of I2C buses.
  • the processor 110 may couple the touch sensor 180K, charger, flash, camera 193, etc., respectively through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the electronic device 100.
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices.
  • the MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 100.
  • the processor 110 and the display screen 194 communicate through a DSI interface to realize the display function of the electronic device 100.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect earphones and play audio through earphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely a schematic description, and does not constitute a structural limitation of the electronic device 100.
  • the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device 100 through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110.
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
  • the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like.
  • the mobile communication module 150 can receive electromagnetic waves by the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 may also receive a signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves to radiate through the antenna 2.
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), and the quasi-zenith satellite system (quasi). -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, connected to the display 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations and is used for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, and the like.
  • the display screen 194 includes a display panel.
  • the display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active-matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • the electronic device 100 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transfers the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
  • ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and is projected to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include one or N cameras 193, and N is a positive integer greater than one.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • MPEG2 MPEG2, MPEG3, MPEG4, and so on.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the NPU can realize applications such as intelligent cognition of the electronic device 100, such as image recognition, face recognition, voice recognition, text understanding, and so on.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, at least one application program (such as a sound playback function, an image playback function, etc.) required by at least one function.
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
  • the speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also called a "handset" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
  • the earphone interface 170D is used to connect wired earphones.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be provided on the display screen 194.
  • the capacitive pressure sensor may include at least two parallel plates with conductive materials.
  • the electronic device 100 determines the intensity of the pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations that act on the same touch position but have different touch operation intensities can correspond to different operation instructions. For example: when a touch operation whose intensity is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the movement posture of the electronic device 100.
  • the angular velocity of the electronic device 100 around three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip holster.
  • the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and be used in applications such as horizontal and vertical screen switching, pedometers and so on.
  • the electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device 100 emits infrared light to the outside through the light emitting diode.
  • the electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100.
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch device”.
  • the touch sensor 180K may be provided on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can obtain the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal.
  • the bone conduction sensor 180M may also be provided in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 180M, and realize the voice function.
  • the application processor may analyze the heart rate information based on the blood pressure beating signal obtained by the bone conduction sensor 180M, and realize the heart rate detection function.
  • the button 190 includes a power-on button, a volume button, and so on.
  • the button 190 may be a mechanical button. It can also be a touch button.
  • the electronic device 100 may receive key input, and generate key signal input related to user settings and function control of the electronic device 100.
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
  • touch operations that act on different applications can correspond to different vibration feedback effects.
  • Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminding, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 is used to connect to the SIM card.
  • the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
  • the electronic device 100 may support 1 or N SIM card interfaces, and N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
  • the same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards can be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 can also be compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication.
  • the electronic device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of the present invention takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 by way of example.
  • FIG. 3 is a block diagram of the software structure of the electronic device 100 provided by an embodiment of the application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface.
  • the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
  • the window manager is used to manage window programs.
  • the window manager can obtain the size of the display, determine whether there is a status bar, lock the screen, take a screenshot, and so on.
  • the content provider is used to store and retrieve data and make these data accessible to applications.
  • the data may include video, image, audio, phone calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, and so on.
  • the view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
  • the phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call status (including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify download completion, message reminders, and so on.
  • the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or a scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • prompt text information in the status bar sound a prompt sound, electronic device vibration, flashing indicator light, etc.
  • Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to realize 3D graphics drawing, image rendering, synthesis, and layer processing.
  • the 2D graphics engine is a graphics engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • the implementation of the method for loading the function package provided by the embodiments of the present application not only involves the electronic device side, but also involves the server side and the App development side.
  • the above-mentioned server may be a cloud server, for example, a server in the cloud application market, and the embodiment of the present application does not impose any restriction on the specific type of the server.
  • FIG. 4 is a schematic structural diagram of a server provided by an embodiment of this application.
  • the server 400 includes a processor 410 and a communication interface 420.
  • the server 400 may further include a memory 430.
  • the processor 410, the communication interface 420, and the memory 430 can communicate with each other through an internal connection path to transfer control and/or data signals.
  • the memory 430 is used to store computer programs, and the processor 410 is used to download from the memory 430 Call and run the computer program.
  • the above-mentioned processor 410 and the memory 430 may be integrated into a processing device, and more commonly, they are components independent of each other.
  • the processor 410 is configured to execute program codes stored in the memory 430.
  • the memory 430 may also be integrated in the processor 410, or independent of the processor 410.
  • the server 400 may further include one or more of the input unit 460 and the display unit 470.
  • the aforementioned server 400 may further include a power supply 450 for providing power to various devices or circuits in the server 400.
  • processor 410 in the server 400 shown in FIG. 4 may be a system-on-chip SOC, and the processor 410 may include a central processing unit (CPU), and may further include other types of processors, for example :Image processor (graphics processing unit, GPU), etc.
  • CPU central processing unit
  • GPU graphics processing unit
  • FIG. 5 is a schematic diagram of adding a matching identifier to a function package according to an embodiment of the application.
  • an App developer adds a matching identifier to a function package when developing an application.
  • the matching identifier of each function package is used for Indicates the type of function provided by the corresponding function package.
  • the matching identifier of function package 1 is used to indicate the type of function provided by function package 1
  • the matching identifier of function package 2 is used to indicate the type of function provided by function package 2.
  • the matching identifier of each function package may include the function category code of the function provided by the corresponding function package; the above function category code is set according to the predetermined function classification code; of course, the above matching identifier may also include Corresponding to one or more of the function description, manufacturer information, and version information of the function package, this embodiment does not limit the information included in the above-mentioned matching identifier.
  • classification code of the function can be as follows:
  • xxx can include subcategories: 01: xx; 02: xx;
  • the App developer uploads the full application package to the cloud application market.
  • the server 400 of the cloud application market can unpack the above-mentioned full application package, and then analyze the function package obtained by the unpacking to obtain the matching identifier of each function package.
  • the matching identifier of each function package is recorded in the function package matching table, and at the same time, the dependent package of each function package is recorded in the function package matching table.
  • FIG. 6 FIG. Schematic diagram of unpacking the application package.
  • the function package matching table recorded by the server 400 may be as follows:
  • manufacturer 1 belonging to application package 1, quality rate (evaluation index): xx%, function description: xx, download address: url1;
  • Manufacturer 4 belonging to application package 3, quality rate (evaluation index): xx%, function description: xx, download address: url4;
  • the download address includes the download address of each function package and the dependent package of the function package.
  • the server 400 may implement the aforementioned unpacking, parsing, and recording operations through the processor 410.
  • Figure 7 is a schematic diagram of an electronic device search function package provided by an embodiment of the application.
  • the first App in the electronic device 100 is running. If the electronic device 100 detects that the user is in the interface displayed by the first App First operation information, the electronic device 100 may display the function selection interface in response to the above-mentioned first operation information, and then the electronic device 100 detects that the user selects the second operation information of the function F, and in response to the second operation information, obtains the function F Descriptive information, where the function F may be a function developed by the developer of the running first App but not currently downloaded, or may be a function included in other apps installed on the electronic device 100.
  • function F the description information of function F can be as follows:
  • the first App sends the description information of the function F through the universal interface I.
  • the resident background service of the electronic device 100 After the resident background service of the electronic device 100 receives the description information, it searches for the matching identifier and the description of the function F in the function package installed in the electronic device 100 If the information matches the function package, if the local match is not successful, the electronic device 100 sends the description information of the function F to the server 400 of the cloud application market, and the server 400 uses the same method to match, and after the match is successful, the electronic device 100 Send download information.
  • the download information includes the download address of the function package corresponding to function F and its dependent package.
  • the background resident service in the electronic device 100 corresponds to the download information and the function package installed by the electronic device 100
  • the download function F corresponds to The function package and its dependent package, and load the function package corresponding to function F.
  • searching for a function package with a matching identifier that matches the description information of the function F may be: in the installed function list of the electronic device 100, searching for the matching identifier and the function F The function package with matching description information; wherein, the entry corresponding to the application program installed by the electronic device 100 is stored in the above installed function list, and the above entry includes the matching identifier of the function package installed by the above application program.
  • the installed function list of the electronic device 100 may be as shown in Table 1.
  • the download information sent by the server 400 includes the application to which the function package corresponding to function F belongs.
  • the download information sent by the server 400 includes the application to which the function package corresponding to function F belongs.
  • obtaining the entry corresponding to the application to which the loaded function package belongs may be: if the installed function list of the electronic device 100 exists with the loaded function package The entry corresponding to the application belongs to, you can directly add the matching identifier of the loaded function package to the above entry; if the installed function list of the electronic device 100 does not exist in the list of installed functions corresponding to the application to which the loaded function package belongs Entries, it is necessary to create an entry corresponding to the application to which the loaded function package belongs in the installed function list of the electronic device 100, and add the matching identifier of the loaded function package to the above entry.
  • the server 400 finds that the function package with the matching identifier 000203 belongs to application package 3, and the application package 3 becomes the third App after being installed on the electronic device 100, so After the electronic device 100 downloads the function package corresponding to function F and its dependent packages, and loads the function package corresponding to function F, it needs to obtain the entry corresponding to the third App from the installed function list of the electronic device 100, and Add the matching identifier 000203 to the obtained entry, as shown in Table 2.
  • the electronic device 100 can realize the operation of detecting the first operation information and the second operation information through the processor 110 and the touch sensor 180K; the processor 110 and the display screen 194 can realize the display interface Operation; through the processor 110, the antenna 1, and the mobile communication module 150, and/or, through the processor 110, the antenna 2, and the wireless communication module 160, the sending and receiving of information with the server 400 is realized.
  • the server 400 may send and receive information with the electronic device 100 through the processor 410 and the communication interface 420.
  • an embodiment of the present application provides a method for loading a function package.
  • the implementation of the method involves the side of the electronic device 100 and the server 400 side.
  • the flowchart of the loading method as shown in Fig. 8, the loading method of the above-mentioned function package may include:
  • Step 801 The electronic device detects the first operation information of the user in the interface displayed by the first application program currently running.
  • the electronic device 100 may implement the operation of detecting the first operation information through the processor 110 and the touch sensor 180K.
  • the above-mentioned first operation information may be an operation of clicking, double-clicking, long-pressing, or drawing a specific graphic by the user in the interface displayed by the first application program, or the above-mentioned first operation information may be an interface displayed by the user on the first application program
  • this embodiment does not limit the operation form of the first operation information.
  • the above-mentioned first operation information is an example of a user's click operation on a specific icon in the interface displayed by the first application program.
  • FIG. 9 is a display of the first application program provided by an embodiment of the application. A schematic diagram of the interface.
  • the first operation information is a click operation on the icon 91.
  • Step 802 In response to the above-mentioned first operation information, a function selection interface is displayed.
  • the electronic device 100 may implement the operation of displaying the function selection interface through the processor 110 and the display screen 194.
  • FIG. 10 is a schematic diagram of a function selection interface provided by an embodiment of this application.
  • interface 1001 is a function selection interface.
  • Step 803 It is detected that the above-mentioned user selects the second operation information of the first function.
  • the electronic device 100 can implement the operation of detecting the second operation information through the processor 110 and the touch sensor 180K.
  • the above-mentioned second operation information may be a user's click, double-click, or long-press operation on the function icon in the function selection interface.
  • This embodiment does not limit the operation form of the second operation information, and the second operation information is used in this embodiment as The user's click operation of the function icon is described as an example.
  • Step 804 In response to the foregoing second operation information, obtain description information of the first function.
  • the electronic device 100 may implement the operation of obtaining description information through the processor 110.
  • the processor 110 may obtain the description information of the function corresponding to the above function icon from the local data of the first application program according to the above function icon.
  • step 805 among the function packages that have been installed in the above electronic device, search for a function package whose matching identifier matches the above description information.
  • the process of searching for the function package by the electronic device 100 may be as shown in FIG. 7, which will not be repeated here.
  • the electronic device 100 may implement the above-mentioned search operation through the processor 110.
  • Step 806 When it is not found, the above description information is sent to the server.
  • Step 807 Receive download information sent by the server.
  • the download information includes the information of the function package and the information of the dependency package of the function package.
  • the function package includes a function package whose matching identifier matches the description information.
  • the information of the above-mentioned function package may include the matching identifier and download address of the above-mentioned function package.
  • the information of the above-mentioned function package may also include other information, such as version information and/or manufacturer information of the function package. This is not limited.
  • the information of the dependent package of the above-mentioned function package may include the matching identifier and download address of the dependent package of the above-mentioned function package.
  • Step 808 download the above-mentioned function package and the dependency package of the above-mentioned function package, silently install and load the above-mentioned function package.
  • silent installation includes installation in the background without prompts or user operations to disturb the user.
  • the user experience is better.
  • the silent installation in the embodiments of this application can also be replaced with a non-silent installation method. , Including the ability to prompt the user for installation progress or installation results during installation, or to request installation confirmation instructions from the user.
  • the electronic device 100 can send and receive information with the server 400 through the processor 110, the antenna 1, and the mobile communication module 150, and/or through the processor 110, the antenna 2, and the wireless communication module 160.
  • the function selection interface is displayed; the user is detected After selecting the second operation information of the first function, in response to the second operation information, obtain the description information of the first function, and then search for the function package whose matching identifier matches the description information among the function packages installed in the electronic device 100 When it is not found, the description information is sent to the server, and the download information sent by the server is received.
  • the download information includes the information of the function package whose matching identifier matches the description information and the dependent package information of the function package.
  • the electronic device 100 downloads the above-mentioned function package and the dependency package of the above-mentioned function package, silently installs and loads the above-mentioned function package, so that the electronic device 100 can download the function package according to the description information of the functions required by the currently running application.
  • the function package occupies a small storage space, so the waiting time for the user to download and install the function package can be shortened, and the storage space of the electronic device 100 can be saved.
  • FIG. 11 is a flowchart of a method for loading a function package provided by another embodiment of this application. As shown in FIG. 11, in the embodiment shown in FIG. 8 of this application, step 808 may include:
  • Step 1101 Determine the dependent package to be downloaded based on the download information and the function package installed on the electronic device.
  • the electronic device 100 may obtain a dependent package that is not installed in the download information according to the matching identifier of the dependent package in the download information and the function package that the electronic device 100 has installed.
  • the uninstalled dependent package is the dependent package to be downloaded.
  • the electronic device 100 may implement the operation of determining the dependent package to be downloaded through the processor 110.
  • Step 1102 download the above-mentioned function package and the above-mentioned dependent package to be downloaded, silently install and load the above-mentioned function package.
  • the electronic device 100 can determine the dependency package to be downloaded based on the download information and the function package that the electronic device has installed, and then only need to download the function package and the dependency package to be downloaded, install and load the function package silently. , Thereby further reducing the installation package to be downloaded by the electronic device 100, further shortening the waiting time of the user, and saving the storage space of the electronic device.
  • silent installation includes installation in the background without prompt or User operations disturb the user, and the user experience is better. It is understandable that the silent installation in the embodiments of this application can also be replaced with a non-silent installation method, including the ability to prompt the user of the installation progress or installation result during the installation, or to inform the user Request installation confirmation instructions.
  • Figure 12 is a flowchart of a method for loading a function package according to another embodiment of the application.
  • the above description information may include: the function category code of the function corresponding to the above function icon, and the above matching identifier may include: the above function
  • the function category code of the function provided by the package; as shown in Figure 12, step 805 may include:
  • Step 1201 among the function packages that have been installed in the electronic device, search according to the function category code in the above description information, and obtain a function package whose function category code in the matching identifier matches the function category code in the above description information.
  • the electronic device 100 can search in the installed function package according to 000102, and obtain the function category code in the matching identifier as The feature pack of 000102.
  • step 1201 it may further include:
  • Step 1202 If a function package with a matching identifier that matches the description information is found among the function packages that have been installed in the above electronic device, load the above-mentioned matching function package in the first application program, and the above-mentioned matching function package is loaded into the first application program. It is a function package installed by the second application program, and the second application program is installed in the above-mentioned electronic device.
  • the function package whose matching identifier found by the electronic device 100 matches the above description information may be a function package installed by the second application program, and it is not restricted that the function package found must be a function in the first application program. After finding the matching function package, you can directly load the matching function package in the first application without jumping to the second application.
  • the above description information may also include the manufacturer information and/or version information of the first application; the above matching identifier may also include the manufacturer information and/or version information of the above function package; in this way, in the first application Before loading the matching function package, if there are at least two matching function packages found in the installed function packages of the electronic device, then the above-mentioned matching function package is determined according to the above-mentioned manufacturer information and/or version information The matching degree with the above-mentioned first application program; then the function package with the highest matching degree is loaded in the first application program.
  • the electronic device 100 finds the function packages with the function category code 000102 in the two matching identifiers in the installed function packages according to 000102, which are respectively function packages. 1 and feature pack 2.
  • the description information includes the manufacturer information and version information of the first application.
  • the manufacturer information is manufacturer 1, and the version information is 1.0
  • the matching identifier of function package 1 is manufacturer 2 and version information 1.0.
  • the manufacturer information is manufacturer 1, and the version information is 2.0.
  • the electronic device 100 can obtain the matching degree 1 between function package 1 and the first application according to the above manufacturer information and version information, and obtain function package 2 and The matching degree 2 of the first application program, assuming that the matching degree 1 is 85% and the matching degree 2 is 90%, then the electronic device 100 loads the function package 2 in the first application program.
  • the electronic device 100 may implement the operations of step 1201 and step 1202 through the processor 110.
  • FIG. 13 is a flowchart of a method for loading a function package according to another embodiment of the application. As shown in FIG. 13, the method for loading a function package may include:
  • Step 1301 The server receives the description information sent by the electronic device.
  • the description information is the description information of the first function selected by the user by the electronic device. In the function package that the electronic device has installed, no matching identifier is found that matches the description information. Sent after the matched function package.
  • Step 1302 in the function package matching table, search for the information of the function package whose matching identifier matches the above description information.
  • the matching identifier may include: the function category code of the function provided by the function package; the application package to which the function package belongs is recorded in the function package matching table, and the matching identifier of the function package, the information of the function package, and the information of the function package Dependent package information; the above description information can include: the function category code of the function corresponding to the above function icon; in this way, in the function package matching table, the information of the function package whose matching identifier matches the above description information can be: In the package matching table, search is performed according to the function category code in the above description information, and a function package whose function category code in the matching identifier matches the function category code in the above description information is obtained.
  • Step 1303 Send download information to the electronic device, where the download information includes the information about the function package and the dependency package of the function package, so that the electronic device downloads the function package and the dependency package of the function package according to the download information. .
  • manufacturer 1 belonging to application package 1, quality rate (evaluation index): xx%, function description: xx, download address: url1;
  • Manufacturer 4 belonging to application package 3, quality rate (evaluation index): xx%, function description: xx, download address: url4;
  • the download address includes the download address of each function package and the dependent package of the function package.
  • the server 400 can search in the function package matching table according to the function category code 000201 in the above description information, and obtain the function package whose function category code in the matching identifier matches 000201. Then, the download address url3 of the manufacturer 3 is sent to the electronic device 100.
  • the url3 includes the function package whose function category code is 000201 in the matching identifier and the download address of the dependent package of the function package.
  • the description information may also include: manufacturer information and/or version information of the first application; the matching identifier may also include manufacturer information and/or version information of the function package; in this way, after step 1302, If in the function package matching table, the found matching function packages include at least two, then according to the manufacturer information and/or version information, the degree of matching between the matching function package and the first application is determined. In this way, the download information sent by the server 400 to the electronic device 100 includes the information of the function package with the highest matching degree and the package-dependent information of the above-mentioned function package with the highest matching degree.
  • the description information sent by the electronic device 100 is:
  • the server 400 can search in the function package matching table according to the function category code 000102 in the above description information, and obtain the function package whose function category code in the matching identifier matches 000102.
  • the description information includes the manufacturer information of the first application, the manufacturer information is manufacturer 1, and the manufacturer information in the matching identifier of function package 1 is manufacturer 1, and the manufacturer information in the matching identifier of function package 2 is manufacturer 1, then
  • the electronic device 100 can obtain, according to the above manufacturer information, that the matching degree between the function package 1 and the first application is 100%, and the matching degree between the function package 2 and the first application is 90%, and the server 400 downloads the manufacturer 1’s
  • the address url1 is sent to the electronic device 100, and the url1 includes the download addresses of the function package 1 whose function category code is 000102 in the matching identifier and the dependent package of the function package 1.
  • the function package whose matching identifier matches the above description information found by the server 400 is a function package with exactly the same function category code.
  • the function package whose matching identifier matches the above description information may also include the function category code. Feature packages that are identical, but belong to the same functional category.
  • the description information sent by the electronic device 100 is:
  • the server 400 can search in the function package matching table according to the function category code 000202 in the description information. If the function package whose function category code is 000202 in the matching identifier is not found, then the server 400 can find the same as 000202 The function package in the function category (0002). At this time, the server 400 finds two function packages, and the function category codes in the matching identifier are 000201 and 000203 respectively. Then, the server 400 can, according to the above-mentioned manufacturer information and/or version information, Determine the degree of matching between the function package with the function category code of 000201 and the first application, and the degree of matching between the function package with the function category code of 000203 and the first application.
  • the server 400 sends the download address url4 of the manufacturer 4 to the electronic device 100.
  • the url4 includes the function package whose function category code is 000203 in the matching identifier and the download address of the dependent package of the function package.
  • the server 400 may implement the operations of step 1301 and step 1303 through the processor 410 and the communication interface 420, and implement the operation of step 1302 through the processor 410.
  • the server 400 After the server 400 receives the description information sent by the electronic device 100, it searches the function package matching table for the information of the function package whose matching identifier matches the description information, and then sends the download to the electronic device 100.
  • Information the download information includes the information of the matching function package and the information of the dependent package of the matching function package, so that the electronic device 100 can download the matching function according to the download information and the function package that the electronic device 100 has installed
  • the package and the dependent package of the matching function package enable the electronic device 100 to download the function package according to the description information of the function required by the currently running application. Since the above function package occupies a small storage space, the user download and installation can be shortened The waiting time of the function package saves the storage space of the electronic device 100.
  • Fig. 14 is a flowchart of another embodiment of a method for loading a function package of this application. As shown in Fig. 14, in the embodiment shown in Fig. 13 of this application, before step 1302, it may further include:
  • Step 1401 Receive the application package uploaded by the developer
  • Step 1402 Split the above-mentioned application package to obtain the function packages included in the above-mentioned application package.
  • Step 1403 Analyze each function package included in the above-mentioned application package, and obtain the matching identifier of the dependent package of the above-mentioned function package and the matching identifier of the above-mentioned function package.
  • Step 1404 Record in the function package matching table the application package to which the function package belongs, and the matching identifier of the function package and the matching identifier of the dependent package of the function package.
  • the process in which the server 400 splits the application package uploaded by the developer may be as shown in FIG. 6, which will not be repeated here.
  • an electronic device in order to implement the above-mentioned functions, includes hardware and/or software modules corresponding to each function.
  • this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Those skilled in the art can use different methods for each specific application in combination with the embodiments to implement the described functions, but such implementation should not be considered as going beyond the scope of the present application.
  • the electronic device may be divided into functional modules according to the foregoing method embodiments.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • FIG. 15 is a schematic structural diagram of an electronic device provided by another embodiment of the application. In the case of dividing each functional module corresponding to each function, FIG. 15 shows a possible composition of the electronic device 1500 involved in the foregoing embodiment.
  • the electronic device 1500 may include: a receiving unit 1501, a processing unit 1502, and a sending unit 1503;
  • the receiving unit 1501 can be used to support the electronic device 1500 to perform step 808, step 809, step 1102, etc., and/or used in other processes of the technical solutions described in the embodiments of the present application;
  • the processing unit 1502 may be used to support the electronic device 1500 to perform steps 801 to 806, steps 1101, 1201, and 1202, etc., and/or other processes used in the technical solutions described in the embodiments of the present application;
  • the sending unit 1503 may be used to support the electronic device 1500 to execute step 807, etc., and/or used in other processes of the technical solutions described in the embodiments of the present application.
  • the electronic device 1500 provided in this embodiment is used to execute the above-mentioned method for loading the function package, and therefore can achieve the same effect as the above-mentioned method.
  • the electronic device 1500 may correspond to the electronic device 100 shown in FIG. 1.
  • the functions of the receiving unit 1501 and the sending unit 1503 may be implemented by the processor 110, the antenna 1 and the mobile communication module 150 in the electronic device 100 shown in FIG. 1, and/or, by the processor 110, the antenna 2 and the wireless communication module 160 Implementation;
  • the function of the processing unit 1502 can be implemented by the processor 110 and the touch sensor 180K in the electronic device 100 shown in FIG. 1.
  • the electronic device 1500 may include a processing module, a storage module, and a communication module.
  • the processing module can be used to control and manage the actions of the electronic device 1500, for example, can be used to support the electronic device 1500 to execute the steps performed by the receiving unit 1501, the processing unit 1502, and the sending unit 1503.
  • the storage module can be used to support the electronic device 1500 to store program codes and data.
  • the communication module can be used to support the communication between the electronic device 1500 and other devices.
  • the processing module may be a processor or a controller, which may implement or execute various exemplary logical blocks, modules, and circuits described in conjunction with the disclosure of this application.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on.
  • the storage module may be a memory.
  • the communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and/or a Wi-Fi chip.
  • the electronic device 1500 involved in this embodiment may be a device having the structure shown in FIG. 1.
  • the server includes hardware and/or software modules corresponding to each function.
  • this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Those skilled in the art can use different methods for each specific application in combination with the embodiments to implement the described functions, but such implementation should not be considered as going beyond the scope of the present application.
  • the server may be divided into functional modules according to the foregoing method embodiments.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • FIG. 16 is a schematic structural diagram of a server provided by another embodiment of the application. In the case of dividing each functional module corresponding to each function, FIG. 16 shows a schematic diagram of a possible composition of the server 1600 involved in the foregoing embodiment. As shown in FIG. 16, the server 1600 may include: a receiving unit 1601, a processing unit 1602, and a sending unit 1603;
  • the receiving unit 1601 may be used to support the server 1600 to perform step 1301 and step 1401, etc., and/or used in other processes of the technical solutions described in the embodiments of the present application;
  • the processing unit 1602 may be used to support the server 1600 to perform step 1302, step 1402, step 1403, step 1404, etc., and/or other processes used in the technical solutions described in the embodiments of the present application;
  • the sending unit 1603 may be used to support the server 1600 to perform step 1303, etc., and/or used in other processes of the technical solutions described in the embodiments of the present application.
  • the server 1600 provided in this embodiment is used to execute the above-mentioned method for loading the function package, so the same effect as the above-mentioned method can be achieved.
  • the server 1600 may correspond to the server 400 shown in FIG. 4.
  • the server 1600 may include a processing module, a storage module, and a communication module.
  • the processing module can be used to control and manage the actions of the server 1600. For example, it can be used to support the server 1600 to execute the steps performed by the receiving unit 1601, the processing unit 1602, and the sending unit 1603.
  • the storage module can be used to support the server 1600 to store program codes and data.
  • the communication module can be used to support the communication between the server 1600 and other devices.
  • the processing module may be a processor or a controller, which may implement or execute various exemplary logical blocks, modules, and circuits described in conjunction with the disclosure of this application.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on.
  • the storage module may be a memory.
  • the communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and/or a Wi-Fi chip.
  • the server 1600 involved in this embodiment may be a device having the structure shown in FIG. 4.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when it runs on a computer, the computer executes the functions provided by the embodiments shown in Figs. 8 to 12 of the present application. method.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when it runs on a computer, the computer executes the functions provided by the embodiments shown in Figs. 13 to 14 of the present application. method.
  • the embodiments of the present application also provide a computer program product.
  • the computer program product includes a computer program that, when running on a computer, causes the computer to execute the method provided by the embodiments shown in FIG. 8 to FIG. 12 of the present application.
  • the embodiments of the present application also provide a computer program product, which includes a computer program, which when running on a computer, causes the computer to execute the method provided by the embodiments shown in FIG. 13 to FIG. 14 of the present application.
  • At least one refers to one or more
  • multiple refers to two or more.
  • And/or describes the association relationship of the associated objects, indicating that there can be three types of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. Among them, A and B can be singular or plural.
  • the character “/” generally indicates that the associated objects before and after are in an “or” relationship.
  • the following at least one item” and similar expressions refer to any combination of these items, including any combination of single items or plural items.
  • At least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single, or There can be more than one.
  • any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program code .

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

Provided are a function pack loading method and apparatus, and a server and an electronic device. In the function pack loading method, after an electronic device detects first operation information, of a user, in an interface displayed by a currently running first application program, in response to the first operation information, displaying a function selection interface; after detecting that the user selects second operation information of a first function, in response to the second operation information, acquiring description information of the first function; then searching installed function packs of the electronic device for a function pack a matching identifier of which matches the description information; when the function pack is not found, sending the description information to a server; receiving download information sent by the server, wherein the download information comprises information of the function pack the matching identifier of which matches the description information and information of a dependent pack of the function pack; and finally, the electronic device downloading the function pack and the dependent pack of the function pack, and silently installing and loading the function pack.

Description

功能包的加载方法、装置、服务器和电子设备Function package loading method, device, server and electronic equipment
本申请要求于2020年5月29日提交中国专利局、申请号为202010477876.0、发明名称为“功能包的加载方法、装置、服务器和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on May 29, 2020, the application number is 202010477876.0, and the invention title is "Functional package loading method, device, server and electronic equipment", the entire content of which is incorporated by reference Incorporated in this application.
技术领域Technical field
本申请实施例涉及智能终端技术领域,特别涉及一种功能包的加载方法、装置、服务器和电子设备。The embodiments of the present application relate to the technical field of smart terminals, and in particular to a method, device, server, and electronic equipment for loading a function package.
背景技术Background technique
随着电子设备(例如:智能手机或平板电脑)处理能力的增强,为了提供更多的功能,现在的应用程序(application,App)设计得越来越复杂,这就导致App的安装包越来越大;同时为了应对设备的多样性(中央处理器(central processing unit,CPU)平台不同和/或屏幕分辨率不同),App为了更好的兼容将冗余的lib库(x86、arm32和/或arm64等)文件和/或资源文件等都打包在一个应用安装包内。用户在使用App的某个功能时不得不下载完整的安装包,多余的功能、冗余的lib库和/或资源文件会导致用户流量的浪费,并且用户下载和安装App所需等待的时长更长,App的安装包占用的存储空间也更多。With the enhancement of the processing power of electronic devices (such as smart phones or tablet computers), in order to provide more functions, the design of applications (App) is becoming more and more complicated, which leads to more and more App installation packages. At the same time, in order to cope with the diversity of equipment (central processing unit (CPU) platforms and/or different screen resolutions), the App will use redundant lib libraries (x86, arm32 and/ (Or arm64, etc.) files and/or resource files are packaged in an application installation package. The user has to download a complete installation package when using a certain function of the App, redundant functions, redundant lib libraries and/or resource files will cause a waste of user traffic, and the waiting time for users to download and install the App is longer Long, the App installation package takes up more storage space.
针对App安装包中冗余的资源文件,现有相关技术提供了资源按需下载(on demand resource download)方案,即根据运行设备的具体情况只下载在该设备运行App所需的资源。Regarding the redundant resource files in the App installation package, the existing related technology provides an on-demand resource download solution, that is, according to the specific conditions of the operating device, only the resources required to run the App on the device are downloaded.
发明内容Summary of the invention
本申请实施例提供了一种功能包的加载方法、装置、服务器和电子设备,本申请实施例还提供一种计算机可读存储介质,以实现电子设备根据当前运行的应用程序所需功能的描述信息下载功能包。The embodiment of the application provides a method, device, server, and electronic device for loading a function package. The embodiment of the application also provides a computer-readable storage medium to implement the description of the functions required by the electronic device according to the currently running application. Information download function package.
第一方面,本申请提供了一种功能包的加载方法,包括:电子设备检测到用户在当前运行的第一应用程序所展示界面中的第一操作信息;其中,上述第一操作信息可以为用户在第一应用程序所展示界面中的点击、双击、长按或描绘特定图形的操作,或者上述第一操作信息可以为用户对第一应用程序所展示界面中特定图标的点击、双击或长按操作,本实施例对第一操作信息的操作形式不作限定。In the first aspect, the present application provides a method for loading a function package, including: the electronic device detects the first operation information of the user in the interface displayed by the first application program currently running; wherein, the above-mentioned first operation information may be The user's click, double-click, long-press or draw a specific graphic in the interface displayed by the first application, or the above-mentioned first operation information may be the user's click, double-click or long-click on a specific icon in the interface displayed by the first application. In terms of operation, this embodiment does not limit the operation form of the first operation information.
然后,电子设备响应于上述第一操作信息,展示功能选择界面。Then, the electronic device displays the function selection interface in response to the above-mentioned first operation information.
接下来,电子设备检测到上述用户选择第一功能的第二操作信息,其中,上述第二操作信息可以为用户在功能选择界面中的功能图标的点击、双击或长按操作,本实施例对第二操作信息的操作形式不作限定,本实施例以第二操作信息为用户对功能图标的点击操作为例进行说明。Next, the electronic device detects the second operation information for the user to select the first function, where the second operation information may be the user's click, double-click, or long-press operation on the function icon in the function selection interface. The operation form of the second operation information is not limited. In this embodiment, the second operation information is the user's clicking operation of the function icon as an example for description.
然后,电子设备响应于上述第二操作信息,获取第一功能的描述信息;在具体实现时,电子设备可以从第一应用程序的本地数据中,获取上述用户选择的第一功能的描述信息。Then, the electronic device obtains the description information of the first function in response to the foregoing second operation information; in specific implementation, the electronic device may obtain the description information of the first function selected by the user from the local data of the first application.
最后,电子设备在上述电子设备已安装的功能包中,查找匹配标识与上述描述信息相匹配的功能包。当未查找到时,将上述描述信息发送给服务器,并接收上述服务器发送的下载信息,上述下载信息中包括功能包的信息和上述功能包的依赖包的信息,上述功能包包括匹配标识与上述描述信息相匹配的功能包。电子设备下载上述功能包和上述功能包的依赖包,静默安装并加载上述功能包。Finally, the electronic device searches for a function package whose matching identifier matches the description information among the function packages that have been installed on the above-mentioned electronic device. When it is not found, the description information is sent to the server, and the download information sent by the server is received. The download information includes the information of the function package and the information of the dependency package of the function package. The function package includes the matching identifier and the above The function package that matches the description information. The electronic device downloads the above-mentioned function package and the dependency package of the above-mentioned function package, silently installs and loads the above-mentioned function package.
其中,上述功能包的信息可以包括上述功能包的匹配标识和下载地址,当然上述功能包的信息中还可以包括其他信息,例如:功能包的版本信息和/或厂商信息等,本实施例对此不作限定。Wherein, the information of the above-mentioned function package may include the matching identifier and download address of the above-mentioned function package. Of course, the information of the above-mentioned function package may also include other information, such as version information and/or manufacturer information of the function package. This is not limited.
上述功能包的依赖包的信息可以包括上述功能包的依赖包的匹配标识和下载地址。The information of the dependent package of the above-mentioned function package may include the matching identifier and download address of the dependent package of the above-mentioned function package.
上述功能包的加载方法中,在电子设备检测到用户在当前运行的第一应用程序所展示界面中的第一操作信息之后,响应于上述第一操作信息,展示功能选择界面;检测到用户选择第一功能的第二操作信息之后,响应于第二操作信息,获取第一功能的描述信息,然后在上述电子设备已安装的功能包中,查找匹配标识与上述描述信息相匹配的功能包,当未查找到时,将上述描述信息发送给服务器,并接收上述服务器发送的下载信息,上述下载信息中包括匹配标识与上述描述信息相匹配的功能包的信息和上述功能包的依赖包的信息,最后电子设备下载上述功能包和上述功能包的依赖包,静默安装并加载上述功能包,从而可以实现电子设备根据当前运行的应用程序所需功能的描述信息下载功能包,由于上述功能包占用的存储空间较小,因此可以缩短用户下载和安装功能包的等待时长,节省电子设备的存储空间。In the above method for loading the function package, after the electronic device detects the user's first operation information in the interface displayed by the currently running first application program, in response to the above first operation information, the function selection interface is displayed; the user selection is detected After the second operation information of the first function, in response to the second operation information, the description information of the first function is obtained, and then, among the function packages installed in the above electronic device, the function package whose matching identifier matches the above description information is searched for, When it is not found, send the above description information to the server, and receive the download information sent by the above server. The above download information includes the information of the function package whose matching identifier matches the above description information and the information of the dependency package of the above function package. Finally, the electronic device downloads the above-mentioned function package and the dependency package of the above-mentioned function package, silently installs and loads the above-mentioned function package, so that the electronic device can download the function package according to the description information of the function required by the currently running application. The storage space is small, so the waiting time for users to download and install the function package can be shortened, and the storage space of the electronic device can be saved.
其中一种可能的实现方式中,下载上述功能包和上述功能包的依赖包,静默安装并加载上述功能包包括:电子设备根据上述下载信息和上述电子设备已安装的功能包,确定待下载的依赖包,然后电子设备下载上述功能包和上述待下载的依赖包,静默安装并加载上述功能包。具体地,电子设备可以根据下载信息中依赖包的匹配标识和电子设备已安装的功能包,获取下载信息中未安装的依赖包,上述未安装的依赖包即为待下载的依赖包。In one of the possible implementations, downloading the above-mentioned function package and the dependency package of the above-mentioned function package, silently installing and loading the above-mentioned function package includes: the electronic device determines which to download according to the above-mentioned download information and the function package installed by the above-mentioned electronic device The dependent package, and then the electronic device downloads the above-mentioned function package and the above-mentioned dependent package to be downloaded, silently installs and loads the above-mentioned function package. Specifically, the electronic device may obtain the dependent package that is not installed in the download information according to the matching identifier of the dependent package in the download information and the functional package that the electronic device has installed, and the uninstalled dependent package is the dependent package to be downloaded.
本实施例中,电子设备可以根据下载信息和上述电子设备已安装的功能包,确定待下载的依赖包,然后只需下载上述功能包和待下载的依赖包,加载上述功能包,从而进一步缩减了电子设备所需下载的安装包,进一步缩短了用户的等待时长,节省了电子设备的存储空间。In this embodiment, the electronic device can determine the dependent package to be downloaded based on the download information and the functional package that the electronic device has installed, and then only need to download the functional package and the dependent package to be downloaded, and load the functional package, thereby further reducing The installation package required to be downloaded by the electronic device is further shortened, and the waiting time of the user is further shortened, and the storage space of the electronic device is saved.
其中一种可能的实现方式中,上述描述信息包括:上述功能图标所对应功能的功能类别编码,上述匹配标识包括:上述功能包所提供功能的功能类别编码;这样,在上述电子设备已安装的功能包中,查找匹配标识与上述描述信息相匹配的功能包包括:在上述电子设备已安装的功能包中,根据上述描述信息中的功能类别编码进行查找,获得匹配标识中的功能类别编码与上述描述信息中的功能类别编码相匹配的功能包。In one possible implementation, the description information includes: the function category code of the function corresponding to the function icon, and the matching identifier includes: the function category code of the function provided by the function package; In the function package, searching for the function package whose matching identifier matches the above description information includes: in the function package installed in the above electronic device, search according to the function category code in the above description information, and obtain the function category code and the function category code in the matching identifier. The function package that matches the function category code in the above description information.
其中一种可能的实现方式中,在上述电子设备已安装的功能包中,查找匹配标识与上述描述信息相匹配的功能包之后,如果在上述电子设备已安装的功能包中,查找到匹配标识与上述描述信息相匹配的功能包,则在上述第一应用程序中加载上述相匹配的功能包,上述相匹配的功能包为第二应用程序已安装的功能包,上述第二应用程序安装在上述电子设备中。In one of the possible implementations, after searching for a function package with a matching identifier that matches the description information among the function packages installed in the above electronic device, if the matching identifier is found in the function package installed in the above electronic device For the function package that matches the above description information, the above-mentioned matching function package is loaded in the above-mentioned first application, and the above-mentioned matching function package is the function package that has been installed by the second application, and the above-mentioned second application is installed in In the above-mentioned electronic equipment.
也就是说,电子设备查找到的匹配标识与上述描述信息相匹配的功能包,可以是第二应用程序已安装的功能包,不限制查找到的功能包必须是第一应用程序中的功能包,并且查找到相匹配的功能包之后,可以直接在第一应用程序中加载相匹配的功能包,不须跳转到第二应用程序。That is to say, the function package whose matching identifier found by the electronic device matches the above description information may be a function package installed by the second application program, and it is not restricted that the function package found must be a function package in the first application program , And after finding the matching function package, you can directly load the matching function package in the first application without jumping to the second application.
其中一种可能的实现方式中,上述描述信息中还包括上述第一应用程序的厂商信息和/或版本信息;上述匹配标识中还包括上述功能包的厂商信息和/或版本信息;则在上述第一应用程序中加载上述相匹配的功能包之前,如果在上述电子设备已安装的功能包中,查找到的相匹配的功能包包括至少两个,则根据上述厂商信息和/或版本信息,确定上述相匹配的功能包与上述第一应用程序的匹配度;这样在上述第一应用程序中加载上述相匹配的功能包可以为:在上述第一应用程序中加载匹配度最高的功能包。In one of the possible implementations, the description information also includes the manufacturer information and/or version information of the first application; the matching identifier also includes the manufacturer information and/or version information of the function package; Before loading the above-mentioned matching function package in the first application, if the found matching function package includes at least two function packages installed in the above-mentioned electronic device, then according to the above-mentioned manufacturer information and/or version information, Determining the degree of matching between the matching function package and the first application program; in this way, loading the matching function package in the first application program may be: loading the function package with the highest matching degree in the first application program.
其中一种可能的实现方式中,在上述电子设备已安装的功能包中,查找匹配标识与上述描述信息相匹配的功能包可以为:在上述电子设备的已安装功能列表中,查找匹配标识与上述描述信息相匹配的功能包;其中,上述已安装功能列表中保存上述电子设备已安装的应用程序对应的表项,上述表项中包括上述应用程序已安装的功能包的匹配标识。In one of the possible implementations, in the function packages that have been installed on the electronic device, searching for a function package whose matching identifier matches the description information may be: in the installed function list of the electronic device, searching for the matching identifier and The function package that matches the description information; wherein, in the installed function list, an entry corresponding to the application program installed by the electronic device is stored, and the entry includes a matching identifier of the function package installed by the application program.
其中一种可能的实现方式中,上述下载信息中包括上述功能包所属的应用,下载上述功能包和上述功能包的依赖包,静默安装并加载上述功能包之后,还可以在上述电子设备的已安装功能列表中,获取与已加载的功能包所属的应用对应的表项,并在获取的表项中添加上述已加载的功能包的匹配标识。In one possible implementation manner, the download information includes the application to which the function package belongs, downloads the function package and the dependent package of the function package, silently installs and loads the function package, and can also download the function package in the electronic device. In the installed function list, the entry corresponding to the application to which the loaded function package belongs is obtained, and the matching identifier of the loaded function package is added to the obtained entry.
第二方面,本申请实施例提供一种功能包的加载方法,包括:服务器接收电子设备发送的描述信息,上述描述信息是上述电子设备获取用户选择的第一功能的描述信息,在上述电子设备已安装的功能包中,未查找到匹配标识与上述描述信息相匹配的功能包之后发送的;在功能包匹配表中,查找匹配标识与上述描述信息相匹配的功能包的信息;向上述电子设备发送下载信息,上述下载信息包括上述功能包的信息和上述功能包的依赖包的信息,以使上述电子设备根据上述下载信息,下载上述功能包和上述功能包的依赖包。In a second aspect, an embodiment of the present application provides a method for loading a function package, including: a server receives description information sent by an electronic device, where the description information is the description information of the first function selected by the user by the electronic device, and the electronic device In the installed function package, it is sent after the function package whose matching identifier matches the above description information is not found; in the function package matching table, the information of the function package whose matching identifier matches the above description information is searched; The device sends download information, and the download information includes the information of the function package and the information of the dependency package of the function package, so that the electronic device downloads the function package and the dependency package of the function package according to the download information.
上述功能包的加载方法中,服务器接收电子设备发送的描述信息之后,在功能包匹配表中,查找匹配标识与上述描述信息相匹配的功能包的信息,然后向上述电子设备发送下载信息,上述下载信息包括相匹配的功能包的信息和相匹配的功能包的依赖包的信息,从而电子设备可以根据上述下载信息,下载相匹配的功能包和相匹配的功能包的依赖包,实现了电子设备根据当前运行的应用程序所需功能的描述信息下载功能包,由于上述功能包占用的存储空间较小,因此可以缩短用户下载和安装功能包的等待时长,节省电子设备的存储空间。In the above method for loading the function package, after receiving the description information sent by the electronic device, the server searches the function package matching table for the information of the function package whose matching identifier matches the description information, and then sends the download information to the electronic device. The download information includes the information of the matching function package and the information of the dependent package of the matching function package, so that the electronic device can download the matching function package and the dependent package of the matching function package according to the above download information, thereby realizing electronic The device downloads the function package according to the description information of the function required by the currently running application. Since the storage space occupied by the function package is small, the waiting time for the user to download and install the function package can be shortened, and the storage space of the electronic device can be saved.
其中一种可能的实现方式中,服务器在功能包匹配表中,查找匹配标识与上述描述信息相匹配的功能包的信息之前,还包括:服务器接收开发者上传的应用包;对上述应用包进行拆分,获取上述应用包包括的功能包;解析上述应用包包括的每个功能包,获取上述功能包的依赖包的匹配标识和上述功能包的匹配标识;在上述功能包匹配表中记录上述功能包所属的应用包,以及上述功能包的匹配标识和上述功能包的依赖包的匹配标识。In one of the possible implementations, before the server searches the function package matching table for the information of the function package whose matching identifier matches the above description information, it also includes: the server receives the application package uploaded by the developer; Split to obtain the function package included in the above application package; parse each function package included in the above application package to obtain the matching identifier of the dependent package of the above function package and the matching identifier of the above function package; record the above in the above function package matching table The application package to which the function package belongs, and the matching identifier of the above-mentioned function package and the matching identifier of the above-mentioned function package's dependent package.
其中一种可能的实现方式中,上述匹配标识包括:功能包所提供功能的功能类别编码;上述功能包匹配表中记录功能包所属的应用包、上述功能包的匹配标识、功能包的信息和上述功能包的依赖包的信息;上述描述信息包括:上述功能图标所对应功能的功能类别编码;这样,在功能包匹配表中,查找匹配标识与上述描述信息相匹配的功能包的信息包括:在功能包匹配表中,根据上述描述信息中的功能类别编码进行查找,获得匹配标识中的功能类别编码与上述描述信息中的功能类别编码相匹配的功能包。In one of the possible implementations, the above-mentioned matching identifier includes: the function category code of the function provided by the function package; the above-mentioned function package matching table records the application package to which the function package belongs, the matching identifier of the above-mentioned function package, the information of the function package, and The above-mentioned function package dependent package information; the above-mentioned description information includes: the function category code of the function corresponding to the above-mentioned function icon; in this way, in the function package matching table, the information of the function package whose matching identifier matches the above-mentioned description information includes: In the function package matching table, search is performed according to the function category code in the above description information to obtain the function package whose function category code in the matching identifier matches the function category code in the above description information.
其中一种可能的实现方式中,上述描述信息中还包括:上述第一应用程序的厂商信息和/或版本信息;上述匹配标识中还包括上述功能包的厂商信息和/或版本信息;在功能包匹配表中,查找匹配标识与上述描述信息相匹配的功能包的信息之后,还包括:如果在上述功能包匹配表中,查找到的相匹配的功能包包括至少两个,则服务器根据上述厂商信息和/或版本信息,确定上述相匹配的功能包与上述第一应用程序的匹配度;则上述下载信息中包括匹配度最高的功能包的信息和上述匹配度最高的功能包的依赖包的信息。In one of the possible implementations, the description information further includes: manufacturer information and/or version information of the first application; the matching identifier also includes manufacturer information and/or version information of the function package; In the package matching table, after searching for the information of the function package whose matching identifier matches the above description information, it also includes: if the found matching function package includes at least two in the above function package matching table, the server will act according to the above Manufacturer information and/or version information to determine the degree of matching between the above-mentioned matching function package and the above-mentioned first application; then the above-mentioned download information includes the information of the function package with the highest matching degree and the dependency package of the above-mentioned function package with the highest matching degree Information.
第三方面,本申请实施例提供一种功能包的加载装置,该装置包含在电子设备中,该装置具有实现第一方面及第一方面的可能实现方式中电子设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,接收模块或单元、处理模块或单元、发送模块或单元等。In a third aspect, an embodiment of the present application provides a device for loading a function package. The device is included in an electronic device, and the device has the function of realizing the behavior of the electronic device in the first aspect and the possible implementation of the first aspect. The function can be realized by hardware, or the corresponding software can be executed by hardware. The hardware or software includes one or more modules or units corresponding to the above-mentioned functions. For example, a receiving module or unit, a processing module or unit, a sending module or unit, and so on.
第四方面,本申请实施例提供一种功能包的加载装置,该装置包含在服务器中,该装置具有实现第二方面及第二方面的可能实现方式中服务器行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,接收模块或单元、处理模块或单元、发送模块或单元等。In a fourth aspect, an embodiment of the present application provides a device for loading a function package, the device is included in a server, and the device has a function of realizing the server behavior in the second aspect and possible implementation manners of the second aspect. The function can be realized by hardware, or the corresponding software can be executed by hardware. The hardware or software includes one or more modules or units corresponding to the above-mentioned functions. For example, a receiving module or unit, a processing module or unit, a sending module or unit, and so on.
第五方面,本申请实施例提供一种电子设备,包括:In a fifth aspect, an embodiment of the present application provides an electronic device, including:
一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序,其中上述一个或多个计算机程序被存储在上述存储器中,上述一个或多个计算机程序包括指令,当上述指令被上述电子设备执行时,使得上述电子设备执行以下步骤:检测到用户在当前运行的第一应用程序所展示界面中的第一操作信息;响应于所述第一操作信息,展示功能选择界面;检测到所述用户选择第一功能的第二操作信息;响应于所述第二操作信息,获取所述第一功能的描述信息;在所述电子设备已安装的功能包中,查找匹配标识与所述描述信息相匹配的功能包;当未查找到时,则将所述描述信息发送给服务器;接收所述服务器发送的下载信息,所述下载信息中包 括功能包的信息和所述功能包的依赖包的信息,所述功能包包括匹配标识与所述描述信息相匹配的功能包;下载所述功能包和所述功能包的依赖包,静默安装并加载所述功能包。One or more processors; memory; multiple application programs; and one or more computer programs, wherein the above-mentioned one or more computer programs are stored in the above-mentioned memory, and the above-mentioned one or more computer programs include instructions, when the above-mentioned instructions When executed by the above-mentioned electronic device, the above-mentioned electronic device is caused to perform the following steps: detecting the first operation information of the user in the interface displayed by the currently running first application program; in response to the first operation information, displaying the function selection interface; It is detected that the user selects the second operation information of the first function; in response to the second operation information, the description information of the first function is obtained; in the function package installed in the electronic device, the matching identifier and The function package that matches the description information; when it is not found, the description information is sent to the server; the download information sent by the server is received, and the download information includes the information of the function package and the function package The function package includes the function package whose matching identifier matches the description information; downloads the function package and the dependency package of the function package, silently installs and loads the function package.
其中一种可能的实现方式中,当上述指令被上述电子设备执行时,使得电子设备执行下载上述功能包和上述功能包的依赖包,加载上述功能包的步骤包括:根据上述下载信息和上述电子设备已安装的功能包,确定待下载的依赖包;下载上述功能包和上述待下载的依赖包,静默安装并加载上述功能包。In one possible implementation manner, when the above instruction is executed by the above electronic device, the electronic device is caused to download the above function package and the dependent package of the above function package. The step of loading the above function package includes: according to the above download information and the above electronic device. For the functional packages that have been installed on the device, determine the dependent packages to be downloaded; download the above functional packages and the dependent packages to be downloaded, silently install and load the above functional packages.
其中一种可能的实现方式中,上述描述信息包括:上述功能图标所对应功能的功能类别编码,上述匹配标识包括:上述功能包所提供功能的功能类别编码;当上述指令被上述电子设备执行时,使得电子设备执行在上述电子设备已安装的功能包中,查找匹配标识与上述描述信息相匹配的功能包的步骤包括:在上述电子设备已安装的功能包中,根据上述描述信息中的功能类别编码进行查找,获得匹配标识中的功能类别编码与上述描述信息中的功能类别编码相匹配的功能包。In one possible implementation manner, the description information includes: the function category code of the function corresponding to the function icon, and the matching identifier includes: the function category code of the function provided by the function package; when the instruction is executed by the electronic device , Causing the electronic device to execute the function package that has been installed in the above-mentioned electronic device, and the step of searching for a function package whose matching identifier matches the above-mentioned description information includes: in the function package that has been installed in the above-mentioned electronic device, according to the function in the above-mentioned description information The category code is searched, and a function package whose function category code in the matching identifier matches the function category code in the description information is obtained.
其中一种可能的实现方式中,当上述指令被上述电子设备执行时,使得电子设备执行在上述电子设备已安装的功能包中,查找匹配标识与上述描述信息相匹配的功能包的步骤之后,还执行以下步骤:如果在上述电子设备已安装的功能包中,查找到匹配标识与上述描述信息相匹配的功能包,则在上述第一应用程序中加载上述相匹配的功能包,上述相匹配的功能包为第二应用程序已安装的功能包,上述第二应用程序安装在上述电子设备中。In one possible implementation manner, when the above instructions are executed by the above electronic device, the electronic device is caused to execute after the step of searching for a function package whose matching identifier matches the above description information among the function packages installed in the above electronic device, The following steps are also performed: if a function package with a matching identifier that matches the description information is found among the function packages that have been installed on the above electronic device, then the above-mentioned matching function package is loaded in the above-mentioned first application, and the above-mentioned matching function package is matched. The function package of is a function package that has been installed by the second application, and the second application is installed in the electronic device.
其中一种可能的实现方式中,上述描述信息中还包括上述第一应用程序的厂商信息和/或版本信息;上述匹配标识中还包括上述功能包的厂商信息和/或版本信息;当上述指令被上述电子设备执行时,使得电子设备执行在上述第一应用程序中加载上述相匹配的功能包的步骤之前,还执行以下步骤:如果在上述电子设备已安装的功能包中,查找到的相匹配的功能包包括至少两个,则根据上述厂商信息和/或版本信息,确定上述相匹配的功能包与上述第一应用程序的匹配度;则在上述第一应用程序中加载上述相匹配的功能包包括:在上述第一应用程序中加载匹配度最高的功能包。In one of the possible implementations, the description information also includes the manufacturer information and/or version information of the first application; the matching identifier also includes the manufacturer information and/or version information of the function package; when the instruction When executed by the above-mentioned electronic device, before the electronic device executes the step of loading the above-mentioned matching function package in the above-mentioned first application, the following steps are also performed: The matching function package includes at least two, then the matching degree between the matching function package and the first application program is determined according to the manufacturer information and/or version information; then the matching function package is loaded into the first application program. The function package includes: loading the function package with the highest matching degree in the above-mentioned first application.
其中一种可能的实现方式中,当上述指令被电子设备执行时,使得上述电子设备执行在上述电子设备已安装的功能包中,查找匹配标识与上述描述信息相匹配的功能包的步骤可以为:在上述电子设备的已安装功能列表中,查找匹配标识与上述描述信息相匹配的功能包;其中,上述已安装功能列表中保存上述电子设备已安装的应用程序对应的表项,上述表项中包括上述应用程序已安装的功能包的匹配标识。In one possible implementation manner, when the above instruction is executed by an electronic device, the above electronic device is caused to execute in the function package installed in the above electronic device, and the step of searching for a function package whose matching identifier matches the above description information may be : In the installed function list of the above electronic device, search for the function package whose matching identifier matches the above description information; wherein, the above installed function list saves the entry corresponding to the application installed on the above electronic device, the above entry Include the matching identifiers of the feature packs installed by the above-mentioned application.
其中一种可能的实现方式中,上述下载信息中包括上述功能包所属的应用,当上述指令被上述电子设备执行时,使得电子设备执行下载上述功能包和上述功能包的依赖包,加载上述功能包的步骤之后,还执行以下步骤:在上述电子设备的已安装功能列表中,获取与已加载的功能包所属的应用对应的表项,并在获取的表项中添加上述已加载的功能包的匹配标识。In one possible implementation manner, the download information includes the application to which the function package belongs, and when the instruction is executed by the electronic device, the electronic device is made to download the function package and the dependent package of the function package, and load the function After the package step, the following steps are also performed: in the installed function list of the above electronic device, obtain the entry corresponding to the application to which the loaded function package belongs, and add the above loaded function package to the obtained entry The matching ID.
第六方面,本申请实施例提供一种服务器,包括:一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序,其中上述一个或多个计算机程序被存 储在上述存储器中,上述一个或多个计算机程序包括指令,当上述指令被服务器执行时,使得服务器执行以下步骤:接收电子设备发送的描述信息,上述描述信息是上述电子设备获取用户选择的第一功能的描述信息,在上述电子设备已安装的功能包中,未查找到匹配标识与上述描述信息相匹配的功能包之后发送的;在功能包匹配表中,查找匹配标识与上述描述信息相匹配的功能包的信息;向上述电子设备发送下载信息,上述下载信息包括上述功能包的信息和上述功能包的依赖包的信息,以使上述电子设备根据上述下载信息和上述电子设备已安装的功能包,下载上述功能包和上述功能包的依赖包。In a sixth aspect, an embodiment of the present application provides a server, including: one or more processors; a memory; multiple application programs; and one or more computer programs, wherein the one or more computer programs are stored in the memory Wherein, the above-mentioned one or more computer programs include instructions. When the above-mentioned instructions are executed by the server, the server executes the following steps: receiving the description information sent by the electronic device. Information, in the function packages that have been installed on the above electronic device, it is sent after the function package whose matching identifier matches the above description information is not found; in the function package matching table, the function package whose matching identifier matches the above description information is searched Send download information to the above-mentioned electronic device, the above-mentioned download information includes the information of the above-mentioned function package and the information of the dependency package of the above-mentioned function package, so that the above-mentioned electronic device downloads according to the above-mentioned download information and the function package installed by the above-mentioned electronic device The above-mentioned function package and the dependency package of the above-mentioned function package.
其中一种可能的实现方式中,当上述指令被上述服务器执行时,使得服务器执行在功能包匹配表中,查找匹配标识与上述描述信息相匹配的功能包的信息的步骤之前,还执行以下步骤:接收开发者上传的应用包;对上述应用包进行拆分,获取上述应用包包括的功能包;解析上述应用包包括的每个功能包,获取上述功能包的依赖包的匹配标识和上述功能包的匹配标识;在上述功能包匹配表中记录上述功能包所属的应用包,以及上述功能包的匹配标识和上述功能包的依赖包的匹配标识。In one possible implementation manner, when the above instructions are executed by the above server, the server executes the following steps before the step of searching for the information of the function package whose matching identifier matches the above description information in the function package matching table : Receive the application package uploaded by the developer; split the above application package to obtain the function package included in the above application package; parse each function package included in the above application package to obtain the matching identifier of the dependent package of the above function package and the above function The matching identifier of the package; the application package to which the function package belongs, and the matching identifier of the function package and the matching identifier of the dependent package of the function package are recorded in the function package matching table.
其中一种可能的实现方式中,上述匹配标识包括:功能包所提供功能的功能类别编码;上述功能包匹配表中记录功能包所属的应用包、上述功能包的匹配标识、功能包的信息和上述功能包的依赖包的信息;上述描述信息包括:上述功能图标所对应功能的功能类别编码;当上述指令被上述服务器执行时,使得服务器执行上述在功能包匹配表中,查找匹配标识与上述描述信息相匹配的功能包的信息的步骤包括:在功能包匹配表中,根据上述描述信息中的功能类别编码进行查找,获得匹配标识中的功能类别编码与上述描述信息中的功能类别编码相匹配的功能包。In one of the possible implementations, the above-mentioned matching identifier includes: the function category code of the function provided by the function package; the above-mentioned function package matching table records the application package to which the function package belongs, the matching identifier of the above-mentioned function package, the information of the function package, and The dependency package information of the above function package; the above description information includes: the function category code of the function corresponding to the above function icon; when the above instruction is executed by the above server, the server executes the above function package matching table, searching for the matching identifier and the above The step of describing the information of the function package that matches the description information includes: in the function package matching table, searching according to the function category code in the above description information, and obtaining the function category code in the matching identifier and the function category code in the above description information. Matching function package.
其中一种可能的实现方式中,上述描述信息中还包括:上述第一应用程序的厂商信息和/或版本信息;上述匹配标识中还包括上述功能包的厂商信息和/或版本信息;当上述指令被上述服务器执行时,使得服务器执行在功能包匹配表中,查找匹配标识与上述描述信息相匹配的功能包的信息的步骤之后,还执行以下步骤:如果在上述功能包匹配表中,查找到的相匹配的功能包包括至少两个,则根据上述厂商信息和/或版本信息,确定上述相匹配的功能包与上述第一应用程序的匹配度;则上述下载信息中包括匹配度最高的功能包的信息和上述匹配度最高的功能包的依赖包的信息。In one of the possible implementations, the description information further includes: manufacturer information and/or version information of the first application; the matching identifier also includes manufacturer information and/or version information of the function package; When the instruction is executed by the above-mentioned server, the server executes the step of searching for the information of the function package whose matching identifier matches the above-mentioned description information in the function package matching table, and then executes the following steps: If in the above-mentioned function package matching table, search The received matching function package includes at least two, then the matching degree between the matching function package and the first application program is determined based on the manufacturer information and/or version information; then the download information includes the highest matching degree The information of the function package and the information of the dependency package of the above-mentioned function package with the highest matching degree.
应当理解的是,本申请的第三方面和第五方面与本申请的第一方面的技术方案一致,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。It should be understood that the third aspect and the fifth aspect of the present application are consistent with the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation manners are similar, and will not be repeated.
应当理解的是,本申请的第四方面和第六方面与本申请的第二方面的技术方案一致,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。It should be understood that the fourth and sixth aspects of the present application are consistent with the technical solutions of the second aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation manners are similar, and will not be repeated.
第七方面,本申请提供一种计算机可读存储介质,上述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行第一方面提供的方法。In a seventh aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, which when running on a computer, causes the computer to execute the method provided in the first aspect.
第八方面,本申请提供一种计算机可读存储介质,上述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行第二方面提供的方法。In an eighth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, which when run on a computer, causes the computer to execute the method provided in the second aspect.
第九方面,本申请提供一种计算机程序,当上述计算机程序被计算机执行时,用于执行第一方面提供的方法。In a ninth aspect, this application provides a computer program, which is used to execute the method provided in the first aspect when the computer program is executed by a computer.
第十方面,本申请提供一种计算机程序,当上述计算机程序被计算机执行时,用于执行第二方面提供的方法。In a tenth aspect, this application provides a computer program, which is used to execute the method provided in the second aspect when the computer program is executed by a computer.
在一种可能的设计中,第九方面和第十方面中的程序可以全部或者部分存储在与处理器封装在一起的存储介质上,也可以部分或者全部存储在不与处理器封装在一起的存储器上。In a possible design, the programs in the ninth aspect and the tenth aspect may be stored in whole or in part on a storage medium that is packaged with the processor, or may be stored in part or all in a storage medium that is not packaged with the processor. On the memory.
附图说明Description of the drawings
图1为现有相关技术中开发者上传的文件的示意图;Figure 1 is a schematic diagram of a file uploaded by a developer in the related art;
图2为本申请一个实施例提供的电子设备的结构示意图;Figure 2 is a schematic structural diagram of an electronic device provided by an embodiment of the application;
图3为本申请一个实施例提供的电子设备100的软件结构框图;3 is a block diagram of the software structure of the electronic device 100 provided by an embodiment of the application;
图4为本申请一个实施例提供的服务器的结构示意图;FIG. 4 is a schematic structural diagram of a server provided by an embodiment of this application;
图5为本申请一个实施例提供的在功能包中增加匹配标识的示意图;FIG. 5 is a schematic diagram of adding a matching identifier to a function package according to an embodiment of the application;
图6为本申请一个实施例提供的服务器对全量应用包进行拆包的示意图;FIG. 6 is a schematic diagram of a server unpacking a full application package according to an embodiment of the application;
图7为本申请一个实施例提供的电子设备查找功能包的示意图;FIG. 7 is a schematic diagram of an electronic device search function package provided by an embodiment of the application;
图8为本申请一个实施例提供的功能包的加载方法的流程图;FIG. 8 is a flowchart of a method for loading a function package provided by an embodiment of the application;
图9为本申请一个实施例提供的第一应用程序所展示界面的示意图;FIG. 9 is a schematic diagram of an interface displayed by a first application program provided by an embodiment of this application;
图10为本申请一个实施例提供的功能选择界面的示意图;FIG. 10 is a schematic diagram of a function selection interface provided by an embodiment of this application;
图11为本申请另一个实施例提供的功能包的加载方法的流程图;FIG. 11 is a flowchart of a method for loading a function package provided by another embodiment of the application;
图12为本申请再一个实施例提供的功能包的加载方法的流程图;FIG. 12 is a flowchart of a method for loading a function package provided by still another embodiment of the application;
图13为本申请再一个实施例提供的功能包的加载方法的流程图;FIG. 13 is a flowchart of a method for loading a function package provided by another embodiment of this application;
图14为本申请功能包的加载方法再一个实施例的流程图;FIG. 14 is a flowchart of another embodiment of a method for loading a function package of this application;
图15为本申请另一个实施例提供的电子设备的结构示意图;15 is a schematic structural diagram of an electronic device provided by another embodiment of this application;
图16为本申请另一个实施例提供的服务器的结构示意图。FIG. 16 is a schematic structural diagram of a server provided by another embodiment of this application.
具体实施方式Detailed ways
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。The terms used in the implementation mode part of this application are only used to explain the specific embodiments of this application, and are not intended to limit this application.
随着App设计得越来越复杂,App的安装包也越来越大,用户在使用App的某个功能时不得不下载完整的安装包,从而导致用户流量的浪费,并且用户下载和安装App所需等待的时长更长,App的安装包占用的存储空间也更多。As the App design becomes more and more complex, the App installation package becomes larger and larger, and the user has to download the complete installation package when using a certain function of the App, which leads to a waste of user traffic, and the user downloads and installs the App The waiting time is longer, and the App installation package takes up more storage space.
针对App安装包中冗余的资源文件,现有相关技术中的一种方案提供了资源按需下载(on demand resource download)方案,但该方案只提供了资源的按需下载,对于App内可运行的代码分包,还是需要全部下载和安装,这样,用户下载和安装App所需等待的时长比较长,App的安装包占用的存储空间比较多。Regarding the redundant resource files in the App installation package, one of the existing related technologies provides an on-demand resource download solution, but this solution only provides on-demand download of resources. The running code still needs to be downloaded and installed in all sub-packages. In this way, the waiting time for users to download and install the App is relatively long, and the installation package of the App occupies more storage space.
现有相关技术提供的另一种方案为App Bundle方案,App Bundle比上述方案更进一步,它不仅解决了冗余资源和冗余lib库的问题,同时提出的分包方案可以让App开发者按功能模块将App拆分多个子功能包,用户下载安装App的时候可以仅安装部分高频功能包、特定的lib库和资源包,从而减小首次下载App的数据大小,减少用户流量的浪费,其它功能包根据用户使用需要来下载安装。Another solution provided by the existing related technology is the App Bundle solution. The App Bundle is a step further than the above solution. It not only solves the problems of redundant resources and redundant lib libraries, but also proposes a subcontracting solution that allows App developers to follow The function module splits the App into multiple sub-function packages. When users download and install the App, they can only install some high-frequency function packages, specific lib libraries and resource packages, thereby reducing the data size of the first download of the App and reducing the waste of user traffic. Other function packages can be downloaded and installed according to user needs.
具体地,要使用App Bundle方案,涉及多个步骤:Specifically, to use the App Bundle solution, multiple steps are involved:
步骤1,开发者在Android Studio中创建工程,引用谷歌移动服务(google mobile service,GMS)的依赖包(com.google.android.play:core:x.x.x),分模块开发时确定要动态安装下载的功能模块Foo,在主功能模块Base中写入下载功能模块Foo的逻辑代码,该逻辑代码可以在用户界面C触发下载;然后,对上述逻辑代码进行编译,生成bundle.aab文件。Step 1. The developer creates a project in Android Studio and references the dependency package (com.google.android.play:core:xxx) of Google Mobile Service (GMS), and determines to dynamically install and download the sub-module development The function module Foo is written in the main function module Base to download the logic code of the function module Foo, which can trigger the download in the user interface C; then, the above logic code is compiled to generate the bundle.aab file.
步骤2,开发者将bundle.aab文件上传到Google Play应用市场。图1为现有相关技术中开发者上传的文件的示意图,如图1所示,开发者上传的文件为bundle.aab,应用中包含Base和Foo两个功能模块,Foo是需要动态按需加载的模块。Play应用市场利用工具将应用拆分为多个安卓应用程序包(android application package,Apk),其中Base的执行逻辑代码在base_master.apk中,Foo的执行逻辑代码在foo_master.apk中。Step 2. The developer uploads the bundle.aab file to the Google Play application market. Figure 1 is a schematic diagram of a file uploaded by a developer in the existing related technology. As shown in Figure 1, the file uploaded by the developer is bundle.aab. The application contains two functional modules, Base and Foo. Foo needs to be dynamically loaded on demand Module. The Play application market uses tools to split the application into multiple Android application packages (Apk), where the execution logic code of Base is in base_master.apk, and the execution logic code of Foo is in foo_master.apk.
步骤3,用户在Play商店下载应用并运行主功能Base,在Base中的用户界面C中触发下载功能模块Foo对应的包foo_master.apk的代码。下载和安装Foo的逻辑在GMS和Play商店的客户端共同完成。Step 3. The user downloads the application in the Play Store and runs the main function Base, and triggers the download of the code of the package foo_master.apk corresponding to the function module Foo in the user interface C in the Base. The logic of downloading and installing Foo is done together on the client side of GMS and the Play Store.
从以上描述可以看出,App Bundle方案中针对“其它功能包”的按需下载存在较多的限制,例如:该按需下载的功能必须借助GMS,App开发者必须显式地在主功能模块Base中写入下载功能模块Foo的逻辑代码,并且按需下载的功能包只能是当前运行的App中的功能包,按需下载的功能不够灵活。并且Foo只能通过Base触发下载,Foo中的功能只能在Base中触发执行。It can be seen from the above description that there are many restrictions on the on-demand download of "other function packs" in the App Bundle solution. For example, the on-demand download function must use GMS, and the App developer must explicitly specify the main function module. The logic code of the download function module Foo is written in Base, and the function package downloaded on demand can only be the function package in the currently running App, and the function of on-demand download is not flexible enough. And Foo can only be triggered by Base to download, and the functions in Foo can only be triggered and executed in Base.
基于以上问题,本申请实施例提供一种功能包的加载方法,可以实现电子设备根据当前运行的应用程序所需功能的描述信息下载功能包。Based on the above problems, an embodiment of the present application provides a method for loading a function package, which can realize that the electronic device downloads the function package according to the description information of the function required by the currently running application program.
本申请实施例提供的功能包的加载方法可以应用于电子设备,其中,上述电子设备可以为智能手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或个人数字助理(personal digital assistant,PDA)等设备;本申请实施例对电子设备的具体类型不作任何限制。The method for loading function packages provided by the embodiments of the present application can be applied to electronic devices, where the above-mentioned electronic devices can be smart phones, tablet computers, wearable devices, in-vehicle devices, augmented reality (AR)/virtual reality (virtual reality). Reality, VR) devices, laptops, ultra-mobile personal computers (UMPC), netbooks or personal digital assistants (personal digital assistants, PDAs) and other devices; the embodiments of this application do not make any reference to the specific types of electronic devices limit.
示例性的,图2为本申请一个实施例提供的电子设备的结构示意图,如图2所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。Exemplarily, FIG. 2 is a schematic structural diagram of an electronic device provided by an embodiment of the application. As shown in FIG. 2, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, and a universal serial bus (universal serial bus). serial bus, USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, Earphone interface 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者 组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or arrange different components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc. Among them, the different processing units may be independent devices or integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface can include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter (universal asynchronous transmitter) interface. receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / Or Universal Serial Bus (USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,DCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, which includes a serial data line (SDA) and a serial clock line (DCL). In some embodiments, the processor 110 may include multiple sets of I2C buses. The processor 110 may couple the touch sensor 180K, charger, flash, camera 193, etc., respectively through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the electronic device 100.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART 接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function. In some embodiments, the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices. The MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate through a DSI interface to realize the display function of the electronic device 100.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect earphones and play audio through earphones. The interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely a schematic description, and does not constitute a structural limitation of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备100供电。The charging management module 140 is used to receive charging input from the charger. Among them, the charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive the charging input of the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device 100 through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收 电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is processed by the baseband processor and then passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves to radiate through the antenna 2.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), and the quasi-zenith satellite system (quasi). -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and is used for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting  diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active-matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transfers the electrical signal to the ISP for processing and is converted into an image visible to the naked eye. ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and is projected to the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal. ISP outputs digital image signals to DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device 100 may include one or N cameras 193, and N is a positive integer greater than one.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, for example, the transfer mode between human brain neurons, it can quickly process input information, and it can also continuously self-learn. The NPU can realize applications such as intelligent cognition of the electronic device 100, such as image recognition, face recognition, voice recognition, text understanding, and so on.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash  storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。The internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions. The internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area can store an operating system, at least one application program (such as a sound playback function, an image playback function, etc.) required by at least one function. The data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。The speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone", "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal into the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used to connect wired earphones. The earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be provided on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors and so on. The capacitive pressure sensor may include at least two parallel plates with conductive materials. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch position but have different touch operation intensities can correspond to different operation instructions. For example: when a touch operation whose intensity is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the movement posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip holster. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and be used in applications such as horizontal and vertical screen switching, pedometers and so on.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F, used to measure distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch device". The touch sensor 180K may be provided on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”. The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. The visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M 可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can obtain the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal. In some embodiments, the bone conduction sensor 180M may also be provided in the earphone, combined with the bone conduction earphone. The audio module 170 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 180M, and realize the voice function. The application processor may analyze the heart rate information based on the blood pressure beating signal obtained by the bone conduction sensor 180M, and realize the heart rate detection function.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The button 190 includes a power-on button, a volume button, and so on. The button 190 may be a mechanical button. It can also be a touch button. The electronic device 100 may receive key input, and generate key signal input related to user settings and function control of the electronic device 100.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback. For example, touch operations that act on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminding, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used to connect to the SIM card. The SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, and N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. The same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication. In some embodiments, the electronic device 100 adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present invention takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 by way of example.
图3为本申请一个实施例提供的电子设备100的软件结构框图。FIG. 3 is a block diagram of the software structure of the electronic device 100 provided by an embodiment of the application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图3所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 3, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图3所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 3, the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有 状态栏,锁定屏幕,截取屏幕等。The window manager is used to manage window programs. The window manager can obtain the size of the display, determine whether there is a status bar, lock the screen, take a screenshot, and so on.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。The content provider is used to store and retrieve data and make these data accessible to applications. The data may include video, image, audio, phone calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls that display text, controls that display pictures, and so on. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, and so on. The notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or a scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, prompt text information in the status bar, sound a prompt sound, electronic device vibration, flashing indicator light, etc.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in a virtual machine. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to realize 3D graphics drawing, image rendering, synthesis, and layer processing.
2D图形引擎是2D绘图的绘图引擎。The 2D graphics engine is a graphics engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
另外,本申请实施例提供的功能包的加载方法的实现不仅涉及电子设备侧,还涉及服务器侧和App开发侧。其中,上述服务器可以为云服务器,例如:云端应用市场的服务器,本申请实施例对服务器的具体类型不作任何限制。In addition, the implementation of the method for loading the function package provided by the embodiments of the present application not only involves the electronic device side, but also involves the server side and the App development side. The above-mentioned server may be a cloud server, for example, a server in the cloud application market, and the embodiment of the present application does not impose any restriction on the specific type of the server.
示例性的,图4为本申请一个实施例提供的服务器的结构示意图,如图4所示, 服务器400包括处理器410和通信接口420。可选地,该服务器400还可以包括存储器430。其中,处理器410、通信接口420和存储器430之间可以通过内部连接通路互相通信,传递控制和/或数据信号,该存储器430用于存储计算机程序,该处理器410用于从该存储器430中调用并运行该计算机程序。Exemplarily, FIG. 4 is a schematic structural diagram of a server provided by an embodiment of this application. As shown in FIG. 4, the server 400 includes a processor 410 and a communication interface 420. Optionally, the server 400 may further include a memory 430. Wherein, the processor 410, the communication interface 420, and the memory 430 can communicate with each other through an internal connection path to transfer control and/or data signals. The memory 430 is used to store computer programs, and the processor 410 is used to download from the memory 430 Call and run the computer program.
上述处理器410可以和存储器430可以合成一个处理装置,更常见的是彼此独立的部件,处理器410用于执行存储器430中存储的程序代码。具体实现时,该存储器430也可以集成在处理器410中,或者,独立于处理器410。The above-mentioned processor 410 and the memory 430 may be integrated into a processing device, and more commonly, they are components independent of each other. The processor 410 is configured to execute program codes stored in the memory 430. During specific implementation, the memory 430 may also be integrated in the processor 410, or independent of the processor 410.
除此之外,为了使得服务器400的功能更加完善,该服务器400还可以包括输入单元460和显示单元470等中的一个或多个。In addition, in order to make the function of the server 400 more complete, the server 400 may further include one or more of the input unit 460 and the display unit 470.
可选地,上述服务器400还可以包括电源450,用于给服务器400中的各种器件或电路提供电源。Optionally, the aforementioned server 400 may further include a power supply 450 for providing power to various devices or circuits in the server 400.
应理解,图4所示的服务器400中的处理器410可以是片上系统SOC,该处理器410中可以包括中央处理器(central processing unit,CPU),还可以进一步包括其他类型的处理器,例如:图像处理器(graphics processing unit,GPU)等。It should be understood that the processor 410 in the server 400 shown in FIG. 4 may be a system-on-chip SOC, and the processor 410 may include a central processing unit (CPU), and may further include other types of processors, for example :Image processor (graphics processing unit, GPU), etc.
为了便于理解,本申请以下实施例将以具有图2和图3所示结构的电子设备,具有图4所示结构的服务器为例,结合附图和应用场景,对本申请实施例提供的功能包的加载方法进行具体阐述。For ease of understanding, the following embodiments of the present application will take the electronic device with the structure shown in FIG. 2 and FIG. 3 and the server with the structure shown in FIG. The loading method is explained in detail.
首先,参见图5,App开发者在开发App时,针对希望被触发的动态特性(Dynamic Feature)包,下称功能包,增加匹配标识。图5为本申请一个实施例提供的在功能包中增加匹配标识的示意图,如图5所示,App开发者在开发应用时在功能包中增加匹配标识,每个功能包的匹配标识用于指示对应功能包提供的功能类型。举例来说,图5中,功能包1的匹配标识用于指示功能包1提供的功能类型,功能包2的匹配标识用于指示功能包2提供的功能类型。First, referring to Figure 5, when an App developer develops an App, he adds a matching identifier for the dynamic feature (Dynamic Feature) package that he wants to be triggered, hereinafter referred to as a function package. Figure 5 is a schematic diagram of adding a matching identifier to a function package according to an embodiment of the application. As shown in Figure 5, an App developer adds a matching identifier to a function package when developing an application. The matching identifier of each function package is used for Indicates the type of function provided by the corresponding function package. For example, in FIG. 5, the matching identifier of function package 1 is used to indicate the type of function provided by function package 1, and the matching identifier of function package 2 is used to indicate the type of function provided by function package 2.
在具体实现时,每个功能包的匹配标识可以包括对应功能包所提供功能的功能类别编码;上述功能类别编码是根据预先规定的功能的分类编码设定的;当然上述匹配标识中还可以包括对应功能包的功能描述、厂商信息和版本信息中的一种或几种,本实施例对上述匹配标识中包括的信息不作限定。In specific implementation, the matching identifier of each function package may include the function category code of the function provided by the corresponding function package; the above function category code is set according to the predetermined function classification code; of course, the above matching identifier may also include Corresponding to one or more of the function description, manufacturer information, and version information of the function package, this embodiment does not limit the information included in the above-mentioned matching identifier.
举例来说,功能的分类编码可以如下所示:For example, the classification code of the function can be as follows:
{{
0001:出行,其中出行下又可以包括子类别:01:订机票;02:订火车票;03:打车;0001: Travel, which can include sub-categories under travel: 01: book air tickets; 02: book train tickets; 03: take a taxi;
0002:支付,其中支付下又可以包括子类别:01:xx;02:xx;0002: Payment, which can include sub-categories under payment: 01: xx; 02: xx;
0003:xxx,其中xxx下又可以包括子类别:01:xx;02:xx;0003: xxx, where xxx can include subcategories: 01: xx; 02: xx;
……...
}}
这样针对特定的功能包会有唯一的大类和子类别,据此,App开发者可以设定每个功能包的匹配标识,如下所示:In this way, there will be a unique category and subcategory for a specific feature package. Based on this, the App developer can set the matching identifier for each feature package, as shown below:
{{
功能类别编码:000102;Function category code: 000102;
功能描述:出行订火车票;Function description: travel and book train tickets;
厂商信息:***;Manufacturer information: ***;
版本信息:1.0;Version information: 1.0;
}}
其次,App开发者上传全量应用包到云端应用市场,云端应用市场的服务器400可以对上述全量应用包进行拆包,然后对拆包获得的功能包进行解析得到每个功能包的匹配标识,将每个功能包的匹配标识记录在功能包匹配表中,同时在功能包匹配表中记录每个功能包的依赖包,如图6所示,图6为本申请一个实施例提供的服务器对全量应用包进行拆包的示意图。Secondly, the App developer uploads the full application package to the cloud application market. The server 400 of the cloud application market can unpack the above-mentioned full application package, and then analyze the function package obtained by the unpacking to obtain the matching identifier of each function package. The matching identifier of each function package is recorded in the function package matching table, and at the same time, the dependent package of each function package is recorded in the function package matching table. As shown in FIG. 6, FIG. Schematic diagram of unpacking the application package.
服务器400记录的功能包匹配表可以如下所示:The function package matching table recorded by the server 400 may be as follows:
000102:000102:
提供者:厂家1,属于应用包1,优质率(评估指数):xx%,功能描述:xx,下载地址:url1;Provider: manufacturer 1, belonging to application package 1, quality rate (evaluation index): xx%, function description: xx, download address: url1;
提供者:厂家2,属于应用包2,优质率(评估指数):xx%,功能描述:xx,下载地址:url2;Provider: manufacturer 2, belonging to application package 2, quality rate (evaluation index): xx%, function description: xx, download address: url2;
000201:000201:
提供者:厂家3,属于应用包3,优质率(评估指数):xx%,功能描述:xx,下载地址:url3;Provider: manufacturer 3, belonging to application package 3, quality rate (evaluation index): xx%, function description: xx, download address: url3;
000202:000202:
null;null;
000203:000203:
提供者:厂家4,属于应用包3,优质率(评估指数):xx%,功能描述:xx,下载地址:url4;Provider: Manufacturer 4, belonging to application package 3, quality rate (evaluation index): xx%, function description: xx, download address: url4;
其中,上述下载地址中包括每个功能包和该功能包的依赖包的下载地址。Wherein, the download address includes the download address of each function package and the dependent package of the function package.
可以理解的是,在具体实现时,服务器400可以通过处理器410实现上述拆包、解析和记录的操作。It can be understood that, in a specific implementation, the server 400 may implement the aforementioned unpacking, parsing, and recording operations through the processor 410.
最后,参见图7,图7为本申请一个实施例提供的电子设备查找功能包的示意图,电子设备100中第一App正在运行,如果电子设备100检测到用户在第一App所展示界面中的第一操作信息,则电子设备100可以响应于上述第一操作信息,展示功能选择界面,然后电子设备100检测到用户选择功能F的第二操作信息,响应于第二操作信息,获取功能F的描述信息,其中该功能F可以是正在运行的第一App的开发者开发的但当前未下载的功能,也可以是电子设备100安装的其他App中包含的功能。Finally, referring to Figure 7, Figure 7 is a schematic diagram of an electronic device search function package provided by an embodiment of the application. The first App in the electronic device 100 is running. If the electronic device 100 detects that the user is in the interface displayed by the first App First operation information, the electronic device 100 may display the function selection interface in response to the above-mentioned first operation information, and then the electronic device 100 detects that the user selects the second operation information of the function F, and in response to the second operation information, obtains the function F Descriptive information, where the function F may be a function developed by the developer of the running first App but not currently downloaded, or may be a function included in other apps installed on the electronic device 100.
举例来说,功能F的描述信息可以如下所示:For example, the description information of function F can be as follows:
{{
功能类别编码:000102;Function category code: 000102;
需要的功能描述:订火车票;Required function description: booking train tickets;
}}
或者,or,
{{
功能类别编码:000202;Function category code: 000202;
需要的功能描述:支付;Required function description: payment;
}}
然后,第一App通过通用接口I发送功能F的描述信息,电子设备100的常驻后台服务接收到该描述信息后,在电子设备100已安装的功能包中,查找匹配标识与功能F的描述信息相匹配的功能包,如果在本地未匹配成功,则电子设备100将功能F的描述信息发送给云端应用市场的服务器400,服务器400利用同样的方法进行匹配,匹配成功后,向电子设备100发送下载信息,下载信息中包括功能F对应的功能包及其依赖包的下载地址,然后,电子设备100中的后台常驻服务根据下载信息和电子设备100已经安装的功能包,下载功能F对应的功能包及其依赖包,并加载功能F对应的功能包。Then, the first App sends the description information of the function F through the universal interface I. After the resident background service of the electronic device 100 receives the description information, it searches for the matching identifier and the description of the function F in the function package installed in the electronic device 100 If the information matches the function package, if the local match is not successful, the electronic device 100 sends the description information of the function F to the server 400 of the cloud application market, and the server 400 uses the same method to match, and after the match is successful, the electronic device 100 Send download information. The download information includes the download address of the function package corresponding to function F and its dependent package. Then, the background resident service in the electronic device 100 corresponds to the download information and the function package installed by the electronic device 100, and the download function F corresponds to The function package and its dependent package, and load the function package corresponding to function F.
具体地,在在电子设备100已安装的功能包中,查找匹配标识与功能F的描述信息相匹配的功能包可以为:在电子设备100的已安装功能列表中,查找匹配标识与功能F的描述信息相匹配的功能包;其中,上述已安装功能列表中保存电子设备100已安装的应用程序对应的表项,上述表项中包括上述应用程序已安装的功能包的匹配标识。Specifically, among the function packages that have been installed in the electronic device 100, searching for a function package with a matching identifier that matches the description information of the function F may be: in the installed function list of the electronic device 100, searching for the matching identifier and the function F The function package with matching description information; wherein, the entry corresponding to the application program installed by the electronic device 100 is stored in the above installed function list, and the above entry includes the matching identifier of the function package installed by the above application program.
举例来说,电子设备100的已安装功能列表可以如表1所示。For example, the installed function list of the electronic device 100 may be as shown in Table 1.
表1Table 1
Figure PCTCN2021083177-appb-000001
Figure PCTCN2021083177-appb-000001
相应地,服务器400发送的下载信息中包括上述功能F对应的功能包所属的应用,这样,在下载功能F对应的功能包及其依赖包,并加载功能F对应的功能包之后,还可以在电子设备100的已安装功能列表中,获取与已加载的功能包所属的应用对应的表项,并在获取的表项中添加上述已加载的功能包的匹配标识。在具体实现时,在电子设备100的已安装功能列表中,获取与已加载的功能包所属的应用对应的表项可以为:如果电子设备100的已安装功能列表中存在与已加载的功能包所属的应用对应的表项,则可以直接在上述表项中添加上述已加载的功能包的匹配标识;如果电子设备100的已安装功能列表中不存在与已加载的功能包所属的应用对 应的表项,则需要在电子设备100的已安装功能列表中建立与已加载的功能包所属的应用对应的表项,并在上述表项中添加上述已加载的功能包的匹配标识。Correspondingly, the download information sent by the server 400 includes the application to which the function package corresponding to function F belongs. In this way, after downloading the function package corresponding to function F and its dependent packages, and loading the function package corresponding to function F, you can In the installed function list of the electronic device 100, the entry corresponding to the application to which the loaded function package belongs is obtained, and the matching identifier of the loaded function package is added to the obtained entry. In specific implementation, in the installed function list of the electronic device 100, obtaining the entry corresponding to the application to which the loaded function package belongs may be: if the installed function list of the electronic device 100 exists with the loaded function package The entry corresponding to the application belongs to, you can directly add the matching identifier of the loaded function package to the above entry; if the installed function list of the electronic device 100 does not exist in the list of installed functions corresponding to the application to which the loaded function package belongs Entries, it is necessary to create an entry corresponding to the application to which the loaded function package belongs in the installed function list of the electronic device 100, and add the matching identifier of the loaded function package to the above entry.
这里,假设功能F的描述信息中携带的功能类别编码为000203,服务器400查找到匹配标识为000203的功能包属于应用包3,应用包3在被安装到电子设备100后为第三App,这样,在电子设备100下载功能F对应的功能包及其依赖包,并加载功能F对应的功能包之后,需要在电子设备100的已安装功能列表中,获取与第三App对应的表项,并在获取的表项中添加匹配标识000203,如表2所示。Here, suppose that the function category code carried in the description information of function F is 000203, the server 400 finds that the function package with the matching identifier 000203 belongs to application package 3, and the application package 3 becomes the third App after being installed on the electronic device 100, so After the electronic device 100 downloads the function package corresponding to function F and its dependent packages, and loads the function package corresponding to function F, it needs to obtain the entry corresponding to the third App from the installed function list of the electronic device 100, and Add the matching identifier 000203 to the obtained entry, as shown in Table 2.
表2Table 2
Figure PCTCN2021083177-appb-000002
Figure PCTCN2021083177-appb-000002
可以理解的是,在具体实现时,电子设备100可以通过处理器110和触摸传感器180K,实现检测第一操作信息和第二操作信息的操作;通过处理器110与显示屏194,实现展示界面的操作;通过处理器110、天线1和移动通信模块150,和/或,通过处理器110、天线2和无线通信模块160实现与服务器400之间信息的发送和接收。It is understandable that, in specific implementation, the electronic device 100 can realize the operation of detecting the first operation information and the second operation information through the processor 110 and the touch sensor 180K; the processor 110 and the display screen 194 can realize the display interface Operation; through the processor 110, the antenna 1, and the mobile communication module 150, and/or, through the processor 110, the antenna 2, and the wireless communication module 160, the sending and receiving of information with the server 400 is realized.
在具体实现时,服务器400可以通过处理器410和通信接口420实现与电子设备100之间信息的发送和接收。In a specific implementation, the server 400 may send and receive information with the electronic device 100 through the processor 410 and the communication interface 420.
结合上述实施例及相关附图,本申请实施例提供了一种功能包的加载方法,该方法的实现涉及电子设备100侧和服务器400侧,图8为本申请一个实施例提供的功能包的加载方法的流程图,如图8所示,上述功能包的加载方法可以包括:With reference to the above-mentioned embodiments and related drawings, an embodiment of the present application provides a method for loading a function package. The implementation of the method involves the side of the electronic device 100 and the server 400 side. The flowchart of the loading method, as shown in Fig. 8, the loading method of the above-mentioned function package may include:
步骤801,电子设备检测到用户在当前运行的第一应用程序所展示界面中的第一操作信息。Step 801: The electronic device detects the first operation information of the user in the interface displayed by the first application program currently running.
具体地,电子设备100可以通过处理器110和触摸传感器180K,实现检测第一操作信息的操作。Specifically, the electronic device 100 may implement the operation of detecting the first operation information through the processor 110 and the touch sensor 180K.
其中,上述第一操作信息可以为用户在第一应用程序所展示界面中的点击、双击、长按或描绘特定图形的操作,或者上述第一操作信息可以为用户对第一应用程序所展示界面中特定图标的点击、双击或长按操作,本实施例对第一操作信息的操 作形式不作限定。Wherein, the above-mentioned first operation information may be an operation of clicking, double-clicking, long-pressing, or drawing a specific graphic by the user in the interface displayed by the first application program, or the above-mentioned first operation information may be an interface displayed by the user on the first application program For the click, double-click, or long-press operation of a specific icon in the middle, this embodiment does not limit the operation form of the first operation information.
本实施例以上述第一操作信息为用户对第一应用程序所展示界面中特定图标的点击操作为例进行说明,参见图9,图9为本申请一个实施例提供的第一应用程序所展示界面的示意图,图9中,第一操作信息为对图标91的点击操作。In this embodiment, the above-mentioned first operation information is an example of a user's click operation on a specific icon in the interface displayed by the first application program. Refer to FIG. 9, which is a display of the first application program provided by an embodiment of the application. A schematic diagram of the interface. In FIG. 9, the first operation information is a click operation on the icon 91.
步骤802,响应于上述第一操作信息,展示功能选择界面。Step 802: In response to the above-mentioned first operation information, a function selection interface is displayed.
具体地,电子设备100可以通过处理器110与显示屏194,实现展示功能选择界面的操作。Specifically, the electronic device 100 may implement the operation of displaying the function selection interface through the processor 110 and the display screen 194.
举例来说,功能选择界面的一个示例可以如图10所示,图10为本申请一个实施例提供的功能选择界面的示意图,图10中,界面1001即为功能选择界面。For example, an example of a function selection interface may be as shown in FIG. 10, which is a schematic diagram of a function selection interface provided by an embodiment of this application. In FIG. 10, interface 1001 is a function selection interface.
步骤803,检测到上述用户选择第一功能的第二操作信息。Step 803: It is detected that the above-mentioned user selects the second operation information of the first function.
同样,电子设备100可以通过处理器110和触摸传感器180K,实现检测第二操作信息的操作。Similarly, the electronic device 100 can implement the operation of detecting the second operation information through the processor 110 and the touch sensor 180K.
其中,上述第二操作信息可以为用户在功能选择界面中的功能图标的点击、双击或长按操作,本实施例对第二操作信息的操作形式不作限定,本实施例以第二操作信息为用户对功能图标的点击操作为例进行说明。Wherein, the above-mentioned second operation information may be a user's click, double-click, or long-press operation on the function icon in the function selection interface. This embodiment does not limit the operation form of the second operation information, and the second operation information is used in this embodiment as The user's click operation of the function icon is described as an example.
步骤804,响应于上述第二操作信息,获取第一功能的描述信息。Step 804: In response to the foregoing second operation information, obtain description information of the first function.
具体地,电子设备100可以通过处理器110,实现获取描述信息的操作。Specifically, the electronic device 100 may implement the operation of obtaining description information through the processor 110.
在具体实现时,处理器110可以根据上述功能图标,从第一应用程序的本地数据中,获取上述功能图标所对应功能的描述信息。In a specific implementation, the processor 110 may obtain the description information of the function corresponding to the above function icon from the local data of the first application program according to the above function icon.
步骤805,在上述电子设备已安装的功能包中,查找匹配标识与上述描述信息相匹配的功能包。In step 805, among the function packages that have been installed in the above electronic device, search for a function package whose matching identifier matches the above description information.
本实施例中,电子设备100查找功能包的过程可以如图7所示,在此不再赘述。In this embodiment, the process of searching for the function package by the electronic device 100 may be as shown in FIG. 7, which will not be repeated here.
具体地,电子设备100可以通过处理器110,实现上述查找操作。Specifically, the electronic device 100 may implement the above-mentioned search operation through the processor 110.
步骤806,当未查找到时,将上述描述信息发送给服务器。Step 806: When it is not found, the above description information is sent to the server.
步骤807,接收上述服务器发送的下载信息,上述下载信息中包括功能包的信息和上述功能包的依赖包的信息,上述功能包包括匹配标识与上述描述信息相匹配的功能包。Step 807: Receive download information sent by the server. The download information includes the information of the function package and the information of the dependency package of the function package. The function package includes a function package whose matching identifier matches the description information.
其中,上述功能包的信息可以包括上述功能包的匹配标识和下载地址,当然上述功能包的信息中还可以包括其他信息,例如:功能包的版本信息和/或厂商信息等,本实施例对此不作限定。Wherein, the information of the above-mentioned function package may include the matching identifier and download address of the above-mentioned function package. Of course, the information of the above-mentioned function package may also include other information, such as version information and/or manufacturer information of the function package. This is not limited.
上述功能包的依赖包的信息可以包括上述功能包的依赖包的匹配标识和下载地址。The information of the dependent package of the above-mentioned function package may include the matching identifier and download address of the dependent package of the above-mentioned function package.
步骤808,下载上述功能包和上述功能包的依赖包,静默安装并加载上述功能包。 Step 808, download the above-mentioned function package and the dependency package of the above-mentioned function package, silently install and load the above-mentioned function package.
本申请实施例中,静默安装包括在后台安装,而没有提示或者用户操作来打扰用户,用户体验更好,可以理解的是,本申请实施例中的静默安装也可以替换为非静默安装的方式,包括可以在安装时提示用户安装进度或者安装结果,或者向用户请求安装确认指示。In the embodiments of this application, silent installation includes installation in the background without prompts or user operations to disturb the user. The user experience is better. It is understandable that the silent installation in the embodiments of this application can also be replaced with a non-silent installation method. , Including the ability to prompt the user for installation progress or installation results during installation, or to request installation confirmation instructions from the user.
具体地,电子设备100可以通过处理器110、天线1和移动通信模块150,和/或,通过处理器110、天线2和无线通信模块160实现与服务器400之间信息的发送 和接收。Specifically, the electronic device 100 can send and receive information with the server 400 through the processor 110, the antenna 1, and the mobile communication module 150, and/or through the processor 110, the antenna 2, and the wireless communication module 160.
上述功能包的加载方法中,在电子设备100检测到用户在当前运行的第一应用程序所展示界面中的第一操作信息之后,响应于上述第一操作信息,展示功能选择界面;检测到用户选择第一功能的第二操作信息之后,响应于第二操作信息,获取第一功能的描述信息,然后在电子设备100已安装的功能包中,查找匹配标识与上述描述信息相匹配的功能包,当未查找到时,将上述描述信息发送给服务器,并接收上述服务器发送的下载信息,上述下载信息中包括匹配标识与上述描述信息相匹配的功能包的信息和上述功能包的依赖包的信息,最后电子设备100下载上述功能包和上述功能包的依赖包,静默安装并加载上述功能包,从而可以实现电子设备100根据当前运行的应用程序所需功能的描述信息下载功能包,由于上述功能包占用的存储空间较小,因此可以缩短用户下载和安装功能包的等待时长,节省电子设备100的存储空间。In the above method for loading the function package, after the electronic device 100 detects the user's first operation information in the interface displayed by the first application currently running, in response to the above first operation information, the function selection interface is displayed; the user is detected After selecting the second operation information of the first function, in response to the second operation information, obtain the description information of the first function, and then search for the function package whose matching identifier matches the description information among the function packages installed in the electronic device 100 When it is not found, the description information is sent to the server, and the download information sent by the server is received. The download information includes the information of the function package whose matching identifier matches the description information and the dependent package information of the function package. Finally, the electronic device 100 downloads the above-mentioned function package and the dependency package of the above-mentioned function package, silently installs and loads the above-mentioned function package, so that the electronic device 100 can download the function package according to the description information of the functions required by the currently running application. The function package occupies a small storage space, so the waiting time for the user to download and install the function package can be shortened, and the storage space of the electronic device 100 can be saved.
图11为本申请另一个实施例提供的功能包的加载方法的流程图,如图11所示,本申请图8所示实施例中,步骤808可以包括:FIG. 11 is a flowchart of a method for loading a function package provided by another embodiment of this application. As shown in FIG. 11, in the embodiment shown in FIG. 8 of this application, step 808 may include:
步骤1101,根据上述下载信息和上述电子设备已安装的功能包,确定待下载的依赖包。Step 1101: Determine the dependent package to be downloaded based on the download information and the function package installed on the electronic device.
具体地,电子设备100可以根据下载信息中依赖包的匹配标识和电子设备100已安装的功能包,获取下载信息中未安装的依赖包,上述未安装的依赖包即为待下载的依赖包。Specifically, the electronic device 100 may obtain a dependent package that is not installed in the download information according to the matching identifier of the dependent package in the download information and the function package that the electronic device 100 has installed. The uninstalled dependent package is the dependent package to be downloaded.
具体地,电子设备100可以通过处理器110,实现确定待下载的依赖包的操作。Specifically, the electronic device 100 may implement the operation of determining the dependent package to be downloaded through the processor 110.
步骤1102,下载上述功能包和上述待下载的依赖包,静默安装并加载上述功能包。 Step 1102, download the above-mentioned function package and the above-mentioned dependent package to be downloaded, silently install and load the above-mentioned function package.
本实施例中,电子设备100可以根据下载信息和上述电子设备已安装的功能包,确定待下载的依赖包,然后只需下载上述功能包和待下载的依赖包,静默安装并加载上述功能包,从而进一步缩减了电子设备100所需下载的安装包,进一步缩短了用户的等待时长,节省了电子设备的存储空间,其中,本申请实施例中,静默安装包括在后台安装,而没有提示或者用户操作来打扰用户,用户体验更好,可以理解的是,本申请实施例中的静默安装也可以替换为非静默安装的方式,包括可以在安装时提示用户安装进度或者安装结果,或者向用户请求安装确认指示。In this embodiment, the electronic device 100 can determine the dependency package to be downloaded based on the download information and the function package that the electronic device has installed, and then only need to download the function package and the dependency package to be downloaded, install and load the function package silently. , Thereby further reducing the installation package to be downloaded by the electronic device 100, further shortening the waiting time of the user, and saving the storage space of the electronic device. In the embodiment of the present application, silent installation includes installation in the background without prompt or User operations disturb the user, and the user experience is better. It is understandable that the silent installation in the embodiments of this application can also be replaced with a non-silent installation method, including the ability to prompt the user of the installation progress or installation result during the installation, or to inform the user Request installation confirmation instructions.
图12为本申请再一个实施例提供的功能包的加载方法的流程图,本实施例中,上述描述信息可以包括:上述功能图标所对应功能的功能类别编码,上述匹配标识可以包括:上述功能包所提供功能的功能类别编码;如图12所示,步骤805可以包括:Figure 12 is a flowchart of a method for loading a function package according to another embodiment of the application. In this embodiment, the above description information may include: the function category code of the function corresponding to the above function icon, and the above matching identifier may include: the above function The function category code of the function provided by the package; as shown in Figure 12, step 805 may include:
步骤1201,在电子设备已安装的功能包中,根据上述描述信息中的功能类别编码进行查找,获得匹配标识中的功能类别编码与上述描述信息中的功能类别编码相匹配的功能包。 Step 1201, among the function packages that have been installed in the electronic device, search according to the function category code in the above description information, and obtain a function package whose function category code in the matching identifier matches the function category code in the above description information.
举例来说,假设用户选择的功能图标所对应功能的描述信息中,功能类别编码 为000102,那么电子设备100可以根据000102在已安装的功能包中进行查找,获得匹配标识中的功能类别编码为000102的功能包。For example, suppose that in the description information of the function corresponding to the function icon selected by the user, the function category code is 000102, then the electronic device 100 can search in the installed function package according to 000102, and obtain the function category code in the matching identifier as The feature pack of 000102.
进一步地,步骤1201之后,还可以包括:Further, after step 1201, it may further include:
步骤1202,如果在上述电子设备已安装的功能包中,查找到匹配标识与上述描述信息相匹配的功能包,则在第一应用程序中加载上述相匹配的功能包,上述相匹配的功能包为第二应用程序已安装的功能包,第二应用程序安装在上述电子设备中。Step 1202: If a function package with a matching identifier that matches the description information is found among the function packages that have been installed in the above electronic device, load the above-mentioned matching function package in the first application program, and the above-mentioned matching function package is loaded into the first application program. It is a function package installed by the second application program, and the second application program is installed in the above-mentioned electronic device.
也就是说,电子设备100查找到的匹配标识与上述描述信息相匹配的功能包,可以是第二应用程序已安装的功能包,不限制查找到的功能包必须是第一应用程序中的功能包,并且查找到相匹配的功能包之后,可以直接在第一应用程序中加载相匹配的功能包,不须跳转到第二应用程序。In other words, the function package whose matching identifier found by the electronic device 100 matches the above description information may be a function package installed by the second application program, and it is not restricted that the function package found must be a function in the first application program. After finding the matching function package, you can directly load the matching function package in the first application without jumping to the second application.
进一步地,上述描述信息中还可以包括第一应用程序的厂商信息和/或版本信息;上述匹配标识中还可以包括上述功能包的厂商信息和/或版本信息;这样,在第一应用程序中加载相匹配的功能包之前,如果在电子设备已安装的功能包中,查找到的相匹配的功能包包括至少两个,则根据上述厂商信息和/或版本信息,确定上述相匹配的功能包与上述第一应用程序的匹配度;然后在第一应用程序中加载匹配度最高的功能包。Further, the above description information may also include the manufacturer information and/or version information of the first application; the above matching identifier may also include the manufacturer information and/or version information of the above function package; in this way, in the first application Before loading the matching function package, if there are at least two matching function packages found in the installed function packages of the electronic device, then the above-mentioned matching function package is determined according to the above-mentioned manufacturer information and/or version information The matching degree with the above-mentioned first application program; then the function package with the highest matching degree is loaded in the first application program.
仍以描述信息中的功能类别编码为000102为例,假设电子设备100,根据000102在已安装的功能包中,查找到两个匹配标识中的功能类别编码为000102的功能包,分别为功能包1和功能包2。这时,假设描述信息中包括第一应用程序的厂商信息和版本信息,厂商信息为厂家1,版本信息为1.0,而功能包1的匹配标识中厂商信息为厂家2,版本信息为1.0,功能包2的匹配标识中厂商信息为厂家1,版本信息为2.0,那么电子设备100可以根据上述厂商信息和版本信息,获得功能包1与第一应用程序的匹配度1,以及获得功能包2与第一应用程序的匹配度2,假设匹配度1为85%,匹配度2为90%,那么电子设备100在第一应用程序中加载功能包2。Still taking the function category code in the description information as 000102 as an example, suppose that the electronic device 100 finds the function packages with the function category code 000102 in the two matching identifiers in the installed function packages according to 000102, which are respectively function packages. 1 and feature pack 2. At this time, it is assumed that the description information includes the manufacturer information and version information of the first application. The manufacturer information is manufacturer 1, and the version information is 1.0, and the matching identifier of function package 1 is manufacturer 2 and version information 1.0. In the matching identifier of package 2, the manufacturer information is manufacturer 1, and the version information is 2.0. Then, the electronic device 100 can obtain the matching degree 1 between function package 1 and the first application according to the above manufacturer information and version information, and obtain function package 2 and The matching degree 2 of the first application program, assuming that the matching degree 1 is 85% and the matching degree 2 is 90%, then the electronic device 100 loads the function package 2 in the first application program.
具体地,电子设备100可以通过处理器110,实现步骤1201和步骤1202的操作。Specifically, the electronic device 100 may implement the operations of step 1201 and step 1202 through the processor 110.
图13为本申请再一个实施例提供的功能包的加载方法的流程图,如图13所示,上述功能包的加载方法可以包括:FIG. 13 is a flowchart of a method for loading a function package according to another embodiment of the application. As shown in FIG. 13, the method for loading a function package may include:
步骤1301,服务器接收电子设备发送的描述信息,上述描述信息是电子设备获取用户选择的第一功能的描述信息,在上述电子设备已安装的功能包中,未查找到匹配标识与上述描述信息相匹配的功能包之后发送的。Step 1301: The server receives the description information sent by the electronic device. The description information is the description information of the first function selected by the user by the electronic device. In the function package that the electronic device has installed, no matching identifier is found that matches the description information. Sent after the matched function package.
步骤1302,在功能包匹配表中,查找匹配标识与上述描述信息相匹配的功能包的信息。 Step 1302, in the function package matching table, search for the information of the function package whose matching identifier matches the above description information.
具体地,上述匹配标识可以包括:功能包所提供功能的功能类别编码;上述功能包匹配表中记录功能包所属的应用包,以及上述功能包的匹配标识、功能包的信息和上述功能包的依赖包的信息;上述描述信息可以包括:上述功能图标所对应功能的功能类别编码;这样,在功能包匹配表中,查找匹配标识与上述描述信息相匹配的功能包的信息可以为:在功能包匹配表中,根据上述描述信息中的功能类别编码进行查找,获得匹配标识中的功能类别编码与上述描述信息中的功能类别编码相 匹配的功能包。Specifically, the matching identifier may include: the function category code of the function provided by the function package; the application package to which the function package belongs is recorded in the function package matching table, and the matching identifier of the function package, the information of the function package, and the information of the function package Dependent package information; the above description information can include: the function category code of the function corresponding to the above function icon; in this way, in the function package matching table, the information of the function package whose matching identifier matches the above description information can be: In the package matching table, search is performed according to the function category code in the above description information, and a function package whose function category code in the matching identifier matches the function category code in the above description information is obtained.
步骤1303,向上述电子设备发送下载信息,上述下载信息包括上述功能包的信息和上述功能包的依赖包的信息,以使电子设备根据上述下载信息,下载上述功能包和上述功能包的依赖包。Step 1303: Send download information to the electronic device, where the download information includes the information about the function package and the dependency package of the function package, so that the electronic device downloads the function package and the dependency package of the function package according to the download information. .
举例来说,假设服务器400记录的功能包匹配表如下所示:For example, suppose that the function package matching table recorded by the server 400 is as follows:
000102:000102:
提供者:厂家1,属于应用包1,优质率(评估指数):xx%,功能描述:xx,下载地址:url1;Provider: manufacturer 1, belonging to application package 1, quality rate (evaluation index): xx%, function description: xx, download address: url1;
提供者:厂家2,属于应用包2,优质率(评估指数):xx%,功能描述:xx,下载地址:url2;Provider: manufacturer 2, belonging to application package 2, quality rate (evaluation index): xx%, function description: xx, download address: url2;
000201:000201:
提供者:厂家3,属于应用包3,优质率(评估指数):xx%,功能描述:xx,下载地址:url3;Provider: manufacturer 3, belonging to application package 3, quality rate (evaluation index): xx%, function description: xx, download address: url3;
000202:000202:
null;null;
000203:000203:
提供者:厂家4,属于应用包3,优质率(评估指数):xx%,功能描述:xx,下载地址:url4;Provider: Manufacturer 4, belonging to application package 3, quality rate (evaluation index): xx%, function description: xx, download address: url4;
其中,上述下载地址中包括每个功能包和该功能包的依赖包的下载地址。Wherein, the download address includes the download address of each function package and the dependent package of the function package.
如果电子设备100发送的描述信息为:If the description information sent by the electronic device 100 is:
{{
功能类别编码:000201;Function category code: 000201;
需要的功能描述:***;Required function description: ***;
}}
那么,服务器400可以在功能包匹配表中,根据上述描述信息中的功能类别编码000201进行查找,获得匹配标识中的功能类别编码与000201相匹配的功能包。然后将厂家3的下载地址url3发送给电子设备100,url3中包括了匹配标识中的功能类别编码为000201的功能包和该功能包的依赖包的下载地址。Then, the server 400 can search in the function package matching table according to the function category code 000201 in the above description information, and obtain the function package whose function category code in the matching identifier matches 000201. Then, the download address url3 of the manufacturer 3 is sent to the electronic device 100. The url3 includes the function package whose function category code is 000201 in the matching identifier and the download address of the dependent package of the function package.
进一步地,上述描述信息中还可以包括:上述第一应用程序的厂商信息和/或版本信息;上述匹配标识中还可以包括上述功能包的厂商信息和/或版本信息;这样,步骤1302之后,如果在功能包匹配表中,查找到的相匹配的功能包包括至少两个,则根据上述厂商信息和/或版本信息,确定上述相匹配的功能包与第一应用程序的匹配度。这样服务器400向电子设备100发送的下载信息中包括匹配度最高的功能包的信息和上述匹配度最高的功能包的依赖包的信息。Further, the description information may also include: manufacturer information and/or version information of the first application; the matching identifier may also include manufacturer information and/or version information of the function package; in this way, after step 1302, If in the function package matching table, the found matching function packages include at least two, then according to the manufacturer information and/or version information, the degree of matching between the matching function package and the first application is determined. In this way, the download information sent by the server 400 to the electronic device 100 includes the information of the function package with the highest matching degree and the package-dependent information of the above-mentioned function package with the highest matching degree.
举例来说,如果电子设备100发送的描述信息为:For example, if the description information sent by the electronic device 100 is:
{{
功能类别编码:000102;Function category code: 000102;
需要的功能描述:订火车票;Required function description: booking train tickets;
}}
那么,服务器400可以在功能包匹配表中,根据上述描述信息中的功能类别编码000102进行查找,获得匹配标识中的功能类别编码与000102相匹配的功能包,查找的功能包有两个,分别为功能包1和功能包2。这时,假设描述信息中包括第一应用程序的厂商信息,厂商信息为厂家1,而功能包1的匹配标识中厂商信息为厂家1,功能包2的匹配标识中厂商信息为厂家1,那么电子设备100可以根据上述厂商信息,获得功能包1与第一应用程序的匹配度为100%,以及获得功能包2与第一应用程序的匹配度为90%,于是服务器400将厂家1的下载地址url1发送给电子设备100,url1中包括了匹配标识中的功能类别编码为000102的功能包1和功能包1的依赖包的下载地址。Then, the server 400 can search in the function package matching table according to the function category code 000102 in the above description information, and obtain the function package whose function category code in the matching identifier matches 000102. There are two function packages searched, respectively It is function package 1 and function package 2. At this time, assuming that the description information includes the manufacturer information of the first application, the manufacturer information is manufacturer 1, and the manufacturer information in the matching identifier of function package 1 is manufacturer 1, and the manufacturer information in the matching identifier of function package 2 is manufacturer 1, then The electronic device 100 can obtain, according to the above manufacturer information, that the matching degree between the function package 1 and the first application is 100%, and the matching degree between the function package 2 and the first application is 90%, and the server 400 downloads the manufacturer 1’s The address url1 is sent to the electronic device 100, and the url1 includes the download addresses of the function package 1 whose function category code is 000102 in the matching identifier and the dependent package of the function package 1.
上述举例中,服务器400查找到的匹配标识与上述描述信息相匹配的功能包是功能类别编码完全相同的功能包,另外,匹配标识与上述描述信息相匹配的功能包也可以包括功能类别编码不完全相同,但属于同一功能大类的功能包。In the above example, the function package whose matching identifier matches the above description information found by the server 400 is a function package with exactly the same function category code. In addition, the function package whose matching identifier matches the above description information may also include the function category code. Feature packages that are identical, but belong to the same functional category.
举例来说,如果电子设备100发送的描述信息为:For example, if the description information sent by the electronic device 100 is:
{{
功能类别编码:000202;Function category code: 000202;
需要的功能描述:支付;Required function description: payment;
}}
那么,服务器400可以在功能包匹配表中,根据上述描述信息中的功能类别编码000202进行查找,未查找到匹配标识中的功能类别编码为000202的功能包,那么服务器400可以查找与000202属于同一功能大类(0002)中的功能包,这时,服务器400查找到两个功能包,匹配标识中的功能类别编码分别为000201和000203,然后服务器400可以根据上述厂商信息和/或版本信息,确定功能类别编码为000201的功能包与第一应用程序的匹配度,以及功能类别编码为000203的功能包与第一应用程序的匹配度,这里假设功能类别编码为000203的功能包与第一应用程序的匹配度较高,于是服务器400将厂家4的下载地址url4发送给电子设备100,url4中包括了匹配标识中的功能类别编码为000203的功能包和该功能包的依赖包的下载地址。Then, the server 400 can search in the function package matching table according to the function category code 000202 in the description information. If the function package whose function category code is 000202 in the matching identifier is not found, then the server 400 can find the same as 000202 The function package in the function category (0002). At this time, the server 400 finds two function packages, and the function category codes in the matching identifier are 000201 and 000203 respectively. Then, the server 400 can, according to the above-mentioned manufacturer information and/or version information, Determine the degree of matching between the function package with the function category code of 000201 and the first application, and the degree of matching between the function package with the function category code of 000203 and the first application. Here it is assumed that the function package with the function category code of 000203 and the first application The program has a high degree of matching, so the server 400 sends the download address url4 of the manufacturer 4 to the electronic device 100. The url4 includes the function package whose function category code is 000203 in the matching identifier and the download address of the dependent package of the function package.
在具体实现时,服务器400可以通过处理器410和通信接口420,实现步骤1301和步骤1303的操作,通过处理器410实现步骤1302的操作。In a specific implementation, the server 400 may implement the operations of step 1301 and step 1303 through the processor 410 and the communication interface 420, and implement the operation of step 1302 through the processor 410.
上述功能包的加载方法中,服务器400接收电子设备100发送的描述信息之后,在功能包匹配表中,查找匹配标识与上述描述信息相匹配的功能包的信息,然后向上述电子设备100发送下载信息,上述下载信息包括相匹配的功能包的信息和相匹配的功能包的依赖包的信息,从而电子设备100可以根据上述下载信息和上述电子设备100已安装的功能包,下载相匹配的功能包和相匹配的功能包的依赖包,实现了电子设备100根据当前运行的应用程序所需功能的描述信息下载功能包,由于上述功能包占用的存储空间较小,因此可以缩短用户下载和安装功能包的等待时长,节省电子设备100的存储空间。In the above method for loading the function package, after the server 400 receives the description information sent by the electronic device 100, it searches the function package matching table for the information of the function package whose matching identifier matches the description information, and then sends the download to the electronic device 100. Information, the download information includes the information of the matching function package and the information of the dependent package of the matching function package, so that the electronic device 100 can download the matching function according to the download information and the function package that the electronic device 100 has installed The package and the dependent package of the matching function package enable the electronic device 100 to download the function package according to the description information of the function required by the currently running application. Since the above function package occupies a small storage space, the user download and installation can be shortened The waiting time of the function package saves the storage space of the electronic device 100.
图14为本申请功能包的加载方法再一个实施例的流程图,如图14所示,本申请图13所示实施例中,步骤1302之前,还可以包括:Fig. 14 is a flowchart of another embodiment of a method for loading a function package of this application. As shown in Fig. 14, in the embodiment shown in Fig. 13 of this application, before step 1302, it may further include:
步骤1401,接收开发者上传的应用包;Step 1401: Receive the application package uploaded by the developer;
步骤1402,对上述应用包进行拆分,获取上述应用包包括的功能包。Step 1402: Split the above-mentioned application package to obtain the function packages included in the above-mentioned application package.
步骤1403,解析上述应用包包括的每个功能包,获取上述功能包的依赖包的匹配标识和上述功能包的匹配标识。Step 1403: Analyze each function package included in the above-mentioned application package, and obtain the matching identifier of the dependent package of the above-mentioned function package and the matching identifier of the above-mentioned function package.
步骤1404,在上述功能包匹配表中记录上述功能包所属的应用包,以及上述功能包的匹配标识和上述功能包的依赖包的匹配标识。Step 1404: Record in the function package matching table the application package to which the function package belongs, and the matching identifier of the function package and the matching identifier of the dependent package of the function package.
本实施例中,服务器400对开发者上传的应用包进行拆分的过程可以如图6所示,在此不再赘述。In this embodiment, the process in which the server 400 splits the application package uploaded by the developer may be as shown in FIG. 6, which will not be repeated here.
可以理解的是,上述实施例中的部分或全部步骤骤或操作仅是示例,本申请实施例还可以执行其它操作或者各种操作的变形。此外,各个步骤可以按照上述实施例呈现的不同的顺序来执行,并且有可能并非要执行上述实施例中的全部操作。It can be understood that some or all of the steps or operations in the above-mentioned embodiments are merely examples, and the embodiments of the present application may also perform other operations or various operation modifications. In addition, each step may be performed in a different order presented in the foregoing embodiment, and it may not be necessary to perform all operations in the foregoing embodiment.
可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本申请所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It can be understood that, in order to implement the above-mentioned functions, an electronic device includes hardware and/or software modules corresponding to each function. In combination with the algorithm steps of the examples described in the embodiments disclosed in this application, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Those skilled in the art can use different methods for each specific application in combination with the embodiments to implement the described functions, but such implementation should not be considered as going beyond the scope of the present application.
本实施例可以根据上述方法实施例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment, the electronic device may be divided into functional modules according to the foregoing method embodiments. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
图15为本申请另一个实施例提供的电子设备的结构示意图,在采用对应各个功能划分各个功能模块的情况下,图15示出了上述实施例中涉及的电子设备1500的一种可能的组成示意图,如图15所示,该电子设备1500可以包括:接收单元1501、处理单元1502和发送单元1503;FIG. 15 is a schematic structural diagram of an electronic device provided by another embodiment of the application. In the case of dividing each functional module corresponding to each function, FIG. 15 shows a possible composition of the electronic device 1500 involved in the foregoing embodiment. For a schematic diagram, as shown in FIG. 15, the electronic device 1500 may include: a receiving unit 1501, a processing unit 1502, and a sending unit 1503;
其中,接收单元1501可以用于支持电子设备1500执行步骤808、步骤809和步骤1102等,和/或用于本申请实施例所描述的技术方案的其他过程;Wherein, the receiving unit 1501 can be used to support the electronic device 1500 to perform step 808, step 809, step 1102, etc., and/or used in other processes of the technical solutions described in the embodiments of the present application;
处理单元1502可以用于支持电子设备1500执行步骤801~步骤806,以及步骤1101、步骤1201和步骤1202等,和/或用于本申请实施例所描述的技术方案的其他过程;The processing unit 1502 may be used to support the electronic device 1500 to perform steps 801 to 806, steps 1101, 1201, and 1202, etc., and/or other processes used in the technical solutions described in the embodiments of the present application;
发送单元1503可以用于支持电子设备1500执行步骤807等,和/或用于本申请实施例所描述的技术方案的其他过程。The sending unit 1503 may be used to support the electronic device 1500 to execute step 807, etc., and/or used in other processes of the technical solutions described in the embodiments of the present application.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that all relevant content of the steps involved in the foregoing method embodiments can be cited in the functional description of the corresponding functional module, and will not be repeated here.
本实施例提供的电子设备1500,用于执行上述功能包的加载方法,因此可以达到与上述方法相同的效果。The electronic device 1500 provided in this embodiment is used to execute the above-mentioned method for loading the function package, and therefore can achieve the same effect as the above-mentioned method.
应当理解的是,电子设备1500可以对应于图1所示的电子设备100。其中,接 收单元1501和发送单元1503的功能可以由图1所示的电子设备100中处理器110、天线1和移动通信模块150,和/或,由处理器110、天线2和无线通信模块160实现;处理单元1502的功能可以由图1所示的电子设备100中的处理器110和触摸传感器180K实现。It should be understood that the electronic device 1500 may correspond to the electronic device 100 shown in FIG. 1. Among them, the functions of the receiving unit 1501 and the sending unit 1503 may be implemented by the processor 110, the antenna 1 and the mobile communication module 150 in the electronic device 100 shown in FIG. 1, and/or, by the processor 110, the antenna 2 and the wireless communication module 160 Implementation; the function of the processing unit 1502 can be implemented by the processor 110 and the touch sensor 180K in the electronic device 100 shown in FIG. 1.
在采用集成的单元的情况下,电子设备1500可以包括处理模块、存储模块和通信模块。In the case of adopting an integrated unit, the electronic device 1500 may include a processing module, a storage module, and a communication module.
其中,处理模块可以用于对电子设备1500的动作进行控制管理,例如,可以用于支持电子设备1500执行上述接收单元1501、处理单元1502和发送单元1503执行的步骤。存储模块可以用于支持电子设备1500存储程序代码和数据等。通信模块,可以用于支持电子设备1500与其他设备的通信。The processing module can be used to control and manage the actions of the electronic device 1500, for example, can be used to support the electronic device 1500 to execute the steps performed by the receiving unit 1501, the processing unit 1502, and the sending unit 1503. The storage module can be used to support the electronic device 1500 to store program codes and data. The communication module can be used to support the communication between the electronic device 1500 and other devices.
其中,处理模块可以是处理器或控制器,其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框、模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片和/或Wi-Fi芯片等与其他电子设备交互的设备。The processing module may be a processor or a controller, which may implement or execute various exemplary logical blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The storage module may be a memory. The communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and/or a Wi-Fi chip.
在一个实施例中,当处理模块为处理器,存储模块为存储器时,本实施例所涉及的电子设备1500可以为具有图1所示结构的设备。In an embodiment, when the processing module is a processor and the storage module is a memory, the electronic device 1500 involved in this embodiment may be a device having the structure shown in FIG. 1.
同样,可以理解的是,服务器为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本申请所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Similarly, it can be understood that, in order to implement the above-mentioned functions, the server includes hardware and/or software modules corresponding to each function. In combination with the algorithm steps of the examples described in the embodiments disclosed in this application, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Those skilled in the art can use different methods for each specific application in combination with the embodiments to implement the described functions, but such implementation should not be considered as going beyond the scope of the present application.
本实施例可以根据上述方法实施例对服务器进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment, the server may be divided into functional modules according to the foregoing method embodiments. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
图16为本申请另一个实施例提供的服务器的结构示意图,在采用对应各个功能划分各个功能模块的情况下,图16示出了上述实施例中涉及的服务器1600的一种可能的组成示意图,如图16所示,该服务器1600可以包括:接收单元1601、处理单元1602和发送单元1603;FIG. 16 is a schematic structural diagram of a server provided by another embodiment of the application. In the case of dividing each functional module corresponding to each function, FIG. 16 shows a schematic diagram of a possible composition of the server 1600 involved in the foregoing embodiment. As shown in FIG. 16, the server 1600 may include: a receiving unit 1601, a processing unit 1602, and a sending unit 1603;
其中,接收单元1601可以用于支持服务器1600执行步骤1301和步骤1401等,和/或用于本申请实施例所描述的技术方案的其他过程;Wherein, the receiving unit 1601 may be used to support the server 1600 to perform step 1301 and step 1401, etc., and/or used in other processes of the technical solutions described in the embodiments of the present application;
处理单元1602可以用于支持服务器1600执行步骤1302、步骤1402、步骤1403和步骤1404等,和/或用于本申请实施例所描述的技术方案的其他过程;The processing unit 1602 may be used to support the server 1600 to perform step 1302, step 1402, step 1403, step 1404, etc., and/or other processes used in the technical solutions described in the embodiments of the present application;
发送单元1603可以用于支持服务器1600执行步骤1303等,和/或用于本申请实施例所描述的技术方案的其他过程。The sending unit 1603 may be used to support the server 1600 to perform step 1303, etc., and/or used in other processes of the technical solutions described in the embodiments of the present application.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对 应功能模块的功能描述,在此不再赘述。It should be noted that all relevant content of the steps involved in the above method embodiments can be cited in the functional description of the corresponding functional module, and will not be repeated here.
本实施例提供的服务器1600,用于执行上述功能包的加载方法,因此可以达到与上述方法相同的效果。The server 1600 provided in this embodiment is used to execute the above-mentioned method for loading the function package, so the same effect as the above-mentioned method can be achieved.
应当理解的是,服务器1600可以对应于图4所示的服务器400。其中,接收单元1601和发送单元1603的功能可以由图4所示的服务器400中处理器410和通信接口420实现;处理单元1602的功能可以由图4所示的服务器400中的处理器410实现。It should be understood that the server 1600 may correspond to the server 400 shown in FIG. 4. The functions of the receiving unit 1601 and the sending unit 1603 may be implemented by the processor 410 and the communication interface 420 in the server 400 shown in FIG. 4; the functions of the processing unit 1602 may be implemented by the processor 410 in the server 400 shown in FIG. .
在采用集成的单元的情况下,服务器1600可以包括处理模块、存储模块和通信模块。In the case of an integrated unit, the server 1600 may include a processing module, a storage module, and a communication module.
其中,处理模块可以用于对服务器1600的动作进行控制管理,例如,可以用于支持服务器1600执行上述接收单元1601、处理单元1602和发送单元1603执行的步骤。存储模块可以用于支持服务器1600存储程序代码和数据等。通信模块,可以用于支持服务器1600与其他设备的通信。The processing module can be used to control and manage the actions of the server 1600. For example, it can be used to support the server 1600 to execute the steps performed by the receiving unit 1601, the processing unit 1602, and the sending unit 1603. The storage module can be used to support the server 1600 to store program codes and data. The communication module can be used to support the communication between the server 1600 and other devices.
其中,处理模块可以是处理器或控制器,其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框、模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片和/或Wi-Fi芯片等与其他电子设备交互的设备。The processing module may be a processor or a controller, which may implement or execute various exemplary logical blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The storage module may be a memory. The communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and/or a Wi-Fi chip.
在一个实施例中,当处理模块为处理器,存储模块为存储器时,本实施例所涉及的服务器1600可以为具有图4所示结构的设备。In an embodiment, when the processing module is a processor and the storage module is a memory, the server 1600 involved in this embodiment may be a device having the structure shown in FIG. 4.
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行本申请图8~图12所示实施例提供的方法。The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when it runs on a computer, the computer executes the functions provided by the embodiments shown in Figs. 8 to 12 of the present application. method.
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行本申请图13~图14所示实施例提供的方法。The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when it runs on a computer, the computer executes the functions provided by the embodiments shown in Figs. 13 to 14 of the present application. method.
本申请实施例还提供一种计算机程序产品,该计算机程序产品包括计算机程序,当其在计算机上运行时,使得计算机执行本申请图8~图12所示实施例提供的方法。The embodiments of the present application also provide a computer program product. The computer program product includes a computer program that, when running on a computer, causes the computer to execute the method provided by the embodiments shown in FIG. 8 to FIG. 12 of the present application.
本申请实施例还提供一种计算机程序产品,该计算机程序产品包括计算机程序,当其在计算机上运行时,使得计算机执行本申请图13~图14所示实施例提供的方法。The embodiments of the present application also provide a computer program product, which includes a computer program, which when running on a computer, causes the computer to execute the method provided by the embodiments shown in FIG. 13 to FIG. 14 of the present application.
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a和b,a和c,b和c或a和b和c,其中a,b,c可以是单个,也可以是多个。In the embodiments of the present application, "at least one" refers to one or more, and "multiple" refers to two or more. "And/or" describes the association relationship of the associated objects, indicating that there can be three types of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. Among them, A and B can be singular or plural. The character "/" generally indicates that the associated objects before and after are in an "or" relationship. "The following at least one item" and similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single, or There can be more than one.
本领域普通技术人员可以意识到,本文中公开的实施例中描述的各单元及算法 步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may be aware that the units and algorithm steps described in the embodiments disclosed in this document can be implemented by a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered as going beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the above-described system, device, and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program code .
以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application. Any person skilled in the art can easily conceive of changes or substitutions within the technical scope disclosed in this application, and they should all be covered by the protection scope of this application. The protection scope of this application shall be subject to the protection scope of the claims.

Claims (26)

  1. 一种功能包的加载方法,其特征在于,包括:A method for loading a function package, which is characterized in that it includes:
    电子设备检测到用户在当前运行的第一应用程序所展示界面中的第一操作信息;The electronic device detects the first operation information of the user in the interface displayed by the first application program currently running;
    响应于所述第一操作信息,展示功能选择界面;In response to the first operation information, display a function selection interface;
    检测到所述用户选择第一功能的第二操作信息;Second operation information of the first function selected by the user is detected;
    响应于所述第二操作信息,获取所述第一功能的描述信息;In response to the second operation information, obtaining description information of the first function;
    在所述电子设备已安装的功能包中,查找匹配标识与所述描述信息相匹配的功能包;Searching for a function package whose matching identifier matches the description information among the function packages that have been installed on the electronic device;
    当未查找到时,将所述描述信息发送给服务器;When it is not found, send the description information to the server;
    接收所述服务器发送的下载信息,所述下载信息中包括功能包的信息和所述功能包的依赖包的信息,所述功能包包括匹配标识与所述描述信息相匹配的功能包;Receiving download information sent by the server, where the download information includes information about a function package and information about a dependent package of the function package, and the function package includes a function package whose matching identifier matches the description information;
    下载所述功能包和所述功能包的依赖包,静默安装并加载所述功能包。Download the function package and the dependent package of the function package, silently install and load the function package.
  2. 根据权利要求1所述的方法,其特征在于,所述下载所述功能包和所述功能包的依赖包,静默安装并加载所述功能包包括:The method according to claim 1, wherein the downloading the function package and the dependent package of the function package, silently installing and loading the function package comprises:
    根据所述下载信息和所述电子设备已安装的功能包,确定待下载的依赖包;Determine the dependent package to be downloaded according to the download information and the function package installed on the electronic device;
    下载所述功能包和所述待下载的依赖包,静默安装并加载所述功能包。Download the function package and the dependent package to be downloaded, silently install and load the function package.
  3. 根据权利要求1或2所述的方法,其特征在于,所述描述信息包括:所述功能图标所对应功能的功能类别编码,所述匹配标识包括:所述功能包所提供功能的功能类别编码;The method according to claim 1 or 2, wherein the description information includes: the function category code of the function corresponding to the function icon, and the matching identifier includes: the function category code of the function provided by the function package ;
    所述在所述电子设备已安装的功能包中,查找匹配标识与所述描述信息相匹配的功能包包括:The searching for a function package whose matching identifier matches the description information among the function packages that have been installed on the electronic device includes:
    在所述电子设备已安装的功能包中,根据所述描述信息中的功能类别编码进行查找,获得匹配标识中的功能类别编码与所述描述信息中的功能类别编码相匹配的功能包。Among the function packages installed in the electronic device, searching is performed according to the function category code in the description information, and a function package whose function category code in the matching identifier matches the function category code in the description information is obtained.
  4. 根据权利要求3所述的方法,其特征在于,所述在所述电子设备已安装的功能包中,查找匹配标识与所述描述信息相匹配的功能包之后,还包括:The method according to claim 3, wherein, after searching for a function package whose matching identifier matches the description information among the function packages installed in the electronic device, the method further comprises:
    如果在所述电子设备已安装的功能包中,查找到匹配标识与所述描述信息相匹配的功能包,则在所述第一应用程序中加载所述相匹配的功能包,所述相匹配的功能包为第二应用程序已安装的功能包,所述第二应用程序安装在所述电子设备中。If a function package with a matching identifier that matches the description information is found among the function packages installed in the electronic device, the matching function package is loaded in the first application, and the matching function package is The function package of is a function package that has been installed by a second application, and the second application is installed in the electronic device.
  5. 根据权利要求4所述的方法,其特征在于,所述描述信息中还包括所述第一应用程序的厂商信息和/或版本信息;所述匹配标识中还包括所述功能包的厂商信息和/或版本信息;The method according to claim 4, wherein the description information further includes manufacturer information and/or version information of the first application; the matching identifier also includes manufacturer information and/or version information of the function package. /Or version information;
    所述在所述第一应用程序中加载所述相匹配的功能包之前,还包括:Before loading the matching function package in the first application, the method further includes:
    如果在所述电子设备已安装的功能包中,查找到的相匹配的功能包包括至少两个,则根据所述厂商信息和/或版本信息,确定所述相匹配的功能包与所述第一应用程序的匹配度;If among the function packages installed in the electronic device, the found matching function packages include at least two, then according to the manufacturer information and/or version information, it is determined that the matching function package and the first The degree of matching of an application;
    所述在所述第一应用程序中加载所述相匹配的功能包包括:The loading the matched function package in the first application includes:
    在所述第一应用程序中加载匹配度最高的功能包。Load the function package with the highest matching degree in the first application program.
  6. 根据权利要求1所述的方法,其特征在于,所述在所述电子设备已安装的功能包中,查找匹配标识与所述描述信息相匹配的功能包包括:The method according to claim 1, wherein, in the function packages installed in the electronic device, searching for a function package whose matching identifier matches the description information comprises:
    在所述电子设备的已安装功能列表中,查找匹配标识与所述描述信息相匹配的功能包;其中,所述已安装功能列表中保存所述电子设备已安装的应用程序对应的表项,所述表项中包括所述应用程序已安装的功能包的匹配标识。In the installed function list of the electronic device, search for a function package with a matching identifier that matches the description information; wherein, the installed function list stores entries corresponding to the applications installed on the electronic device, The entry includes the matching identifier of the installed function package of the application.
  7. 根据权利要求6所述的方法,其特征在于,所述下载信息中包括所述功能包所属的应用,所述下载所述功能包和所述功能包的依赖包,静默安装并加载所述功能包之后,还包括:The method according to claim 6, wherein the download information includes the application to which the function package belongs, the downloading the function package and the dependent package of the function package, silently installing and loading the function After the package, it also includes:
    在所述电子设备的已安装功能列表中,获取与已加载的功能包所属的应用对应的表项,并在获取的表项中添加所述已加载的功能包的匹配标识。In the installed function list of the electronic device, the entry corresponding to the application to which the loaded function package belongs is obtained, and the matching identifier of the loaded function package is added to the obtained entry.
  8. 一种功能包的加载方法,其特征在于,包括:A method for loading a function package, which is characterized in that it includes:
    服务器接收电子设备发送的描述信息,所述描述信息是所述电子设备获取用户选择的第一功能的描述信息,在所述电子设备已安装的功能包中,未查找到匹配标识与所述描述信息相匹配的功能包之后发送的;The server receives the description information sent by the electronic device, and the description information is the description information of the first function selected by the electronic device obtained by the user. In the function package installed on the electronic device, no matching identifier and the description are found. Sent after the functional package with matching information;
    在功能包匹配表中,查找匹配标识与所述描述信息相匹配的功能包的信息;In the function package matching table, search for the information of the function package whose matching identifier matches the description information;
    向所述电子设备发送下载信息,所述下载信息包括所述功能包的信息和所述功能包的依赖包的信息,以使所述电子设备根据所述下载信息,下载所述功能包和所述功能包的依赖包。Send download information to the electronic device, where the download information includes the information of the function package and the information of the dependency package of the function package, so that the electronic device downloads the function package and all the function packages according to the download information. The dependency package of the function package.
  9. 根据权利要求8所述的方法,其特征在于,所述在功能包匹配表中,查找匹配标识与所述描述信息相匹配的功能包的信息之前,还包括:The method according to claim 8, characterized in that, before searching in the function package matching table, the method further comprises:
    接收开发者上传的应用包;Receive application packages uploaded by developers;
    对所述应用包进行拆分,获取所述应用包包括的功能包;Split the application package to obtain function packages included in the application package;
    解析所述应用包包括的每个功能包,获取所述功能包的依赖包的匹配标识和所述功能包的匹配标识;Parse each function package included in the application package, and obtain the matching identifier of the dependent package of the function package and the matching identifier of the function package;
    在所述功能包匹配表中记录所述功能包所属的应用包,以及所述功能包的匹配标识和所述功能包的依赖包的匹配标识。Record in the function package matching table the application package to which the function package belongs, as well as the matching identifier of the function package and the matching identifier of the dependent package of the function package.
  10. 根据权利要求8或9所述的方法,其特征在于,所述匹配标识包括:功能包所提供功能的功能类别编码;所述功能包匹配表中记录功能包所属的应用包、所述功能包的匹配标识、功能包的信息和所述功能包的依赖包的信息;所述描述信息包括:所述功能图标所对应功能的功能类别编码;The method according to claim 8 or 9, wherein the matching identifier comprises: the function category code of the function provided by the function package; the function package matching table records the application package to which the function package belongs, and the function package The matching identifier, the information of the function package and the information of the dependent package of the function package; the description information includes: the function category code of the function corresponding to the function icon;
    所述在功能包匹配表中,查找匹配标识与所述描述信息相匹配的功能包的信息包括:In the function package matching table, searching for the information of the function package whose matching identifier matches the description information includes:
    在功能包匹配表中,根据所述描述信息中的功能类别编码进行查找,获得匹配标识中的功能类别编码与所述描述信息中的功能类别编码相匹配的功能包。In the function package matching table, search is performed according to the function category code in the description information, and a function package whose function category code in the matching identifier matches the function category code in the description information is obtained.
  11. 根据权利要求10所述的方法,其特征在于,所述描述信息中还包括:所述第一应用程序的厂商信息和/或版本信息;所述匹配标识中还包括所述功能包的厂商信息和/或版本信息;The method according to claim 10, wherein the description information further includes: manufacturer information and/or version information of the first application; the matching identifier also includes manufacturer information of the function package And/or version information;
    所述在功能包匹配表中,查找匹配标识与所述描述信息相匹配的功能包的信息之后,还包括:In the function package matching table, after searching the information of the function package whose matching identifier matches the description information, the method further includes:
    如果在所述功能包匹配表中,查找到的相匹配的功能包包括至少两个,则根据 所述厂商信息和/或版本信息,确定所述相匹配的功能包与所述第一应用程序的匹配度;If in the function package matching table, the found matching function package includes at least two, then according to the manufacturer information and/or version information, it is determined that the matching function package is the same as the first application program. Matching degree;
    则所述下载信息中包括匹配度最高的功能包的信息和所述匹配度最高的功能包的依赖包的信息。Then, the download information includes the information of the functional package with the highest matching degree and the information of the dependent package of the functional package with the highest matching degree.
  12. 一种功能包的加载装置,其特征在于,用于执行如权利要求1至7任一所述的方法。A loading device for a function package, which is characterized in that it is used to execute the method according to any one of claims 1 to 7.
  13. 一种功能包的加载装置,其特征在于,用于执行如权利要求8至11任一所述的方法。A loading device of a function package, which is characterized in that it is used to execute the method according to any one of claims 8 to 11.
  14. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述电子设备执行时,使得所述电子设备执行以下步骤:One or more processors; a memory; a plurality of application programs; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, When the instruction is executed by the electronic device, the electronic device is caused to execute the following steps:
    检测到用户在当前运行的第一应用程序所展示界面中的第一操作信息;The first operation information of the user in the interface displayed by the currently running first application is detected;
    响应于所述第一操作信息,展示功能选择界面;In response to the first operation information, display a function selection interface;
    检测到所述用户选择第一功能的第二操作信息;Second operation information of the first function selected by the user is detected;
    响应于所述第二操作信息,获取所述第一功能的描述信息;In response to the second operation information, obtaining description information of the first function;
    在所述电子设备已安装的功能包中,查找匹配标识与所述描述信息相匹配的功能包;Searching for a function package whose matching identifier matches the description information among the function packages that have been installed on the electronic device;
    当未查找到时,则将所述描述信息发送给服务器;When it is not found, send the description information to the server;
    接收所述服务器发送的下载信息,所述下载信息中包括功能包的信息和所述功能包的依赖包的信息,所述功能包包括匹配标识与所述描述信息相匹配的功能包;Receiving download information sent by the server, where the download information includes information about a function package and information about a dependent package of the function package, and the function package includes a function package whose matching identifier matches the description information;
    下载所述功能包和所述功能包的依赖包,静默安装并加载所述功能包。Download the function package and the dependent package of the function package, silently install and load the function package.
  15. 根据权利要求14所述的电子设备,其特征在于,当所述指令被所述电子设备执行时,使得所述电子设备执行所述下载所述功能包和所述功能包的依赖包,加载所述功能包的步骤包括:The electronic device according to claim 14, wherein when the instruction is executed by the electronic device, the electronic device is caused to execute the download of the function package and the dependency package of the function package, and load all The steps of the function package include:
    根据所述下载信息和所述电子设备已安装的功能包,确定待下载的依赖包;Determine the dependent package to be downloaded according to the download information and the function package installed on the electronic device;
    下载所述功能包和所述待下载的依赖包,静默安装并加载所述功能包。Download the function package and the dependent package to be downloaded, silently install and load the function package.
  16. 根据权利要求14或15所述的电子设备,其特征在于,所述描述信息包括:所述功能图标所对应功能的功能类别编码,所述匹配标识包括:所述功能包所提供功能的功能类别编码;The electronic device according to claim 14 or 15, wherein the description information includes: the function category code of the function corresponding to the function icon, and the matching identifier includes: the function category of the function provided by the function package coding;
    当所述指令被所述电子设备执行时,使得所述电子设备执行所述在所述电子设备已安装的功能包中,查找匹配标识与所述描述信息相匹配的功能包的步骤包括:When the instruction is executed by the electronic device, causing the electronic device to execute the function package that has been installed in the electronic device, the step of searching for a function package whose matching identifier matches the description information includes:
    在所述电子设备已安装的功能包中,根据所述描述信息中的功能类别编码进行查找,获得匹配标识中的功能类别编码与所述描述信息中的功能类别编码相匹配的功能包。Among the function packages installed in the electronic device, searching is performed according to the function category code in the description information, and a function package whose function category code in the matching identifier matches the function category code in the description information is obtained.
  17. 根据权利要求16所述的电子设备,其特征在于,当所述指令被所述电子设备执行时,使得所述电子设备执行所述在所述电子设备已安装的功能包中,查找匹配标识与所述描述信息相匹配的功能包的步骤之后,还执行以下步骤:The electronic device according to claim 16, wherein when the instruction is executed by the electronic device, the electronic device is caused to execute the search for a matching identifier and a function package installed in the electronic device. After the step of the function package matching the description information, the following steps are also performed:
    如果在所述电子设备已安装的功能包中,查找到匹配标识与所述描述信息相匹配的功能包,则在所述第一应用程序中加载所述相匹配的功能包,所述相匹配的功 能包为第二应用程序已安装的功能包,所述第二应用程序安装在所述电子设备中。If a function package with a matching identifier that matches the description information is found among the function packages installed in the electronic device, the matching function package is loaded in the first application, and the matching function package is The function package of is a function package that has been installed by a second application, and the second application is installed in the electronic device.
  18. 根据权利要求17所述的电子设备,其特征在于,所述描述信息中还包括所述第一应用程序的厂商信息和/或版本信息;所述匹配标识中还包括所述功能包的厂商信息和/或版本信息;The electronic device according to claim 17, wherein the description information further includes manufacturer information and/or version information of the first application; the matching identifier also includes manufacturer information of the function package And/or version information;
    当所述指令被所述电子设备执行时,使得所述电子设备执行所述在所述第一应用程序中加载所述相匹配的功能包的步骤之前,还执行以下步骤:When the instruction is executed by the electronic device, the electronic device further executes the following steps before executing the step of loading the matching function package in the first application:
    如果在所述电子设备已安装的功能包中,查找到的相匹配的功能包包括至少两个,则根据所述厂商信息和/或版本信息,确定所述相匹配的功能包与所述第一应用程序的匹配度;If among the function packages installed in the electronic device, the found matching function packages include at least two, then according to the manufacturer information and/or version information, it is determined that the matching function package and the first The degree of matching of an application;
    所述在所述第一应用程序中加载所述相匹配的功能包包括:The loading the matched function package in the first application includes:
    在所述第一应用程序中加载匹配度最高的功能包。Load the function package with the highest matching degree in the first application program.
  19. 根据权利要求14所述的电子设备,其特征在于,当所述指令被所述电子设备执行时,使得所述电子设备执行所述在所述电子设备已安装的功能包中,查找匹配标识与所述描述信息相匹配的功能包的步骤包括:The electronic device according to claim 14, wherein when the instruction is executed by the electronic device, the electronic device is caused to execute the search for a matching identifier and a function package installed in the electronic device. The step of the function package matching the description information includes:
    在所述电子设备的已安装功能列表中,查找匹配标识与所述描述信息相匹配的功能包;其中,所述已安装功能列表中保存所述电子设备已安装的应用程序对应的表项,所述表项中包括所述应用程序已安装的功能包的匹配标识。In the installed function list of the electronic device, search for a function package with a matching identifier that matches the description information; wherein, the installed function list stores entries corresponding to the applications installed on the electronic device, The entry includes the matching identifier of the installed function package of the application.
  20. 根据权利要求19所述的电子设备,其特征在于,所述下载信息中包括所述功能包所属的应用,当所述指令被所述电子设备执行时,使得所述电子设备执行所述下载所述功能包和所述功能包的依赖包,静默安装并加载所述功能包的步骤之后,还执行以下步骤:The electronic device according to claim 19, wherein the download information includes the application to which the function package belongs, and when the instruction is executed by the electronic device, the electronic device is caused to execute the download After the function package and the dependent packages of the function package are silently installed and loaded, the following steps are also performed:
    在所述电子设备的已安装功能列表中,获取与已加载的功能包所属的应用对应的表项,并在获取的表项中添加所述已加载的功能包的匹配标识。In the installed function list of the electronic device, the entry corresponding to the application to which the loaded function package belongs is obtained, and the matching identifier of the loaded function package is added to the obtained entry.
  21. 一种服务器,其特征在于,包括:A server, characterized in that it comprises:
    一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述服务器执行时,使得所述服务器执行以下步骤:One or more processors; a memory; a plurality of application programs; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, When the instruction is executed by the server, the server is caused to execute the following steps:
    接收电子设备发送的描述信息,所述描述信息是所述电子设备获取用户选择的第一功能的描述信息,在所述电子设备已安装的功能包中,未查找到匹配标识与所述描述信息相匹配的功能包之后发送的;Receive description information sent by an electronic device, where the description information is the description information of the first function selected by the user obtained by the electronic device, and the matching identifier and the description information are not found in the function package installed on the electronic device Sent after the matching function package;
    在功能包匹配表中,查找匹配标识与所述描述信息相匹配的功能包的信息;In the function package matching table, search for the information of the function package whose matching identifier matches the description information;
    向所述电子设备发送下载信息,所述下载信息包括所述功能包的信息和所述功能包的依赖包的信息,以使所述电子设备根据所述下载信息,下载所述功能包和所述功能包的依赖包。Send download information to the electronic device, where the download information includes the information of the function package and the information of the dependency package of the function package, so that the electronic device downloads the function package and all the function packages according to the download information. The dependency package of the function package.
  22. 根据权利要求21所述的服务器,其特征在于,当所述指令被所述服务器执行时,使得所述服务器执行所述在功能包匹配表中,查找匹配标识与所述描述信息相匹配的功能包的信息的步骤之前,还执行以下步骤:21. The server according to claim 21, wherein when the instruction is executed by the server, the server executes the function in the function package matching table to find the function whose matching identifier matches the description information Before the step of package information, also perform the following steps:
    接收开发者上传的应用包;Receive application packages uploaded by developers;
    对所述应用包进行拆分,获取所述应用包包括的功能包;Split the application package to obtain function packages included in the application package;
    解析所述应用包包括的每个功能包,获取所述功能包的依赖包的匹配标识和所 述功能包的匹配标识;Parse each function package included in the application package, and obtain the matching identifier of the dependent package of the function package and the matching identifier of the function package;
    在所述功能包匹配表中记录所述功能包所属的应用包,以及所述功能包的匹配标识和所述功能包的依赖包的匹配标识。Record in the function package matching table the application package to which the function package belongs, as well as the matching identifier of the function package and the matching identifier of the dependent package of the function package.
  23. 根据权利要求21或22所述的服务器,其特征在于,所述匹配标识包括:功能包所提供功能的功能类别编码;所述功能包匹配表中记录功能包所属的应用包、所述功能包的匹配标识、功能包的信息和所述功能包的依赖包的信息;所述描述信息包括:所述功能图标所对应功能的功能类别编码;The server according to claim 21 or 22, wherein the matching identifier comprises: the function category code of the function provided by the function package; the function package matching table records the application package to which the function package belongs, and the function package The matching identifier, the information of the function package and the information of the dependent package of the function package; the description information includes: the function category code of the function corresponding to the function icon;
    当所述指令被所述服务器执行时,使得所述服务器执行所述在功能包匹配表中,查找匹配标识与所述描述信息相匹配的功能包的信息的步骤包括:When the instruction is executed by the server, the step of causing the server to execute the function package matching table and searching for the information of the function package whose matching identifier matches the description information includes:
    在功能包匹配表中,根据所述描述信息中的功能类别编码进行查找,获得匹配标识中的功能类别编码与所述描述信息中的功能类别编码相匹配的功能包。In the function package matching table, search is performed according to the function category code in the description information, and a function package whose function category code in the matching identifier matches the function category code in the description information is obtained.
  24. 根据权利要求23所述的服务器,其特征在于,所述描述信息中还包括:所述第一应用程序的厂商信息和/或版本信息;所述匹配标识中还包括所述功能包的厂商信息和/或版本信息;The server according to claim 23, wherein the description information further includes: manufacturer information and/or version information of the first application; the matching identifier also includes manufacturer information of the function package And/or version information;
    当所述指令被所述服务器执行时,使得所述服务器执行所述在功能包匹配表中,查找匹配标识与所述描述信息相匹配的功能包的信息的步骤之后,还执行以下步骤:When the instruction is executed by the server, after the server executes the step of searching for the information of the function package whose matching identifier matches the description information in the function package matching table, the following steps are further performed:
    如果在所述功能包匹配表中,查找到的相匹配的功能包包括至少两个,则根据所述厂商信息和/或版本信息,确定所述相匹配的功能包与所述第一应用程序的匹配度;If in the function package matching table, the found matching function package includes at least two, then according to the manufacturer information and/or version information, it is determined that the matching function package is the same as the first application program. Matching degree;
    则所述下载信息中包括匹配度最高的功能包的信息和所述匹配度最高的功能包的依赖包的信息。Then, the download information includes the information of the functional package with the highest matching degree and the information of the dependent package of the functional package with the highest matching degree.
  25. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如权利要求1-7任一项所述的方法。A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which when running on a computer, causes the computer to execute the method according to any one of claims 1-7.
  26. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如权利要求8-11任一项所述的方法。A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which when running on a computer, causes the computer to execute the method according to any one of claims 8-11.
PCT/CN2021/083177 2020-05-29 2021-03-26 Function pack loading method and apparatus, and server and electronic device WO2021238376A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010477876.0A CN113741911A (en) 2020-05-29 2020-05-29 Function package loading method and device, server and electronic equipment
CN202010477876.0 2020-05-29

Publications (1)

Publication Number Publication Date
WO2021238376A1 true WO2021238376A1 (en) 2021-12-02

Family

ID=78724996

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/083177 WO2021238376A1 (en) 2020-05-29 2021-03-26 Function pack loading method and apparatus, and server and electronic device

Country Status (2)

Country Link
CN (1) CN113741911A (en)
WO (1) WO2021238376A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338652B (en) * 2021-12-30 2023-10-20 北京欧珀通信有限公司 Distribution method and downloading method of installation package and related products

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281325A (en) * 2011-06-30 2011-12-14 杭州斯凯网络科技有限公司 Method for downloading mobile application subpacket
CN102932441A (en) * 2012-10-26 2013-02-13 北京小米科技有限责任公司 Method and system for downloading application, terminal and server
CN103473080A (en) * 2012-06-07 2013-12-25 腾讯科技(深圳)有限公司 Software installation method, terminal and software installation system
CN107809491A (en) * 2017-11-30 2018-03-16 北京小米移动软件有限公司 The method for down loading and device of installation kit
CN108287722A (en) * 2018-01-09 2018-07-17 北京大学 A kind of decoupling method of Android application
US20190369977A1 (en) * 2018-06-05 2019-12-05 Microsoft Technology Licensing, Llc On-demand installer for resource packages

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281325A (en) * 2011-06-30 2011-12-14 杭州斯凯网络科技有限公司 Method for downloading mobile application subpacket
CN103473080A (en) * 2012-06-07 2013-12-25 腾讯科技(深圳)有限公司 Software installation method, terminal and software installation system
CN102932441A (en) * 2012-10-26 2013-02-13 北京小米科技有限责任公司 Method and system for downloading application, terminal and server
CN107809491A (en) * 2017-11-30 2018-03-16 北京小米移动软件有限公司 The method for down loading and device of installation kit
CN108287722A (en) * 2018-01-09 2018-07-17 北京大学 A kind of decoupling method of Android application
US20190369977A1 (en) * 2018-06-05 2019-12-05 Microsoft Technology Licensing, Llc On-demand installer for resource packages

Also Published As

Publication number Publication date
CN113741911A (en) 2021-12-03

Similar Documents

Publication Publication Date Title
WO2021083378A1 (en) Method for accelerating starting of application, and electronic device
WO2020108356A1 (en) Application display method and electronic device
WO2020103764A1 (en) Voice control method and electronic device
WO2021017901A1 (en) Screen display method and electronic device
CN112947947B (en) Download method, distribution method, terminal equipment, server and system of installation package
WO2021159746A1 (en) File sharing method and system, and related device
WO2021253975A1 (en) Permission management method and apparatus for application, and electronic device
CN113805797B (en) Processing method of network resource, electronic equipment and computer readable storage medium
WO2021218429A1 (en) Method for managing application window, and terminal device and computer-readable storage medium
WO2022100141A1 (en) Plug-in management method, system and apparatus
WO2021093626A1 (en) Memory management method and electronic device
WO2021073337A1 (en) Method and apparatus for installing plug-in, and storage medium
WO2021104117A1 (en) Method for constructing application program resource packet, construction apparatus, and terminal device
WO2022253158A1 (en) User privacy protection method and apparatus
CN113741993B (en) Method and device for compiling plug-in dex file
CN112783418B (en) Method for storing application program data and mobile terminal
WO2021238376A1 (en) Function pack loading method and apparatus, and server and electronic device
CN114079642A (en) Mail processing method and electronic equipment
CN114828098B (en) Data transmission method and electronic equipment
CN114816973A (en) Method and device for debugging codes, electronic equipment and readable storage medium
CN113590346A (en) Method and electronic equipment for processing service request
CN114398108A (en) Electronic device, drive loading method thereof, and medium
CN114168115B (en) Communication system, application downloading method and device
WO2024140891A1 (en) Compiling method, electronic device, and system
CN116048629B (en) System service switching method, control device, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21813428

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21813428

Country of ref document: EP

Kind code of ref document: A1