Application running method, electronic device and storage medium

Through shared function packages and dynamic loading and unloading technology, the problem of excessive application installation packages is solved, the download speed and user experience is improved, and the storage space is optimized.

WO2025002248A1PCT designated stage expired Publication Date: 2025-01-02HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/101963
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-30
Filing Date
2024-06-27
Publication Date
2025-01-02

AI Technical Summary

Technical Problem

With the enrichment of application functions, the application's installation package becomes too large, resulting in a longer download time and poor user experience, making it difficult for the existing technology to effectively solve this problem.

Method used

By sharing function packages, different applications can share the same function package, reduce the size of the installation package, and dynamically load and unload the shared implementation package on electronic devices to improve download speed and storage efficiency.

Benefits of technology

It realizes the sharing of function packages between different applications, reduces the size of the installation package and download time, improves the user experience, and optimizes the storage space utilization of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024101963_02012025_PF_FP_ABST
    Figure CN2024101963_02012025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are an application running method, an electronic device and a storage medium. The method comprises: in response to a user operation of opening a first application, an electronic device acquiring a first storage path of an installation package of the first application and a second storage path of a shared implementation package on which the first application depends, wherein the first application and the shared implementation package are installed on the electronic device, the shared implementation package is used for implementing a preset function, and the first storage path is different from the second storage path; on the basis of the first storage path, the electronic device acquiring the installation package of the first application, the installation package of the first application being configured with reference information for the shared implementation package; and, on the basis of the first storage path, the reference information and the second storage path, the electronic device running the first application. The method enables different applications to share the same function package, reducing the sizes of installation packages of the applications, and increasing the download speed of the installation packages of the applications.
Need to check novelty before this filing date? Find Prior Art

Description

Application running method, electronic device and storage medium

[0001] This application claims priority to the Chinese patent application with application number 202310802854.0 filed with the State Intellectual Property Office of China on June 30, 2023, and priority to the Chinese patent application with the invention name “An application operation method, electronic device and storage medium”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to an application running method, an electronic device, and a storage medium. Background Art

[0003] With the advancement of technology and the development of smart electronic devices, in order to meet the needs of users, developers have developed a variety of functional applications. Users can download and install applications on electronic devices and experience different application features through installed applications, such as playing music, playing videos, etc.

[0004] Currently, an application installation package may include multiple different function packages, each of which can implement different functions. For example, an application's function package may include, but is not limited to, a basic package, a configuration package, an entry function package, or a feature function package.

[0005] As applications become more and more functional, the number of application function packages increases, resulting in application installation packages being too large. It takes a long time for electronic devices to download application installation packages, and users also need to wait a long time to download application installation packages, resulting in poor user experience.

[0006] Summary of the Invention

[0007] The present application provides an application running method, an electronic device, and a storage medium, which enable different applications to share the same function package, reduce the size of the application installation package, and speed up the download speed of the application installation package.

[0008] In a first aspect, the present application provides an application running method, the method comprising: the electronic device obtains a first storage path of the installation package of the first application and a second storage path of a shared implementation package that the first application depends on in response to a user's opening operation of the first application; wherein the electronic device is installed with the first application and the shared implementation package, wherein the shared implementation package is used to implement a preset function, and the first storage path is different from the second storage path; the electronic device obtains the installation package of the first application based on the first storage path, and the installation package of the first application is configured with reference information to the shared implementation package; the electronic device runs the first application based on the first storage path, the reference information and the second storage path.

[0009] The reference information of the shared implementation package may include the API used by the electronic device to call the shared implementation package. The electronic device can derive the shared implementation package based on the API of the shared implementation package and then load and run the shared implementation package. The reference information of the shared implementation package is not limited to the API of the shared implementation package and may also include other information, which is not limited in this application.

[0010] The storage paths of the installation package of the first application and the shared implementation package that the first application relies on are different. The shared implementation package can be used by different applications. When the first application is launched, the electronic device can obtain the second storage path of the shared implementation package that the first application relies on, and then run the first application based on the installation package of the first application and the shared implementation package that the first application relies on. Through this method, different applications can share the same function package, reducing the size of the application installation package and speeding up the download speed of the application installation package.

[0011] In combination with the first aspect, in a possible implementation, the method also includes: the electronic device obtains a third storage path of the installation package of the second application and a second storage path of the shared implementation package that the second application depends on in response to the user's opening operation of the second application; wherein the electronic device is installed with the second application and the shared implementation package, and the third storage path is different from the second storage path; the electronic device obtains the installation package of the second application based on the third storage path, and the installation package of the second application is configured with reference information to the shared implementation package; the electronic device runs the second application based on the third storage path, the reference information and the second storage path.

[0012] The same shared implementation package can be used by different applications. When different applications call the same shared implementation package, it is necessary to record the reference information of the shared implementation package that the application depends on in the installation package of each application. This allows the electronic device to obtain the second storage path of the shared implementation package that the second application depends on when the second application is launched, and then run the first application based on the installation package of the second application and the shared implementation package that the second application depends on. In this way, different applications can share the same function package, reducing the size of the application installation package and speeding up the download speed of the application installation package.

[0013] In combination with the first aspect, in one possible implementation, before the electronic device runs the first application based on the first storage path, reference information and the second storage path, the method also includes: the electronic device loads the first storage path and the second storage path into the process sandbox of the first application; the electronic device runs the first application based on the first storage path, reference information and the second storage path, specifically including: the electronic device runs the first application in the process sandbox of the first application based on the first storage path, reference information and the second storage path.

[0014] In some embodiments, the electronic device may also load the reference information of the shared implementation package that the first application depends on into the process sandbox of the first application, or may not load the reference information of the shared implementation package that the first application depends on into the process sandbox of the first application. This application does not limit this.

[0015] When a first application is launched, the electronic device may load the first storage path of the first application's installation package and the second storage path of the shared implementation package that the first application depends on into the first application's process sandbox. Only the first application can access the data in the first application's process sandbox, while other applications cannot access the data in the first application's process sandbox. This allows different applications to run independently and ensures the security of application operation.

[0016] In combination with the first aspect, in a possible implementation, before the electronic device responds to the user's opening operation of the first application, the method also includes: the electronic device receives and responds to a third user operation, downloads and installs the installation package of the first application, and stores the installation package of the first application in the first storage area, the storage path of the installation package of the first application stored in the first storage area is the first storage path, the installation package of the first application includes a shared interface package, and the shared interface package includes an identifier of the shared implementation package that the first application depends on; when the electronic device determines that the shared implementation package is not installed on the electronic device based on the identifier of the shared implementation package, the electronic device downloads the shared implementation package; the electronic device installs the shared implementation package and stores the shared implementation package in the second storage area, and the storage path of the shared implementation package stored in the second storage area is the second storage path.

[0017] In combination with the first aspect, in a possible implementation method, the method also includes: when the electronic device determines that the shared implementation package is installed on the electronic device based on the identifier of the shared implementation package, the electronic device obtains a second storage path of the shared implementation package based on the identifier of the shared implementation package.

[0018] Optionally, the electronic device may send an identifier of the shared implementation package to the server. After receiving the shared implementation package sent by the server, the electronic device installs the shared implementation package.

[0019] In this way, when the electronic device downloads and installs the first application, it can only download the installation package of the first application. When determining whether the electronic device has a shared implementation package that the first application depends on locally, if the electronic device has a shared implementation package that the first application depends on locally stored, the electronic device may not download the shared implementation package, thereby reducing the amount of data downloaded for the installation package of the first application. If the electronic device does not have a shared implementation package that the first application depends on locally stored, the electronic device will download the shared implementation package.

[0020] In combination with the first aspect, in one possible implementation method, the shared interface package also includes reference information of the shared implementation package; before the electronic device runs the first application based on the first storage path, reference information and second storage path, the method also includes: the electronic device obtains the shared interface package from the installation package of the first application; the electronic device obtains the reference information of the shared implementation package from the shared interface package.

[0021] The same shared implementation package can be used by different applications. When different applications call the same shared implementation package, the reference information of the shared implementation package that the application depends on must be recorded in the installation package of each application.

[0022] In combination with the first aspect, in a possible implementation, after the electronic device obtains the second storage path of the shared implementation package and before the electronic device responds to the user's opening operation on the first application, the method also includes: the electronic device obtains the installation information of the first application based on the first storage path of the installation package of the first application and the second storage path of the shared implementation package on which the first application depends; the electronic device obtains the first storage path of the installation package of the first application and the second storage path of the shared implementation package on which the first application depends in response to the user's opening operation on the first application, specifically including: the electronic device obtains the installation information of the first application in response to the user's opening operation on the first application; the electronic device obtains the first storage path of the installation package of the first application and the second storage path of the shared implementation package on which the first application depends from the installation information of the first application.

[0023] In this way, before launching the first application, the electronic device can obtain the installation information of the first application based on the first storage path of the installation package of the first application and the second storage path of the shared implementation package that the first application depends on. After launching the first application, the electronic device can quickly obtain the first storage path of the installation package of the first application and the second storage path of the shared implementation package that the first application depends on from the installation information of the first application, thereby speeding up the startup of the first application.

[0024] In combination with the first aspect, in a possible implementation method, the electronic device obtains a first storage path of the installation package of the first application and a second storage path of the shared implementation package that the first application depends on in response to the user's opening operation of the first application, specifically including: in response to the user's opening operation of the first application, the electronic device obtains the first storage path of the installation package of the first application based on the identifier of the first application; the electronic device obtains the installation package of the first application based on the first storage path; the electronic device obtains the identifier of the shared implementation package that the first application depends on from the installation package of the first application; the electronic device obtains the second storage path of the shared implementation package based on the identifier of the shared implementation package.

[0025] In another possible implementation, before launching the first application, the electronic device does not pre-acquire the installation information of the first application. After launching the first application, the electronic device can obtain in real time the first storage path of the installation package of the first application and the second storage path of the shared implementation package that the first application depends on.

[0026] In combination with the first aspect, in one possible implementation, after the electronic device runs the first application based on the first storage path, reference information and the second storage path, the method also includes: if the shared implementation package is not used within a first time period, the electronic device uninstalls the shared implementation package.

[0027] In this way, the electronic device can dynamically delete the shared implementation package that has not been used for a long time. For example, the shared implementation package that has not been used for a long time may be the shared implementation package before the version is updated, so as to save storage space of the electronic device.

[0028] In combination with the first aspect, in a possible implementation method, the electronic device installs a shared implementation package, specifically including: when the electronic device determines that the installation package of the first application includes a shared interface package, the electronic device obtains the identifier and first version number of the shared implementation package that the first application depends on from the shared interface package; when the electronic device determines based on the identifier and the first version number of the shared implementation package that the first version of the shared implementation package is not stored on the electronic device, the electronic device downloads the first version of the shared implementation package; the electronic device installs the first version of the shared implementation package, and stores the first version of the shared implementation package in a second storage area, and the storage path of the first version of the shared implementation package stored in the second storage area is the second storage path.

[0029] In other possible implementations, when the electronic device determines that a first version of the shared implementation package is stored on the electronic device based on the identifier of the shared implementation package and the first version number, the electronic device obtains a second storage path of the first version of the shared implementation package based on the identifier of the shared implementation package and the first version number.

[0030] In this way, the shared implementation package that the first application depends on can be distinguished by version number. When the electronic device downloads and installs the first application, it can only download the installation package of the first application. When judging whether the electronic device has the shared implementation package that the first application depends on locally, if the electronic device has the first version of the shared implementation package that the first application depends on stored locally, the electronic device may not download the first version of the shared implementation package to reduce the amount of downloaded data of the installation package of the first application. If the electronic device does not have the first version of the shared implementation package that the first application depends on stored locally, the electronic device will download the first version of the shared implementation package.

[0031] In combination with the first aspect, in a possible implementation method, the electronic device downloads the first version of the shared implementation package, specifically including: the electronic device sends the identifier and the first version number of the shared implementation package to the server; the electronic device receives the first version of the shared implementation package sent by the server.

[0032] In combination with the first aspect, in a possible implementation method, after the electronic device receives the first version of the shared implementation package sent by the server, the method also includes: the electronic device receives the second version of the shared implementation package sent by the server, and updates the first version of the shared implementation package to the second version of the shared implementation package.

[0033] In this way, the electronic device can also automatically update the latest version. When the first application needs to use the second version of the shared implementation package, the electronic device does not need to download the second version of the shared implementation package from the server in real time.

[0034] In combination with the first aspect, in one possible implementation method, the preset functions include any one of the following: login function, payment function, map function, navigation function, networking function, advertising display function, data storage function, image recognition function, connection function, screen projection function, communication function, camera function, multimedia function, device virtualization function, and device security function.

[0035] In a second aspect, the present application provides an application running method, the method comprising: in response to a user opening operation of a first application, the electronic device obtains the storage path of a shared implementation package that the first application depends on, wherein the electronic device is installed with the first application and the shared implementation package; the electronic device loads the shared implementation package into the process sandbox of the first application; the electronic device displays the user interface of the first application; in response to a user clicking operation on the user interface, the electronic device implements a preset function of the click operation based on the shared implementation package; wherein the preset function includes any one of the following: login function, payment function, map function, navigation function, networking function, advertising display function, data storage function, image recognition function, connection function, screen projection function, communication function, camera function, multimedia function, device virtualization function, and device security function.

[0036] In combination with the second aspect, in a possible implementation, before responding to the user's operation to open the first application, the method also includes: the electronic device receives and responds to the user's operation to download the first application, downloads and installs the installation package of the first application, and stores the installation package of the first application in the first storage area; the electronic device obtains the shared interface package from the installation package of the first application, and obtains the identifier of the shared implementation package from the shared interface package; when the electronic device determines that the shared implementation package is not stored on the electronic device based on the identifier of the shared implementation package, the electronic device downloads the shared implementation package; the electronic device installs the shared implementation package and stores the shared implementation package in the second storage area; the electronic device obtains the storage path of the shared implementation package based on the shared implementation package stored in the second storage area.

[0037] In combination with the second aspect, in a possible implementation method, the method also includes: when the electronic device determines that the shared implementation package is stored in the second storage area on the electronic device based on the identifier of the shared implementation package, the electronic device obtains the storage path of the shared implementation package based on the shared implementation package stored in the second storage area.

[0038] In combination with the second aspect, in a possible implementation method, the electronic device implements the preset function of the click operation based on the shared implementation package, specifically including: the electronic device obtains the shared interface package from the installation package of the first application; the electronic device obtains the reference information of the shared implementation package from the shared interface package; the electronic device implements the preset function of the click operation based on the reference information of the shared implementation package and the shared implementation package.

[0039] It should be noted that any possible implementation of the application running method provided in the first aspect can also be applied to an application running method provided in the second aspect.

[0040] In a third aspect, the present application provides an electronic device, which includes a processor and a memory; the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, and the processor calls the computer instructions to execute an application running method provided in any possible implementation of any of the above aspects.

[0041] In a fourth aspect, the present application provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes an application running method provided in any possible implementation of any of the above aspects.

[0042] In a fifth aspect, the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes an application running method provided in any possible implementation of any of the above aspects.

[0043] For the beneficial effects of the second to fifth aspects, reference may be made to the description of the beneficial effects in the first aspect, and this application will not go into details here. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] FIG1 is a schematic diagram of the composition structure of an installation package of a first application and an installation package of a second application provided in an embodiment of the present application;

[0045] FIG2 is a schematic diagram provided in an embodiment of the present application;

[0046] FIG3 is another schematic diagram provided in an embodiment of the present application;

[0047] 4A-4D are schematic diagrams showing the electronic device 100 receiving a user operation to download and install a first application;

[0048] FIG5A is a schematic diagram showing the electronic device 100 downloading the installation package of the first application;

[0049] FIG5B shows a schematic diagram of an electronic device 100 storing an hsp package and an application installation package;

[0050] FIG6A shows another schematic diagram of how the electronic device 100 downloads the installation package of the first application;

[0051] FIG6B shows a schematic diagram of another electronic device 100 storing an hsp package and an application installation package;

[0052] FIG7 shows a schematic diagram of the interaction of functional modules for running an hsp package;

[0053] FIG8 shows another schematic diagram of the interaction of functional modules running an hsp package;

[0054] FIG9 shows a schematic flow chart of a method for running a first application;

[0055] FIG10 shows a schematic diagram of an application startup module running a first application;

[0056] FIG11 shows a schematic diagram of the hardware structure of an electronic device;

[0057] FIG12 shows a schematic diagram of the software structure of the electronic device. DETAILED DESCRIPTION

[0058] The following is a clear and detailed description of the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0059] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0060] The term "user interface (UI)" in the following embodiments of this application refers to the media interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. A common form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.

[0061] As shown in (a) and (b) of Figure 1, the installation package of the first application may include multiple different function packages, and different function packages may implement different functional characteristics. For example, the first application may include a first function package, a second function package, and a third function package. Among them, different function packages may implement different functional characteristics. Exemplarily, the first function package may include a basic function package of the first application or an Entry function package of the first application, and the second function package may include a configuration function package of the first application, such as a resource package related to the language configuration of the first application, a resource package related to the central processing unit (CPU) configuration of the first application, etc. The third function package may include a Feature function package, such as a resource package that provides map capabilities, networking capabilities, advertising capabilities, etc.

[0062] Similarly, the installation package of the second application may also include multiple different function packages. For example, the second application may include a fourth function package, a fifth function package, and a third function package. Different function packages can implement different functional characteristics. Exemplarily, the fourth function package may include the basic function package of the second application or the Entry function package of the second application, and the fifth function package may include the configuration function package of the second application, such as a resource package related to the language configuration of the second application, a resource package related to the CPU configuration of the second application, etc. The second application also includes a third function package, and the third function package in the second application is the same as the third function package in the first application.

[0063] When the electronic device 100 downloads the first application, it needs to download all of the multiple function packages of the first application, such as the first function package, the second function package, and the third function package.

[0064] When the electronic device 100 downloads the second application, it also needs to download multiple function packages of the second application, such as the fourth function package, the fifth function package and the third function package.

[0065] The first application and the second application have the same third function package. However, when downloading the first application and the second application, the same third function package needs to be downloaded multiple times, and the electronic device 100 also needs to store multiple third function packages.

[0066] In other possible implementations, the developer can develop a sixth function package with the same or similar functions as the third function package, and the sixth function package is integrated with the second application. When the electronic device 100 downloads the first application and the second application, it needs to download the third function package and the sixth function package with the same or similar functions, and store the third function package and the sixth function package with the same or similar functions.

[0067] This not only wastes the memory space of the electronic device 100 , but also requires the user to wait longer for downloading multiple function packages of the first application and the second application when there are many function packages of the first application and the second application.

[0068] Based on this, the following embodiments of the present application provide a shared function package and an application running method based on the shared function package. The shared function package can realize preset functions, such as login function, payment function, map function, navigation function, networking function, advertising display function, data storage function, image recognition function, connection function, screen projection function, communication function, camera function, multimedia function, device virtualization function, device security function, etc. The shared function package can be shared between different applications. For example, the first application needs to use the first shared package. If the first shared package is already stored on the electronic device 100, then when downloading the installation package of the first application, it is not necessary to download the first shared package to reduce the amount of downloaded data of the installation package of the first application.

[0069] Next, we will give a detailed introduction to the development stage, download stage, and usage stage of the shared function package.

[0070] Shared function package development stage

[0071] Shared functionality packages may include shared implementation packages and shared interface packages.

[0072] The shared implementation package may include files that implement the functional characteristics of the first shared function package, such as but not limited to js / ts files, standard program libraries, configuration files, resource files, etc. The shared implementation package can be shared between different applications.

[0073] The shared interface package is used to be integrated into the installation package of the application, and the electronic device can obtain the shared implementation package based on the shared interface package mapping. The shared interface package may include but is not limited to: the shared implementation package information that the application depends on, the reference information of the shared implementation package that the application depends on, etc. Among them, the shared implementation package information that the application depends on includes but is not limited to the identifier of the shared implementation package that the application depends on, or the identifier of the shared implementation package that the application depends on and the version number of the shared implementation package that the application depends on, etc. The reference information of the shared implementation package may include the application programming interface (API) for the electronic device to call the shared implementation package. The electronic device can export the shared implementation package based on the API of the shared implementation package, and then load and run the shared implementation package.

[0074] Not limited to API, the reference information of the shared implementation package can also be other implementation methods, which is not limited in this application.

[0075] For example, in the HarmonyOS system, the shared implementation package can be referred to as an HSP package, and the shared interface package can be referred to as a HAR package. As shown in Figure 2, the HAR package may include but is not limited to: the HSP package information that the application depends on, the API of the HSP package that the application depends on, etc. Among them, the HSP package information that the application depends on includes but is not limited to the identifier of the HSP package that the application depends on, or the identifier of the HSP package that the application depends on and the version number of the HSP package that the application depends on, etc. The HAR package is used for application integration in electronic devices.

[0076] In some embodiments, the hsp package information that the application depends on can also be called the configuration file of the har package, and the API of the hsp package that the application depends on can be called the interface exposed by the har package.

[0077] The following embodiments of this application are illustrated using the hsp package and har package in the HarmonyOS system as examples.

[0078] In a possible implementation, the hsp package may be pre-installed on the electronic device. If the hsp package is not pre-installed on the electronic device, the electronic device may also download the hsp package of the shared function package from the application store server.

[0079] Table 1

[0080] Table 1 exemplifies the composition of two shared function packages. For example, the first shared function package may include a first HAR package and a first HSP package. The second shared function package may include a second HAR package and a second HSP package.

[0081] When an application needs to use a shared function package, the har package of the shared function package needs to be integrated into the installation package of the application.

[0082] For example, as shown in (a) of FIG3 , when the third function package is a shared function package (e.g., the first shared function package), the first application's installation package may not integrate the third function package, but instead integrate the first HAR package of the third function package. The first HAR package does not include code files and has a relatively small data size. In this way, the data size of the first application's installation package can be reduced.

[0083] Similarly, as shown in (b) of FIG3 , the installation package of the second application may not integrate the third function package, but may integrate the first har package of the third function package. In this way, the data volume of the installation package of the second application can be reduced.

[0084] Optionally, the application of the electronic device can also integrate the HAR packages of multiple shared function packages. For example, when the first application needs to use the second shared function package, the second HAR package of the second shared function package can be integrated into the installation package of the first application.

[0085] Optionally, when the application of the electronic device needs to use multiple shared function packages, for example, the application of the electronic device needs to use the first shared function package and the second shared function package, the first HAR package of the first shared function package and the second HAR package of the second shared function package can be combined into one HAR package, and only one HAR package needs to be integrated into the installation package of the application of the electronic device.

[0086] The following embodiments of the present application are explained by taking the example that when an application of an electronic device uses a shared function package, the installation package of the application of the electronic device must contain a har package corresponding to each shared function package.

[0087] hsp package download stage

[0088] First, the application download scenario involved in this application is described.

[0089] 4A-4D are schematic diagrams showing the electronic device 100 receiving a user operation to download and install a first application.

[0090] The electronic device 100 may receive a user operation to download an installation package of a first application from an application store. The electronic device 100 may install the first application on the electronic device based on the installation package of the first application. After the first application is installed on the electronic device 100, the electronic device 100 may display an application icon of the first application on the desktop.

[0091] Exemplarily, the first application may be a Huawei video application.

[0092] As shown in Figure 4A, Figure 4A shows the main interface 310 of the electronic device 100 before the Huawei Video app is installed. The main interface 310 includes multiple application icons, such as an icon for the Weather app, an icon for the Huawei Store app, an icon for the Smart Home app, an icon for the Sports & Health app, an icon for the Memo app, an icon for the Calendar app, an icon for the Life Service app, an icon for the Camera app, an icon for the Contacts app, an icon for the Phone app, and an icon for the Message app. The main interface 310 also displays a battery indicator, a weather indicator, a date indicator, a network signal indicator, a page indicator, and the like.

[0093] As shown in Figure 4A, the electronic device 100 can receive a user input operation (e.g., a single click) on the icon of the Huawei Store application. In response to the user input operation, the electronic device 100 can display the user interface 320 shown in Figure 4B. The user interface 320 is the main interface of the Huawei Store application. The user interface 320 includes an application search bar 3201 and recommended applications. The recommended applications can be Huawei Music applications, sports and health applications, etc. Among them, the electronic device 100 can receive a user input operation in the search bar 3201 (e.g., entering an application keyword in the search bar 3201), and the electronic device 100 will display the application search interface.

[0094] For example, the electronic device 100 receives the keyword "Huawei Video" entered by the user in the search bar, after which the electronic device 100 may display the download interface or opening interface of Huawei Video. If Application 1 is already installed locally, in response to the keyword "Huawei Video" entered by the user, the electronic device 100 will display the opening interface of Application 1. The interface may include the Huawei Video icon, Huawei Video introduction information, controls for opening Huawei Video, and so on.

[0095] For example, as shown in FIG4C , electronic device 100 receives a user input of the keyword "Huawei Video" in the search bar, after which electronic device 100 may display a Huawei Video download interface. The Huawei Video download interface may include a Huawei Video icon, a Huawei Video profile, a download control for the Huawei Video installation package, and the like.

[0096] 4C , the electronic device 100 may receive a user input operation (e.g., a single click) for the download control of the Huawei Video installation package. In response to the user's input operation, the electronic device 100 may download the installation package of the Huawei Video application and install the Huawei Video application.

[0097] As shown in Figure 4D, after the electronic device 100 has installed the Huawei Video application, the electronic device 100 can display the Huawei Video application icon 3101 in the main interface 310. The electronic device 100 can receive a user input operation (e.g., a single click) on the Huawei Video application icon 3101 in the main interface 310. In response to the user input operation, the electronic device 100 can display the content of the Huawei Video application, such as playing a video provided by the Huawei Video application.

[0098] FIG5A shows a schematic diagram of the electronic device 100 downloading the installation package of the first application.

[0099] S501 : The electronic device 100 sends the application identifier of the first application to the server 200 .

[0100] Exemplarily, the first application may be a Huawei video application.

[0101] As shown in Figures 4A-4D , when electronic device 100 needs to download a first application, electronic device 100 may receive a user input of the keyword "Huawei Video" in the search bar shown in Figure 4C . Subsequently, electronic device 100 may receive a user input operation (e.g., a single click) on the download control shown in Figure 4C . In response to the user input operation, electronic device 100 may send the application identifier "Huawei Video" of the Huawei Video application to server 200.

[0102] S502 : The electronic device 100 receives the installation package of the first application sent by the server 200 .

[0103] In some embodiments, after the electronic device 100 sends the application identifier of the first application to the server 200, the server 200 can obtain the installation package of the first application based on the application identifier of the first application. The server 200 then sends the installation package of the first application to the electronic device 100.

[0104] The installation package of the first application may include one or more function packages.

[0105] The installation package of the first application may also include one or more function packages, and one or more HAR packages of shared function packages.

[0106] The function package can be a unique function package of the first application and cannot be used by other applications. The hsp package of the shared function package can be used not only by the application itself but also by other applications.

[0107] S503 : The electronic device 100 installs a first application and stores the installation package of the first application in a first storage area of ​​the electronic device 100 .

[0108] After the electronic device 100 obtains the installation package of the first application sent by the server 200, the electronic device 100 can install the first application and install the installation package of the first application in the first storage area of ​​the electronic device 100. The installation package of the first application installed in the first storage area is only used by the first application and cannot be used by other applications (such as the second application).

[0109] The storage path of the installation package of the first application stored in the first storage area is the first storage path.

[0110] S504: The electronic device 100 needs to confirm whether the electronic device 100 locally stores a first hsp package that the first application depends on.

[0111] When the electronic device 100 confirms that the first hsp package that the first application depends on is stored locally in the electronic device 100, the electronic device 100 does not need to download the first hsp package that the first application depends on from the server 200, and the process ends.

[0112] When the electronic device 100 confirms that the electronic device 100 does not locally store the first hsp package that the first application depends on, the electronic device 100 needs to download the first hsp package that the first application depends on from the server 200 and execute S505.

[0113] Optionally, before executing S504, the electronic device 100 may determine whether the installation package of the first application includes a HAR package. If the electronic device 100 determines that the installation package of the first application does not include a HAR package, it indicates that the first application does not use a shared function package. After the electronic device 100 installs the first application and stores the installation package of the first application in the first storage area of ​​the electronic device 100, the process ends and the electronic device 100 does not need to execute S505.

[0114] When the electronic device 100 determines that the installation package of the first application includes the har package, it means that the first application needs to use the shared function package. After the electronic device 100 installs the first application and stores the installation package of the first application in the first storage area of ​​the electronic device 100, the electronic device 100 also needs to execute S505.

[0115] When the electronic device 100 determines that the installation package of the first application includes a HAR package, for example, the HAR package is a first HAR package, the electronic device 100 can obtain the first HAR package. The electronic device 100 can obtain the HSP package information that the first application depends on from the first HAR package, and then obtain the name or ID of the first HSP package that the first application depends on from the HSP package information that the first application depends on. The HSP package information that the first application depends on can include the name or ID of the HSP package that the first application depends on, or the name or ID of the HSP package that the first application depends on and the version number of the HSP package that the first application depends on.

[0116] In the embodiment of FIG5A , the hsp package information that the first application depends on includes the name or ID of the hsp package that the first application depends on as an example for description.

[0117] The electronic device 100 can obtain the name or ID of the first hsp package that the first application depends on based on the hsp package information that the first application depends on, and based on the name or ID of the first hsp package, confirm whether the first hsp package that the first application depends on is stored on the electronic device 100.

[0118] S505 : The electronic device 100 sends a download notification to the server 200 .

[0119] When the electronic device 100 confirms that the electronic device 100 does not locally store the first hsp package that the first application depends on, the electronic device 100 can send a download notification to the server 200, and the download notification is used for the server 200 to download the first hsp package.

[0120] In a possible implementation, the download notification may carry the name or ID of the first hsp package. In other possible implementations, the name of the first hsp package and the download notification may also be sent to the server 200 separately. This application does not limit this.

[0121] S506 : The electronic device 100 receives the first HSP packet sent by the server 200 .

[0122] In some embodiments, after receiving the download notification sent by the electronic device 100, the server 200 can obtain the name of the first HSP package in response to the download notification, and obtain the first HSP package based on the name of the first HSP package. The server 200 then sends the first HSP package to the electronic device 100.

[0123] S507: The electronic device 100 installs the first HSP package and stores the first HSP package in a second storage area, which is different from the first storage area.

[0124] After the electronic device 100 obtains the first HSP package sent by the server 200, the electronic device 100 can install the first HSP package and store the first HSP package in the second storage area, which is different from the first storage area. In this way, the first HSP package stored in the second storage area is not limited to being used by the first application, but can also be used by other applications (such as the second application).

[0125] Optionally, multiple hsp packages can be stored in the electronic device 100. In order to facilitate the management of multiple hsp packages, the electronic device 100 can create an hsp package upper directory, and the hsp package upper directory can include multiple hsp package subdirectories. Different hsp packages can be stored in different hsp package subdirectories. For example, when the electronic device 100 installs the first hsp package, the electronic device 100 can create a subdirectory of the hsp package upper directory (for example, the first hsp package subdirectory), and install and store the first hsp package in the first hsp package subdirectory. For another example, when the electronic device 100 installs the second hsp package, the electronic device 100 can create a subdirectory of the hsp package upper directory (for example, the second hsp package subdirectory), and install and store the second hsp package in the second hsp package subdirectory. The first hsp package subdirectory and the second hsp package subdirectory are different.

[0126] Optionally, in other embodiments, the electronic device 100 may not include an upper-level directory of the hsp package, but only include subdirectories of different hsp packages, and this application does not limit this.

[0127] The first hsp package subdirectory can be referred to as a second storage area. The storage path of the first hsp package stored in the first hsp package subdirectory is the second storage path.

[0128] The second hsp package subdirectory can be referred to as a third storage area. The storage path of the first hsp package stored in the second hsp package subdirectory is a fifth storage path.

[0129] In some examples, each hap package subdirectory in the hsp package parent directory can be mounted by non-hsp package applications when needed to implement corresponding functions.

[0130] Optionally, before the electronic device 100 installs the first hsp package, the electronic device 100 can verify whether the first hsp package is an installation package of a shared function package. In this way, the security of the hsp package can be guaranteed. Specifically, when the server 200 sends the first hsp package to the electronic device 100, it can also send a first verification value to the electronic device 100. The electronic device 100 can obtain a second verification value locally. When the first verification value sent by the server 200 is the same as the second verification value stored locally or meets a preset condition, the electronic device 100 can determine that the first hsp package is an installation package of a shared function package, and the electronic device 100 then stores the first hsp package in the second storage area.

[0131] Optionally, after the electronic device 100 installs the first application, the electronic device 100 can obtain the first storage path of the installation package of the first application and the second storage path of the first hsp package. The first storage path of the installation package of the first application and the second storage path of the first hsp package are stored in the package management module. In this way, when the electronic device 100 needs to use the first application, the electronic device 100 can directly obtain the first storage path of the installation package of the first application and the second storage path of the first hsp package from the package management module to speed up the startup speed of the first application.

[0132] Optionally, S503 and S507 may be executed simultaneously.

[0133] FIG5B shows a schematic diagram of an electronic device 100 storing an hsp package and an application installation package.

[0134] As shown in Figure 5B, the first storage area stores the installation packages of various applications. The application installation packages include the application's function packages and the HAR packages of the shared function packages that the applications depend on. For example, the first storage area stores the installation package of the first application and the installation package of the second application. The installation package of the first application includes the first function package, the second function package, and the first HAR package. The installation package of the second application includes the third function package, the fourth function package, and the first HAR package.

[0135] Stored in the second storage area are HSP packages of shared function packages that the application depends on, such as the first HSP package of the first shared function package and the second HSP package of the second shared function package.

[0136] In some embodiments, the hsp package information that the first application depends on may include not only the name or ID of the hsp package that the first application depends on, but also the version number of the hsp package that the first application depends on.

[0137] Then the electronic device 100 not only needs to determine whether the electronic device 100 locally stores the hsp package that the first application depends on, but also needs to determine whether the version number of the hsp package is the same as the version number of the hsp package that the first application depends on.

[0138] FIG6A shows another schematic diagram of how the electronic device 100 downloads the installation package of the first application.

[0139] For S601-S603, please refer to the description in S501-S503, and this application will not go into details here.

[0140] S604. The electronic device 100 obtains the name of the first hsp package that the first application depends on and the first version number of the first hsp package based on the hsp package information that the first application depends on.

[0141] S605: The electronic device 100 needs to determine whether the electronic device 100 locally stores a first hsp package that the first application depends on.

[0142] In some examples, the electronic device 100 can obtain the first HAR package from the installation package of the first application. The first HAR package may include the HSP package information that the first application depends on and the API of the HSP package that the first application depends on.

[0143] The hsp package information that the first application depends on may include the name of the first hsp package that the first application depends on and the version number of the first hsp package that the first application depends on.

[0144] After obtaining the first HAR package, the electronic device 100 can obtain the first HSP package information that the first application depends on from the first HAR package, and then obtain the name of the first HSP package that the first application depends on and the first version number of the first HSP package based on the first HSP package information that the first application depends on.

[0145] After obtaining the name of the first hsp package that the first application depends on, the electronic device 100 can confirm whether the first hsp package that the first application depends on is stored on the electronic device 100 based on the name of the first hsp package.

[0146] When the electronic device 100 confirms that the electronic device 100 locally stores the first HSP package that the first application depends on, the electronic device 100 also needs to determine whether the version number of the first HSP package locally stored in the electronic device 100 is the same as the version number of the first HSP package recorded in the first HAR package, and execute S606.

[0147] When the electronic device 100 confirms that the electronic device 100 does not locally store the first hsp package that the first application depends on, the electronic device 100 needs to download the first version of the first hsp package that the first application depends on from the server 200 and execute S607.

[0148] S606: The electronic device 100 needs to determine whether the second version number of the first hsp package stored locally in the electronic device 100 is the same as the first version number.

[0149] The functional characteristics of the shared function package can be updated. After the functional characteristics of the shared function package are updated, the version number of the shared function package also needs to be updated. The electronic device 100 needs to determine whether the second version number of the first hsp package stored locally by the electronic device 100 is the same as the first version number.

[0150] When the second version number of the first hsp package stored locally in the electronic device 100 is the same as the first version number, the electronic device 100 does not need to download the first version of the first hsp package from the server 200, and the process ends.

[0151] If the second version number of the first HSP package stored locally in the electronic device 100 is different from the first version number, the electronic device 100 needs to download the first version of the first HSP package from the server 200 and execute S607. In some examples, the first version number is higher than the second version number, and the first HSP package with the second version number can be updated to the first HSP package of the first version.

[0152] S607 : The electronic device 100 sends a download notification to the server 200 .

[0153] When the electronic device 100 confirms that the second version number of the first hsp package stored locally in the electronic device 100 is different from the first version number, the electronic device 100 can send a download notification to the server 200, which is used for the server 200 to download the first version of the first hsp package.

[0154] In a possible implementation, the download notification may carry the name of the first hsp package and the first version number of the first hsp package. In other possible implementations, the name of the first hsp package and the first version number of the first hsp package may also be sent to the server 200 separately with the download notification. This application is not limited to this.

[0155] S608 : The electronic device 100 receives the first hsp packet of the first version sent by the server 200 .

[0156] In some embodiments, the electronic device 100 may send a download notification to the server 200. After receiving the download notification, the server 200 may obtain the name of the first HSP package and the first version number of the first HSP package, and obtain the first version of the first HSP package based on the name of the first HSP package and the first version number of the first HSP package.

[0157] S609: The electronic device 100 installs the first hsp package of the first version and stores the first hsp package of the first version in a second storage area, which is different from the first storage area.

[0158] After the electronic device 100 obtains the first version of the first hsp package sent by the server 200, the electronic device 100 can install the first version of the first hsp package and store the first version of the first hsp package in the second storage area, which is different from the first storage area. In this way, the first version of the first hsp package stored in the second storage area is not limited to being used by the first application, but can also be used by other applications (such as the second application).

[0159] The storage path of the first hsp package of the first version stored in the second storage area is the second storage path.

[0160] Optionally, before the electronic device 100 stores the first hsp package of the first version in the second storage area, the electronic device 100 can verify whether the first hsp package of the first version is an installation package of the shared function package. In this way, the security of the hsp package can be guaranteed. Specifically, when the server 200 sends the first hsp package of the first version to the electronic device 100, it can also send a third verification value to the electronic device 100. The electronic device 100 can obtain the second verification value locally. When the third verification value sent by the server 200 is the same as the second verification value stored locally or meets the preset conditions, the electronic device 100 can determine that the first hsp package of the first version is an installation package of the shared function package, and the electronic device 100 then stores the first hsp package of the first version in the second storage area.

[0161] Optionally, after the electronic device 100 installs the first hsp package of the first version and stores the first hsp package of the first version in the second storage area, the electronic device 100 can obtain the first storage path of the installation package of the first application and the second storage path of the first hsp package of the first version. The first storage path of the installation package of the first application and the second storage path of the first hsp package of the first version are stored in the package management module. In this way, when the electronic device 100 needs to use the first application, the electronic device 100 can obtain the first storage path of the installation package of the first application and the second storage path of the first hsp package of the first version from the package management module to speed up the startup speed of the first application.

[0162] Optionally, S604 and S609 may be executed simultaneously.

[0163] FIG6B shows another schematic diagram of an electronic device 100 storing an hsp package and an application installation package.

[0164] As shown in Figure 6B, the first storage area stores the installation packages of various applications. The application installation packages include the application's function packages and the HAR packages of the shared function packages that the applications depend on. For example, the first storage area stores the installation package of the first application and the installation package of the second application. The installation package of the first application includes the first function package, the second function package, and the first HAR package. The installation package of the second application includes the third function package, the fourth function package, and the first HAR package.

[0165] The second storage area stores the installation packages of the shared function packages, such as the first hsp package of the first version of the first shared function package and the first hsp package of the second version of the first shared function package. For example, the first version number may be app version 1.0 and the second version number may be app version 2.0.

[0166] hsp package update and deletion

[0167] After storing the HSP package in the second storage area, the electronic device 100 can manage the HSP package, such as updating or deleting it.

[0168] 1. The server 200 can automatically send HSP packets with a usage frequency greater than a preset value to the electronic device 100.

[0169] The server 200 stores multiple HSP packages. Different electronic devices can download multiple HSP packages from the server 200. The server 200 can count the usage frequency of each HSP package, determine the HSP package with a usage frequency greater than a preset value, and automatically send the HSP package with a usage frequency greater than the preset value to each electronic device.

[0170] Exemplarily, after the server 200 determines that the usage frequency of the first hsp package or the first version of the first hsp package is greater than a preset value, the server 200 may send the first hsp package or the first version of the first hsp package to the electronic device 100. The electronic device 100 may store the first hsp package or the first version of the first hsp package in the second storage area. In this way, when the electronic device 100 receives a user operation to download the first application, the first application depends on the first hsp package or the first version of the first hsp package. The electronic device 100 no longer needs to download the first hsp package or the first version of the first hsp package from the server 200, and only needs to download the installation package of the first application. In this way, the speed at which the electronic device 100 downloads and installs the first application can be accelerated.

[0171] 2. After the version of the hsp package is updated, the server 200 can automatically send the latest version of the hsp package to the electronic device 100.

[0172] The hsp package stored in the server 200 has a version number. After the hsp package is upgraded, the version number of the hsp package also needs to be updated accordingly. The server 200 can automatically send the hsp package with the updated version number to each electronic device.

[0173] For example, the server 200 stores the first hsp package of the second version. After the first hsp package of the second version is upgraded, the first hsp package of the first version can be obtained. The server 200 can automatically send the first hsp package of the first version to the electronic device 100. In this way, when the electronic device 100 receives a user operation to download the first application, the first application depends on the first hsp package of the first version. The electronic device 100 no longer needs to download the first hsp package of the first version from the server 200, and only needs to download the installation package of the first application. This can speed up the download and installation of the first application by the electronic device 100.

[0174] 3. The electronic device 100 may also automatically delete the HSP packets that have not been used for more than the first time period.

[0175] Multiple HSP packages are stored on the electronic device 100. These HSP packages can be downloaded from the server 200 when the electronic device 100 downloads an application, or these HSP packages can be preset by the system, or these HSP packages can be automatically sent to the electronic device 100 by the server 200, or these HSP packages can be downloaded from the server 200 periodically / irregularly when the electronic device 100 responds to an automatic update request set by the user.

[0176] The electronic device 100 can count the usage frequencies of the multiple hsp packages stored in the electronic device 100 and delete the hsp packages that have not been used for more than the first time period to save the storage space of the electronic device 100.

[0177] Exemplarily, the electronic device 100 stores a first HSP package of a first version and a first HSP package of a second version. If the electronic device 100 determines that the first HSP package of the second version has not been used for a first period of time, the electronic device 100 may delete the first HSP package of the second version to save storage space of the electronic device 100.

[0178] hsp package usage stage

[0179] FIG7 shows a schematic diagram of the interaction of functional modules for running an hsp package.

[0180] As shown in FIG7 , the functional modules include but are not limited to a storage module, a package management module, an application operation management module, an application startup (app spawn) module, and the like.

[0181] The storage module is used to store the application installation package and the hsp package that the application depends on.

[0182] The first storage area in the storage module stores the installation package of the application, and the second storage area in the storage module stores the hsp package that the application depends on.

[0183] Exemplarily, as shown in FIG7 , the first storage area stores an installation package of a first application, and the second storage area stores a first hsp package that the first application depends on.

[0184] The storage module is further configured to send the first storage path of the installation package of the first application and the second storage path of the first hsp package to the package management module.

[0185] The package management module is further configured to store a first storage path for storing the installation package of the first application and a second storage path for storing the first hsp package.

[0186] The application operation management module is used to respond to user operations and start the first application.

[0187] The application operation management module is also used to send application startup notifications to the package management module.

[0188] In one possible implementation, the application startup notification may carry the identifier of the first application. In other possible implementations, the identifier of the first application may also be sent to the package management module independently of the application startup notification. This application does not limit this.

[0189] The package management module is further configured to, in response to the application startup notification, acquire the first storage path of the installation package of the first application and the second storage path of the first HSP package based on the identifier of the first application.

[0190] In one possible implementation, after receiving the application startup notification sent by the application execution management module, the package management module can obtain the first storage path of the installation package of the first application based on the identifier of the first application, obtain the installation package of the first application, determine the identifier of the first hsp package that the first application depends on recorded in the installation package of the first application, and then obtain the second storage path of the first hsp package based on the identifier of the first hsp package.

[0191] In other possible implementations, the package management module may pre-bind and store the first storage path of the first application's installation package and the second storage path of the first HSP package that the first application depends on. Subsequently, upon receiving an application startup notification from the application execution management module, the package management module may directly retrieve the first storage path of the first application's installation package and the second storage path of the first HSP package based on the first application's identifier, thereby reducing the time the package management module takes to search for the second storage path of the first HSP package that the first application depends on and accelerating application startup.

[0192] The package management module is also used to send the first storage path of the installation package of the first application and the second storage path of the first hsp package that the first application depends on to the application startup module after obtaining the first storage path of the installation package of the first application and the second storage path of the first hsp package that the first application depends on.

[0193] The application startup module is used to receive the first storage path of the installation package of the first application and the second storage path of the first hsp package that the first application depends on sent by the package management module, and create a process sandbox for the first application.

[0194] The application startup module is further configured to store a first storage path of the installation package of the first application and a second storage path of the first hsp package that the first application depends on in the process sandbox of the first application.

[0195] In this way, after the first application is running, it can obtain the installation package of the first application and the first hsp package that the first application depends on based on the first storage path of the installation package of the first application in the process sandbox of the first application and the second storage path of the first hsp package that the first application depends on, and run the installation package of the first application and the first hsp package that the first application depends on to realize the functional characteristics of the first application.

[0196] FIG8 shows another schematic diagram of the interaction of functional modules for running an hsp package.

[0197] The embodiment corresponding to FIG8 is similar to the embodiment corresponding to FIG7 , except that, in the embodiment of FIG8 , the version number of the hsp package needs to be distinguished.

[0198] The storage module is used to store the application installation package and the hsp package that the application depends on.

[0199] As shown in FIG8 , the first storage area in the storage module stores the installation package of the application, and the second storage area in the storage module stores the hsp package that the application depends on.

[0200] Exemplarily, the first storage area stores an installation package of a first application. The second storage area stores a first version of a first HSP package and a second version of a first HSP package. Exemplarily, the first version number may be app version 1.0, and the second version number may be app version 2.0.

[0201] The storage module is also used to send the first storage path of the installation package of the first application, the second storage path of the first hsp package of the first version, and the fourth storage path of the first hsp package of the second version to the package management module.

[0202] The package management module is also used to store the first storage path of the installation package of the first application, the second storage path of the first hsp package of the first version, and the fourth storage path of the first hsp package of the second version.

[0203] The application operation management module is used to respond to user operations and start the first application.

[0204] The application operation management module is also used to send application startup notifications to the package management module.

[0205] In one possible implementation, the application startup notification may carry the identifier of the first application. In other possible implementations, the identifier of the first application may also be sent to the package management module independently of the application startup notification. This application does not limit this.

[0206] The package management module is further configured to obtain, in response to the application startup notification, a first storage path of the installation package of the first application and a second storage path of the first version of the first hsp package based on the identifier of the first application.

[0207] In one possible implementation, after receiving the application startup notification sent by the application execution management module, the package management module can obtain the first storage path of the installation package of the first application based on the identifier of the first application, obtain the installation package of the first application, determine the identifier of the first hsp package of the first version that the first application depends on recorded in the installation package of the first application, and then obtain the second storage path of the first hsp package of the first version based on the identifier of the first hsp package of the first version.

[0208] In other possible implementations, the package management module may bind and store the first storage path of the installation package of the first application and the second storage path of the first version of the first HSP package that the first application depends on in advance. Subsequently, upon receiving the application startup notification sent by the application execution management module, the package management module may directly retrieve the first storage path of the installation package of the first application and the second storage path of the first version of the first HSP package based on the identifier of the first application, thereby reducing the time required by the package management module to search for the second storage path of the first version of the first HSP package that the first application depends on, and accelerating the startup of the application.

[0209] The package management module is also used to send the first storage path of the installation package of the first application and the second storage path of the first hsp package on which the first application depends to the application startup module after obtaining the first storage path of the installation package of the first application and the second storage path of the first hsp package on which the first application depends.

[0210] The application startup module is used to receive the first storage path of the installation package of the first application and the second storage path of the first hsp package of the first version sent by the package management module, and create a process sandbox for the first application.

[0211] The application startup module is further configured to store a first storage path of the installation package of the first application and a second storage path of the first hsp package of the first version in the process sandbox of the first application.

[0212] In this way, after the first application is running, it can obtain the installation package of the first application and the first hsp package of the first version that the first application depends on based on the first storage path of the installation package of the first application in the process sandbox of the first application and the second storage path of the first hsp package of the first version that the first application depends on, and run the installation package of the first application and the first hsp package of the first version that the first application depends on to realize the functional characteristics of the first application.

[0213] FIG9 shows a schematic flow chart of a method for running a first application.

[0214] S901: The package management module stores the storage paths of one or more application installation packages and one or more hsp packages.

[0215] The storage area of ​​the application installation package is different from the storage area of ​​the hsp package. For example, the application installation package can be stored in the first storage area, and the hsp package can be stored in the second storage area. The first storage area is different from the second storage area.

[0216] Table 2

[0217] Table 2 shows a storage path of an application installation package stored in a package management module. The storage path of the application installation package is stored in a one-to-one correspondence with the application identifier. The electronic device 100 can obtain the storage path of the application installation package based on the application identifier.

[0218] For example, the electronic device 100 may obtain the storage path of the installation package of the first application as the first storage path based on the application identifier of the first application and the storage path of the installation package of the second application as the third storage path based on the application identifier of the second application.

[0219] Table 3

[0220] Table 3 shows a storage path of an HSP package stored in a package management module. The storage path of the HSP package is stored in a one-to-one correspondence with the identifier of the HSP package. The electronic device 100 can obtain the storage path of the HSP package based on the identifier of the HSP package.

[0221] Exemplarily, the electronic device 100 may obtain the storage path of the first hsp package as the second storage path based on the hsp package identifier of the first hsp package. The electronic device 100 may obtain the storage path of the second hsp package as the fifth storage path based on the hsp package identifier of the second hsp package.

[0222] Table 4

[0223] Table 4 shows another storage path for an HSP package stored within a package management module. Table 4 differs from Table 3 in that, in Table 4, the HSP packages stored by electronic device 100 are further distinguished by version number. The storage path of an HSP package is stored in a one-to-one correspondence with the HSP package identifier and the HSP package identifier. Electronic device 100 can obtain the storage path of the HSP package based on the HSP package identifier and the HSP package version number.

[0224] Exemplarily, the electronic device 100 may obtain the storage path of the first version of the first HSP package as the second storage path based on the HSP package identifier of the first HSP package and the first version number of the first HSP package. The electronic device 100 may obtain the storage path of the second version of the first HSP package as the fourth storage path based on the HSP package identifier of the first HSP package and the second version number of the first HSP package.

[0225] In one possible implementation, the package management module may not store the storage paths of one or more application installation packages and one or more HSP packages. Alternatively, in addition to storing the storage paths of one or more application installation packages and one or more HSP packages, the package management module may also store application installation information. The application installation information records the storage paths of the application installation packages and the storage paths of the HSP packages that the applications depend on.

[0226] Table 5

[0227] Table 5 shows the installation information of an application stored in a package management module. The installation information of the application is stored in a one-to-one correspondence with the identification of the application. The electronic device 100 can obtain the installation information of the application based on the identification of the application.

[0228] Exemplarily, the electronic device 100 may obtain the installation information of the first application based on the application identifier of the first application. The installation information of the first application may include the first storage path of the installation package of the first application and the second storage path of the first hsp package that the first application depends on.

[0229] The electronic device 100 can also obtain the installation information of the second application based on the application identifier of the second application. The installation information of the second application can include the third storage path of the installation package of the second application and the second storage path of the first hsp package that the second application depends on.

[0230] The package management module can also store installation information of more other applications, which is not limited in this application.

[0231] Table 6

[0232] Table 6 shows another type of application installation information stored in a package management module. The application installation information and the application identifier are stored in a one-to-one correspondence. The electronic device 100 can obtain the application installation information based on the application identifier.

[0233] The difference between Table 6 and Table 5 is that in Table 5, the hsp package stored in the electronic device 100 also needs to distinguish the version number.

[0234] Exemplarily, the electronic device 100 can obtain the installation information of the first application based on the application identifier of the first application. The installation information of the first application can include the first storage path of the installation package of the first application and the second storage path of the first version of the first hsp package that the first application depends on.

[0235] The electronic device 100 can also obtain the installation information of the second application based on the application identifier of the second application. The installation information of the second application can include the third storage path of the installation package of the second application and the second storage path of the first version of the first hsp package that the second application depends on.

[0236] The package management module can also store installation information of more other applications, which is not limited in this application.

[0237] S902: The application operation management module obtains the activation notification.

[0238] The electronic device 100 may receive an operation from the user and start the first application.

[0239] Exemplarily, the first application may be a Huawei video application, and the operation of opening the first application may be an input operation (eg, a single click) on the icon 3101 of the Huawei video application shown in FIG. 4D .

[0240] In response to the user's operation, the application execution management module may obtain an activation notification, where the activation notification is used to activate the first application.

[0241] When the application execution management module obtains the start notification, the application execution management module may also obtain the identifier of the first application.

[0242] In a possible implementation, the identifier of the first application may be carried in an activation notification and sent to the application execution management module.

[0243] In other possible implementations, the identifier of the first application may also be sent to the application execution management module independently of the start notification, and this application does not limit this.

[0244] S903: The application operation management module sends an activation notification to the package management module.

[0245] Likewise, the application execution management module needs to send the identifier of the first application to the package management module.

[0246] In a possible implementation, the identifier of the first application may be carried in an opening notification sent to the package management module.

[0247] In other possible implementations, the identifier of the first application may also be sent to the package management module independently of the start notification, and this application does not limit this.

[0248] S904: The package management module obtains installation information of the first application based on the identifier of the first application.

[0249] After obtaining the start notification sent by the application execution management module and the identifier of the first application, the package management module can obtain the installation information of the first application based on the identifier of the first application in response to the start notification.

[0250] As can be seen from S901, in some embodiments, the package management module stores installation information for multiple applications, and the package management module can directly obtain the installation information of the first application from Table 5 or Table 6 based on the identifier of the first application. Exemplarily, the installation information of the first application may include the first storage path of the installation package of the first application and the second storage path of the first hsp package that the first application depends on. Exemplarily, the installation information of the first application may also include the first storage path of the installation package of the first application and the second storage path of the first version of the first hsp package that the first application depends on.

[0251] In other embodiments, the package management module does not store the installation information of multiple applications. The package management module can obtain the installation information of the first application from the storage path of the installation package of one or more applications and the storage path of one or more hsp packages stored in the package management module based on the identifier of the first application. Specifically, the package management module can obtain the first storage path of the installation package of the first application from Table 2 based on the identifier of the first application. Then, based on the first storage path of the installation package of the first application, the installation package of the first application is obtained, and the package management module can obtain the hsp package information that the first application depends on from the installation package of the first application.

[0252] In one possible implementation, the HSP package information that the first application depends on may include an HSP package identifier (e.g., the first HSP package) that the first application depends on. The package management module may obtain the second storage path of the first HSP package from Table 3 based on the identifier of the first HSP package. The package management module may then generate installation information for the first application based on the first storage path of the installation package of the first application and the second storage path of the first HSP package.

[0253] In other possible implementations, the HSP package information that the first application depends on may include the HSP package identifier (e.g., the first HSP package) and version number (e.g., the first version number) that the first application depends on. The package management module may obtain the second storage path of the first HSP package of the first version from Table 4 based on the identifier and the first version number of the first HSP package. The package management module may then generate installation information for the first application based on the first storage path of the installation package of the first application and the second storage path of the first HSP package of the first version.

[0254] Optionally, the HSP package stored on the electronic device 100 is updateable. For example, an HSP package that has not been used for a long time may be deleted. In this case, before executing S904, the package management module may determine whether the HSP package that the first application depends on exists. If it does not exist, the package management module may download the HSP package that the first application depends on from the server 200. This can avoid the situation where the HSP package that the first application depends on is deleted, causing the first application to fail to start.

[0255] S905: The package management module sends the installation information of the first application to the application startup module.

[0256] After acquiring the installation information of the first application, the package management module sends the installation information of the first application to the application startup module, so that the application startup module can start the first application based on the installation information of the first application.

[0257] S906: The application startup module creates a process sandbox for the first application.

[0258] S907: The application startup module stores the installation information of the first application in the process sandbox of the first application.

[0259] Before launching the first application, the application launch module creates a process sandbox for the first application. It then stores or mounts the installation information for the first application, sent by the package management module, within the first application's process sandbox. This ensures that only the first application can access information within the first application's process sandbox, while other application processes cannot, thus ensuring the security of process operation.

[0260] S908. The application startup module sends the process ID of the first application to the package management module.

[0261] S909: The package management module sends the process ID of the first application to the application startup module.

[0262] After creating the process sandbox for the first application, the application startup module can obtain the process ID of the first application and send it to the package management module. After receiving the process ID of the first application from the application startup module, the package management module sends the process ID of the first application to the application startup module. In this way, the application startup module can inform the package management module and the application startup module that the first application has been launched.

[0263] S910. The application startup module obtains the first storage path of the installation package of the first application from the installation information of the first application, obtains the installation package of the first application based on the first storage path, and obtains the API of the first hsp package that the first application depends on or the API of the first version of the first hsp package from the installation package of the first application.

[0264] The API of the first hsp package may include one or more APIs. The electronic device may export the first hsp package based on the API of the first hsp package, and then load and run the first hsp package.

[0265] S911. The application startup module runs the first application in the process sandbox of the first application based on the API of the first hsp package or the API of the first version of the first hsp package and the installation information of the first application.

[0266] After the first application is started, if the first application needs to use the hsp package, the application startup module can obtain the first storage path of the installation package of the first application from the installation information of the first application, and obtain the installation package of the first application based on the first storage path. The application startup module can obtain the API of the first hsp package that the first application depends on or the API of the first version of the first hsp package that the first application depends on from the installation package of the first application. The application startup module then runs the first application based on the API of the first hsp package and the second storage path of the first hsp package in the process sandbox of the first application and the first storage path of the installation package of the first application in the process sandbox of the first application. Or the application startup module then runs the first application based on the API of the first version of the first hsp package and the second storage path of the first version of the first hsp package in the process sandbox of the first application and the first storage path of the installation package of the first application in the process sandbox of the first application. In this way, the preset function of the hsp package is realized through the API of the hsp package recorded in the installation package of the first application.

[0267] Next, the application startup module will be described on how to run the first application.

[0268] FIG10 shows a schematic diagram of an application startup module running a first application.

[0269] S1001. The package management module obtains a first data packet based on installation information of a first application.

[0270] S1002: The package management module sends the first data packet to the application startup module.

[0271] Exemplarily, the installation information of the first application may include a first storage path of the installation package of the first application.

[0272] Exemplarily, the installation information of the first application may include a first storage path of the installation package of the first application and a second storage path of a first hsp package that the first application depends on.

[0273] Exemplarily, the installation information of the first application may also include a first storage path of the installation package of the first application and a second storage path of a first version of a first hsp package that the first application depends on.

[0274] The package management module may obtain a first data packet based on the installation information of the first application, and send the installation information of the first application to the application startup module via the first data packet.

[0275] The first data packet may include a first field, and the value of the first field is used to indicate whether the first application depends on the hsp package.

[0276] For example, the first field may be the HspList.totalLength field. If the value of the HspList.totalLength field is 1, it indicates that the first application depends on the HSP package. If the value of the HspList.totalLength field is 0, it indicates that the first application does not depend on the HSP package.

[0277] In the case where the first application depends on an HSP package, the first data packet can identify a unique HSP package through multiple fields. Because the first application may depend on multiple HSP packages, different HSP packages can be identified by the values ​​of the multiple fields.

[0278] For example, the multiple fields used to uniquely identify an HSP package may be a bundles field, a modules field, and a versions field. The bundles field is used to fill in the name of the HSP package, the modules field is used to fill in the name of the module to which the HSP package belongs, and the versions field is used to fill in the version number of the HSP package. Optionally, the modules field, or both the modules field and the versions field may not be included. Each HSP package can be uniquely identified by the values ​​of the bundles field, the modules field, and the versions field, thereby determining the storage path of each HSP package.

[0279] Optionally, the installation information of the first application can also be sent to the application startup module through multiple different data packets. Exemplarily, the first storage path of the installation package of the first application is sent to the application startup module through a data packet. The storage paths of one or more hsp packages that the first application depends on can be sent to the application startup module through multiple data packets respectively, and the storage paths of one or more hsp packages that the first application depends on can also be sent to the application startup module through a data packet. This application does not limit this.

[0280] The following embodiments of the present application are described using a data packet (eg, the first data packet) as an example.

[0281] Optionally, the packet management module may send the one or more data packets to the application startup module through a socket channel.

[0282] S1003: The application startup module determines from the first field in the first data packet whether the first application depends on the hsp package.

[0283] Optionally, the first field may be an HspList.totalLength field. If the value of the HspList.totalLength field is 1, it indicates that the first application depends on an HSP package, and S1010 to S1015 are executed.

[0284] If the value of the HspList.totalLength field is 0, it means that the first application has no dependent hsp package, and S1004-S1009 are executed.

[0285] S1004: The application startup module obtains a first storage path of the installation package of the first application from the first data packet.

[0286] S1005: The application startup module creates a first temporary storage area, and stores a first storage path of the installation package of the first application in the first temporary storage area.

[0287] S1006: The application startup module calls the DoStartAPP() method to create a process for the first application.

[0288] Optionally, the process of creating the first application is not limited to calling the DoStartAPP() method. The application startup module can also create the process of the first application through other methods, and this application does not limit this.

[0289] S1007: The application startup module calls the SetAppSandbox() method to create a process sandbox for the first application.

[0290] Optionally, the process sandbox of the first application is not limited to being created by calling the SetAppSandbox() method. The application startup module can also create the process sandbox of the first application through other methods, and this application does not limit this.

[0291] S1008. The application startup module calls SetAppSandbox() to mount the first storage path of the installation package of the first application into the process sandbox of the first application.

[0292] S1009: The application startup module clears and releases the first temporary storage area.

[0293] In this way, after the application startup module mounts the first storage path of the installation package of the first application into the process sandbox of the first application, the data in the first temporary storage area can be cleared and the first temporary storage area can be released, saving storage space of the electronic device 100.

[0294] If the value of the HspList.totalLength field is 1, it means that the first application has a dependent hsp package, and S1010-S1015 can be executed.

[0295] S1010. The application startup module obtains a first storage path of an installation package of a first application and a second storage path of a first hsp package that the first application depends on from a first data packet.

[0296] S1011. The application startup module creates a first temporary storage area and a second temporary storage area, stores the first storage path of the installation package of the first application in the first temporary storage area, and stores the second storage path of the first hsp package that the first application depends on in the second temporary storage area.

[0297] Optionally, the application startup module may not create the second temporary storage area, and store the first storage path of the installation package of the first application and the second storage path of the first hsp package that the first application depends on in the first temporary storage area. This application does not limit this.

[0298] S1012: Call the DoStartAPP() method to create a process for the first application.

[0299] Optionally, the process of creating the first application is not limited to calling the DoStartAPP() method. The application startup module can also create the process of the first application through other methods, and this application does not limit this.

[0300] S1013: Call the SetAppSandbox() method to create a process sandbox for the first application.

[0301] Optionally, the process sandbox of the first application is not limited to being created by calling the SetAppSandbox() method. The application startup module can also create the process sandbox of the first application through other methods, and this application does not limit this.

[0302] S1014. Call SetAppSandbox() to mount the first storage path of the installation package of the first application and the second storage path of the first hsp package that the first application depends on into the process sandbox of the first application.

[0303] S1015: Clear and release the first temporary storage area and the second temporary storage area.

[0304] In this way, after the application startup module mounts the first storage path of the installation package of the first application and the second storage path of the first hsp package that the first application depends on into the process sandbox of the first application, the data in the first temporary storage area and the second temporary storage area can be cleared, and the first temporary storage area and the second temporary storage area can be released, saving storage space of the electronic device 100.

[0305] Referring to FIG11 , FIG11 shows a schematic structural diagram of an electronic device.

[0306] The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, and / or a smart city device. The embodiments of the present application do not impose any particular restrictions on the specific type of the electronic device.

[0307] 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 button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0308] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0309] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), 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). The different processing units may be independent devices or integrated into one or more processors.

[0310] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0311] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0312] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (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.

[0313] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.

[0314] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.

[0315] The PCM interface can 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 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0316] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.

[0317] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0318] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0319] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.

[0320] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0321] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.

[0322] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0323] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0324] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0325] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G 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), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0326] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0327] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0328] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-CDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. 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).

[0329] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0330] Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.

[0331] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0332] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise and brightness. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.

[0333] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0334] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0335] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0336] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.

[0337] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0338] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.

[0339] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage cell potential level; universal flash storage (UFS) and embedded multi media card (eMMC) can be divided into UFS and eMMC according to the storage specification.

[0340] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.

[0341] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .

[0342] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 via the external memory interface 120 to implement data storage. For example, files such as music and videos can be stored in the external non-volatile memory.

[0343] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0344] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0345] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.

[0346] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.

[0347] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.

[0348] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0349] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.

[0350] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (such as the x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0351] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0352] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.

[0353] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when electronic device 100 is stationary. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.

[0354] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0355] 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 outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0356] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.

[0357] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0358] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.

[0359] The touch sensor 180K is also called a "touch-sensitive device." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a location different from that of the display screen 194.

[0360] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.

[0361] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0362] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0363] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.

[0364] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, such as an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0365] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.

[0366] FIG12 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present invention.

[0367] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0368] The application layer can include a series of application packages.

[0369] As shown in FIG12 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.

[0370] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0371] As shown in FIG12 , the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.

[0372] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0373] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0374] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0375] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

[0376] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0377] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0378] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.

[0379] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0380] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0381] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0382] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0383] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0384] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0385] A 2D graphics engine is a drawing engine for 2D drawings.

[0386] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0387] The various implementation modes of this application can be combined arbitrarily to achieve different technical effects.

[0388] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0389] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0390] The above description is only an embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modification, equivalent replacement, improvement, etc. made based on the disclosure of the present invention shall be included in the scope of protection of the present invention.

Claims

1. An application running method, characterized in that: The method comprises: The electronic device, in response to a user opening operation on a first application, obtains a first storage path of an installation package of the first application and a second storage path of a shared implementation package on which the first application depends; wherein the electronic device is installed with the first application and the shared implementation package, wherein the shared implementation package is used to implement a preset function, and the first storage path is different from the second storage path; The electronic device obtains the installation package of the first application based on the first storage path, where the installation package of the first application is configured with reference information to the shared implementation package; The electronic device runs the first application based on the first storage path, the reference information and the second storage path.

2. The method according to claim 1, characterized in that The method further comprises: The electronic device, in response to the user's opening operation of the second application, obtains a third storage path of the installation package of the second application and the second storage path of the shared implementation package on which the second application depends; wherein the electronic device is installed with the second application and the shared implementation package, and the third storage path is different from the second storage path; The electronic device obtains the installation package of the second application based on the third storage path, where the installation package of the second application is configured with reference information to the shared implementation package; The electronic device runs the second application based on the third storage path, the reference information and the second storage path.

3. The method according to claim 1 or 2, characterized in that: Before the electronic device runs the first application based on the first storage path, the reference information and the second storage path, the method further includes: The electronic device loads the first storage path and the second storage path into a process sandbox of the first application; The electronic device runs the first application based on the first storage path, the reference information and the second storage path, specifically including: The electronic device runs the first application within a process sandbox of the first application based on the first storage path, the reference information and the second storage path.

4. The method according to any one of claims 1 to 3, characterized in that: Before the electronic device responds to the user's opening operation on the first application, the method further includes: The electronic device receives and responds to a third user operation, downloads and installs an installation package of the first application, and stores the installation package of the first application in the first storage area, the storage path of the installation package of the first application stored in the first storage area is the first storage path, the installation package of the first application includes a shared interface package, and the shared interface package includes an identifier of the shared implementation package that the first application depends on; When the electronic device determines that the shared implementation package is not installed on the electronic device based on the identifier of the shared implementation package, the electronic device downloads the shared implementation package; The electronic device installs the shared implementation package and stores the shared implementation package in the second storage area. The storage path of the shared implementation package stored in the second storage area is the second storage path.

5. The method according to claim 4, characterized in that The method further comprises: When the electronic device determines that the shared implementation package is installed on the electronic device based on the identifier of the shared implementation package, the electronic device acquires the second storage path of the shared implementation package based on the identifier of the shared implementation package.

6. The method according to claim 4 or 5, characterized in that: The shared interface package also includes the reference information of the shared implementation package; Before the electronic device runs the first application based on the first storage path, the reference information and the second storage path, the method further includes: The electronic device obtains the shared interface package from the installation package of the first application; The electronic device obtains reference information of the shared implementation package from the shared interface package.

7. The method according to any one of claims 4 to 6, characterized in that: After the electronic device acquires the second storage path of the sharing implementation package and before the electronic device responds to the user's opening operation on the first application, the method further includes: The electronic device obtains the installation information of the first application based on the first storage path of the installation package of the first application and the second storage path of the shared implementation package on which the first application depends; The electronic device, in response to a user opening operation of a first application, obtains a first storage path of an installation package of the first application and a second storage path of a shared implementation package that the first application depends on, specifically including: The electronic device obtains installation information of the first application in response to the user opening the first application; The electronic device obtains the first storage path of the installation package of the first application and the second storage path of the shared implementation package that the first application depends on from the installation information of the first application.

8. The method according to any one of claims 4 to 6, characterized in that: The electronic device, in response to a user opening operation of a first application, obtains a first storage path of an installation package of the first application and a second storage path of a shared implementation package that the first application depends on, specifically including: In response to the user opening the first application, the electronic device acquires the first storage path of the installation package of the first application based on the identifier of the first application; The electronic device obtains the installation package of the first application based on the first storage path; The electronic device obtains, from the installation package of the first application, an identifier of the shared implementation package on which the first application depends; The electronic device acquires the second storage path of the sharing implementation package based on the identifier of the sharing implementation package.

9. The method according to any one of claims 1 to 8, characterized in that: After the electronic device runs the first application based on the first storage path, the reference information and the second storage path, the method further includes: When the shared implementation package is not used within a first period of time, the electronic device uninstalls the shared implementation package.

10. The method according to claim 4 or 5, characterized in that: The electronic device installing the shared implementation package specifically includes: When the electronic device determines that the installation package of the first application includes the shared interface package, the electronic device obtains, from the shared interface package, an identifier and a first version number of the shared implementation package on which the first application depends; When the electronic device determines that the first version of the shared implementation package is not stored on the electronic device based on the identifier of the shared implementation package and the first version number, the electronic device downloads the first version of the shared implementation package; The electronic device installs the shared implementation package of the first version and stores the shared implementation package of the first version in the second storage area, and the storage path of the shared implementation package of the first version stored in the second storage area is the second storage path.

11. The method according to claim 10, characterized in that The electronic device downloading the shared implementation package of the first version specifically includes: The electronic device sends the identifier of the shared implementation package and the first version number to a server; The electronic device receives the shared implementation package of the first version sent by the server.

12. The method according to any one of claims 1 to 11, characterized in that: The preset functions include any one of the following: login function, payment function, map function, navigation function, networking function, advertising display function, data storage function, image recognition function, connection function, screen projection function, communication function, camera function, multimedia function, device virtualization function, and device security function.

13. An application running method, characterized in that: The method comprises: In response to a user opening operation on a first application, the electronic device obtains a storage path of a shared implementation package that the first application depends on, wherein the electronic device has the first application and the shared implementation package installed; The electronic device loads the shared implementation package into the process sandbox of the first application; The electronic device displays a user interface of a first application; In response to a user clicking operation on the user interface, the electronic device implements a preset function of the clicking operation based on the shared implementation package; Among them, the preset functions include any one of the following: login function, payment function, map function, navigation function, networking function, advertising display function, data storage function, image recognition function, connection function, screen projection function, communication function, camera function, multimedia function, device virtualization function, and device security function.

14. The method according to claim 13, characterized in that Before responding to the user's opening operation on the first application, the method further includes: The electronic device receives and responds to an operation by a user to download the first application, downloads and installs an installation package of the first application, and stores the installation package of the first application in a first storage area; The electronic device obtains a shared interface package from the installation package of the first application, and obtains an identifier of the shared implementation package from the shared interface package; When the electronic device determines that the sharing implementation package is not stored on the electronic device based on the identifier of the sharing implementation package, the electronic device downloads the sharing implementation package; The electronic device installs the shared implementation package and stores the shared implementation package in the second storage area; The electronic device acquires a storage path of the shared implementation package based on the shared implementation package stored in the second storage area.

15. The method according to claim 14, characterized in that The method further comprises: When the electronic device determines that the shared implementation package is stored in the second storage area on the electronic device based on the identifier of the shared implementation package, the electronic device obtains the storage path of the shared implementation package based on the shared implementation package stored in the second storage area.

16. The method according to claim 14 or 15, characterized in that The electronic device implements the preset function of the click operation based on the shared implementation package, specifically including: The electronic device obtains the shared interface package from the installation package of the first application; The electronic device obtains reference information of the shared implementation package from the shared interface package; The electronic device implements a preset function of the click operation based on the reference information of the shared implementation package and the shared implementation package.

17. An electronic device, characterized in that: The electronic device includes a processor and a memory; the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, and the processor calls the computer instructions to execute the method described in any one of claims 1-12 or 13-16 above.

18. A computer-readable storage medium, characterized in that: Used to store computer instructions, when the computer instructions are executed on an electronic device, the electronic device executes the method described in any one of claims 1-12 or 13-16.

Citation Information

Patent Citations

  • Data processing method and device, electronic equipment and storage medium

    CN111290736A

  • File sharing method and device and storage medium

    CN114461993A

  • File sharing method and device and electronic equipment

    CN114546969A

  • Method, device and equipment for using applet capability

    CN114579216A

  • File management method and apparatus

    US20200218694A1

Cited By

  • Application startup method and device

    WO2026166216A1