Application program starting method, readable storage medium and electronic device

By mounting only the core dependency shared libraries to the application process sandbox when the application starts, the problem of slow application startup is solved, resulting in fast startup and a better user experience.

CN119442220BActive Publication Date: 2026-03-27HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-02
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

When an application starts, it needs to mount all shared libraries between applications into a sandbox, which slows down the startup process, especially the more shared libraries the application depends on.

Method used

When the application starts, the core dependency shared libraries are first mounted into the application process sandbox, and after startup, the non-core dependency shared libraries are mounted into the application process sandbox to improve startup speed.

Benefits of technology

By mounting only core dependency shared libraries, the application startup time is reduced, thereby improving application startup speed and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119442220B_ABST
    Figure CN119442220B_ABST
Patent Text Reader

Abstract

The application relates to the terminal technical field and discloses an application program starting method, a readable storage medium and an electronic device. The application program starting method is applied to the electronic device. When the electronic device detects a starting instruction of a first application, a core dependent shared library required by the first application is mounted in an application process sandbox of the first application, the core dependent shared library comprises resources required to be loaded when the first application is started, and the first application can be quickly started. When the first application needs to load a non-core dependent shared library during running, the corresponding non-core dependent shared library can be mounted in the application process sandbox of the first application through a sandbox mounting service, so that the first application can load the non-core dependent shared library during running, and the normal running of the first application can be ensured. Through the application, the first application on the electronic device can be quickly started, and the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of terminal, in particular to an application program starting method, a readable storage medium and an electronic device. BACKGROUND

[0002] With the rapid development of mobile Internet, application programs integrate more and more software development kits (SDKs), so as to realize the purpose of reusing public codes, improving development efficiency and reducing development cost. However, this also makes the memory occupied by the installation package of the application program greatly increase. In addition, different application programs on the electronic device also integrate the same SDK, and the SDK redundantly occupies a large amount of storage space.

[0003] Therefore, the inter-application shared library is arranged in the electronic device to store the SDK files in the application program, and the resources of the inter-application shared library can be accessed by the application program. Therefore, the application program using the inter-application shared library does not need to package the SDK into the installation package. When the application program runs, the operating system of the electronic device can provide a set of sandbox mounting mechanism (for example, providing an isolated virtualization environment for the application program and ensuring that all operations of the application program are in the isolated environment), and mount the code and resources of the inter-application shared library into the process sandbox of the running application program for loading when the application program runs.

[0004] Generally, when the application program starts, the operating system of the electronic device needs to mount all the inter-application shared libraries relied on by the application program into the sandbox before starting the application program, which causes the starting process of the application program to be slow. In addition, the more inter-application shared libraries relied on by the application program, the slower the starting speed. SUMMARY

[0005] The present application provides an application program starting method, a readable storage medium and an electronic device.

[0006] In a first aspect, an application program starting method is provided, which is applied to an electronic device and includes the following steps: detecting a starting instruction of a first application; mounting a first inter-application shared library required by the first application to start, and starting the first application based on the first inter-application shared library; and mounting a second inter-application shared library required by the first application to run in a running process of the first application, and running the first application based on the second inter-application shared library.

[0007] It can be understood that in the embodiments of the present application, when the first application on the electronic device is started, the operating system of the electronic device creates an application process sandbox of the first application, and mounts the first inter-application shared library required when the first application is started into the application process sandbox, so that the first application loads the corresponding resources when starting. The first inter-application shared library can also be referred to as a core dependent shared library hereinafter. When the first application is running, if the second inter-application shared library needs to be loaded, the operating system of the electronic device will mount the corresponding second inter-application shared library into the application process sandbox, so that the first application loads the corresponding resources when running. The second inter-application shared library can also be referred to as a non-core dependent shared library hereinafter. In this way, the first application does not need to mount all inter-application shared libraries dependent on the first application when starting, thereby improving the starting speed of the first application and improving the user experience.

[0008] In a possible implementation of the first aspect, the mounting of the first inter-application shared library required when the first application is started and the starting of the first application based on the first inter-application shared library include: creating an application process of the first application, creating an application process sandbox of the first application based on the application process of the first application; the application process of the first application mounts the first inter-application shared library required when the first application is started into the application process sandbox; and the application process of the first application starts the first application by obtaining resources in the first inter-application shared library from the application process sandbox.

[0009] It can be understood that the application hatcher in the operating system of the electronic device can create the application process of the first application and the application process sandbox of the first application when the first application is started. The corresponding first inter-application shared library is mounted into the application process sandbox by the application process. The first inter-application shared library includes resources required when the first application is started, so that the first application does not need to mount all inter-application shared libraries when starting, thereby improving the starting speed of the first application.

[0010] In a possible implementation of the first aspect, the identification of the inter-application shared library required when the first application is started has a first mark, and the application process of the first application mounts the first inter-application shared library required when the first application is started into the application process sandbox, including: the application process of the first application determines the first inter-application shared library with the first mark from a plurality of inter-application shared libraries of the first application; and the application process of the first application mounts the first inter-application shared library into the application process sandbox based on the first mark.

[0011] It can be understood that, in some embodiments of the present application, the first application stores the identifiers of all inter-application shared libraries on which the first application depends, and the first application has a first mark on the identifier of the inter-application shared library required by the first application at runtime. When the first application starts, the operating system of the electronic device can mount the inter-application shared library with the first mark on the identifier, and the inter-application shared library with the first mark on the identifier is the first application shared library.

[0012] In a possible implementation of the first aspect, the electronic device stores a first list including the identifiers of the inter-application shared libraries required by the first application when the first application starts; and the application process of the first application mounts the first inter-application shared library required by the first application when the first application starts into the application process sandbox, including: the application process of the first application determines the first identifier of the first inter-application shared library from the first list, and mounts the first inter-application shared library into the application process sandbox.

[0013] It can be understood that, in some embodiments of the present application, the first application stores the identifiers of all inter-application shared libraries on which the first application depends, and the first application stores the inter-application shared libraries on which the first application depends when the first application starts in a first list, and the inter-application shared library corresponding to the identifier of the inter-application shared library in the first list is the first inter-application shared library. When the first application starts, the operating system of the electronic device can determine the first inter-application shared library to be mounted from the first list.

[0014] In a possible implementation of the first aspect, the mounting of the second inter-application shared library required by the first application during the running of the first application, and the running of the first application based on the second application shared library, include: mounting the second inter-application shared library required by the first application when the first application runs into the application process sandbox; and the application process of the first application obtains the second inter-application shared library from the application process sandbox.

