CN113741911A - Function package loading method and device, server and electronic equipment - Google Patents

Function package loading method and device, server and electronic equipment Download PDF

Info

Publication number
CN113741911A
CN113741911A CN202010477876.0A CN202010477876A CN113741911A CN 113741911 A CN113741911 A CN 113741911A CN 202010477876 A CN202010477876 A CN 202010477876A CN 113741911 A CN113741911 A CN 113741911A
Authority
CN
China
Prior art keywords
function
package
information
matching
function package
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202010477876.0A
Other languages
Chinese (zh)
Inventor
李国强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010477876.0A priority Critical patent/CN113741911A/en
Priority to PCT/CN2021/083177 priority patent/WO2021238376A1/en
Publication of CN113741911A publication Critical patent/CN113741911A/en
Pending legal-status Critical Current

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

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

The embodiment of the application provides a method and a device for loading a function package, a server and electronic equipment, wherein in the method for loading the function package, after the electronic equipment detects first operation information of a user in an interface displayed by a currently running first application program, a function selection interface is displayed in response to the first operation information; after detecting that a user selects second operation information of a first function, responding to the second operation information, acquiring description information of the first function, searching a function package with a matching identifier matched with the description information in an installed function package of the electronic equipment, sending the description information to a server and receiving download information sent by the server when the function package is not searched, wherein the download information comprises information of the function package with the matching identifier matched with the description information and information of a dependent package of the function package, finally downloading the function package and the dependent package of the function package by the electronic equipment, and silently installing and loading the function package, so that the electronic equipment can download the function package according to the description information of functions required by a currently running application program, and the waiting time for downloading and installing the function package by the user can be shortened due to the fact that the storage space occupied by the function package is small, the storage space of the electronic equipment is saved.

Description