[0015] It can be understood that, in some embodiments of the present application, the first application needs to load the resources of the second inter-application shared library during the running process, and the operating system of the electronic device can mount the second inter-application shared library into the application process sandbox, so as to dynamically expand the application process sandbox and ensure that the first application can run normally.

[0016] In a possible implementation of the first aspect, the mounting of the second inter-application shared library required by the first application when the first application runs into the application process sandbox includes: determining that the second inter-application shared library belongs to the inter-application shared library on which the first application depends; and mounting the second inter-application shared library into the application process sandbox; wherein the inter-application shared library on which the first application depends represents the inter-application shared library from which the first application can obtain resources.

[0017] It can be understood that in some embodiments of the present application, when the first application needs to mount the inter-application shared library, the electronic device further judges whether the inter-application shared library required by the first application is legal. For example, it is judged whether the inter-application shared library required by the first application is the inter-application shared library relied on by the first application. If yes, the operating system of the electronic device mounts the inter-application shared library into the application process sandbox. If not, no mounting is performed. In this way, the first application can be prevented from illegally accessing other inter-application shared libraries, and the data security of the electronic device can be ensured.

[0018] In a possible implementation of the first aspect, the first inter-application shared library and the second inter-application shared library are independently stored in the electronic device, and the first inter-application shared library and the second inter-application shared library can be independently updated.

[0019] It can be understood that in some embodiments of the present application, the inter-application shared library is independently stored in the electronic device, and therefore, after a problem of the inter-application shared library is repaired, the inter-application shared library can be independently updated without following the version of the first application. Therefore, the inter-application shared library can be updated in a timely manner, and the use experience of the user can be improved.

[0020] In a possible implementation of the first aspect, the method further includes: detecting that the first inter-application shared library and / or the second inter-application shared library are updated to a third inter-application shared library; when the application process of the first application needs to obtain the third inter-application shared library, mounting the third inter-application shared library into the application process sandbox; and the application process of the first application obtains the third inter-application shared library from the application process sandbox.

[0021] It can be understood that in some embodiments of the present application, the inter-application shared library is independently stored in the electronic device, and therefore, the inter-application shared library can be independently updated. When the inter-application shared library is updated, the updated inter-application shared library can be mounted into the application process sandbox even if the first application is running, so as to be loaded when the first application runs. Therefore, the electronic device can obtain the updated inter-application shared library without restarting, and the user can have a better use experience.

[0022] In a second aspect, embodiments of the present application provide an electronic device, which includes: a memory configured to store instructions; and at least one processor configured to execute the instructions to enable the electronic device to implement the application program starting method provided in the first aspect and any possible implementation of the first aspect.

[0023] In a third aspect, embodiments of the present application provide a computer readable storage medium, which stores instructions. When the instructions are executed on a computer, the computer executes the application program starting method provided in the first aspect and any possible implementation of the first aspect.

[0024] In a fourth aspect, an embodiment of the present application provides a program product, which, when running on an electronic device, causes the electronic device to implement the application starting method provided in the above first aspect and any possible implementation of the above first aspect.

[0025] It should be understood that the beneficial effects of the above second aspect to fourth aspect can refer to the description of the above first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0026] Figure 1 According to an embodiment of the present application, a mounting method of an inter-application shared library is shown;

[0027] Figure 2 According to some embodiments of the present application, a schematic diagram of a mounting scenario of an inter-application shared library is shown;

[0028] Figure 3 According to some embodiments of the present application, a schematic block diagram of the system architecture of an electronic device is shown;

[0029] Figure 4 According to some embodiments of the present application, an implementation flowchart of the application starting method is shown;

[0030] Figure 5a According to some embodiments of the present application, a schematic diagram of the structure of an application installation package is shown;

[0031] Figure 5b According to some embodiments of the present application, another schematic diagram of the structure of an application installation package is shown;

[0032] Figure 6a According to some embodiments of the present application, an interaction flowchart of a method for dynamically expanding the sandbox of an application process by a sandbox mounting service is shown;

[0033] Figure 6b According to some embodiments of the present application, another interaction flowchart of a method for dynamically expanding the sandbox of an application process by a sandbox mounting service is shown;

[0034] Figure 7 According to some embodiments of the present application, an interaction flowchart of a method for detecting the state of the sandbox of an application process is shown;

[0035] Figure 8 According to some embodiments of the present application, a schematic diagram of the structure of an electronic device is shown. DETAILED DESCRIPTION

[0036] The illustrative embodiments of the present application include, but are not limited to, an application starting method, a readable storage medium and an electronic device.

[0037] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0038] As described above, when starting an application, the operating system of the electronic device needs to mount all the inter-application shared libraries relied on by the application into the sandbox before starting the application, which results in a slow starting process of the application. Moreover, the more inter-application shared libraries the application relies on, the slower the starting speed.

[0039] For example, Figure 1 According to the embodiments of the present application, a method for mounting inter-application shared libraries is shown.

[0040] As Figure 1 As shown, the physical file system (for example, the non-volatile memory in the electronic device) 01 of the electronic device stores inter-application shared library 1, inter-application shared library 2 and inter-application shared library 3. When the A application installed in the electronic device starts, the operating system of the electronic device first establishes the A application process sandbox 02 through the sandbox mounting mechanism, and then mounts the code and resources of the A application and the inter-application shared library 1 and inter-application shared library 2 relied on by the A application into the A application process sandbox 02 before starting the A application. For another example, the B application relies on the inter-application shared library 2 and the inter-application shared library 3. When the B application starts, the operating system of the electronic device establishes the B application process sandbox 03 through the sandbox mounting mechanism, and mounts the code and resources of the B application into the B application process sandbox 03. The operating system of the electronic device will mount the inter-application shared library 2 and the inter-application shared library 3 in the physical file system 01 into the B application process sandbox 03 before starting the B application.

[0041] To solve the problem that the system of the electronic device needs to mount all the inter-application shared libraries relied on by the application program into the process sandbox before starting the application program, resulting in slow starting speed of the application program. The application provides an application program starting method. When starting the application program, the electronic device can first determine the inter-application shared libraries (hereinafter referred to as core dependent shared libraries) that the application program must start. Then, the electronic device can mount the core dependent shared libraries of the application program into the application process sandbox of the application program and start the application program. Finally, after the application program is started, the inter-application shared libraries (hereinafter referred to as non-core dependent shared libraries) required by the application program during running are mounted into the process sandbox of the application program. In this way, the electronic device can start the application program after mounting the core dependent shared libraries of the application program into the process sandbox of the application program, without starting the application program after mounting all the inter-application shared libraries of the application program, thereby improving the starting speed of the application program.

[0042] In some embodiments, the application program stores the identification of the inter-application shared libraries relied on by the application program. In the identification of the inter-application shared libraries, the core dependent shared libraries have a first flag. The operating system of the electronic device can determine the inter-application shared libraries as core dependent shared libraries according to the first flag. For example, if an inter-application shared library is a core dependent shared library of an application program, the first flag of the identification of the inter-application shared library stored by the application program can be set to 1, and the flag added to the identification of the non-core dependent shared library is 0.

[0043] In other embodiments, the application program can determine the core dependent shared libraries by storing the identification of each inter-application shared library related to the application program into different lists. For example, the identification of the core dependent shared libraries is stored in a core dependent list, and the identification of the non-core dependent shared libraries is stored in a non-core dependent list. When the operating system of the electronic device mounts the inter-application shared libraries, the core dependent shared libraries can be mounted based on the identification in the core dependent list.

[0044] It should be understood that the core dependent shared libraries represent the inter-application shared libraries that must be loaded when the application program starts in the list of inter-application shared libraries relied on by the application program. The non-core dependent shared libraries represent the inter-application shared libraries other than the core dependent shared libraries in the list of inter-application shared libraries relied on by the application program. The inter-application shared libraries are composed of code, resources and configuration files, are independently installed in the system of the electronic device, can be shared among multiple application programs, but cannot be independently run.

[0045] By the scheme, the inter-application shared library depended by the application installed on the electronic device is configured in the installation package of the application, and the inter-application shared library configured includes the core dependent shared library and the non-core dependent shared library. The core dependent shared library includes resources that must be loaded by the application at startup, and the non-core dependent shared library includes other resources that need to be loaded by the application at runtime. Therefore, when the application starts, the operating system of the electronic device can start the application after mounting the core dependent shared library to the process sandbox of the application, so as to enable the application to start quickly. When the application needs to load other resources after starting, the operating system of the electronic device can mount the non-core dependent shared library to the process sandbox of the application, so as to enable the application to run normally.

[0046] Figure 2 According to an embodiment of the present application, a schematic diagram of a mounting scenario of an inter-application shared library is shown.

[0047] Exemplarily, as shown in Figure 2 In the embodiment of the present application, the inter-application shared library depended by the D application installed on the electronic device includes the core dependent shared library 1, the core dependent shared library 2 and the non-core dependent shared library 1. The core dependent shared library 1 and the core dependent shared library 2 are resources that must be loaded by the D application at startup, and the non-core dependent shared library 1 is a resource that needs to be loaded by the D application at runtime. When the D application starts, the operating system of the electronic device creates a process sandbox 20 of the D application, and then mounts the code and resources 21 of the D application, the core dependent shared library 1 and the core dependent shared library 2 to the process sandbox 20. At this time, the D application can load the resources in the process sandbox 20 to start. If the D application needs to load other resources during running, the operating system of the electronic device can mount the corresponding non-core dependent shared library 1 to the process sandbox 20' of the D application according to the needs of the D application at runtime.

[0048] By the above method, when the D application starts, the operating system of the electronic device does not need to mount all the inter-application shared libraries depended by the D application to the process sandbox 20 of the D application. Therefore, when the D application starts, the operating system of the electronic device needs to mount less inter-application shared libraries, and the D application starts quickly, thereby improving the user experience.

[0049] Next, a system architecture diagram of an electronic device is introduced as an example.

[0050] Figure 3 According to an embodiment of the present application, a system architecture schematic block diagram of an electronic device is shown.

[0051] The operating system of the electronic device can employ a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. Embodiments of the present application take the Openharmony system with a layered architecture as an example to illustrate the system architecture of the electronic device 1.

[0052] The layered architecture divides software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Openharmony system is divided from top to bottom into an application layer 310, an application framework layer 320, and a file system 330.

[0053] As shown in Figure 3 , the application layer 310 can include a series of application packages and application processes 313 of the application.

[0054] The application packages can include an application market 311 and other application programs such as a desktop 312. In other embodiments, the other application programs include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, information, and other application programs.

[0055] The application market 311 is an entrance for users to obtain and install application installation packages.

[0056] The desktop 312 displays icons of installed application programs of the electronic device to the user and provides an entrance to start the application programs.

[0057] The application process 313 is a process of executing any one of the above-mentioned application packages once. In embodiments of the present application, the application process 313 also has a higher permission to create an application process sandbox 333 and mount an inter-application shared library into the application process sandbox 333. However, after mounting the inter-application shared library, the application process 313 reduces its own permission, loads and runs the code and other resources of the application program.

[0058] The application framework layer 320 provides application programming interfaces (application programming interface, API) and programming frameworks for the application programs of the application layer 310. The application framework layer 320 includes some pre-defined functions.

[0059] In some embodiments of the present application, the application framework layer 320 can include a bundle manager service (bundle manager service, BMS) 321, an ability manager service (ability manager service, AMS) 322, an application spawner (app spawn) 323, and a sandbox mounting service 324.

[0060] The package management service 321 is configured to parse and install the application installation package, record application program information into a database of the electronic device, and persistently save the code, resources and configuration files of the application installation package into the electronic device, so as to facilitate loading of the application program at startup.

[0061] It should be understood that in the present embodiment, the user can install the application program from the application market 311, and the package management service 321 independently saves the application installation package 331 in the application program and the inter-application shared library consisting of code, resources and configuration files into the file system 330 of the electronic device, wherein the inter-application shared library is independently installed and can be shared among multiple application programs but cannot be independently run.

[0062] The meta-ability management service 322 is configured to manage the life cycle of the application program at runtime. The application process 313 can support multiple abilities (meta-abilities), and the ability has the ability of cross-process and intra-process calling. The meta-ability management service 322 uniformly schedules and manages the abilities in the application program, and manages the life cycle changes of the abilities.

[0063] In some embodiments, the meta-ability management service 322 includes a connection management module (ability connect manager), a data management module (data ability manager), an app management service scheduling module (app scheduler), an ability scheduling module (ability scheduler) and a life cycle scheduling module (lifecycle deal).

[0064] The connection management module (ability connect manager) is a module of the meta-ability management service 322 for connection management of the service type ability.

[0065] The data management module (data ability manager) is a module of the meta-ability management service 322 for management of the data type ability.

[0066] The app management service scheduling module (app scheduler) provides the ability of the meta-ability management service 322 for scheduling management of the user program management service.

[0067] The ability scheduling module (ability scheduler) provides the ability of scheduling management of the ability.

[0068] The lifecycle scheduling module (lifecycledeal) is a module for scheduling and managing lifecycle events of the ability by the meta-ability management service 322.

[0069] It should be understood that the meta-ability management service 322 can query the package management service 321 for information about the application inter-process shared library set 332, including the core dependent shared library and the non-core dependent shared library, on which the application program depends. The meta-ability management service 322 sends the information to the application hatcher 323, and requests the application hatcher 323 to hatch the application process 313.

[0070] The application hatcher 323 is configured to prepare resources required for starting the application program, and create the application process 313. At this time, the application process 313 has the same high privilege as the application hatcher 323, and can create the application process sandbox 333 and mount the application inter-process shared library into the application process sandbox 333. After the application inter-process shared library is mounted, the corresponding privilege of the application process 313 is reduced, and the application process 313 can only load code or resource data required for starting or running the application program.

[0071] The application process sandbox 333 is a range of files accessible and loaded by the application process 313. The application process sandboxes 333 of different application programs are isolated from each other, and the application hatcher 323 cannot change the application process sandbox 333 after the application program is started.

[0072] It should be understood that, after the application hatcher 323 obtains the information about the application inter-process shared library on which the application program depends, the application hatcher 323 can start the application process 313 of the corresponding application program, create the application process sandbox 333 of the application program, and mount the core dependent shared library of the application program and the resources and code of the application installation package into the application process sandbox 333. During the running of the application process 313, the application process 313 can only load files in the application process sandbox 333.

[0073] The sandbox mounting service 324 is a functional unit with high privilege, and provides the application process 313 with the ability to dynamically change the range of the process sandbox.

[0074] It should be understood that, since only the core dependent shared library is mounted in the application process sandbox 333, the application program needs to load files of the non-core dependent shared library during the running after the application program is started. At this time, the application process 313 requests the sandbox mounting service 324 to expand the application process sandbox 333. The sandbox mounting service 324 has high privilege, and can continue to mount the non-core dependent shared library into the application process sandbox 333, thereby dynamically expanding the application process sandbox 333, so as to realize the fast starting of the application program.

[0075] The file system 330 may be, for example, a memory such as a random-access memory (RAM) and a flash memory, etc. in which the electronic device stores application installation packages 331 and inter-application shared libraries. In other embodiments, the file system 330 may also include a floppy disk, an optical disc, a magneto-optical disc, a read only memory (ROM), an erasable programmable read only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic or optical card, a flash memory, or a tangible machine readable storage used for transmitting information via the Internet using an electric, optical, acoustic, or other form of propagated signals (e.g., carrier waves, infrared signals, digital signals, etc.) in an electric, optical, acoustic, or other form.

[0076] It should be understood that the user may download the corresponding application program through the application market 311 on the electronic device, and the package management service 321 in the operating system of the electronic device saves the application installation package 331 and the inter-application shared library set 332 of the application program installed by the user in the file system 330 of the electronic device, respectively.

[0077] When the user clicks the icon of the application program on the desktop 312 of the electronic device, the desktop 312 requests the meta-capability management service 322 to start the application program in response to the operation of the user. After receiving the request to start the application program, the meta-capability management service 322 queries the package management service 321 for information such as inter-application shared libraries on which the application program depends. Then, the meta-capability management service 322 requests the application hatcher 323 to create an application process 313 of the application program according to the obtained information. The application process 313 creates an application process sandbox 333 of the application program and mounts the core dependent shared library of the application program into the application process sandbox 333. After that, the permission of the application process sandbox 333 and the mounting of the inter-application shared library disappear, and the application process 313 loads the core dependent shared library in the application process sandbox 333 when the application program is started or runs, thereby starting the application program and showing the operation interface of the application program to the user.

[0078] When the user operates the operation interface of the application program, the application process 313 requests the sandbox mounting service 324 to dynamically extend the application process sandbox 333 in response to the operation of the user, mounts the non-core dependent library required by the application process 313 into the application process sandbox 333, so that the application process 313 loads the corresponding resource when running.

[0079] It can be understood that, through the above embodiment, when the application is started, only the core dependent shared library of the application is mounted in the application process sandbox 333. Therefore, the application can be started quickly. When a file that needs to load a non-core dependent shared library during the running of the application, the corresponding non-core dependent shared library can be mounted in the application process sandbox 333 by the sandbox mounting service 324, so as to dynamically expand the application process sandbox 333, thereby ensuring the normal running of the application.

[0080] Next, in combination with the above system architecture, a starting method of an application is introduced.

[0081] Figure 4 According to some embodiments of the present application, an implementation flowchart of a starting method of an application is shown.

[0082] It can be understood that, in the embodiments of the present application, the application market 311 and the desktop 312 can be Figure 3 application in the electronic device in the embodiments. The package management service 321, the meta-capability management service 322, the application incubator 323, the application process 313, the sandbox mounting service 324 and the application process sandbox 333 are all functional units of the electronic device in the embodiments. Figure 3

[0083] As shown in Figure 4 , the flowchart includes:

[0084] 401, the developer configures the inter-application shared library set 332 in the application installation package 331.

[0085] Exemplarily, the application installation package 331 includes code, resources and configuration files. In addition to developing the code and resources of the application, the developer also needs to specify the inter-application shared library set 332 that the application depends on at runtime in the configuration file. And in the embodiments of the present application, the developer also needs to identify in the configuration file whether each inter-application shared library in the inter-application shared library set 332 is a core dependent shared library.

[0086] Figure 5a According to some embodiments of the present application, a structural diagram of an application installation package 331 is shown.

[0087] As shown in Figure 5a ​As shown, the application installation package 331 includes code, resources, and configuration files. The configuration files set up a core dependency list and a non-core dependency list to identify whether an inter-application shared library is a core dependency shared library. The core dependency list includes the identifiers of shared libraries A and B, therefore shared libraries A and B are core dependency shared libraries. When the application incubator 323 mounts inter-application shared libraries to the application process sandbox 333 to start the application, only the inter-application shared libraries corresponding to the identifiers in the core dependency list need to be mounted. The non-core dependency list stores the identifiers of non-core dependency shared libraries, such as the identifiers of shared libraries C and D. When the sandbox mounting service 324 dynamically extends the application process sandbox 333, shared libraries C and D can be mounted according to the identifiers in the non-core dependency list.

[0088] Figure 5b A schematic diagram of the structure of another application installation package is shown according to some embodiments of this application.

[0089] like Figure 5b As shown, the application installation package 331 includes code, resources, and configuration files. The configuration file sets a dependency list for inter-application shared libraries. This dependency list includes identifiers for shared libraries such as shared library A, shared library B, shared library C, and shared library D. For example, shared libraries A and B have a first flag of 1, indicating that they are core dependent shared libraries. Shared libraries C and D have a flag of 2, indicating that they are non-core dependent shared libraries. When application process 313 mounts inter-application shared libraries to application process sandbox 333 to start the application, only the inter-application shared libraries with the first flag of 1 need to be mounted. When sandbox mounting service 324 dynamically extends application process sandbox 333, shared libraries C and D with the flag of 2 can be mounted. It should be understood that the first flag 1 and flag 2 can also be, for example, 0 and 1, used to distinguish between core and non-core dependent shared libraries. In other embodiments, the first marker 1 and marker 2 may also be in other forms.

[0090] 402, The developer publishes the application installation package 331 to the application market 311.

[0091] For example, the application market 311 is the entry point for users to obtain and install the application installation package 331. Developers publish the application installation package 331 on the application market 311 for users to download.

[0092] 403, App Store 311 responds to user action, downloads application installation package 331.

[0093] Exemplarily, the user can browse the application programs on the application market 311 and click the installation icon corresponding to the application program to install the application installation package 331. The application market 311 can download the installation package of the corresponding application program in response to the click operation of the user.

[0094] It should be understood that the installation icon corresponding to the application program represents a button for downloading the application installation package 331, and in other embodiments, the installation icon can also be a download icon or other icons.

[0095] 404. The application market 311 downloads the application installation package 331 and the inter-application shared library dependent thereon and calls the package management service 321 to install the application program.

[0096] Exemplarily, the application market 311 downloads the application installation package 331 and the inter-application shared library dependent thereon in response to the operation of the user clicking the installation icon corresponding to the application program, and calls the interface of the package management service 321 to install the application program. The package management service 321 saves the application installation package 331 and the inter-application shared library dependent on the application program to the system file 330 of the electronic device.

[0097] It should be understood that when the corresponding inter-application shared library has been saved in the system file 330 of the electronic device, the electronic device can not download the inter-application shared library.

[0098] 405. The desktop 312 detects the operation of the user clicking the icon of the application program.

[0099] Exemplarily, in the embodiments of the present application, the desktop 312 displays the icons of the application programs installed on the electronic device to the user and provides an entry to start the application program. The user can click the icon of the application program to start the application program.

[0100] 406. The desktop 312 initiates a request to the meta-capability management service 322 to start the application program.

[0101] Exemplarily, after the user clicks the icon of the application program, the desktop 312 responds to the click operation of the user and requests the meta-capability management service 322 to start the corresponding application program.

[0102] 407. The meta-capability management service 322 queries the application information of the application program from the package management service 321.

[0103] Exemplarily, after receiving the request to start the application program from the desktop 312, the meta-capability management service 322 queries the application information of the corresponding application program from the package management service 321. In the embodiments of the present application, the application information can include, for example, the information of the application program and the information of the inter-application shared library dependent on the application program.

[0104] 408, the meta-capability management service 322 sends the application information to the application hatcher 323.

[0105] 409, the application hatcher 323 creates an application process 313 of the corresponding application program.

[0106] Exemplarily, after obtaining the application information, the application hatcher 323 can create the application process 313 of the corresponding application program according to the application program information in the application information. The application hatcher 323 creates the application process 313 by means of forking process.

[0107] 410, the application process 313 creates an application process sandbox 333 of the application program.

[0108] Exemplarily, the application hatcher 323 has high permissions when creating the application process 313, and can create the application process sandbox 333 of the corresponding application program. The application process 313 is a child process of the application hatcher 323 process and has the same high permissions as the application hatcher 323 process, and the application process 313 completes the creation of the application process sandbox 333.

[0109] 411, the application process 313 mounts the core dependency shared library into the application process sandbox 333, and then reduces the permissions.

[0110] Exemplarily, after the application process 313 creates the application process sandbox 333, the application process 313 can mount the core dependency shared library of the corresponding application program into the application process sandbox 333. When the operation of mounting the core dependency shared library by the application process 313 is completed, the permission of mounting the inter-application shared library disappears, and the application process 313 cannot mount the inter-application shared library into the application process sandbox 333. In some embodiments of the present application, after the application process 313 creates the application process sandbox 333, the application process 313 can only mount the core dependency shared library of the application program into the application process sandbox 333, so that the application process 313 can load the required file resources from the application process sandbox 333 when starting the application program.

[0111] 412, the application process 313 loads the code and resources from the application process sandbox 333.

[0112] Exemplarily, after the application hatcher 323 mounts the core dependency shared library into the application process sandbox 333, the application process 313 can load the code and resources of the core application shared library in the application process sandbox 333, start the application program, and execute the corresponding business logic.

[0113] 413, the application process 313 shows the interface of the application program to the user.

[0114] Exemplarily, after the application process 313 loads the code and resources in the application process sandbox 333, the application process 313 shows the corresponding operation interface to the user for operation.

[0115] 414, the application process 313 requests the sandbox mounting service 324 to dynamically expand the application process sandbox 333.

[0116] Exemplarily, if the application process 313 needs to load the code and resources in the non-core dependent shared library during the operation of the user, the application process 313 needs to request the sandbox mounting service 324 to dynamically expand the application process sandbox 333. It should be understood that the application hatcher 323 does not have the permission to mount the inter-application shared library to the application process sandbox 333 again after performing the operation of mounting the inter-application shared library to the application process sandbox 333 once. The sandbox mounting service 324 has higher permission, so the application process 313 can request the sandbox mounting service 324 to dynamically expand the application process sandbox 333.

[0117] 415, the sandbox mounting service 324 processes the expansion request of the application process sandbox 333.

[0118] Exemplarily, in the embodiment of the present application, after the sandbox mounting service 324 receives the request of the application process 313 to dynamically expand the application process sandbox 333, the sandbox mounting service 324 can process the request and mount the corresponding non-core inter-application shared library to the application process sandbox 333. The process of the sandbox mounting service 324 to dynamically expand the application process sandbox 333 is described below.

[0119] 416, the application process 313 detects the state of the application process sandbox 333.

[0120] Exemplarily, in the embodiment of the present application, the application process 313 detecting the state of the application process sandbox 333 can be, for example, that the sandbox mounting service 324 provides the application process 313 with the listening ability of the state of the application process sandbox 333, which can include, for example, the ability to listen to the states of inter-application shared library mounting success, inter-application shared library mounting failure, inter-application shared library version update, etc. The process of the application process 313 detecting the state of the application process sandbox 333 is described below.

[0121] It can be understood that in the embodiment of the present application, at the start of the application program, the application hatcher 323 only needs to mount the core dependent shared library of the application program in the application process sandbox 333, so the application program can be started quickly. During the operation of the application program, the corresponding non-core dependent shared library can be mounted to the application process sandbox 333 by the sandbox mounting service 324 according to the operation of the user. Thus, the normal operation of the application program is ensured.

[0122] The following describes Figure 4The sandbox mounting service 324 of the embodiment 414 dynamically extends the application process sandbox 333.

[0123] It should be understood that after the application incubator 323 performs an operation of mounting an inter-application shared library to the application process sandbox 333 once, the corresponding mounting permission disappears, and the application incubator 323 has no permission to mount the inter-application shared library to the application process sandbox 333 again. Therefore, in the embodiments of the present application, the sandbox mounting service 324 with the mounting permission needs to be set to mount the non-core dependent shared library to the application process sandbox 333, so as to dynamically extend the application process sandbox 333.

[0124] Figure 6a According to the embodiments of the present application, an interaction flowchart of a method for the sandbox mounting service 324 to dynamically extend the application process sandbox 333 is shown.

[0125] As shown in the flowchart, the interaction flow includes: Figure 6a

[0126] 601, the application process 313 loads a target shared library in response to a user operation.

[0127] Exemplarily, in the embodiments of the present application, the application process 313 displays an operation interface of an application program to the user for the user to operate. The application process 313 loads a corresponding inter-application shared library in response to a user operation, and the inter-application shared library is the target shared library.

[0128] 602, the application process 313 judges whether the application process sandbox 333 has mounted the target shared library.

[0129] Exemplarily, the application process 313 checks whether the target shared library has been mounted to the application process sandbox 333.

[0130] If it is detected that the target shared library is already included in the application process sandbox 333, the flow 607 is executed to load the code and resources of the target shared library.

[0131] If it is detected that the target shared library is not included in the application process sandbox 333, the flow 603 is executed to request the sandbox mounting service 324 to mount the target shared library.

[0132] 603, the application process 313 requests the sandbox mounting service 324 to mount the target shared library.

[0133] Exemplarily, in the embodiments of the present application, after the application process 313 detects that the target shared library is not mounted to the application process sandbox 333, the application process 313 requests the sandbox mounting service 324 to mount the target shared library to the application process sandbox 333.

[0134] ​604, the sandbox mounting service 324 queries the package management service 321 to check whether the target shared library is in the dependency list in the configuration file of the application.

[0135] Exemplarily, in some embodiments of the present application, the sandbox mounting service 324 can query the package management service 321 to check whether the target shared library is in the dependency list in the configuration file of the application, for verifying whether the target shared library requested to be mounted by the application process 313 is legal.

[0136] If the sandbox mounting service 324 queries the package management service 321 and finds that the target shared library is in the dependency list in the configuration file of the application, the process 605 is executed to mount the target shared library into the application process sandbox 333.

[0137] If the sandbox mounting service 324 queries the package management service 321 and finds that the target shared library is not in the dependency list in the configuration file of the application, the process 608 is executed to return a mounting failure message to the application process 313.

[0138] 605, the sandbox mounting service 324 mounts the target shared library into the application process sandbox 333.

[0139] Exemplarily, after the sandbox mounting service 324 queries the package management service 321 and finds that the target shared library is in the dependency list in the configuration file of the application, it is indicated that the request of the application process 313 is a legal request. The sandbox mounting service 324 can obtain the physical path of the target shared library and mount the target shared library into the application process sandbox 333.

[0140] In some other embodiments, the sandbox mounting service 324 only needs to obtain the identification information such as the package name, module name and version number of the inter-application shared library, and does not need to transmit the specific physical path to mount the inter-application shared library into the application process sandbox 333, which can flexibly expand the range of the application process sandbox 333.

[0141] 606, the sandbox mounting service 324 returns a mounting success message to the application process 313.

[0142] 607, the application process 313 loads the code and resources of the target shared library from the application process sandbox 333.

[0143] Exemplarily, after the sandbox mounting service 324 mounts the target shared library into the application process sandbox 333, the application process 313 can load the code and resources of the target shared library to respond to the operation of the user.

[0144] 608, the sandbox mounting service 324 returns a mounting failure message to the application process 313.

[0145] Exemplarily, when the target shared library is not an inter-application shared library in the dependency list of the application program, it indicates that the request of the application process 313 is not legal, and the sandbox mounting service 324 will not mount the target shared library into the application process sandbox 333.

[0146] Figure 6b An interaction flowchart of a method for dynamically expanding the application process sandbox 333 by the sandbox mounting service 324 is shown according to an embodiment of the present application.

[0147] As shown in Figure 6b the interaction flowchart includes:

[0148] 610, the user triggers the application process 313 to load a target shared library.

[0149] Exemplarily, in the embodiments of the present application, the application process 313 displays an operation interface of an application program to the user for operation. The application process 313 loads a corresponding inter-application shared library in response to the operation of the user, and the inter-application shared library is the target shared library.

[0150] 620, the application process 313 requests the sandbox mounting service 324 to mount the target shared library.

[0151] Exemplarily, if the application process 313 judges that the target shared library is not mounted in the application process sandbox 333, the application process 313 requests the sandbox mounting service 324 to mount the target shared library into the application process sandbox 333.

[0152] 630, the sandbox mounting service 324 verifies whether the target shared library is in the dependency list of the application program from the package management service 321.

[0153] Exemplarily, in some embodiments of the present application, the sandbox mounting service 324 can query from the package management service 321 whether the target shared library is in the dependency list in the configuration file of the application program, to verify whether the target shared library requested to be mounted by the application process 313 is legal.

[0154] If the target shared library is in the dependency list of the application program, the verification is successful, and the process of 640 is executed to mount the target shared library into the application process sandbox 333.

[0155] If the target shared library is not in the dependency list of the application program, the verification fails, and the process of 660 is executed to return a mounting failure message to the application process 313.

[0156] 640, the sandbox mounting service 324 mounts the target shared library into the application process sandbox 333.

[0157] Exemplarily, the sandbox mounting service 324 determines that the request of the application process 313 is a legal request after querying the package management service 321 to find that the target shared library is in the dependency list of the application program. The sandbox mounting service 324 can obtain the physical path of the target shared library and mount the target shared library into the application process sandbox 333.

[0158] In some other embodiments, the sandbox mounting service 324 only needs to obtain the identification information such as the package name, the module name, and the version number of the inter-application shared library, and does not need to transmit the specific physical path to mount the inter-application shared library into the application process sandbox 333, which can flexibly expand the range of the application process sandbox 333.

[0159] 650, the sandbox mounting service 324 returns a mounting success message to the application process 313.

[0160] 660, the sandbox mounting service 324 returns a mounting failure message to the application process 313.

[0161] 670, the application process 313 loads the code and resources of the target shared library from the application process sandbox 333.

[0162] Exemplarily, after the sandbox mounting service 324 mounts the target shared library into the application process sandbox 333, the application process 313 can load the code and resources of the target shared library to respond to the operation of the user.

[0163] It can be understood that, through the embodiments of the present application, the sandbox mounting service 324 can dynamically expand the application process sandbox 333. When the application process 313 requests the sandbox mounting service 324 to mount the target shared library, the sandbox mounting service 324 first determines the legality of the request of the application process 313. That is, whether the target shared library is in the dependency list of the application program. If the request of the application process 313 is legal, the sandbox mounting service 324 mounts the target shared library into the application process sandbox 333 for the application process 313 to load the code and resources of the target shared library. If the request of the application process 313 is not legal, the sandbox mounting service 324 does not mount the target shared library into the application process sandbox 333, which effectively avoids the security and privacy risk that the ordinary application program bypasses the application process sandbox 333 to access any file.

[0164] The following describes Figure 4 The application process 313 detects the state of the application process sandbox 333 in the flow of the embodiment 416.

[0165] Figure 7 According to the embodiments of the present application, an interactive flowchart of the application process 313 detecting the state of the application process sandbox 333 is shown.

[0166] As Figure 7As shown, the interaction flow includes:

[0167] 701, the application process 313 registers the application process sandbox 333 change listening to the sandbox mounting service 324.

[0168] Exemplarily, in the embodiment of the present application, the sandbox mounting service 324 can provide the application process 313 with the listening capability of the application process sandbox 333 state, specifically including the capability of listening to the sandbox state such as the inter-application shared library mounting success, the inter-application shared library mounting failure, and the inter-application shared library version update.

[0169] 702, the application process 313 requests the sandbox mounting service 324 to expand the application process sandbox 333.

[0170] Exemplarily, when the application process 313 needs to dynamically expand the application process sandbox 333, it can send a request to the sandbox mounting service 324 to expand the application process sandbox 333.

[0171] 703, the sandbox mounting service 324 processes the request to expand the application process sandbox 333.

[0172] Exemplarily, after the sandbox mounting service 324 receives the request to expand the application process sandbox 333 sent by the application process 313, it processes the request. The detailed process of processing the request of the application process 313 refers to the embodiment in Figure 4 .

[0173] 704, the sandbox mounting service 324 returns the mounting result of the inter-application shared library to the application process 313.

[0174] 705, the application process 313 determines the code and resources of the inter-application shared library.

[0175] Exemplarily, when the application process 313 listens to the message of the inter-application shared library mounting success returned by the sandbox mounting service 324, the application process 313 can determine the code and resources of the corresponding inter-application shared library.

[0176] When the application process 313 listens to the message of the inter-application shared library mounting failure returned by the sandbox mounting service 324, it cannot load the corresponding code and resources.

[0177] 706, the package management service 321 detects that the application market 311 updates the inter-application shared library.

[0178] Exemplarily, since the inter-application shared library is independently installed in the file system of the electronic device, the inter-application shared library can also be independently updated, and the package management service 321 can detect the update of the inter-application shared library from the application market 311.

[0179] 707, the package management service 321 notifies the sandbox mounting service 324 of the inter-application shared library update.

[0180] 708, the sandbox mounting service 324 notifies the application process 313 of the inter-application shared library update.

[0181] 709, the application process 313 remounts the inter-application shared library on demand.

[0182] Exemplarily, after the inter-application shared library is updated, the application process 313 can issue a request for updating the inter-application shared library according to demand. For example, the application process 313 needs to load the code and resources of the corresponding inter-application shared library during running, and then issues a request for remounting the inter-application shared library. If the application process 313 does not need to load the resources of the corresponding inter-application shared library during running, the application process 313 can not issue a request for remounting the inter-application shared library.

[0183] 710, the sandbox mounting service 324 mounts the updated inter-application shared library.

[0184] Exemplarily, when the application process 313 needs to remount the inter-application shared library, the sandbox mounting service 324 mounts the updated inter-application shared library into the application process sandbox 333.

[0185] 711, the sandbox mounting service 324 returns the mounting result of the inter-application shared library to the application process 313.

[0186] 712, the application process 313 loads the code and resources of the inter-application shared library.

[0187] It can be understood that in the embodiments of the present application, after the inter-application shared library is updated, the application process 313 can listen to the message of the inter-application shared library update. Moreover, the application process 313 can also mount the updated inter-application shared library into the application process sandbox 333 through the sandbox mounting service 324 during running. Therefore, the application program does not need to be restarted to load the code and resources of the updated inter-application shared library.

[0188] The electronic device involved in some embodiments of the present application is described in detail below.

[0189] Figure 8 According to the embodiments of the present application, a structural schematic diagram of an electronic device is shown.

[0190] As Figure 8As shown, the electronic device can 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, a headset jack 170D, a sensor module 180, a key 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 can include a pressure sensor 180A, a gyro sensor 180B, a barometric 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.

[0191] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device can include more or fewer components than the illustration, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0192] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.

[0193] The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching instructions and executing instructions.

[0194] The processor 110 can also have a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can hold instructions or data that the processor 110 has just used or is using repeatedly. If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.

[0195] In some embodiments, the processor 110 can include one or more interfaces. The interface can 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 interface, and / or a universal serial bus interface, etc.

[0196] The charging management module 140 is configured to receive a charging input from a charger. The charger can be a wireless charger or a wired charger.

[0197] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the display screen, the camera, and the wireless communication module 160, etc.

[0198] The wireless communication function of the electronic device 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, etc.

[0199] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas.

[0200] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. of an application on an electronic device. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive an electromagnetic wave by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic wave, and transfer to a modem processor for demodulation. The mobile communication module 150 can also amplify a signal modulated by the modem processor, and radiate as an electromagnetic wave through the antenna 1.

[0201] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), blue-tooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. of an application on an electronic device. The wireless communication module 160 can be one or more devices integrated with at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, performs frequency modulation and filtering on the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification, and radiate as an electromagnetic wave through the antenna 2.

[0202] The external memory interface 120 can be used to connect an external memory card, such as a micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are saved in the external memory card.

[0203] The internal memory 121 can be used to store computer-executable program codes including instructions. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, application programs (such as a sound play function, an image play function, etc.) required by at least one function, etc. The data storage area can store data (such as audio data, a phone book, etc.) created during use of the electronic device, etc. In addition, the internal memory 121 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 performs various function applications and data processing of the electronic device by executing instructions stored in the internal memory 121 and / or instructions stored in a memory disposed in the processor.

[0204] The pressure sensor 180A is configured to sense a pressure signal and convert the pressure signal into an electrical signal.

[0205] The touch sensor 180K is also referred to as a "touch device". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 can form a touch screen, also referred to as a "touch panel". The touch sensor 180K is configured to detect a touch operation applied thereto or in the vicinity thereof.

[0206] The SIM card interface 195 is configured to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device. In some embodiments, the electronic device uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device and cannot be separated from the electronic device. In the drawings, some structural or method features can be shown in certain arrangements and / or orders. However, it should be understood that such certain arrangements and / or orders can not be required. Instead, in some embodiments, the features can be arranged in a different manner and / or order than those shown in the illustrative figures. Additionally, the inclusion of a structural or method feature in a particular figure is not meant to be a requirement of all embodiments and, in some embodiments, the feature can not be included or can be combined with other features in some embodiments.

[0207] In the drawings, some structural or method features can be shown in certain arrangements and / or orders. However, it should be understood that such certain arrangements and / or orders can not be required. Instead, in some embodiments, the features can be arranged in a different manner and / or order than those shown in the illustrative figures. Additionally, the inclusion of a structural or method feature in a particular figure is not meant to be a requirement of all embodiments and, in some embodiments, the feature can not be included or can be combined with other features in some embodiments.

[0208] It should be noted that each unit / module mentioned in each device embodiment of the present application is a logical unit / module, and in physical aspect, one logical unit / module can be a physical unit / module, or a part of a physical unit / module, or be realized in a combination of multiple physical unit / modules, and the physical realization of these logical units / modules is not the most important point. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce the units / modules which are not closely related to solving the technical problems proposed in the present application, which does not mean that the above-mentioned device embodiments do not have other units / modules.

[0209] It should be noted that in the examples and description of the present patent, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including one" does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0210] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it should be understood by those skilled in the art that various changes in form and details can be made therein without departing from the spirit and scope of the present application.

Claims

1. An application program starting method applied in an electronic device, characterized in that, The electronic device includes a sandbox mounting service, and the method includes: detecting a starting instruction of a first application; creating an application process of the first application, creating an application process sandbox of the first application based on the application process of the first application; mounting, by the application process of the first application, an inter-application shared library required by the first application when the first application is started into the application process sandbox, and starting the first application based on the inter-application shared library; during running of the first application, detecting a message of mounting a second inter-application shared library required by the first application, and sending, by the application process of the first application, a request of mounting the second inter-application shared library to the sandbox mounting service; mounting, by the sandbox mounting service, the second inter-application shared library into the application process sandbox; obtaining, by the application process of the first application, the second inter-application shared library from the application process sandbox, and running the first application based on the second inter-application shared library.

2. The method of claim 1, wherein, The identification of the inter-application shared library required by the first application when the first application is started has a first mark, and mounting, by the application process of the first application, the first inter-application shared library required by the first application when the first application is started into the application process sandbox includes: determining, by the application process of the first application, the first inter-application shared library with the first mark from a plurality of inter-application shared libraries of the first application; mounting, by the application process of the first application, the first inter-application shared library into the application process sandbox based on the first mark.

3. The method of claim 1, wherein, The electronic device stores a first list including the identification of the inter-application shared library required by the first application when the first application is started; and mounting, by the application process of the first application, the first inter-application shared library required by the first application when the first application is started into the application process sandbox includes: determining, by the application process of the first application, the first identification of the first inter-application shared library from the first list, and mounting the first inter-application shared library into the application process sandbox.

4. The method of claim 1, wherein, Mounting, by the sandbox mounting service, the second inter-application shared library into the application process sandbox includes: determining that the second inter-application shared library belongs to an inter-application shared library relied on by the first application; mounting the second inter-application shared library into the application process sandbox; The inter-application shared library relied on by the first application represents an inter-application shared library from which the first application can obtain resources.

5. The method of claim 1, wherein, The first inter-application shared library and the second inter-application shared library are independently stored in the electronic device, and the first inter-application shared library and the second inter-application shared library can be independently updated.

6. The method of claim 5, wherein, Further including: detecting that the first inter-application shared library and / or the second inter-application shared library are updated into a third inter-application shared library; mounting, by the sandbox mounting service, the third inter-application shared library into the application process sandbox when the application process of the first application needs to obtain the third inter-application shared library; obtaining, by the application process of the first application, the third inter-application shared library from the application process sandbox.

7. An electronic device, comprising: including: a memory for storing instructions; At least one processor configured to execute the instructions to cause the electronic device to implement the application launch method of any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium has stored thereon instructions which, when executed on a computer, cause the computer to perform the application launch method of any one of claims 1-6.

Citation Information

Patent Citations

  • Application program starting method and device, terminal and storage medium

    CN108446144A

  • Preloading dynamic link libraries

    WO2009083732A1