Function package loading method and device, server and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of intelligent terminals, in particular to a method and a device for loading a function package, a server and electronic equipment.
Background
With the enhancement of processing capability of electronic devices (such as smartphones or tablet computers), in order to provide more functions, applications (apps) are designed to be more and more complex, which results in larger and larger installation packages of apps; meanwhile, in order to cope with the diversity of the devices (the Central Processing Unit (CPU) is different in platform and/or screen resolution), the App packages redundant lib library (x86, arm32 and/or arm64 and the like) files and/or resource files and the like in an application installation package for better compatibility. When a user uses a certain function of the App, the user has to download a complete installation package, the redundant function, the redundant lib library and/or the resource file can cause waste of user traffic, the waiting time required by the user to download and install the App is longer, and the storage space occupied by the installation package of the App is more.
For redundant resource files in an App installation package, the related art provides an on demand download (on demand) scheme for resources, that is, only the resources required for running an App on a running device are downloaded according to the specific situation of the running device.
Disclosure of Invention
The embodiment of the application provides a method and a device for loading a function package, a server and electronic equipment, and further provides a computer-readable storage medium for downloading the function package according to description information of functions required by a currently running application program by the electronic equipment.
In a first aspect, the present application provides a method for loading a function package, including: the method comprises the steps that the electronic equipment detects first operation information of a user in an interface displayed by a first application program which is currently running; the first operation information may be a click, a double click, a long press, or an operation of drawing a specific graphic in an interface displayed by the first application program by the user, or the first operation information may be a click, a double click, or a long press operation of a specific icon in the interface displayed by the first application program by the user, and the operation form of the first operation information is not limited in this embodiment.
And then, the electronic equipment responds to the first operation information and displays a function selection interface.
Next, the electronic device detects second operation information of the user selecting the first function, where the second operation information may be a click, double-click, or long-press operation of a function icon in the function selection interface by the user, and the operation form of the second operation information is not limited in this embodiment, and this embodiment takes the second operation information as an example of a click operation of the function icon by the user.
Then, the electronic equipment responds to the second operation information to acquire description information of the first function; in a specific implementation, the electronic device may obtain, from the local data of the first application, the description information of the first function selected by the user.
And finally, the electronic equipment searches the function package of which the matching identification is matched with the description information in the installed function package of the electronic equipment. And when the information is not found, sending the description information to a server, and receiving download information sent by the server, wherein the download information comprises information of a function package and information of a dependent package of the function package, and the function package comprises a function package of which the matching identifier is matched with the description information. And the electronic equipment downloads the function package and the dependency package of the function package, and silently installs and loads the function package.
The information of the function package may include the matching identifier and the download address of the function package, and of course, the information of the function package may also include other information, for example: the version information and/or vendor information of the function package, etc., are not limited in this embodiment.
The information of the dependency package of the function package may include a matching identifier and a download address of the dependency package of the function package.
In the method for loading the function package, after the electronic equipment detects first operation information of a user in an interface displayed by a first application program currently running, a function selection interface is displayed in response to the first operation information; after detecting that a user selects second operation information of a first function, responding to the second operation information, acquiring description information of the first function, searching a function package with a matching identifier matched with the description information in an installed function package of the electronic equipment, sending the description information to a server and receiving download information sent by the server when the function package is not searched, wherein the download information comprises information of the function package with the matching identifier matched with the description information and information of a dependent package of the function package, finally downloading the function package and the dependent package of the function package by the electronic equipment, and silently installing and loading the function package, so that the electronic equipment can download the function package according to the description information of functions required by a currently running application program, and the waiting time for downloading and installing the function package by the user can be shortened due to the fact that the storage space occupied by the function package is small, the storage space of the electronic equipment is saved.
In one possible implementation manner, downloading the function package and the dependency package of the function package, and silently installing and loading the function package includes: and the electronic equipment determines a dependent package to be downloaded according to the download information and the function package installed by the electronic equipment, downloads the function package and the dependent package to be downloaded, and installs and loads the function package in a silent manner. Specifically, the electronic device may obtain an uninstalled dependency package in the download information according to the matching identifier of the dependency package in the download information and the installed function package of the electronic device, where the uninstalled dependency package is the dependency package to be downloaded.
In this embodiment, the electronic device may determine the dependency package to be downloaded according to the download information and the installed function package of the electronic device, and then load the function package by downloading the function package and the dependency package to be downloaded, thereby further reducing the installation package required to be downloaded by the electronic device, further shortening the waiting time of the user, and saving the storage space of the electronic device.
In one possible implementation manner, the description information includes: the function type code of the function corresponding to the function icon, the matching identifier includes: function type codes of the functions provided by the function packet; in this way, in the function packages installed in the electronic device, searching for the function package with the matching identifier matching with the description information includes: and searching according to the function type code in the description information in the function package installed in the electronic equipment to obtain the function package of which the function type code in the matching identifier is matched with the function type code in the description information.
In one possible implementation manner, after searching for a function package with a matching identifier matching with the description information in an installed function package of the electronic device, if the function package with the matching identifier matching with the description information is found in the installed function package of the electronic device, the matched function package is loaded in the first application program, where the matched function package is an installed function package of a second application program, and the second application program is installed in the electronic device.
That is to say, the function package whose matching identifier is found by the electronic device and matched with the description information may be an installed function package of the second application, the found function package is not limited to be a function package in the first application, and after the matched function package is found, the matched function package may be directly loaded in the first application without jumping to the second application.
In one possible implementation manner, the description information further includes vendor information and/or version information of the first application; the matching identification also comprises manufacturer information and/or version information of the function package; before loading the matched function packages in the first application program, if at least two searched matched function packages are included in the installed function packages of the electronic equipment, determining the matching degree of the matched function packages and the first application program according to the manufacturer information and/or the version information; thus, the loading of the matched feature pack in the first application program may be: and loading the function package with the highest matching degree in the first application program.
In one possible implementation manner, in the function package installed in the electronic device, the function package for searching the matching identifier matched with the description information may be: searching a function package of which the matching identification is matched with the description information in an installed function list of the electronic equipment; and storing a table entry corresponding to the application program installed in the electronic device in the installed function list, where the table entry includes a matching identifier of the function package installed in the application program.
In one possible implementation manner, the download information includes an application to which the function package belongs, the function package and a dependency package of the function package are downloaded, after the function package is installed and loaded in a silent manner, an entry corresponding to the application to which the loaded function package belongs may be obtained in an installed function list of the electronic device, and a 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: the server receives description information sent by electronic equipment, wherein the description information is sent after the electronic equipment acquires a first function selected by a user and does not find a function package of which the matching identification is matched with the description information in an installed function package of the electronic equipment; searching the information of the function packet with the matching identification matched with the description information in a function packet matching table; and sending download information to the electronic equipment, wherein the download information comprises the information of the function package and the information of the dependence package of the function package, so that the electronic equipment downloads the function package and the dependence package of the function package according to the download information.
In the method for loading the function package, after the server receives the description information sent by the electronic equipment, the server searches the information of the function package matched with the matching identification and the description information in a function package matching table, and then sends the download information to the electronic equipment, wherein the download information comprises the information of the matched function package and the information of the dependent package of the matched function package, so that the electronic equipment can download the matched function package and the dependent package of the matched function package according to the download information, the function package is downloaded by the electronic equipment according to the description information of the functions required by the currently running application program, and the function package occupies a smaller storage space, so that the waiting time for downloading and installing the function package by a user can be shortened, and the storage space of the electronic equipment is saved.
In one possible implementation manner, before the server searches for the information of the function package matching the matching identifier and the description information in the function package matching table, the method further includes: the server receives an application package uploaded by a developer; splitting the application package to obtain a function package included by the application package; analyzing each function package included in the application package to obtain a matching identifier of a dependence package of the function package and a matching identifier of the function package; and recording the application packet to which the function packet belongs, the matching identifier of the function packet and the matching identifier of the dependency packet of the function packet in the function packet matching table.
In one possible implementation manner, the matching identifier includes: function type codes of functions provided by the function package; recording an application package to which the function package belongs, a matching identifier of the function package, information of the function package and information of a dependent package of the function package in the function package matching table; the above description information includes: function type codes of the functions corresponding to the function icons; thus, in the function package matching table, the searching for the information matching the function package whose matching identifier matches with the description information includes: and searching according to the function category codes in the description information in a function packet matching table to obtain a function packet of which the function category codes in the matching identification are matched with the function category codes in the description information.
In one possible implementation manner, the description information further includes: vendor information and/or version information of the first application; the matching identification also comprises manufacturer information and/or version information of the function package; after searching the information of the function packet matching the matching identifier with the description information in the function packet matching table, the method further comprises the following steps: if the matched function packages searched in the function package matching table comprise at least two function packages, the server determines the matching degree of the matched function packages and the first application program according to the manufacturer information and/or the version information; the download information includes information of the function package with the highest matching degree and information of the dependent package of the function package with the highest matching degree.
In a third aspect, an embodiment of the present application provides a device for loading a function package, where the device is included in an electronic device, and the device has a function of implementing a behavior of the electronic device in the first aspect and possible implementation manners of the first aspect. The functions may be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-described functions. Such as a receiving module or unit, a processing module or unit, a transmitting module or unit, etc.
In a fourth aspect, an embodiment of the present application provides a function package loading apparatus, where the apparatus is included in a server, and the apparatus has a function of implementing the second aspect and a server behavior in a possible implementation manner of the second aspect. The functions may be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-described functions. Such as a receiving module or unit, a processing module or unit, a transmitting module or unit, etc.
In a fifth aspect, an embodiment of the present application provides an electronic device, including:
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, the one or more computer programs comprising instructions that, when executed by the electronic device, cause the electronic device to perform the steps of: detecting first operation information of a user in an interface displayed by a currently running first application program; responding to the first operation information, and displaying a function selection interface; detecting second operation information of the first function selected by the user; responding to the second operation information, and acquiring description information of the first function; searching a function package with a matching identifier matched with the description information in the installed function packages of the electronic equipment; when the description information is not searched, the description information is sent to a server; receiving download information sent by the server, wherein the download information comprises information of a function package and information of a dependency package of the function package, and the function package comprises a function package of which the matching identification is matched with the description information; downloading the function package and the dependent package of the function package, and silently installing and loading the function package.
In one possible implementation manner, when the instruction is executed by the electronic device, the electronic device is enabled to execute downloading the function package and a dependency package of the function package, and the step of loading the function package includes: determining a dependence package to be downloaded according to the downloading information and the function package installed in the electronic equipment; and downloading the function package and the dependency package to be downloaded, and silently installing and loading the function package.
In one possible implementation manner, the description information includes: the function type code of the function corresponding to the function icon, the matching identifier includes: function type codes of the functions provided by the function packet; when the instruction is executed by the electronic device, the step of searching for the function package with the matching identifier matching with the description information in the function package installed in the electronic device, which is executed by the electronic device, includes: and searching according to the function type code in the description information in the function package installed in the electronic equipment to obtain the function package of which the function type code in the matching identifier is matched with the function type code in the description information.
In one possible implementation manner, when the instruction is executed by the electronic device, the electronic device is caused to perform, after the step of searching for a function package matching the matching identifier and the description information from among function packages installed in the electronic device, the following steps are further performed: and if the function package with the matching identifier matched with the description information is found in the installed function packages of the electronic equipment, loading the matched function package in the first application program, wherein the matched function package is the function package with the installed second application program, and the second application program is installed in the electronic equipment.
In one possible implementation manner, the description information further includes vendor information and/or version information of the first application; the matching identification also comprises manufacturer information and/or version information of the function package; when the instruction is executed by the electronic device, before the step of loading the matched function package in the first application program, the electronic device further executes the following steps: if at least two matched function packages are found in the installed function packages of the electronic equipment, determining the matching degree of the matched function packages and the first application program according to the manufacturer information and/or the version information; loading the matched function package in the first application program includes: and loading the function package with the highest matching degree in the first application program.
In one possible implementation manner, when the instruction is executed by an electronic device, the step of causing the electronic device to execute a function package matching the matching identifier and the description information in an installed function package of the electronic device may be: searching a function package of which the matching identification is matched with the description information in an installed function list of the electronic equipment; and storing a table entry corresponding to the application program installed in the electronic device in the installed function list, where the table entry includes a matching identifier of the function package installed in the application program.
In one possible implementation manner, the download information includes an application to which the function package belongs, when the instruction is executed by the electronic device, the electronic device executes a dependent package for downloading the function package and the function package, and after the step of loading the function package, the following steps are further executed: and acquiring a table entry corresponding to the application to which the loaded function package belongs in the installed function list of the electronic equipment, and adding the matching identifier of the loaded function package in the acquired table entry.
In a sixth aspect, an embodiment of the present application provides a server, including: 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, the one or more computer programs comprising instructions which, when executed by the server, cause the server to perform the steps of: receiving description information sent by electronic equipment, wherein the description information is sent after the electronic equipment acquires a first function selected by a user and finds out no function package of which the matching identification is matched with the description information in an installed function package of the electronic equipment; searching the information of the function packet with the matching identification matched with the description information in a function packet matching table; and sending download information to the electronic equipment, wherein the download information comprises the information of the function package and the information of the dependence package of the function package, so that the electronic equipment downloads the function package and the dependence package of the function package according to the download information and the function package installed in the electronic equipment.
In one possible implementation manner, when the instruction is executed by the server, the server performs the following steps before the step of searching the information of the function package matching the identifier and the description information in the function package matching table: receiving an application package uploaded by a developer; splitting the application package to obtain a function package included by the application package; analyzing each function package included in the application package to obtain a matching identifier of a dependence package of the function package and a matching identifier of the function package; and recording the application packet to which the function packet belongs, the matching identifier of the function packet and the matching identifier of the dependency packet of the function packet in the function packet matching table.
In one possible implementation manner, the matching identifier includes: function type codes of functions provided by the function package; recording an application package to which the function package belongs, a matching identifier of the function package, information of the function package and information of a dependent package of the function package in the function package matching table; the above description information includes: function type codes of the functions corresponding to the function icons; when the instructions are executed by the server, the step of searching the matching information of the function package which is matched with the description information in the function package matching table by the server comprises the following steps: and searching according to the function category codes in the description information in a function packet matching table to obtain a function packet of which the function category codes in the matching identification are matched with the function category codes in the description information.
In one possible implementation manner, the description information further includes: vendor information and/or version information of the first application; the matching identification also comprises manufacturer information and/or version information of the function package; when the above instructions are executed by the above server, the server executes the following steps after the step of searching the matching information of the function package which is matched with the above description information in the function package matching table: if the matched function packages searched in the function package matching table comprise at least two function packages, determining the matching degree of the matched function packages and the first application program according to the manufacturer information and/or the version information; the download information includes information of the function package with the highest matching degree and information of the dependent package of the 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 solution of the first aspect of the present application, and the beneficial effects achieved by the aspects and the corresponding possible implementation manners are similar, and are not described again.
It should be understood that the fourth aspect and the sixth aspect of the present application are consistent with the technical solution of the second aspect of the present application, and the beneficial effects achieved by the aspects and the corresponding possible embodiments are similar, and are not described again.
In a seventh aspect, the present application provides a computer-readable storage medium, in which a computer program is stored, which, when run on a computer, causes the computer to perform the method provided in the first aspect.
In an eighth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when run on a computer, causes the computer to perform the method provided by the second aspect.
In a ninth aspect, the present application provides a computer program for performing the method provided in the first aspect when the computer program is executed by a computer.
In a tenth aspect, the present application provides a computer program for performing 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 and tenth aspects may be stored in whole or in part on a storage medium packaged with the processor, or in part or in whole on a memory not packaged with the processor.
Drawings
FIG. 1 is a diagram illustrating a file uploaded by a developer in the related art;
fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 3 is a block diagram of a software structure of the electronic device 100 according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a server according to an embodiment of the present application;
fig. 5 is a schematic diagram of adding a matching identifier to a feature pack according to an embodiment of the present application;
fig. 6 is a schematic diagram illustrating a server unpacking a full application package according to an embodiment of the present application;
FIG. 7 is a diagram illustrating an electronic device lookup function package according to an embodiment of the present application;
fig. 8 is a flowchart of a method for loading a function package according to an embodiment of the present application;
FIG. 9 is a schematic diagram illustrating an interface presented by a first application according to an embodiment of the present application;
FIG. 10 is a schematic illustration of a function selection interface provided in accordance with an embodiment of the present application;
fig. 11 is a flowchart of a method for loading a feature pack according to another embodiment of the present application;
fig. 12 is a flowchart of a method for loading a function package according to still another embodiment of the present application;
fig. 13 is a flowchart of a method for loading a function package according to still another embodiment of the present application;
FIG. 14 is a flowchart of a method for loading a feature pack according to yet another embodiment of the present application;
fig. 15 is a schematic structural diagram of an electronic device according to another embodiment of the present application;
fig. 16 is a schematic structural diagram of a server according to another embodiment of the present application.
Detailed Description
The terminology used in the description of the embodiments section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application.
As apps are designed to be more and more complex, installation packages of apps are larger and larger, and a user has to download a complete installation package when using a certain function of an App, so that user traffic is wasted, the waiting time required for downloading and installing an App by the user is longer, and the storage space occupied by the installation package of the App is also larger.
For redundant resource files in an App installation package, one scheme in the prior art provides a resource on-demand download (on-demand download) scheme, but the scheme only provides the resource on-demand download, and for code sub-packages operable in the App, all the code sub-packages still need to be downloaded and installed, so that the time length required by a user to download and install the App is longer, and the storage space occupied by the App installation package is more.
Another scheme provided by the prior art is an App Bundle scheme, which is further than the above scheme, not only solves the problems of redundant resources and redundant lib libraries, but also provides a sub-package scheme which enables an App developer to split an App into a plurality of sub-function packages according to function modules, and a user can only install part of high-frequency function packages, specific lib libraries and resource packages when downloading and installing the App, so that the data size of the App downloaded for the first time is reduced, the waste of user traffic is reduced, and other function packages are downloaded and installed according to the use needs of the user.
Specifically, to use the App Bundle scheme involves a number of steps:
step 1, a developer creates a project in Android Studio, introduces a comg (google mobile service, GMS) dependency package, determines to dynamically install and download a functional module Foo during development of sub-modules, writes a logic code of the downloaded functional module Foo in a main functional module Base, and the logic code can be triggered and downloaded on a user interface C; and compiling the logic codes to generate bundle.
And 2, uploading the bundle. Fig. 1 is a schematic diagram of a file uploaded by a developer in the related art, and as shown in fig. 1, the file uploaded by the developer is bundle. The Play application marketplace utilizes tools to split the application into android application packages (apks), with the execution logic code for Base in Base _ master.
And 3, downloading the application and running the main function Base in the Play store by the user, and triggering and downloading the code of the package Foo _ master.apk corresponding to the functional module Foo in the user interface C in the Base. The logic to download and install Foo is done jointly at the clients of the GMS and the Play shop.
As can be seen from the above description, there are more limitations in the App Bundle scheme for on-demand downloading of "other function packages", such as: the downloading-on-demand function must be realized by means of the GMS, an App developer must explicitly write the logic code of the downloading function module Foo in the main function module Base, and the downloading-on-demand function package can only be the function package in the currently running App, and the downloading-on-demand function is not flexible enough. And Foo can only be downloaded through Base trigger, and functions in Foo can only be executed in Base trigger.
Based on the above problems, embodiments of the present application provide a method for loading a function package, which can enable an electronic device to download the function package according to description information of functions required by a currently running application program.
The method for loading the function package provided by the embodiment of the application can be applied to electronic equipment, wherein the electronic equipment can be a smart phone, a tablet computer, wearable equipment, vehicle-mounted equipment, Augmented Reality (AR)/Virtual Reality (VR) equipment, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like; the embodiment of the present application does not set any limit to the specific type of the electronic device.
For example, fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, and as shown in fig. 2, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display 194, a Subscriber Identity Module (SIM) card interface 195, and the like. 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, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (DCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K via an I2C interface, such that the processor 110 and the touch sensor 180K communicate via an I2C bus interface to implement the touch functionality of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may communicate audio signals to the wireless communication module 160 via the I2S interface, enabling answering of calls via a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by 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 implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative, and is not limited to the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device 100 through the power management module 141 while charging the battery 142.
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 charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication 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 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred 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 a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. 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, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
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 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near 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 to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, electronic device 100 may utilize range sensor 180F to range for fast focus.
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 detects infrared reflected light from nearby objects using a photodiode. 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 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also called a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: 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 employ a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention uses an Android system with a layered architecture as an example to exemplarily illustrate a software structure of the electronic device 100.
Fig. 3 is a block diagram of a software structure of the electronic device 100 according to an embodiment of the present application.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 3, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 3, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media libraries (MediaLibraries), three-dimensional graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
In addition, the implementation of the loading method of the function package provided by the embodiment of the application not only relates to the electronic device side, but also relates to the server side and the App development side. The server may be a cloud server, for example: the embodiment of the application does not limit the specific type of the server.
Fig. 4 is a schematic structural diagram of a server according to an embodiment of the present application, and as shown in fig. 4, the server 400 includes a processor 410 and a communication interface 420. Optionally, the server 400 may also include a memory 430. The processor 410, the communication interface 420 and the memory 430 can communicate with each other via internal connection paths to transmit control and/or data signals, the memory 430 is used for storing computer programs, and the processor 410 is used for calling and running the computer programs from the memory 430.
The processor 410 and the memory 430 may be combined into a single processing device, or more generally, separate components, and the processor 410 is configured to execute the program code stored in the memory 430. In particular implementations, the memory 430 may be integrated into the processor 410 or may be separate from the processor 410.
In addition to this, in order to make the functions of the server 400 more complete, the server 400 may further include one or more of an input unit 460, a display unit 470, and the like.
Optionally, the server 400 may further include a power supply 450 for providing power to various devices or circuits in the server 400.
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: an image processing unit (GPU), and the like.
For convenience of understanding, in the following embodiments of the present application, an electronic device having a structure shown in fig. 2 and fig. 3 and a server having a structure shown in fig. 4 are taken as examples, and a method for loading a function package provided in the embodiments of the present application is specifically described in conjunction with the drawings and application scenarios.
First, referring to fig. 5, when developing an App, an App developer adds a matching identifier to a Dynamic Feature (Dynamic Feature) packet, hereinafter referred to as a function packet, that is desired to be triggered. Fig. 5 is a schematic diagram of adding matching identifiers in function packages according to an embodiment of the present application, and as shown in fig. 5, an App developer adds matching identifiers in function packages when developing an application, where the matching identifier of each function package is used to indicate a function type provided by the corresponding function package. For example, in fig. 5, the matching identifier of the function package 1 is used to indicate the function type provided by the function package 1, and the matching identifier of the function package 2 is used to indicate the function type provided by the function package 2.
In a specific implementation, the matching identifier of each function package may include a function category code of a function provided by the corresponding function package; the function type code is set according to a predetermined function type code; of course, the matching identifier may further include one or more of function description, vendor information, and version information of the corresponding function package, and the information included in the matching identifier is not limited in this embodiment.
For example, the classification coding of the functions may be as follows:
{
0001: and (3) going out, wherein the going out can comprise sub-categories: 01: booking an air ticket; 02: booking a train ticket; 03: getting a taxi;
0002: payment, which in turn may include sub-categories: 01: xx; 02: xx;
0003: xxx, where xxx may in turn include subcategories: 01: xx; 02: xx;
……
}
thus there will be a unique major and minor class for a particular feature pack, from which App developers can set a matching identity for each feature pack, as follows:
{
function type coding: 000102 of a base;
description of the function: booking train tickets when going out;
manufacturer information: (ii) a;
version information: 1.0;
}
secondly, the App developer uploads a full amount of application packages to the cloud application market, the server 400 in the cloud application market can unpack the full amount of application packages, then analyzes the function packages obtained through unpacking to obtain matching identifiers of each function package, records the matching identifiers of each function package in a function package matching table, and records a dependent package of each function package in a function package matching table, as shown in fig. 6, fig. 6 is a schematic diagram of unpacking the full amount of application packages by the server provided in an embodiment of the present application.
The function package matching table recorded by the server 400 may be as follows:
000102:
a provider: manufacturer 1, belonging to application package 1, premium rate (evaluation index): xx%, functional description: xx, download address: url 1;
a provider: manufacturer 2, belonging to application package 2, goodness (evaluation index): xx%, functional description: xx, download address: url 2;
000201:
a provider: manufacturer 3, belonging to application package 3, goodness (evaluation index): xx%, functional description: xx, download address: url 3;
000202:
null;
000203:
a provider: manufacturer 4, belonging to application package 3, goodness (evaluation index): xx%, functional description: xx, download address: url 4;
wherein, the download address includes the download address of each function package and the dependent package of the function package.
It is to be appreciated that, in particular implementations, the server 400 may implement the unpacking, parsing, and recording operations described above via the processor 410.
Finally, referring to fig. 7, fig. 7 is a schematic diagram of the electronic device search function package according to an embodiment of the present application, where a first App in the electronic device 100 is running, if the electronic device 100 detects first operation information of a user in an interface displayed by the first App, the electronic device 100 may display a function selection interface in response to the first operation information, then the electronic device 100 detects second operation information of a function F selected by the user, and obtains description information of the function F in response to the second operation information, where the function F may be a function developed by a developer of the running first App but not currently downloaded, or a function included in another App installed by the electronic device 100.
For example, the description information of the function F may be as follows:
{
function type coding: 000102 of a base;
description of the required functions: booking a train ticket;
}
alternatively, the first and second electrodes may be,
{
function type coding: 000202, respectively;
description of the required functions: paying;
}
then, the first App sends description information of the function F through the universal interface I, after receiving the description information, the resident background service of the electronic device 100 searches for a function package of which the matching identifier matches the description information of the function F in an installed function package of the electronic device 100, if the local matching is not successful, the electronic device 100 sends the description information of the function F to the server 400 in the cloud application market, the server 400 performs matching by using the same method, after the matching is successful, the electronic device 100 sends download information including the function package corresponding to the function F and a download address of a dependent package thereof, and then the background resident service in the electronic device 100 downloads the function package corresponding to the function F and the dependent package thereof according to the download information and the installed function package of the electronic device 100 and loads the function package corresponding to the function F.
Specifically, among the function packages installed in the electronic device 100, the function package for which the matching identifier matches the description information of the function F may be found as follows: searching a function package of which the matching identification is matched with the description information of the function F in an installed function list of the electronic equipment 100; the installed function list stores entries corresponding to the applications installed in the electronic device 100, where the entries include matching identifiers of the function packages installed in the applications.
For example, the list of installed functions of the electronic device 100 may be as shown in table 1.
TABLE 1
Figure BDA0002516387590000181
Accordingly, the download information sent by the server 400 includes the application to which the function package corresponding to the function F belongs, so that after the function package corresponding to the function F and the dependency package thereof are downloaded and the function package corresponding to the function F is loaded, an entry corresponding to the application to which the loaded function package belongs may be obtained in the installed function list of the electronic device 100, and the matching identifier of the loaded function package is added to the obtained entry. In a specific implementation, in the installed function list of the electronic device 100, obtaining an entry corresponding to an application to which the loaded function package belongs may be: if an entry corresponding to the application to which the loaded function package belongs exists in the installed function list of the electronic device 100, the matching identifier of the loaded function package may be directly added to the entry; if there is no entry corresponding to the application to which the loaded function package belongs in the installed function list of the electronic device 100, it is necessary to establish 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 a matching identifier of the loaded function package in the entry.
Here, assuming that the function type code carried in the description information of the function F is 000203, the server 400 finds that the function package with the matching identifier 000203 belongs to the application package 3, and the application package 3 is the third App after being installed in the electronic device 100, so that after the electronic device 100 downloads the function package corresponding to the function F and the dependency package thereof and loads the function package corresponding to the function F, it is necessary to obtain an entry corresponding to the third App in the installed function list of the electronic device 100 and add the matching identifier 000203 to the obtained entry, as shown in table 2.
TABLE 2
Figure BDA0002516387590000191
It is understood that, in a specific implementation, the electronic device 100 may implement the operation of detecting the first operation information and the second operation information through the processor 110 and the touch sensor 180K; the operation of displaying the interface is realized through the processor 110 and the display screen 194; the transmission and reception of information with the server 400 is achieved 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.
In particular implementations, server 400 may enable the transmission and reception of information with electronic device 100 via processor 410 and communication interface 420.
With reference to the foregoing embodiments and the related drawings, an embodiment of the present application provides a method for loading a function package, where implementation of the method relates to an electronic device 100 side and a server 400 side, fig. 8 is a flowchart of a method for loading a function package according to an embodiment of the present application, and as shown in fig. 8, the method for loading a function package may include:
step 801, the electronic device detects first operation information of a user in an interface displayed by a currently running first application program.
Specifically, the electronic device 100 may implement an operation of detecting the first operation information through the processor 110 and the touch sensor 180K.
The first operation information may be a click, a double click, a long press, or an operation of drawing a specific graphic in an interface displayed by the first application program by the user, or the first operation information may be a click, a double click, or a long press operation of a specific icon in the interface displayed by the first application program by the user, and the operation form of the first operation information is not limited in this embodiment.
In this embodiment, the first operation information is taken as an example of a click operation of a user on a specific icon in an interface displayed by a first application program, refer to fig. 9, fig. 9 is a schematic diagram of the interface displayed by the first application program according to an embodiment of the present application, and in fig. 9, the first operation information is a click operation on an icon 91.
Step 802, responding to the first operation information, and displaying a function selection interface.
Specifically, the electronic device 100 may implement the operation of displaying the function selection interface through the processor 110 and the display screen 194.
For example, an example of a function selection interface may be as shown in fig. 10, where fig. 10 is a schematic view of a function selection interface provided in an embodiment of the present application, and in fig. 10, an interface 1001 is a function selection interface.
Step 803, detecting the second operation information of the first function selected by the user.
Also, the electronic device 100 may implement an operation of detecting the second operation information through the processor 110 and the touch sensor 180K.
The second operation information may be a click, double click, or long press operation of a function icon in the function selection interface by a user, the operation form of the second operation information is not limited in this embodiment, and the embodiment describes an example in which the second operation information is a click operation of the function icon by the user.
And step 804, responding to the second operation information, and acquiring description information of the first function.
Specifically, the electronic device 100 may implement the operation of acquiring the description information through the processor 110.
In a specific implementation, the processor 110 may obtain, according to the function icon, description information of a function corresponding to the function icon from local data of the first application.
Step 805, searching for a function package with a matching identifier matching with the description information in the installed function packages of the electronic device.
In this embodiment, the process of the electronic device 100 for searching for the function package may be as shown in fig. 7, which is not described herein again.
Specifically, the electronic device 100 may implement the above-mentioned lookup operation through the processor 110.
And step 806, when the description information is not searched, sending the description information to the server.
Step 807, receiving the download information sent by the server, where the download information includes information of a function package and information of a dependency package of the function package, and the function package includes a function package whose matching identifier matches with the description information.
The information of the function package may include the matching identifier and the download address of the function package, and of course, the information of the function package may also include other information, for example: the version information and/or vendor information of the function package, etc., are not limited in this embodiment.
The information of the dependency package of the function package may include a matching identifier and a download address of the dependency package of the function package.
And 808, downloading the function package and the dependency package of the function package, and silently installing and loading the function package.
In the embodiment of the present application, the silent installation includes installation in the background, and there is no prompt or user operation to disturb the user, so that the user experience is better.
Specifically, the electronic device 100 may implement transmission and reception of 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.
In the method for loading the function package, after the electronic device 100 detects first operation information of a user in an interface displayed by a currently running first application program, a function selection interface is displayed in response to the first operation information; after detecting that a user selects second operation information of a first function, acquiring description information of the first function in response to the second operation information, searching a function package with a matching identifier matched with the description information in an installed function package of the electronic device 100, sending the description information to a server and receiving download information sent by the server when the function package is not searched, wherein the download information comprises information of the function package with the matching identifier matched with the description information and information of a dependent package of the function package, finally downloading the function package and the dependent package of the function package by the electronic device 100, and silently installing and loading the function package, so that the electronic device 100 can download the function package according to the description information of the function required by a currently running application program, and the waiting time for downloading and installing the function package by the user can be shortened due to the small storage space occupied by the function package, saving storage space of the electronic device 100.
Fig. 11 is a flowchart of a method for loading a function package according to another embodiment of the present application, as shown in fig. 11, in the embodiment shown in fig. 8 of the present application, step 808 may include:
step 1101, determining a dependency package to be downloaded according to the download information and the installed function package of the electronic device.
Specifically, the electronic device 100 may obtain an uninstalled dependency package in the download information according to the matching identifier of the dependency package in the download information and the function package installed in the electronic device 100, where the uninstalled dependency package is the dependency package to be downloaded.
Specifically, the electronic device 100 may implement the operation of determining the dependency package to be downloaded through the processor 110.
Step 1102, downloading the function package and the dependency package to be downloaded, and silently installing and loading the function package.
In this embodiment, the electronic device 100 may determine the dependency package to be downloaded according to the download information and the function package installed in the electronic device, and then only needs to download the function package and the dependency package to be downloaded, and install and load the function package in a silent manner, so as to further reduce the installation package required to be downloaded by the electronic device 100, further shorten the waiting time of the user, and save the storage space of the electronic device.
Fig. 12 is a flowchart of a method for loading a function package according to still another embodiment of the present application, where in this embodiment, the description information may include: the function type code of the function corresponding to the function icon, the matching identifier may include: function type codes of the functions provided by the function packet; as shown in fig. 12, step 805 may include:
step 1201, in the function package installed in the electronic device, searching is performed according to the function type code in the description information, and a function package in which the function type code in the matching identifier matches with the function type code in the description information is obtained.
For example, assuming that the function category code in the description information of the function corresponding to the function icon selected by the user is 000102, the electronic device 100 may search for the installed function package according to 000102 to obtain the function package with 000102 as the function category code in the matching identifier.
Further, after step 1201, the method may further include:
step 1202, if the function package matching the matching identifier with the description information is found in the installed function packages of the electronic device, loading the matched function package in a first application program, where the matched function package is the installed function package of a second application program installed in the electronic device.
That is to say, the function package with the matching identifier matching the description information searched by the electronic device 100 may be a function package installed in the second application, the searched function package is not limited to be a function package in the first application, and after the matched function package is searched, the matched function package may be directly loaded in the first application without jumping to the second application.
Furthermore, the description information may further include vendor information and/or version information of the first application program; the matching identification can also comprise manufacturer information and/or version information of the function package; thus, before loading the matched function packages in the first application program, if at least two searched matched function packages are included in the installed function packages of the electronic equipment, determining the matching degree of the matched function packages and the first application program according to the manufacturer information and/or the version information; and then loading the function package with the highest matching degree in the first application program.
Still taking the function class code 000102 in the description information as an example, assume that the electronic device 100 finds the function packages with the function class codes 000102 in the two matching identifiers, namely the function package 1 and the function package 2, in the installed function packages according to 000102. At this time, if the description information includes manufacturer information and version information of the first application, the manufacturer information is manufacturer 1, the version information is 1.0, the manufacturer information in the matching identifier of the function package 1 is manufacturer 2, the version information is 1.0, the manufacturer information in the matching identifier of the function package 2 is manufacturer 1, and the version information is 2.0, then the electronic device 100 may obtain a matching degree 1 between the function package 1 and the first application and a matching degree 2 between the function package 2 and the first application according to the manufacturer information and the version information, and if 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.
Specifically, 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 still another embodiment of the present application, and as shown in fig. 13, the method for loading a function package may include:
step 1301, the server receives description information sent by the electronic device, where the description information is sent after the electronic device obtains the description information of the first function selected by the user, and a function package with a matching identifier matching with the description information is not found in an installed function package of the electronic device.
Step 1302, finding the information of the function package matching the matching identifier with the description information in the function package matching table.
Specifically, the matching identifier may include: function type codes of functions provided by the function package; recording the application package to which the function package belongs, the matching identification of the function package, the information of the function package and the information of the dependence package of the function package in the function package matching table; the description information may include: function type codes of the functions corresponding to the function icons; in this way, in the function package matching table, the information for searching the function package whose matching identifier matches with the description information may be: and searching according to the function category codes in the description information in a function packet matching table to obtain a function packet of which the function category codes in the matching identification are matched with the function category codes in the description information.
And 1303, sending download information to the electronic device, where the download information includes information of the function package and 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.
For example, assume that the function package matching table recorded by the server 400 is as follows:
000102:
a provider: manufacturer 1, belonging to application package 1, premium rate (evaluation index): xx%, functional description: xx, download address: url 1;
a provider: manufacturer 2, belonging to application package 2, goodness (evaluation index): xx%, functional description: xx, download address: url 2;
000201:
a provider: manufacturer 3, belonging to application package 3, goodness (evaluation index): xx%, functional description: xx, download address: url 3;
000202:
null;
000203:
a provider: manufacturer 4, belonging to application package 3, goodness (evaluation index): xx%, functional description: xx, download address: url 4;
wherein, the download address includes the download address of each function package and the dependent package of the function package.
If the description information sent by the electronic device 100 is:
{
function type coding: 000201;
description of the required functions: (ii) a;
}
then, the server 400 may perform a lookup according to the function class code 000201 in the above description information in the function package matching table, and obtain a function package whose function class code in the matching identifier matches 000201. The download address url3 of vendor 3 is then sent to the electronic device 100, and url3 includes the function package with function class code 000201 in the matching identifier and the download address of the dependent package of the function package.
Further, the description information may further include: vendor information and/or version information of the first application; the matching identification can also comprise manufacturer information and/or version information of the function package; thus, after step 1302, if at least two matched function packages are found in the function package matching table, the matching degree between the matched function packages and the first application is determined according to the manufacturer information and/or the version information. The download information transmitted from the server 400 to the electronic device 100 includes the information of the function package with the highest matching degree and the information of the dependent package of the function package with the highest matching degree.
For example, if the description information sent by the electronic device 100 is:
{
function type coding: 000102 of a base;
description of the required functions: booking a train ticket;
}
then, the server 400 may perform a search in the function package matching table according to the function class code 000102 in the above description information to obtain a function package whose function class code in the matching identifier matches 000102, where two function packages are searched, and the function packages are function package 1 and function package 2 respectively. At this time, assuming that the description information includes manufacturer information of the first application, the manufacturer information is manufacturer 1, the manufacturer information in the matching identifier of the function package 1 is manufacturer 1, and the manufacturer information in the matching identifier of the function package 2 is manufacturer 1, the electronic device 100 may obtain, according to the manufacturer information, a matching degree of the function package 1 and the first application as 100% and a matching degree of the function package 2 and the first application as 90%, so that the server 400 sends a download address url1 of the manufacturer 1 to the electronic device 100, where the url1 includes a download address of the function package 1 with a function type code of 000102 and a download address of a dependent package of the function package 1 in the matching identifier.
In the above example, the function package with the matching identifier matching the description information searched by the server 400 is a function package with the same function type code, and in addition, the function package with the matching identifier matching the description information may also include a function package with the same function type code but the same function type code.
For example, if the description information sent by the electronic device 100 is:
{
function type coding: 000202, respectively;
description of the required functions: paying;
}
then, the server 400 may perform a search according to the function class code 000202 in the description information, and not find the function package with the function class code of 000202 in the matching identifier, then the server 400 may search for the function package belonging to the same function category (0002) as 000202, at this time, the server 400 finds two function packages with the function class codes of 000201 and 000203 in the matching identifier, and then the server 400 may determine the matching degree between the function package with the function class code of 000201 and the first application program, and the matching degree between the function package with the function class code of 000203 and the first application program, according to the vendor information and/or the version information, where it is assumed that the matching degree between the function package with the function class code of 000203 and the first application program is higher, so the server 400 sends the download address url4 of the vendor 4 to the electronic device 100, the function package with 000203 function category code in the matching identifier and the download address of the dependent package of the function package are included in url 4.
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.
In the loading method of the function package, after the server 400 receives the description information sent by the electronic device 100, searching the information of the function packet matched with the matching identification and the description information in the function packet matching table, and then transmits download information, which includes information of the matched function package and information of the dependency package of the matched function package, so that the electronic device 100 can download the matched function package and the dependency package of the matched function package according to the download information and the function package installed in the electronic device 100, thereby implementing that the electronic device 100 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 100 can be saved.
Fig. 14 is a flowchart of a further embodiment of a method for loading a function package in the present application, as shown in fig. 14, in the embodiment shown in fig. 13 in the present application, before step 1302, the method may further include:
1401, receiving an application package uploaded by a developer;
step 1402, splitting the application package to obtain a function package included in the application package.
Step 1403, analyzing each function package included in the application package, and obtaining a matching identifier of a dependent package of the function package and a matching identifier of the function package.
Step 1404, recording the application package to which the function package belongs, the matching identifier of the function package, and the matching identifier of the dependency package of the function package in the function package matching table.
In this embodiment, the process of splitting the application package uploaded by the developer by the server 400 may be as shown in fig. 6, and is not described herein again.
It is to be understood that some or all of the steps or operations in the above-described embodiments are merely examples, and other operations or variations of various operations may be performed by the embodiments of the present application. Further, the various steps may be performed in a different order presented in the above-described embodiments, and it is possible that not all of the operations in the above-described embodiments are performed.
It will be appreciated that the electronic device, in order to implement the above-described functions, comprises corresponding hardware and/or software modules for performing the respective functions. The exemplary algorithm steps described in connection with the embodiments disclosed herein may be embodied in hardware or in a combination of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, with the embodiment described in connection with the particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In this embodiment, the electronic device may be divided into functional modules according to the 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 integrated module may be implemented in the form of hardware. It should be noted that the division of the modules in this embodiment is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 15 is a schematic structural diagram of an electronic device according to another embodiment of the present application, where each functional module is divided according to a corresponding function, and fig. 15 illustrates a schematic possible composition diagram of the electronic device 1500 related to the foregoing embodiment, as shown in fig. 15, the electronic device 1500 may include: a reception unit 1501, a processing unit 1502, and a transmission unit 1503;
the receiving unit 1501 may be configured to support the electronic device 1500 to perform step 808, step 809, step 1102, and the like, and/or other processes used in the technical solutions described in the embodiments of the present application;
the processing unit 1502 may be configured to support the electronic device 1500 to perform steps 801 to 806, and step 1101, step 1201, step 1202, and/or the like, and/or other processes used in the technical solutions described in the embodiments of the present application;
the sending unit 1503 may be configured to support the electronic device 1500 to perform step 807 and/or other processes of the technical solutions described in the embodiments of the present application.
It should be noted that all relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
The electronic device 1500 provided in this embodiment is configured to execute the method for loading the function package, so that the same effect as that of the method can be achieved.
It should be understood that electronic device 1500 may correspond to electronic device 100 shown in fig. 1. The functions of the receiving unit 1501 and the transmitting 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; the functions of the processing unit 1502 may be implemented by the processor 110 and the touch sensor 180K in the electronic device 100 shown in fig. 1.
Where an integrated unit is employed, the electronic device 1500 may include a processing module, a memory module, and a communication module.
The processing module may be configured to control and manage the actions of the electronic device 1500, for example, may be configured 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 memory modules may be used to support electronic device 1500 in storing program codes and data and the like. A communication module that can be used to support communication of the electronic device 1500 with other devices.
Among other things, a processing module may be a processor or controller that may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with the present disclosure. A processor may also be a combination of computing functions, e.g., a combination of one or more microprocessors, a Digital Signal Processing (DSP) and a microprocessor, or the like. The storage module may be a memory. The communication module may specifically be a radio frequency circuit, a bluetooth chip and/or a Wi-Fi chip, and the like, which interact with other electronic devices.
In an embodiment, when the processing module is a processor and the storage module is a memory, the electronic device 1500 according to this embodiment may be a device having the structure shown in fig. 1.
Also, it is understood that the server, in order to implement the above-described functions, includes corresponding hardware and/or software modules for performing the respective functions. The exemplary algorithm steps described in connection with the embodiments disclosed herein may be embodied in hardware or in a combination of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, with the embodiment described in connection with the particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In this embodiment, the server may be divided into functional modules according to the 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 integrated module may be implemented in the form of hardware. It should be noted that the division of the modules in this embodiment is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 16 is a schematic structural diagram of a server according to another embodiment of the present application, where each functional module is divided by using corresponding functions, and fig. 16 shows a schematic possible composition diagram 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 transmitting unit 1603;
the receiving unit 1601 may be configured to support the server 1600 to perform step 1301, step 1401, and the like, and/or other processes of the technical solution described in the embodiment of the present application;
processing unit 1602 may be configured to support server 1600 performing step 1302, step 1402, step 1403, step 1404, and/or the like, and/or other processes for the technical solutions described in the embodiments of the present application;
sending unit 1603 may be used to support server 1600 to perform step 1303 and the like, and/or to perform other processes of the technical solutions described in the embodiments of the present application.
It should be noted that all relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
The server 1600 provided in this embodiment is configured to execute the method for loading the function package, so that the same effect as that of the method can be achieved.
It should be understood that server 1600 may correspond to server 400 shown in fig. 4. The functions of the receiving unit 1601 and the sending unit 1603 can be realized 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. 4.
Where an integrated unit is employed, server 1600 may include a processing module, a storage module, and a communication module.
The processing module may be used to control and manage the operation of server 1600, and for example, may be used to support server 1600 to execute the steps executed by receiving unit 1601, processing unit 1602, and sending unit 1603. Memory modules may be used to support server 1600 in storing program codes and data, etc. A communications module may be used to support communications for the server 1600 with other devices.
Among other things, a processing module may be a processor or controller that may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with the present disclosure. A processor may also be a combination of computing functions, e.g., a combination of one or more microprocessors, a Digital Signal Processing (DSP) and a microprocessor, or the like. The storage module may be a memory. The communication module may specifically be a radio frequency circuit, a bluetooth chip and/or a Wi-Fi chip, and the like, which interact with other electronic devices.
In one embodiment, when the processing module is a processor and the storage module is a memory, the server 1600 according to this embodiment may be a device having the structure shown in fig. 4.
Embodiments of the present application further provide a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer is enabled to execute the method provided by the embodiments shown in fig. 8 to 12 of the present application.
Embodiments of the present application further provide a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer is enabled to execute the method provided by the embodiments shown in fig. 13 to 14 of the present application.
Embodiments of the present application further provide a computer program product, which includes a computer program, when the computer program runs on a computer, causing the computer to execute the method provided by the embodiments shown in fig. 8 to 12 of the present application.
Embodiments of the present application further provide a computer program product, which includes a computer program, when the computer program runs on a computer, causing the computer to execute the method provided by the embodiments shown in fig. 13 to 14 of the present application.
In the embodiments of the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, and means that there may be three relationships, for example, a and/or B, and may mean that a exists alone, a and B exist simultaneously, and B exists alone. Wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, wherein a, b and c can be single or multiple.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, any function, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered by the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

Claims (26)

1. A method for loading a function package is characterized by comprising the following steps:
the method comprises the steps that the electronic equipment detects first operation information of a user in an interface displayed by a first application program which is currently running;
responding to the first operation information, and displaying a function selection interface;
detecting second operation information of the first function selected by the user;
responding to the second operation information, and acquiring description information of the first function;
searching a function package with a matching identifier matched with the description information in the installed function packages of the electronic equipment;
when the description information is not searched, the description information is sent to a server;
receiving download information sent by the server, wherein the download information comprises information of a function package and information of a dependency package of the function package, and the function package comprises a function package of which the matching identification is matched with the description information;
downloading the function package and the dependent package of the function package, and silently installing and loading the function package.
2. The method of claim 1, wherein the downloading the function package and the dependent package of the function package, and wherein quiescing installation and loading of the function package comprises:
determining a dependence package to be downloaded according to the downloading information and the function package installed in the electronic equipment;
and downloading the function package and the dependency package to be downloaded, and silently installing and loading the function package.
3. The method according to claim 1 or 2, wherein the description information comprises: the function type code of the function corresponding to the function icon, the matching identification comprises: function category codes of functions provided by the function pack;
the searching for the function package with the matching identifier matched with the description information in the installed function packages of the electronic equipment comprises:
and searching according to the function category code in the description information in the function package installed in the electronic equipment to obtain the function package of which the function category code in the matching identifier is matched with the function category code in the description information.
4. The method according to claim 3, wherein after searching for a function package matching the identifier and the description information from among the installed function packages of the electronic device, the method further comprises:
if the function package with the matching identifier matched with the description information is found in the installed function packages of the electronic equipment, loading the matched function package in the first application program, wherein the matched function package is the function package with the installed second application program, and the second application program is installed in the electronic equipment.
5. The method according to claim 4, wherein the description information further includes vendor information and/or version information of the first application; the matching identification also comprises manufacturer information and/or version information of the function package;
before the loading the matched function package in the first application program, the method further includes:
if at least two matched function packages are found in the installed function packages of the electronic equipment, determining the matching degree of the matched function packages and the first application program according to the manufacturer information and/or the version information;
the loading the matched function package in the first application program comprises:
and loading the function package with the highest matching degree in the first application program.
6. The method according to claim 1, wherein the searching for the function package with the matching identifier matching with the description information in the function packages installed in the electronic device comprises:
searching a function package of which the matching identification is matched with the description information in an installed function list of the electronic equipment; and storing a table entry corresponding to the application program installed in the electronic device in the installed function list, wherein the table entry includes a matching identifier of the function package installed in the application program.
7. The method according to claim 6, wherein the downloading information includes an application to which the function package belongs, and the downloading the function package and a dependent package of the function package further includes, after quiescing and loading the function package:
and acquiring a table entry corresponding to the application to which the loaded function package belongs in an installed function list of the electronic equipment, and adding the matching identifier of the loaded function package in the acquired table entry.
8. A method for loading a function package is characterized by comprising the following steps:
the method comprises the steps that a server receives description information sent by electronic equipment, wherein the description information is sent after the electronic equipment acquires a first function selected by a user and does not find a function package of which the matching identification is matched with the description information in an installed function package of the electronic equipment;
searching information of the function packet with the matching identification matched with the description information in a function packet matching table;
and sending download information to the electronic equipment, wherein the download information comprises the information of the function package and the information of the dependence package of the function package, so that the electronic equipment downloads the function package and the dependence package of the function package according to the download information.
9. The method of claim 8, wherein before searching for information in the feature pack matching table that matches the feature pack that identifies the feature pack that matches the description information, further comprising:
receiving an application package uploaded by a developer;
splitting the application package to obtain a function package included by the application package;
analyzing each function package included in the application package to obtain a matching identifier of a dependent package of the function package and a matching identifier of the function package;
and recording the application packet to which the function packet belongs, the matching identifier of the function packet and the matching identifier of the dependent packet of the function packet in the function packet matching table.
10. The method according to claim 8 or 9, wherein the matching identification comprises: function type codes of functions provided by the function package; recording an application package to which a function package belongs, a matching identifier of the function package, information of the function package and information of a dependent package of the function package in the function package matching table; the description information includes: function type codes of functions corresponding to the function icons;
in the function package matching table, the searching for the information of the function package matching the matching identifier with the description information includes:
and searching according to the function category codes in the description information in a function packet matching table to obtain a function packet of which the function category codes in the matching identification are matched with the function category codes in the description information.
11. The method according to claim 10, wherein the description information further includes: vendor information and/or version information of the first application; the matching identification also comprises manufacturer information and/or version information of the function package;
after searching the information of the function package matching the matching identifier and the description information in the function package matching table, the method further comprises the following steps:
if the searched matched function packages comprise at least two function packages in the function package matching table, determining the matching degree of the matched function packages and the first application program according to the manufacturer information and/or the version information;
the download information includes information of the function package with the highest matching degree and information of the dependent package of the function package with the highest matching degree.
12. A device for loading a feature pack, characterised by being arranged to perform the method of any of claims 1 to 7.
13. A device for loading a feature pack, configured to perform the method according to any one of claims 8 to 11.
14. An electronic device, comprising:
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, the one or more computer programs comprising instructions which, when executed by the electronic device, cause the electronic device to perform the steps of:
detecting first operation information of a user in an interface displayed by a currently running first application program;
responding to the first operation information, and displaying a function selection interface;
detecting second operation information of the first function selected by the user;
responding to the second operation information, and acquiring description information of the first function;
searching a function package with a matching identifier matched with the description information in the installed function packages of the electronic equipment;
when the description information is not searched, the description information is sent to a server;
receiving download information sent by the server, wherein the download information comprises information of a function package and information of a dependency package of the function package, and the function package comprises a function package of which the matching identification is matched with the description information;
downloading the function package and the dependent package of the function package, and silently installing and loading the function package.
15. The electronic device of claim 14, wherein the instructions, when executed by the electronic device, cause the electronic device to perform the downloading of the feature package and the dependency package of the feature package, the step of loading the feature package comprising:
determining a dependence package to be downloaded according to the downloading information and the function package installed in the electronic equipment;
and downloading the function package and the dependency package to be downloaded, and silently installing and loading the function package.
16. The electronic device according to claim 14 or 15, wherein the description information includes: the function type code of the function corresponding to the function icon, the matching identification comprises: function category codes of functions provided by the function pack;
when executed by the electronic device, the instructions cause the electronic device to perform the step of searching for a function package matching the identification and the description information from among the function packages installed in the electronic device, including:
and searching according to the function category code in the description information in the function package installed in the electronic equipment to obtain the function package of which the function category code in the matching identifier is matched with the function category code in the description information.
17. The electronic device of claim 16, wherein the instructions, when executed by the electronic device, cause the electronic device to perform the following steps after the step of finding a function package matching the identifier and the description information from among the function packages installed in the electronic device is performed:
if the function package with the matching identifier matched with the description information is found in the installed function packages of the electronic equipment, loading the matched function package in the first application program, wherein the matched function package is the function package with the installed second application program, and the second application program is installed in the electronic equipment.
18. The electronic device according to claim 17, wherein the description information further includes vendor information and/or version information of the first application; the matching identification also comprises manufacturer information and/or version information of the function package;
when the instructions are executed by the electronic equipment, the electronic equipment executes the following steps before the step of loading the matched function package in the first application program:
if at least two matched function packages are found in the installed function packages of the electronic equipment, determining the matching degree of the matched function packages and the first application program according to the manufacturer information and/or the version information;
the loading the matched function package in the first application program comprises:
and loading the function package with the highest matching degree in the first application program.
19. The electronic device of claim 14, wherein the instructions, when executed by the electronic device, cause the electronic device to perform the step of finding a function package matching an identifier matching the description information from among function packages installed in the electronic device comprises:
searching a function package of which the matching identification is matched with the description information in an installed function list of the electronic equipment; and storing a table entry corresponding to the application program installed in the electronic device in the installed function list, wherein the table entry includes a matching identifier of the function package installed in the application program.
20. The electronic device of claim 19, wherein the download information includes an application to which the function package belongs, and wherein the instructions, when executed by the electronic device, cause the electronic device to perform the steps of downloading the function package and a dependent package of the function package, quiescently installing and loading the function package, and further performing the following steps:
and acquiring a table entry corresponding to the application to which the loaded function package belongs in an installed function list of the electronic equipment, and adding the matching identifier of the loaded function package in the acquired table entry.
21. A server, comprising:
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, the one or more computer programs comprising instructions which, when executed by the server, cause the server to perform the steps of:
receiving description information sent by electronic equipment, wherein the description information is sent after the electronic equipment acquires a first function selected by a user and does not find a function package of which the matching identification is matched with the description information in an installed function package of the electronic equipment;
searching information of the function packet with the matching identification matched with the description information in a function packet matching table;
and sending download information to the electronic equipment, wherein the download information comprises the information of the function package and the information of the dependence package of the function package, so that the electronic equipment downloads the function package and the dependence package of the function package according to the download information.
22. The server according to claim 21, wherein the instructions, when executed by the server, cause the server to perform the following further steps prior to the step of looking up information in the function package matching table that matches the function package that identifies the function package that matches the description information:
receiving an application package uploaded by a developer;
splitting the application package to obtain a function package included by the application package;
analyzing each function package included in the application package to obtain a matching identifier of a dependent package of the function package and a matching identifier of the function package;
and recording the application packet to which the function packet belongs, the matching identifier of the function packet and the matching identifier of the dependent packet of the function packet in the function packet matching table.
23. The server according to claim 21 or 22, wherein the matching identification comprises: function type codes of functions provided by the function package; recording an application package to which a function package belongs, a matching identifier of the function package, information of the function package and information of a dependent package of the function package in the function package matching table; the description information includes: function type codes of functions corresponding to the function icons;
when executed by the server, the instructions cause the server to perform the step of looking up information in a function package matching table that matches a function package that identifies the matching description information comprises:
and searching according to the function category codes in the description information in a function packet matching table to obtain a function packet of which the function category codes in the matching identification are matched with the function category codes in the description information.
24. The server according to claim 23, wherein the description information further includes: vendor information and/or version information of the first application; the matching identification also comprises manufacturer information and/or version information of the function package;
when executed by the server, the instructions cause the server to perform the following steps after the step of searching the function package matching table for information matching the function package identifying the function package matching the description information:
if the searched matched function packages comprise at least two function packages in the function package matching table, determining the matching degree of the matched function packages and the first application program according to the manufacturer information and/or the version information;
the download information includes information of the function package with the highest matching degree and information of the dependent package of the function package with the highest matching degree.
25. A computer-readable storage medium, in which a computer program is stored which, when run on a computer, causes the computer to carry out the method according to any one of claims 1 to 7.
26. A computer-readable storage medium, in which a computer program is stored which, when run on a computer, causes the computer to carry out the method according to any one of claims 8-11.
CN202010477876.0A 2020-05-29 2020-05-29 Function package loading method and device, server and electronic equipment Pending CN113741911A (en)

Priority Applications (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
PCT/CN2021/083177 WO2021238376A1 (en) 2020-05-29 2021-03-26 Function pack loading method and apparatus, and server and electronic device

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
CN113741911A true CN113741911A (en) 2021-12-03

Family

ID=78724996

Family Applications (1)

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

Country Status (2)

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

Cited By (1)

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

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281325B (en) * 2011-06-30 2014-11-12 杭州斯凯网络科技有限公司 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
US10713028B2 (en) * 2018-06-05 2020-07-14 Microsoft Technology Licensing, Llc On-demand installer for resource packages

Cited By (2)

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

Also Published As

Publication number Publication date
WO2021238376A1 (en) 2021-12-02

Similar Documents

Publication Publication Date Title
WO2021159746A1 (en) File sharing method and system, and related device
CN113704205B (en) Log storage method, chip, electronic device and readable storage medium
CN112947947A (en) Downloading method and distribution method of installation package, terminal equipment, server and system
CN113821767A (en) Application program authority management method and device and electronic equipment
CN114461588A (en) Method for adjusting pre-reading window and electronic equipment
CN114124980B (en) Method, device, system, terminal and storage medium for starting application
CN113641271A (en) Application window management method, terminal device and computer readable storage medium
CN113741993B (en) Method and device for compiling plug-in dex file
CN115438354A (en) User privacy protection method and device
WO2022100141A1 (en) Plug-in management method, system and apparatus
WO2021238376A1 (en) Function pack loading method and apparatus, and server and electronic device
CN113590346B (en) Method and electronic equipment for processing service request
CN113380240B (en) Voice interaction method and electronic equipment
CN113407300B (en) Application false killing evaluation method and related equipment
CN113485709B (en) Application optimization method and device and electronic equipment
CN112783418B (en) Method for storing application program data and mobile terminal
CN114398108A (en) Electronic device, drive loading method thereof, and medium
CN114079642A (en) Mail processing method and electronic equipment
CN114971107A (en) Privacy risk feedback method and device and first terminal equipment
CN114816973A (en) Method and device for debugging codes, electronic equipment and readable storage medium
CN114828098A (en) Data transmission method and electronic equipment
CN113950045A (en) Subscription data downloading method and electronic equipment
CN112286596A (en) Message display method and electronic equipment
CN114168115B (en) Communication system, application downloading method and device
CN115421644B (en) Method and device for determining source of popup message

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination