Application management method and electronic equipment
By storing the development toolkit in a shared library, multiple applications can share the same shared library for independent updates, solving the problems of wasted storage space and difficult version management, and improving application stability and development efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2026-03-31
AI Technical Summary
In existing technologies, application integration development kits lead to wasted storage space and difficulties in version management. Furthermore, application developers need to manage the code quality of the development kits, which affects application deployment and operational stability.
The development kits are stored in a shared library, allowing multiple applications to share the same shared library. The shared library's software packages are updated independently of applications and operating systems, and dependencies are identified and updated independently.
It reduces the size of application packages, saves storage space, simplifies the management of development toolkits, and improves application stability and development efficiency.
Smart Images

Figure CN121764488A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an application management method and electronic device. Background Technology
[0002] With the booming development of the application (APP) ecosystem, the types and number of applications have experienced explosive growth. In application development, using existing functional modules can improve the speed of application development.
[0003] In one possible implementation, developers utilize development kits (such as software development kits, SDKs) to assist in application development. During application development, developers integrate the released SDK into the software engineering of the application to be developed, and compile the software engineering to obtain the application's software package. This software package includes the aforementioned SDK. Subsequently, the developers upload the application software package to a server, and a first electronic device can download the application software package from the server to install the application onto the operating system of the first electronic device.
[0004] However, the development kits integrated into the application can cause the application to consume a lot of storage space. Summary of the Invention
[0005] To address the aforementioned technical problems, this application provides an application management method and an electronic device. In the technical solution provided by this application, the development toolkits (DMPs) upon which the application depends for execution are stored in a shared library. Each shared library has an independent software package. By installing the shared library's software package on a first electronic device, multiple applications can share the DMPs within the shared library. This avoids the occurrence of multiple copies of the shared library on the first electronic device when multiple applications referencing the same shared library are installed on the first electronic device.
[0006] To achieve the above-mentioned technical objectives, this application provides the following technical solution:
[0007] In a first aspect, an application management method is provided, applied to a first electronic device. The method includes: in response to an instruction to install a first application, downloading a first software package of the first application from a first server; determining at least one shared library that the first application depends on, based on a first identifier carried by the first software package, the at least one shared library being used to provide runtime resources required for the first application to run; if a target shared library from the at least one shared library is not installed in the first electronic device, downloading a second software package from the first server, the second software package being used to install the target shared library in the first electronic device; and installing the first software package and the second software package.
[0008] This approach decouples the development kit from the application's software package and operating system. On one hand, the shared library supports providing runtime resources for multiple applications, allowing multiple applications to share the same shared library. Compared to integrating the SDK into the application's software package, this method helps reduce the size of the application's software package and avoids the situation where multiple applications' software development kits carry the same SDK, thus saving storage space in the primary electronic device.
[0009] On the other hand, the shared library's software packages can be obtained independently from the primary server, making shared library updates independent of operating system or application version updates. This approach allows the primary electronic device to independently update the shared library, which helps to promptly obtain repaired runtime resources by updating the shared library in the event of problems with the runtime resources provided by the shared library. This ensures that the primary application receives the correct runtime resources, thus improving the availability of the shared library.
[0010] Furthermore, in the solution provided in this application embodiment, since the shared library software package and the application software package are independent of each other, and the application software package does not include the shared library, the application developer is not responsible for the qualification testing process of the shared library. This approach avoids situations where the application cannot be submitted due to problems with the shared library, thus helping to reduce the workload of application developers.
[0011] In one possible implementation, after installing the first software package and the second software package, the method further includes: in response to launching the first application, obtaining a first resource from the first software package; obtaining a second resource based on a first identifier, the second resource being a shared library resource, the second resource including resources in the second software package; and displaying a first interface of the first application based on the first resource and the second resource.
[0012] In this way, the shared libraries that the first application depends on are identified by the first identifier, so that the corresponding runtime resources can be called from the shared libraries to support the normal operation of the first application. In this way, the size of the first software package is reduced while ensuring the normal operation of the first application.
[0013] In one possible implementation, the application management method further includes installing a first software package if at least one shared library is already installed in the first electronic device.
[0014] In this way, the shared libraries already installed on the first electronic device can be shared by multiple applications. If at least one shared library required for the first application to run is already installed on the first electronic device, there is no need to reinstall at least one of the shared libraries required for the first application to run; only the first team-building package needs to be installed, and then the first software package can run normally on the first electronic device. Compared to configuring shared libraries independently for each application, or including the SDK in the application's software package, this method helps avoid installing multiple redundant identical shared libraries on the first electronic device, thereby saving storage space on the first electronic device.
[0015] In one possible implementation, the first server includes first version information of the target shared library, and the second software package includes second version information of the target shared library. After installing the first software package and the second software package, the method further includes: obtaining the first version information of the target shared library from the first server; if the first version information and the second version information are different, downloading a third software package corresponding to the first version information from the first server, the third software package being used to update the target shared library in the first electronic device; and installing the third software package.
[0016] Thus, by updating the version of the target shared library already installed on the first electronic device, independent updates of the target shared library are achieved, improving the flexibility of shared library updates. This approach helps the first electronic device promptly install the latest version of the target shared library after it is available on the first server. By supporting independent updates of shared libraries, it helps to promptly obtain and install new shared libraries when there are problems with older versions, improving the stability of applications that depend on the target shared library during runtime.
[0017] In one possible implementation, after installing the first software package and the second software package, the method further includes: obtaining application dependency information of the target shared library, the application dependency information being used to indicate applications in the first electronic device that depend on the target shared library; and uninstalling the second software package if the application dependency information of the target shared library meets the shared library removal conditions.
[0018] Therefore, by checking the dependencies of shared libraries between applications and performing aging-out cleanup of shared libraries, it is helpful to promptly remove shared libraries installed on the first electronic device that are no longer depended upon by applications. Regularly cleaning up shared libraries that have no application dependencies helps reduce the storage space occupied by useless shared libraries on the first electronic device without affecting the normal operation of applications.
[0019] In one possible implementation, the first identifier includes at least one first sub-identifier, and the first sub-identifier corresponding to each shared library in at least one shared library includes at least one of the following: the package name of the shared library, the module name of the shared library, and the version information of the shared library.
[0020] Thus, by including the first sub-identifiers corresponding to each shared library that the first application depends on in the first identifier, the first electronic device can determine all the shared libraries that the first application depends on based on the first identifier after obtaining the first software package, and then verify whether the shared libraries are installed based on the first sub-identifiers. If the target shared library is not installed, the second software package can be obtained from the first server through the sub-identifier of the target shared library.
[0021] Furthermore, by specifying the package name, module name, and version information of the shared library, a specific shared library can be identified. This ensures that the second software package downloaded by the first electronic device from the first server corresponds to the target shared library that the first application depends on. This helps avoid situations where the version information of the second software package obtained from the first server is incorrect, leading to a mismatch between the version information of the target shared library installed on the first electronic device and the version information of the target shared library that the first application depends on, thus preventing the first application from running. This contributes to improving the stability of the first application's operation.
[0022] In one possible implementation, downloading the second software package of the target shared library from the first server includes: sending a shared library download request to the first server based on a first sub-identifier corresponding to the target shared library, wherein the shared library download request is used to request the download of the second software package corresponding to the target shared library.
[0023] Thus, after acquiring the first software package, if the first electronic device determines that it lacks the target shared library required for the first application to run, it automatically requests the second software package from the first server based on the first sub-identifier corresponding to the target shared library. In other words, the processing logic for determining whether a target shared library is missing and requesting the shared library is triggered by the first electronic device. The first server only needs to manage the first and second software packages. This approach simplifies the service logic that the first server needs to execute to provide software package download services to multiple electronic devices, reducing the computational burden on the first server.
[0024] In one possible implementation, the first software package is generated during the development of the first application based on the first description package, which corresponds to a shared library of runtime resources required for the first application to run, and the first software package includes a first identifier.
[0025] Thus, during the development of the first application, a first software package is generated based on the description package of the shared library, and the first software package carries a first identifier. The dependency relationship between the application and the shared library is established during application development, allowing application developers to directly check and verify the correctness of the first identifier. This helps ensure that after the first electronic device obtains the first software package, it can directly determine all the shared libraries that the first application depends on based on the first identifier.
[0026] Secondly, an application management method is provided for a second electronic device. The method includes: in response to an operation of developing a first application, downloading a first description package from a second server, the first description package corresponding to a first shared library for providing a development toolkit required for running the first application; generating a first software package for the first application based on the first description package, the first software package including a first identifier indicating a second shared library, the second shared library including the first shared library; and sending the first software package to a first server, the first software package being used by the first electronic device to download the first application from the first server, and to download target shared libraries from the second shared library that are not installed on the first electronic device.
[0027] Thus, when the application's software package and the shared library's software package are independent of each other, a first identifier is generated through the shared library's description file, and this first identifier is carried in the first software package, establishing a dependency relationship between the application and the shared library. By indicating the first identifier of the application's software package, on the one hand, third-party SDKs are not required to be integrated into the application's software package, helping to reduce the application's software package size; on the other hand, by indicating the shared libraries that the application depends on, the first electronic device can pre-install the shared libraries that the application depends on before running the application, thereby ensuring the application's normal operation.
[0028] Furthermore, since the application's software package does not include the source code of third-party SDKs, the server's compliance checks on the application's software package will not result in situations where the application's software package cannot be released due to quality issues with third-party SDKs. Separating the application's software package from third-party SDKs helps reduce the difficulty for application developers in managing the quality of the application's software package code, and helps improve application development efficiency.
[0029] In one possible implementation, generating a first software package for the first application based on a first description package includes: determining a second shared library based on the first description package; generating a first identifier based on a description file corresponding to the second shared library; and adding the first identifier to the first software package.
[0030] By having shared library developers upload the first description package to the second server, application developers can identify all the shared libraries required by the first application during application development, based on the data carried in the first description package. This helps avoid omitting shared libraries that the first application depends on in the first identifier, improving the accuracy of the first identifier.
[0031] In one possible implementation, determining the second shared library based on the first description package includes: determining the first shared library based on the description file carried by the first description package; determining the third shared library based on the dependency information carried by the first description package, wherein the first shared library depends on the third contributing library; and determining the second shared library based on the first shared library and the third shared library.
[0032] This helps to identify all the shared libraries required for the first application to run, so that the first electronic device on the application side can install all the shared libraries required for the first application to run before the first application runs by using the first identifier in the first software package. This allows the first application to obtain runtime resources from these shared libraries and run smoothly, thus helping to improve the stability of the first application.
[0033] In one possible implementation, in response to the operation of developing the first application, downloading the first description package from the second server includes: in response to the operation of developing the first application, obtaining location information of the first description package, the location information of the first description package being used to indicate the storage location of the first description package in the second server; and sending a description package download request to the second server based on the location information of the first description package, the description package download request being used to request the download of the first description package.
[0034] Uploading the shared library's descriptor package to the second server facilitates the retrieval of the shared library's descriptor package from the second server based on its location information, regardless of the application's development context. This helps reduce the difficulty of obtaining the shared library's descriptor package.
[0035] Thirdly, an application management system is provided, comprising: a first server, a second server, a first electronic device, and a second electronic device; the second electronic device, in response to an operation of developing a first application, sends a description package download request from the second server, the description package download request requesting the download of a first description package, the first description package corresponding to a first shared library for providing development toolkits required for the operation of the first application; the second server sends the first description package to the second electronic device; the second electronic device generates a first software package of the first application based on the first description package, the first software package including a first identifier, the first identifier indicating a second shared library dependent on the operation of the first application, the second shared library including the first shared library; the second electronic device sends the first software package to the first server; the first electronic device, in response to an operation instructing the installation of the first application, sends an application download request to the first server, the application download request requesting the download of the first software package of the first application; the first server sends the first software package to the first electronic device; the first electronic device determines the second shared library based on the first identifier carried by the first software package; if the target shared library in the second shared library is not installed in the first electronic device, the first electronic device downloads the second software package of the target shared library from the first server; the first electronic device installs the first software package and the second software package.
[0036] This approach decouples the development kit from the application's software package and operating system. On one hand, the shared library supports providing runtime resources for multiple applications, allowing multiple applications to share the same shared library. Compared to integrating the SDK into the application's software package, this method helps reduce the size of the application's software package and avoids the situation where multiple applications' software development kits carry the same SDK, thus saving storage space in the primary electronic device.
[0037] On the other hand, the shared library's software packages can be obtained independently from the primary server, making shared library updates independent of operating system or application version updates. This approach allows the primary electronic device to independently update the shared library, which helps to promptly obtain repaired runtime resources by updating the shared library in the event of problems with the runtime resources provided by the shared library. This ensures that the primary application receives the correct runtime resources, thus improving the availability of the shared library.
[0038] Furthermore, in the solution provided in this application embodiment, since the shared library software package and the application software package are independent of each other, and the application software package does not include the shared library, the application developer is not responsible for the qualification testing process of the shared library. This approach avoids situations where the application cannot be submitted due to problems with the shared library, thus helping to reduce the workload of application developers.
[0039] Fourthly, a first electronic device is provided, comprising at least one processor and a memory; the at least one processor is configured to execute instructions stored in the memory to cause the device to perform the methods described in the first aspect and any possible implementation thereof. In response to an operation instructing the installation of a first application, the first electronic device downloads a first software package of the first application from a first server; determines at least one shared library dependent on the first application based on a first identifier carried by the first software package, the at least one shared library being used to provide runtime resources required for the first application to run; if a target shared library from the at least one shared library is not installed in the first electronic device, downloads a second software package from the first server, the second software package being used to install the target shared library in the first electronic device; and installs the first software package and the second software package.
[0040] In one possible implementation, when the processor reads computer instructions from memory, it also causes the electronic device to perform: in response to launching a first application, acquiring a first resource from a first software package; acquiring a second resource based on a first identifier, the second resource being a shared library resource, the second resource including resources in a second software package; and displaying a first interface of the first application based on the first and second resources.
[0041] In one possible implementation, when the processor reads computer instructions from memory, it also causes the electronic device to perform the following: if at least one shared library is already installed in the first electronic device, install a first software package.
[0042] In one possible implementation, the first server includes first version information of the target shared library, and the second software package includes second version information of the target shared library. When the processor reads computer instructions from memory, it also causes the electronic device to perform the following: obtain the first version information of the target shared library from the first server; if the first version information is different from the second version information, download a third software package corresponding to the first version information from the first server, the third software package being used to update the target shared library in the first electronic device; and install the third software package.
[0043] In one possible implementation, when the processor reads computer instructions from memory, it also causes the electronic device to perform: obtaining application dependency information of a target shared library, the application dependency information being used to indicate applications in the first electronic device that depend on the target shared library; and unloading a second software package if the application dependency information of the target shared library satisfies the shared library cleanup conditions.
[0044] In one possible implementation, the first identifier includes at least one first sub-identifier, and the first sub-identifier corresponding to each shared library in at least one shared library includes at least one of the following: the package name of the shared library, the module name of the shared library, and the version information of the shared library.
[0045] In one possible implementation, downloading the second software package of the target shared library from the first server includes: sending a shared library download request to the first server based on a first sub-identifier corresponding to the target shared library, wherein the shared library download request is used to request the download of the second software package corresponding to the target shared library.
[0046] In one possible implementation, the first software package is generated during the development of the first application based on the first description package, which corresponds to a shared library of runtime resources required for the first application to run, and the first software package includes a first identifier.
[0047] Fifthly, a second electronic device is provided. The second electronic device includes a processor and a memory; the at least one processor is configured to execute instructions stored in the memory to cause the device to perform the methods described in either the second aspect or any possible implementation of the second aspect. In response to an operation of developing a first application, the second electronic device downloads a first description package from a second server, the first description package corresponding to a first shared library for providing a development toolkit required for running the first application; based on the first description package, generates a first software package for the first application, the first software package including a first identifier indicating a second shared library, the second shared library including the first shared library; and sends the first software package to a first server, the first software package being used by the first electronic device to download the first application from the first server, and to download target shared libraries from the second shared library that are not installed on the first electronic device.
[0048] In one possible implementation, the second electronic device generates a first software package for the first application based on the first description package, including: determining a second shared library based on the first description package; generating a first identifier based on the description file corresponding to the second shared library; and adding the first identifier to the first software package.
[0049] In one possible implementation, the second electronic device determines the second shared library based on the first description package, including: determining the first shared library based on the description file carried in the first description package; determining the third shared library based on the dependency information carried in the first description package, wherein the first shared library depends on the third contributing library; and determining the second shared library based on the first shared library and the third shared library.
[0050] In one possible implementation, the second electronic device, in response to the operation of developing the first application, downloads a first description package from a second server, including: in response to the operation of developing the first application, obtaining location information of the first description package, the location information of the first description package being used to indicate the storage location of the first description package in the second server; and sending a description package download request to the second server based on the location information of the first description package, the description package download request being used to request the download of the first description package.
[0051] In a sixth aspect, a computer-readable storage medium is provided, on which computer program instructions are stored, which, when executed by a processing circuit, implement the method as described in any possible embodiment of the first aspect or the method as described in any possible embodiment of the second aspect.
[0052] In a seventh aspect, a chip system is provided, the chip system including a processing circuit and a storage medium, the storage medium storing computer program instructions; when the computer program instructions are executed by the processing circuit, they implement the method as described in any possible embodiment of the first aspect or the method as described in any possible embodiment of the second aspect.
[0053] Eighthly, a computer program product comprising instructions is provided, which, when run on a computer, causes the computer to perform the method as described in any possible embodiment of the first aspect or the method as described in any possible embodiment of the second aspect.
[0054] The technical effects corresponding to any of the implementation methods in aspects four through eight can be found in the first aspect and the technical effects corresponding to any of the implementation methods in the first aspect, or in the second aspect and the technical effects corresponding to any of the implementation methods in the second aspect. They will not be repeated here. Attached Figure Description
[0055] Figure 1 This is a schematic diagram of a software package used in a related technology.
[0056] Figure 2 This is a schematic diagram of a software package used in another application of related technologies.
[0057] Figure 3 A schematic diagram of an application management system for an application management method provided in an embodiment of this application;
[0058] Figure 4 This is an interactive schematic diagram of an application management method system provided in an embodiment of this application;
[0059] Figure 5 This is a schematic diagram of the functional modules of the application management system provided in the embodiments of this application;
[0060] Figure 6 This is a schematic diagram of the structure of a first electronic device provided in an embodiment of this application;
[0061] Figure 7 A software structure block diagram of the first electronic device provided in the embodiments of this application;
[0062] Figure 8This application provides a schematic diagram of the structure of a server according to an embodiment of the present application.
[0063] Figure 9 A flowchart illustrating the application management method provided in this application embodiment;
[0064] Figure 10 A schematic diagram illustrating the contents of the description package of the shared library provided in this application embodiment;
[0065] Figure 11 This is a schematic diagram illustrating the contents of the shared library software package provided in the embodiments of this application;
[0066] Figure 12 A compilation diagram illustrating the shared library development process provided in this application embodiment;
[0067] Figure 13 A schematic diagram illustrating the generation of the software package for the application provided in this embodiment of the application;
[0068] Figure 14 A flowchart illustrating the application installation method provided in this application embodiment;
[0069] Figure 15 The module interaction diagram for application installation provided in the embodiments of this application;
[0070] Figure 16 A schematic diagram illustrating the operation of an application that depends on a shared library, provided as an embodiment of this application;
[0071] Figure 17 An interactive diagram illustrating the process of calling a shared library provided in an embodiment of this application;
[0072] Figure 18 A schematic diagram illustrating the operation of an application that depends on a shared library, provided as an embodiment of this application;
[0073] Figure 19 A schematic diagram illustrating the shared library update process provided in this application embodiment;
[0074] Figure 20 This is a schematic diagram of the shared library aging and cleanup process provided in an embodiment of this application;
[0075] Figure 21 Module interaction diagram for updating the shared library provided in the embodiments of this application;
[0076] Figure 22 This application provides a module interaction diagram for shared library aging cleanup in its embodiments.
[0077] Figure 23 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0078] Figure 24This is a schematic diagram of the server structure provided in an embodiment of this application. Detailed Implementation
[0079] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0080] The terms "comprising" and "having," and any variations thereof, used in the description of the embodiments of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0081] Hereinafter, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature.
[0082] In this application, the terms "exemplarily" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplarily" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0083] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. "And / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone.
[0084] As described in the background section, to reduce development difficulty and shorten the development cycle, pre-released development toolkits (IDEs) can be used to reduce the amount of content to be developed during application development. If an IDE supports a certain function, the application can directly call that part of the IDE during runtime, eliminating the need for developers to design program code to implement that function during application development. This helps reduce the workload of application development and improves development efficiency. The sources of IDEs include at least one of the following: software vendor releases, open-source organization releases, etc. The reliance on existing IDEs during application runtime can be achieved in two main ways:
[0085] In one implementation, the development kit (DKP) is embedded within the application. That is, the DKP is imported into the application's source code during application development, and then compiled to generate the application's software package. The DKP is distributed along with the application's software package and installed on a first electronic device along with the application. In response to an application execution command, the first electronic device switches the application from a stored state to a runtime state. The runtime application can run the binary source code within the DKP to implement the functionalities supported by the DKP.
[0086] In this scenario, the SDK is included within the application's software package, and the SDK's lifecycle completely overlaps with the application's lifecycle. The SDK version is updated with the application and removed when the application is uninstalled. The type and version of the SDK integrated into the application are determined by the application developers, and different applications may integrate the same SDK.
[0087] like Figure 1 As shown, three applications are installed on the first electronic device, and these three applications integrate existing development toolkits. For example, APP1 integrates SDK1, SDK2, and SDK3 versions 1.0; APP2 integrates SDK1, SDK2, and SDK3 versions 2.0; and APP3 integrates SDK1, SDK2, and SDK3 versions 3.0.
[0088] In this implementation, on the one hand, since each application's software package needs to carry its dependent development kits, multiple applications may integrate the same development kit, causing these duplicate development kits to occupy storage space in the first electronic device, resulting in unnecessary waste of storage space. On the other hand, for the same development kit integrated in multiple applications, the version of the development kit may be different in different applications. The development kit is bound to the application's software package and needs to be released together with the application's software package. The development kit cannot be upgraded independently, making version management of the development kit difficult.
[0089] In addition, to ensure the quality of the application's software package, it is necessary to review the application's code quality and security before listing it on an application distribution platform. Since the application's software package integrates a development kit (DKP), the application developer needs to manage the code and content quality of the DKP to avoid the application's software package being rejected by the application distribution platform due to DKP quality issues.
[0090] Due to the lack of quality control over SDK versions, integrating SDK source code into the application's software package can easily lead to security vulnerabilities, malicious behavior, privacy leaks, and other issues in the application's software package.
[0091] In another implementation, the runtime application dynamically loads system libraries to implement the corresponding functions. The application development phase declares the system libraries it needs to load, and the application compilation phase builds its own source code, without needing to package the system libraries into the application's software package. Optionally, the system libraries include multiple development toolkits. The operating system of the first electronic device provides the system libraries. After the application transitions from storage to runtime, the runtime application dynamically scans the file directories to obtain the system libraries, so as to call the system libraries to implement the corresponding functions. For example, the runtime application scans for dynamic libraries in a specified directory and loads the system libraries into the application's linked namespace. The runtime application then executes native calls to the system libraries.
[0092] like Figure 2 As shown, the first electronic device has three applications installed: APP-1, APP-2, and APP-3. All three applications include a system library loading declaration, "System.loadLibrary". The three applications can depend on the same system library, which does not need to be packaged into the application's software package. The runtime applications call the system library based on the system library loading declaration.
[0093] In this implementation, the type and version of the system libraries are related to the operating system, and these libraries are updated, added, or removed along with the operating system. Since the operating system version determines the types and versions of available system libraries, and applications depend on these libraries, the application version is strictly dependent on the operating system version. If the application version is incompatible with the operating system version, the application may fail to run due to the lack of the corresponding system libraries in the operating system. Furthermore, the system libraries are released with the operating system, resulting in a long update cycle and poor timeliness in fixing system library problems.
[0094] To address the aforementioned issues, this application proposes an application management method. A first electronic device, in response to an installation operation for a first application, obtains a first software package for the first application. In the absence of at least one shared library that the first application depends on, the first electronic device obtains at least one second software package based on the first software package. The shared library provides the development toolkit required for the first application to run. The first shared library is installed based on the at least one second software package, and the first application is installed based on the first software package. Optionally, at least one shared library refers to all shared libraries that the first application depends on.
[0095] This approach decouples the development kit (SDK) from the application's software package and operating system. On one hand, the shared library supports providing SSDs for multiple applications, allowing multiple applications to share the same shared library. Compared to integrating the SSD into the application's software package, this method helps reduce the size of the application's software package and avoids the situation where multiple applications' SSDs carry the same SSD, thus helping to save storage space in the primary electronic device.
[0096] On the other hand, shared library packages can be obtained independently, making SDK updates independent of operating system or application version updates. This support for independent updates to shared libraries helps to promptly provide new SDKs when issues arise with the SDKs within the shared library; in other words, it addresses problems with the original version of the SDK, thus improving the availability of the shared library.
[0097] Furthermore, in the solution provided in this application embodiment, since the shared library software package and the application software package are independent of each other, and the application software package does not include the shared library, the application developer is not responsible for the qualification testing process of the shared library. This approach avoids situations where problems with the shared library prevent the application from being listed on the app store, thus improving the ease of use of the shared library in applications.
[0098] For example, Figure 3 This is a schematic diagram of the application management system applied by the application management method provided in the embodiments of this application. For example... Figure 3 As shown, the application management system includes a first electronic device 100 and a first server 200.
[0099] In some embodiments, the first electronic device 100 may also be referred to as a terminal device, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, wireless communication device, user agent, or user device, etc. In the embodiments of this application, the first electronic device 100 may be a mobile phone, personal computer, tablet computer, computer with wireless transceiver function, smartwatch, smart bracelet, virtual reality (VR) first electronic device, augmented reality (AR) first electronic device, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical care, wireless terminal in smart grid, wireless terminal in transportation safety, wireless terminal in smart city, wireless terminal in smart home, vehicle-mounted terminal, roadside unit (RSU) with terminal function, etc.
[0100] Optionally, the operating system installed on the first electronic device 100 includes, but is not limited to, Alternatively, it can be another operating system capable of running applications to perform corresponding functions. For example, the operating system installed on the first electronic device 100 includes an application market, also known as an application distribution platform. The application market provides services such as downloading, installing, upgrading, and uninstalling shared libraries and applications. The first electronic device 100 allows users to obtain application packages and shared library packages from the application market.
[0101] In some embodiments, the first server 200 may be a device or server with computing capabilities, such as a cloud server or a network server. The server may be a single server, a server cluster consisting of multiple servers, or a cloud computing service center. The first server 200 may be a backend server with an application marketplace, providing services such as reviewing, uploading, and distributing installation packages for shared libraries and applications. For example, the first server 200 may be referred to as the cloud version of the application marketplace, or as an application distribution platform server.
[0102] Optionally, the first server 200 manages application software packages and shared library software packages. When the first electronic device 100 needs to install an application or shared library, the first electronic device 100 sends a request to the server 200, and the server 200 provides download information to the first electronic device 100. Based on the download information, the first electronic device 100 obtains the application installation package or shared library installation package from the first server so that the first electronic device 100 can subsequently install the application or shared library.
[0103] Optionally, the application management system further includes at least one of the following: a second electronic device 300 and a second server 400. The first electronic device 100 and the first server 200 included in the application management system participate in the user-side application management method; the first server 200, the second electronic device 300, and the second server 400 participate in the development-side application management method.
[0104] In some embodiments, the second electronic device 300 may be a computer device with software development capabilities. The second electronic device 300 includes, but is not limited to: mobile phones, tablets, laptops, smart screens, in-vehicle terminals, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), wearable devices, and artificial intelligence (AI) devices. The second electronic device 300 provides an integrated development environment (IDE), within which shared libraries or applications can be developed. The second electronic device 300 includes the software engineering of the application to be developed; compiling the software engineering generates the application's software package.
[0105] The second electronic device 300 is divided into two categories according to the different development entities: application development devices and shared library development devices. Application development devices are electronic devices used by application developers, while shared library development devices are electronic devices used by shared library developers.
[0106] Optionally, the application development device and the shared library development device can be different electronic devices, or they can be the same electronic device. For example, if application 1 and shared library 1 are developed by the same developer, then the application development device and the shared library development device are the same electronic device.
[0107] In some embodiments, the second server 400 is used to manage information related to at least one shared library. The second server 400 can be a device or server with computing capabilities, such as a cloud server or a network server. The server can be a single server, a server cluster consisting of multiple servers, or a cloud computing data center. The second server 400 is used to provide application developers with information related to the shared library during application development, so that developers can establish dependencies between the application and the shared library.
[0108] Optionally, the first server 200 and the second server 400 are the same server, which manages both the software packages and the descriptor packages of the shared library. The descriptor packages of the shared library are used to establish dependencies between the application and the shared library during application development. During application development, the application development device 320 obtains the descriptor packages of the shared library from the second server 400 and sets the integration dependencies between the application and the shared library based on these descriptor packages.
[0109] The shared library software package is used to install the shared library in the first electronic device 100 so that when the application runs in the first electronic device 100, it can call the development toolkit in the shared library.
[0110] Optionally, the first server 200 and the second server 400 are different servers. The first server 200 is used on the user side to provide software packages containing shared libraries for the first electronic device 100, while the second server 400 is used to provide description packages of shared libraries during application development.
[0111] Figure 4 This is an interactive schematic diagram of the application management system provided in this application embodiment. The various hardware devices included in the application management system are as follows: Figure 3 As shown. In this example, to improve the clarity of the description, Figure 3 The second electronic device 300 is divided into two electronic devices: a shared library development device 310 and an application development device 320.
[0112] like Figure 4 As shown, the shared library development device 310 is responsible for developing the shared library. After the shared library development is completed, the shared library development device 310 publishes the shared library description package to the second server 400 and the shared library software package to the first server 200.
[0113] During the application development process, the application development device 320 obtains the description packages of the shared libraries required for the application's operation from the second server 400, and generates a shared library identifier (the first identifier in the following embodiment) based on the description packages. The application's software package can carry this shared library identifier. After the application development is completed, the application development device 320 publishes the application's software package to the first server 200.
[0114] When the first electronic device 100 needs to download an application software package or a shared library software package, it obtains the corresponding software package from the first server 200.
[0115] In the process of implementing the application management method, the operation steps performed by each hardware device in the application management system, as well as the interaction between hardware devices, are completed through the software functions in the hardware devices. The functional modules included in the application management system are described below.
[0116] Figure 5 This is a schematic diagram of the functional modules of the application management system provided in an embodiment of this application. Figure 5 As shown, the application management system includes the following functional modules: tool module, component repository (package manager, PM), application distribution platform server, application distribution platform client, and operating system.
[0117] The tool module is a functional module within the second electronic device 400. The tool module provides developer tools to support developers in developing application software packages based on shared libraries and application software package specifications. Optionally, the tool module includes an IDE and compilation / build tools. The IDE is responsible for the application's software engineering management; the compilation / build tools are used to compile the application's software engineering to build the application's software package. For example, the compilation / build tools are also called debugging tools or compilation / packaging tools.
[0118] The component repository is Figure 4 The component repository, a functional module within the second server 400, is responsible for version management and dependency management of shared libraries. It assists developers in creating applications that depend on these shared libraries during the application development process.
[0119] The application distribution platform server is a functional module within the first server 200. The application distribution platform server includes an application shelf submodule and an application distribution submodule. The application shelf submodule is responsible for submitting, testing, reviewing, and uploading shared library software packages and application software packages; the application distribution submodule is responsible for distributing the latest versions of shared library software packages and application software packages to the first electronic device 100.
[0120] The application distribution platform client is a functional module in the first electronic device 100. The application distribution platform client includes an application query submodule, an application download submodule, an application installation submodule, an application upgrade submodule, and a lifecycle management submodule.
[0121] The system comprises the following modules: a query submodule to retrieve the application's software package and shared library identifier from the application distribution platform server; an application download submodule to download the application's installation package and the shared library's software package from the application distribution platform server; an application installation submodule to call the operating system's installation module to install the corresponding application based on its software package and the corresponding shared library based on its software package; an application upgrade submodule to detect the versions of the application and shared libraries and download and install the new versions of the application or shared libraries; and a lifecycle management submodule to manage the aging of shared libraries. For example, if a shared library in the first electronic device is not depended upon by any application, the lifecycle management submodule calls the operating system's software management module to uninstall the shared library.
[0122] The operating system is included in the first electronic device 100. The operating system includes a package management module, which is responsible for installing and managing application packages and shared library packages.
[0123] For easier understanding, please refer to Figure 6 , Figure 6 A schematic diagram of the electronic device is shown. This electronic device is... Figure 3 The first electronic device 100 and / or the second electronic device 300 are described below. The first electronic device 100 will be used as an example for explanation. Figure 6 As shown, the first electronic device 100 may include a processor 110, a memory 120, a communication module 130, and a display screen 140.
[0124] Processor 110 may include one or more processing units. For example, 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). Different processing units may be independent devices or integrated into one or more processors.
[0125] Memory 120 includes external memory and internal memory. The internal memory can be used to store executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of the first electronic device 100 by running the instructions stored in the internal memory. The internal memory may include a program storage area and a data storage area. Memory 120 may be located within processor 110 and is used to store instructions and data. External memory refers to a memory card connected to the first electronic device 100 via an external memory interface.
[0126] The communication module 130 is used to implement the communication function of the first electronic device 100. Optionally, the communication module 130 includes functional modules such as an antenna, a mobile communication module, a wireless communication module, a modem processor, and a baseband processor. Optionally, at least some of the functional modules of the mobile communication module can be housed within the processor. The wireless communication module is used to support the first electronic device in wireless communication.
[0127] The first electronic device 100 implements display functions through functional modules such as a GPU and a display screen 140. The display screen 140 is used to display images, videos, etc. In some embodiments, the first electronic device 100 may include one or N display screens 140, where N is a positive integer greater than 1. The GPU and the display screens 140 can be used to support the first electronic device 100 in displaying interactive interfaces of system tools or third-party applications, wherein the interactive interface displays an interactive interface generated by a running application.
[0128] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the first electronic device 100. In other embodiments of this application, the first electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0129] In some embodiments, the software system of the first electronic device 100 adopts a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered HarmonyOS system as an example to exemplify the software structure of the first electronic device 100.
[0130] Figure 7 This is a software structure block diagram of a first electronic device according to an embodiment of this application. The first electronic device is... Figure 3The first electronic device 100 in the system. The layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the TS (arkts runtime) runtime and system libraries, and the kernel layer.
[0131] The application layer can include a series of application packages. For example... Figure 7 As shown, the application layer includes Figure 5 The example shown includes an application query submodule, an application download submodule, an application installation submodule, an application upgrade submodule, a lifecycle management submodule, and a package management module. In this embodiment, the application store, shared library, and first application are all located at the application layer.
[0132] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications within the application layer. The application framework layer includes predefined functions. As shown in the diagram, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0133] The window manager is used to manage window applications. It can obtain the screen size, determine if a status bar is present, lock the screen, and capture screenshots, among other things.
[0134] Content providers are used to store and retrieve data, and make that data accessible to applications. This data may include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, etc.
[0135] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0136] The phone manager is used to provide communication functions for the first electronic device 100. For example, it manages call status (including connection, hang-up, etc.).
[0137] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0138] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0139] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0140] The Surface Manager is used to manage the display subsystem and provides the fusion of two-dimensional (2D) and three-dimensional (3D) layers for multiple applications.
[0141] The media library supports playback and recording of various commonly used audio and video formats, as well as still image files. It supports multiple audio and video coding formats, such as: Moving Picture Experts Group 4 (MPEG4), Advanced Video Coding (H.264), Moving Picture Experts Group Audio Layer III (MP3), Advanced Audio Coding (AAC), Adaptive Multi Rate (AMR), Joint Photographic Experts Group (JPG), and Portable Network Graphics (PNG).
[0142] 3D graphics processing libraries are used to implement 3D graphics drawing, image rendering, compositing, and layer processing. 2D graphics engines are drawing engines for 2D graphics.
[0143] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0144] For example, Figure 8 The server structure is shown. This server corresponds to... Figure 3The first server is 200 and / or the second server is 400. For example... Figure 8 As shown, the server includes at least one processor 801, a communication line 802, a memory 803, and at least one communication interface 804. The memory 803 may also be included within the processor 801.
[0145] The processor 801 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present application.
[0146] The communication line 802 may include at least one path for transmitting information between the aforementioned components.
[0147] The memory 803 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 803 may exist independently and be connected to the processor 801 via communication line 802. The memory 803 may also be integrated with the processor 801.
[0148] The memory 803 stores computer execution instructions for implementing the solutions of this application, and its execution is controlled by the processor 801. The processor 801 executes the computer execution instructions stored in the memory 803, thereby implementing the application management method provided in the following embodiments of this application.
[0149] A communication interface 804 is used for communicating with other devices. In this embodiment, the communication interface 804 may be a module, circuit, bus, interface, transceiver, or other device capable of implementing communication functions. Optionally, when the communication interface 804 is a transceiver, the transceiver may be a separately configured transmitter used to send information to other devices, or it may be a separately configured receiver used to receive information from other devices. The transceiver may also be a component that integrates sending and receiving information functions; this embodiment does not limit the specific implementation of the transceiver.
[0150] Optionally, the computer execution instructions in the embodiments of this application may also be referred to as application code, instructions, computer program or other names, and the embodiments of this application do not specifically limit them.
[0151] In a specific implementation, as one example, the processor 801 may include one or more CPUs, for example... Figure 8 CPU0 and CPU1 in the example. In a specific implementation, as one embodiment, server 200 may include multiple processors, such as... Figure 8 Processors 801 and 807 are mentioned. Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. Here, "processor" can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).
[0152] It is understood that the embodiments illustrated in this application are as follows: Figure 7 The structure does not constitute a specific limitation on the implementation of the server structure. In other embodiments of this application, the server may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0153] The application management method provided in this application will be specifically described below using an application management system as the implementing entity. The application management method of the application management system mainly includes two parts: the development side and the application side. For ease of understanding, the overall scheme will be introduced first, followed by step-by-step implementation examples to describe the implementation details of this method on the development side and the application side.
[0154] Please refer to the following: Figure 9 , Figure 9 This is a flowchart illustrating the application management method provided in an embodiment of this application. Figure 9 As shown, the execution subject of this method includes Figure 4The system includes a first server 200, a shared library development device 310, an application development device 320, and a second server 400. The application management method provided in this application embodiment may include steps S910 to S970.
[0155] Step S910: Develop a shared library using the shared library development equipment.
[0156] The shared library provides the runtime resources required for the application to run. Optionally, runtime resources include, but are not limited to, binary files such as library files and development toolkits (DMPs) used to implement preset functions. In some embodiments, the shared library cannot run independently in the first electronic device; it is invoked by the application when triggered in the first electronic device. Optionally, applications that depend on the shared library need the support of the shared library to run smoothly; if the shared library that the application depends on is not installed in the first electronic device, the application cannot run. For example, when an application in the first electronic device transitions from a stored state to a running state, the application invokes a DMP from the shared library.
[0157] For example, the development toolkit includes a third-party SDK. The shared library includes a collection of library files, the third-party SDK, and an interface for calling the development toolkit. Different library files and development toolkits are called through different interfaces. The types and number of library files and development toolkits included in the shared library are designed by the shared library developer and are not limited herein.
[0158] In some embodiments, the shared library provided in this application is an inter-application shared library. The lifecycle of the shared library in the first electronic device is not bound to the lifecycle of the application, and the first electronic device can independently acquire, update, and delete the shared library. After a shared library is installed in the first electronic device, multiple applications can share the shared library, such as multiple applications being able to call the development toolkit in the shared library.
[0159] For example, if application 1, application 2, and application 3 in the first electronic device all require the use of development toolkit 1 during operation, and shared library 1 includes development toolkit 1, then application 1, application 2, and application 3 can all call development toolkit 1 from shared library 1. This ensures that only one instance of the same shared library is stored in the first electronic device, helping to avoid duplicate storage of shared libraries within the first electronic device.
[0160] Optionally, the shared library can be developed by any open-source team or company. The shared library development device is the device used by the shared library's developers. After the shared library development is complete, the shared library development device can send the shared library's software package to a first server, which then provides the shared library's software package to a first electronic device, allowing the first electronic device to install the shared library's software package.
[0161] In one example, the shared library development device supports an IDE, and the shared library is developed within the IDE. Exemplarily, during the shared library development process, developers perform development operations based on the shared library development specifications. Based on these operations, the shared library development device creates a software engineering file set for the shared library, which is then compiled to generate the shared library's software package and description package. The generation process of the shared library's description package is described below in step S920, and the generation process of the shared library's software package is described in step S930.
[0162] In step S920, the shared library development device sends the description packet of the shared library to the second server.
[0163] The shared library descriptor package is used to assist in the development of applications that depend on the shared library. An application that depends on the shared library is one that needs to call the development toolkits within the shared library during runtime. Optionally, the shared library descriptor package is used during application development, but the user's primary electronic device is unaware of it. For example, application developers can locate the shared library through the description file in the shared library descriptor package, thus establishing the dependency relationship between the application and the shared library during application development.
[0164] Optionally, the application is a program software used to implement corresponding functions in the first electronic device. The application can implement the corresponding functions through user interaction. The application can be a third-party application or a native application of the operating system. For example, the types of applications include, but are not limited to: video applications, image applications, social applications, shopping applications, game applications, office assistance applications, etc. The type of application is determined according to business needs, and this application does not limit it.
[0165] The second server is the backend server for the component repository, which is a repository for storing development components such as shared libraries. The component repository is also called a remote component repository or a central repository. Optionally, the component repository stores the description package of at least one shared library. For example, the component repository also stores the software package of at least one shared library.
[0166] During application development, application developers access a second server through the application development device to obtain auxiliary program code required for the application development process from the component repository.
[0167] In some embodiments, the description package of a shared library includes a description file for identifying the shared library. Optionally, the description package of a shared library includes at least one of the following: coordinate information, a description file, and dependency information.
[0168] The coordinate information indicates the storage location of the shared library's descriptor package within the component repository. Optionally, the shared library's coordinate information includes the storage coordinates of the shared library's package within the component repository. These storage coordinates represent the access path of the shared library's descriptor package within the component repository. The shared library's package can be retrieved from the component repository using these storage coordinates. For example, the coordinate information of a shared library might be: "@accxxxxkit":"1.0.1". Here, the coordinates "@accxxxxkit":"1.0.1" represent the name "accxxxxkit" and the version number 1.01.
[0169] In one example, during the compilation process of generating the shared library's description package, the shared library development device specifies that coordinate information can be included in the shared library's description package. After uploading the shared library's description package to the component repository, the component repository retrieves the coordinate information from the shared library's description package. If the coordinates are not occupied, the component repository stores the shared library's description package; if the coordinates are occupied, the component repository generates and sends a prompt message to the shared library development device, indicating that the shared library's description package upload failed. In this case, the shared library development device re-specifies the coordinate information and repeats the above steps until the shared library's description package is successfully uploaded.
[0170] In one example, during the compilation process of generating a shared library package, the shared library development device specifies the coordinate information of the shared library package, which can be included in the shared library package. After uploading the shared library package to the component repository, the component repository obtains the coordinate information from the shared library package. If the coordinates are not occupied, the component repository stores the shared library package; if the coordinates are occupied, the component repository generates and sends a notification message to the shared library development device, indicating that the shared library package upload failed. In this case, the shared library development device re-specifies the coordinate information and repeats the above steps until the shared library package is successfully uploaded.
[0171] In another example, the coordinate information is generated by a second server. The shared library development device requests the coordinate information from the second server, which generates and sends the coordinate information to the shared library development device. The shared library development device then adds the coordinate information to the shared library's description package. Subsequently, the shared library development device sends the shared library's description package to the second server. The second server stores the shared library's description package according to the aforementioned coordinate information.
[0172] For example, the second server also stores the shared library software package according to this coordinate information. That is, the description package of the shared data or the shared library software package can be obtained from the second server using the coordinate information. By uploading the shared library software package to the second server, it is convenient to debug the application's ability to call the shared library during application development.
[0173] The description file is used to identify the shared library, distinguishing it from other shared libraries. For example, the description file is the module.json file within the description package of the shared library. Optionally, the description file includes at least one of the following: the shared library's package name, module name, version information, and package type.
[0174] For example, the bundle name (bundName) indicates the name of the shared library; different shared libraries have different bundle names. The module name (moduleName) identifies the module name of the shared library. The version information (versionCode) indicates the version of the shared library. The bundle type (bundType) indicates the type of the bundle. For shared libraries, the bundle type is: shared.
[0175] In one example, the description file includes the package name, module name, version information, and package type; specifically, it includes the following: package name "bundName":"com.xxx.id"; module name "moduleName":"accxxxxkit"; shared library version information "versionCode":"100001"; package type "bundType":"shared".
[0176] like Figure 10 As shown, the description package of the shared library accxxxxkit includes: the coordinate information of the shared library 1010 and the description file 1020.
[0177] Optionally, dependency information is used to indicate at least one upper-level shared library that the shared library depends on. For example, in addition to including at least one development kit, the shared library may also indicate other shared libraries referenced by the shared library through dependency information. The referenced shared library is the upper-level shared library of the shared library. For instance, if the dependency information included in the descriptor package of shared library 1 is used to indicate shared library 2, then shared library 2 is the upper-level shared library of shared library 1.
[0178] In one example, the dependency information includes the coordinates of at least one upper-level shared library. In another example, the dependency information includes the description file of at least one upper-level shared library.
[0179] In some embodiments, in response to a description package generation operation, the application development device compiles the software engineering of the shared library and generates a description package for the shared library. The application development device sends the description package of the shared library to a component repository. Upon receiving the description package of the shared library, the component repository stores the description package of the shared library.
[0180] Optionally, the component repository obtains the coordinate information of the shared library's description package through the description package of the shared library; the component repository then generates a shared library document based on the coordinate information of the shared library's description package. The shared library document records the coordinates of at least one shared library's description package within the component repository. For example, the shared library document includes the shared library's identification information and the coordinate information of the shared library's description package.
[0181] In one example, upon receiving the description package of the first shared library, the component repository updates the shared library document based on the coordinate information of the first shared library description package. For instance, the second server adds the coordinate information of the first shared library description package to the shared library document, resulting in the updated shared library document.
[0182] In this way, the descriptor packages of shared libraries stored on the second server can be located using coordinate information. Once the shared library is developed and an application that depends on it needs to be developed, the application developer can find the coordinate information of the required descriptor package through the shared library documentation. Based on this coordinate information, the developer can quickly retrieve the shared library descriptor package from the second server. Compared to the method of searching through all shared library descriptor packages on the second server, this method, which directly indicates the coordinate information of the required shared library descriptor package, helps to improve the efficiency of retrieving the shared library descriptor package.
[0183] In step S930, the shared library development device sends the shared library software package to the server.
[0184] The shared library's software package includes the resources required to run the shared library. Optionally, the shared library's software package includes at least one of the following: resource files, binary files, and description files. The resource files and binary files contain the program code corresponding to the development toolkit, and the description file is used to identify the shared library. Please refer to the above embodiment for details regarding the shared library.
[0185] like Figure 11 As shown, the package containing the shared library accxxxxkit includes a description file 1110: module.json.
[0186] The following example, using the first server as the application distribution platform server and the second server as the component repository, illustrates the process of publishing a shared library. Figure 12 As shown, the project directory of the shared library accxxxxkit stores files included in the software project file set. Compiling this software project file set generates the shared library's description package "accxxxxkit.har" and the shared library's software package "accxxxxkit.app". Subsequently, the shared library development device sends the shared library's description package "accxxxxkit.har" to the component repository and the shared library's software package "accxxxxkit.app" to the server.
[0187] After the server receives the shared library software package, the server stores the shared library software package so that if the first electronic device requests to download the shared library software package, the server can return the download information of the shared library software package to the first electronic device.
[0188] It should be noted that there is no time restriction between steps S920 and S930; step S920 can be executed before step S930, step S920 can be executed after step S930, and steps S920 and S930 can also be executed simultaneously.
[0189] In some embodiments, the development process of the shared library is completed when the shared library description package is sent to the second server and the shared library software package is sent to the first server. Optionally, the shared library development device may also send the shared library software package to the second server. Subsequently, the application development device can obtain the shared library description package and software package from the component repository to develop applications that depend on the shared library. The first electronic device can obtain the shared library software package from the server so that it can call the shared library during the runtime of the application in the first electronic device. Optionally, the shared library development device and the application development device are the same electronic device.
[0190] This embodiment generates a shared library software package and a shared library description package, eliminating the need for the shared library to be integrated into the application's software package or bound to the operating system. This decouples the development toolkit in the shared library from the application's software package and the operating system. This approach helps reduce the size of application software packages that depend on the shared library, thus saving storage space in the first electronic device.
[0191] On the other hand, the shared library's software packages are stored on a server, allowing for flexible access and improving the flexibility of the first electronic device in using and updating the shared library.
[0192] The development process of a first application that depends on a shared library is described below through the embodiments in steps S940-S970. It should be understood that the shared library depended upon by the first application includes at least one of the following two types: a first shared library and a third shared library. The first shared library is a shared library that the first application directly depends on. Optionally, the first shared library is configured by the application developer in the first application software project during the development process of the first application. The third shared library is a shared library that the first application indirectly depends on. For each third shared library, it is a higher-level shared library than at least one first shared library. Optionally, the third shared library can be determined through the dependency information in the description package of the first shared library.
[0193] Step S940: The application development device acquires at least one first description package.
[0194] The application development equipment is used to develop the first application. Optionally, the application development equipment is equipped with an integrated development environment (IDE) in which the application developers develop the software engineering file set for the first application.
[0195] Wherein, the first description package is the description package of the first shared library, and each first shared library corresponds to one first description package. Optionally, the first shared library is a shared library that the first application depends on. After the first application is developed, the first shared library is used to provide a development toolkit for the operation of the first application. For example, the first shared library is a shared library that the first application directly depends on.
[0196] In some embodiments, the application development device acquires at least one first description package, including: for each of the at least one first description package, the application development device acquires the first description package in response to an operation of developing a first application. Optionally, the application development device acquires coordinate information of the first description package in response to an operation of developing a first application; the application development device acquires the first description package from a second server based on the coordinate information of the first description package. The second server includes a component repository, which stores and manages the description packages of the shared library. Exemplarily, the application development device can also acquire a first software package based on location information, where the first software package and the first description package correspond to the same shared library.
[0197] Optionally, the operations for developing the first application are used to edit the software engineering file set of the first application. For example, the operations for developing the first application include: operations indicating coordinate information of the first description package. For instance, the operations for developing the first application can be implemented as input operations for the coordinate information of the first description package.
[0198] As described in the above embodiments, the shared library document is used to record the coordinate information of the shared library's descriptor package in the component repository. In one example, the application development device performs a search operation based on the shared library document to obtain the coordinate information of the first descriptor package. For example, the application developer inputs the identifier information of the shared library; the application development device searches for the coordinate information of the first descriptor package in the shared library document based on the identifier information of the shared library. After obtaining the coordinate information of the first descriptor package, the application developer inputs the location of the first descriptor package to realize the operation of developing the first application. The identifier information of the shared library includes, but is not limited to: the package name, module name, and version information of the shared library.
[0199] In some embodiments, the application development device obtains the first description package from the second server based on the coordinate information of the first description package, including: after obtaining the coordinate information of at least one first description package, the application development device adds the coordinate information of at least one first description package to the configuration file of the development state first application; when the software engineering file set of the application is triggered to be compiled, the application development device obtains at least one first description package from the second server based on the configuration file.
[0200] Optionally, the configuration file is used to indicate at least one first shared library that the first application depends on. For example, the configuration file is a file named "oh-package.json5" in the software project of the first application. For example, the configuration file includes coordinate information of the first descriptor packages of each of the at least one first shared library. For instance, if the first application depends on three first shared libraries, and the descriptor packages of the three first shared libraries each have coordinate information of position 1, position 2, and position 3, then the application development device generates a configuration file including positions 1, 2, and 3.
[0201] Optionally, in response to a software package compilation operation, the application development device reads the coordinate information of at least one first description package from a configuration file; and then obtains at least one first description package from a second server using the coordinate information. The first description package indicates the description package of a first shared library. For example, the application development device can also obtain the software package of the shared library corresponding to at least one first description package from a component repository using the coordinate information, so as to test whether the first application can successfully call the shared library during runtime during the development of the first application.
[0202] In some embodiments, the application development device generates a first software package of a first application based on a first description package, the first software package including a first identifier. The process is described below using a component repository as an example of a second server implementation. Exemplarily, the application development device reads the coordinate information of at least one first description package from a configuration file, generates a description package retrieval request based on the coordinate information of the at least one first description package, sends the description package retrieval request to the component repository, and the component repository sends at least one first description package to the application development device based on the description package retrieval request. Exemplarily, the description package retrieval request carries the coordinate information of at least one first description package.
[0203] In step S950, the application development device obtains a first identifier based on at least one first description packet.
[0204] The first identifier indicates at least one shared library that the first application depends on for execution. This at least one shared library represents all shared libraries that the first application depends on for execution. Optionally, the at least one shared library may include the first shared library. Furthermore, the at least one shared library may also include a third shared library. If the first application depends on multiple shared libraries, the at least one shared library indicated by the first identifier can be multiple non-overlapping shared libraries. Here, "multiple" refers to two or more.
[0205] For ease of description, all shared libraries that the first application depends on are also referred to as the second shared library. That is, in the embodiments of this application, at least one shared library and the second shared library have the same meaning, and the first identifier is used to indicate the second shared library.
[0206] In some embodiments, the second shared library includes the first shared library. Optionally, if the first shared library does not depend on an upper-level shared library, the second shared library is the first shared library. Optionally, if the first shared library depends on an upper-level shared library, the second shared library includes the first shared library and at least one other shared library besides the first shared library. Exemplarily, the second shared library also includes a third shared library, which is an upper-level shared library that the first shared library depends on.
[0207] In some embodiments, the first identifier includes a first sub-identifier corresponding to each of at least one shared library. The first sub-identifier corresponding to a particular shared library is used to identify that shared library. Optionally, the first identifier can indicate a first shared library. For example, when a second shared library includes the first shared library, the first identifier includes a first sub-identifier corresponding to the first shared library.
[0208] Optionally, the first sub-identifier corresponding to the shared library includes at least one of the following: the package name, module name, version information, and package type of the shared library. For example, the first identifier corresponding to the shared library includes the package name, module name, version information, and package type of the shared library. By including version information and package name in the first sub-identifier, a shared library with a specific name and version can be identified based on the first identifier, which helps to distinguish multiple versions of shared libraries with the same package name.
[0209] In some embodiments, the application development device obtains a first identifier based on at least one first description package, including: the application development device determines a second shared library based on at least one first description package; for each shared library in the second shared library, the application development device generates a first sub-identifier for indicating the shared library based on the description file of the shared library; the first identifier includes at least one first sub-identifier.
[0210] Optionally, the first identifier includes a first sub-identifier corresponding to each of the second shared libraries.
[0211] As described in the above embodiments, the description package of a shared library includes not only a description file indicating the shared library itself, but also dependency information indicating upper-layer shared libraries. Therefore, an application development device can obtain one or more shared libraries based on the description package of a shared library. For example, the application development device can obtain q shared libraries based on p first description packages, where q shared libraries are all the shared libraries that the first application depends on, p is a positive integer, and q is a positive integer greater than or equal to p.
[0212] Optionally, the application development device determines the second shared library based on the first description package, including: for any one of the at least one first description package, the application development device obtains a description file based on the first description package; the application development device determines a first shared library based on the description file; if the first description package includes dependency information, the application development device obtains at least one third shared library that the first shared library depends on based on the dependency information; after processing all the first description packages through the above steps, the application development device obtains at least one first shared library. Exemplarily, the application development device can also obtain at least one third shared library. Subsequently, the application development device determines the second shared library based on the at least one first shared library and the at least one third shared library.
[0213] For example, the application development device performs deduplication processing on p first shared libraries and t third shared libraries to obtain at least one of the aforementioned shared libraries, where p is a positive integer and t is a natural number. The deduplication process is used to retain only one of the duplicate first or third shared libraries.
[0214] For example, based on p first description packages, the application development device can obtain p first shared libraries and t third shared libraries, where p + t = q.
[0215] In one example, the application development device obtains a shared library dependency tree based on at least one first description package; the application development device then determines a second shared library based on the shared library dependency tree. The shared library dependency tree represents the dependencies between at least one shared library, with the first shared library being a leaf node and the third shared library being a parent node.
[0216] For example, for each of at least one first description package, the application development device determines a first shared library based on the first description package; the application development device uses the first shared library as the first node in the shared library dependency tree, and the first node is a leaf node in the shared library dependency tree; if the dependency information in the first description package indicates that the first shared library has a dependent third shared library, the application development device uses the third shared library as the second node in the shared library dependency tree, wherein the second node is the parent node of the first node.
[0217] In one example, if the first shared library has a third shared library, the application development device determines whether the shared library dependency tree includes a node corresponding to the third shared library. If a node corresponding to the third shared library exists in the shared library dependency tree, it is not necessary to recreate that node. If a node corresponding to the third shared library exists in the shared library dependency tree, the application development device performs the step of adding the third shared library as the second node in the shared library dependency tree.
[0218] When a third shared library has dependencies on a higher-level shared library, the application development device designates that higher-level shared library as the third node in the shared library dependency tree, with the third node being the parent node of the second node. Subsequently, the application development device designates this higher-level shared library as the third shared library and repeats the step of "when the third shared library has dependencies on a higher-level shared library, the application development device designates this higher-level shared library as the third node in the shared library dependency tree" until the third shared library no longer depends on any other higher-level shared libraries.
[0219] Subsequently, the application development device selects a new first description package from at least one first description package. Based on the new first description package, the application development device obtains a new first shared library. If there is no node corresponding to the new first shared library in the shared library dependency tree, the application development device repeats the process starting from the step of "setting the first shared library as the first node in the shared library dependency tree".
[0220] If a node corresponding to the new first shared library exists in the shared library dependency tree, the application development device re-executes the step of selecting a new first descriptor package from at least one first descriptor package until at least one first descriptor package has been selected once. After traversing at least one first descriptor package in the above manner, the application development device determines the second shared library based on the shared library dependency tree.
[0221] Optionally, the second shared library includes the shared library corresponding to each node in the shared library dependency tree.
[0222] In this way, a shared dependency tree is constructed using the first description package, and the second shared library is determined based on the shared library dependency tree. On the one hand, this accurately identifies all the shared libraries required for application operation, avoiding the impact of missing essential shared libraries on application performance. On the other hand, the process of generating the shared library dependency tree removes duplicate shared libraries, helping to prevent duplicate shared libraries from appearing in at least one shared library indicated by the first identifier. This avoids the first electronic device downloading the same shared library package multiple times based on the first identifier, thus reducing the waste of storage space in the first electronic device.
[0223] For example, the application development device constructs a shared library dependency tree starting from description package 1 in at least one first description package. For first description package 1, the application development device identifies a first shared library 1 through the description file in the first description package, and designates first shared library 1 as node 1 in the shared library dependency tree, with node 1 being a leaf node. The application development device obtains third shared library 1 and third shared library 2 through the dependency information in the first description package. The application development device designates third shared library 1 as node 2 in the shared library dependency tree, third shared library 2 as node 3 in the shared library dependency tree, and designates nodes 2 and 3 as the parent nodes of node 1. If the third shared library depends on third shared library 3, the application development device designates third shared library 3 as node 4, and node 4 as the parent node of node 2.
[0224] In some embodiments, after the second shared library is determined, the application development device generates a first identifier based on the description file corresponding to the second shared library.
[0225] Optionally, the description file corresponding to the second shared library includes the identification information of the second shared library. For example, the description file corresponding to the second shared library is obtained from the second description package. For example, when the second shared library includes multiple shared libraries, each shared library corresponds to a different description file. The second description package is a description package of the second shared library, and the second description package includes the first description package.
[0226] Optionally, the description file corresponding to the first shared library is obtained from the description file of the first description package, and the description file corresponding to the third shared library is obtained through the dependency information in the first description package.
[0227] In some embodiments, when the second shared library includes multiple shared libraries, the first identifier includes multiple first sub-identifiers. The first sub-identifiers are used to indicate different shared libraries within the second shared library, with each second shared library corresponding to one first sub-identifier.
[0228] In some embodiments, the application development device generates a first identifier based on the description file corresponding to the second shared library, including: for each shared library in the second shared library, the application development device generates a first sub-identifier for indicating the shared library based on the description file of the shared library; the application development device generates a first identifier based on multiple first sub-identifiers.
[0229] Optionally, the application development device obtains the description file of the first shared library from the first description package; and generates a first sub-identifier corresponding to the first shared library based on the description file of the first shared library. For example, the first description package includes the description file of the first shared library, and the application development device obtains the description file of the first shared library by searching for its filename in the first description package.
[0230] Optionally, if the first description package includes dependency information, the application development device obtains the description file of the third shared library based on the dependency information; the application development device generates the first sub-identifier corresponding to the third shared library based on the description file of the third shared library.
[0231] For example, the application development device generates a first sub-identifier corresponding to at least one third shared library based on the dependency information, including: the application development device obtaining a description file of at least one third shared library based on the dependency information; and the application development device generating a first sub-identifier corresponding to at least one third shared library based on the description file of at least one third shared library.
[0232] In one possible implementation, the description package of the shared library is stored in a shared repository supported by the second server, and the dependency information includes the coordinate information of at least one second description package in the component repository; the application development device obtains at least one description package from the component repository based on the coordinate information of at least one description package; for each shared library in at least one second shared library, the application development device obtains the description file of the shared library from the description package of the shared library; the application development device generates a first sub-identifier corresponding to the second shared library based on the description file of the shared library.
[0233] In another possible implementation, the dependency information includes a description file of at least one third shared library; the application development device generates a first sub-identifier corresponding to the third shared library based on the description file of the third shared library.
[0234] In some embodiments, after determining the first sub-identifier corresponding to each of the at least one shared library, the application development device generates a first identifier based on the first sub-identifier corresponding to each of the at least one shared library. Optionally, the application development device uses a set of at least one first sub-identifier as the first identifier.
[0235] After generating the first identifier, the application development device adds the first identifier to the software engineering file set of the first application. For example, the application development device adds the first identifier to a configuration file in the software engineering file set. The first identifier is also called a dependency configuration list.
[0236] In step S960, the application development device generates a software package for the first application based on the first identifier.
[0237] After the first application is developed, the application development device responds to the compilation operation by generating a software package for the first application based on the software engineering file set of the first application. In some embodiments, the software package of the first application includes a first identifier.
[0238] like Figure 13 As shown, the process of generating the software package for the first application includes the following steps:
[0239] 1. Locate the descriptor package of the shared library.
[0240] For the first application video that depends on the shared library accxxxxkit, during the development of the software package of the first application video, the application developer sets the configuration file oh-package.json5 in the software project file set 1310 of video through the application development device. The configuration file oh-package.json5 includes the coordinate information of the description package of the shared library accxxxxkit in the component repository.
[0241] like Figure 13 As shown in 1312, the configuration file oh-package.json5 includes the coordinate information of the package description for the shared library accxxxxkit: @accountkit":"1.0.1".
[0242] like Figure 13 As shown, the shared library's description package 1320 is stored in the component repository. When the application development device compiles and builds the software engineering file set of the first application video, the application development device downloads the shared library's description package accxxxxkit.har from the component repository using the compilation and build tool based on the configuration file oh-package.json5.
[0243] The build tools obtain all the shared libraries that the first application, video, depends on by parsing the shared library description package accxxxxkit.har.
[0244] 2. Compile and build the application software package.
[0245] 3. Obtain and parse the description package of the shared library from the component repository to generate the first identifier.
[0246] like Figure 13 As shown, the compilation and packaging tool determines the first sub-identifier 1331 corresponding to the shared library accxxxxkit based on the description package 1320. Specifically, it is: "bundType":"shared", "bundName":"com.hw.id", "moduleName":"accountkit", "versionCode":10000001. The compilation and build tool adds the first identifier including this first sub-identifier 1331 to the configuration file 1330 of the first application video, and packages the configuration file 1330 into the software package 1332 of the first application video. During the development of the first application, the software package of the first application video implements the dependency integration of the accxxxxkit shared library.
[0247] After the first electronic device obtains the software package 1332 of the first application video, the first electronic device obtains the shared library software package 1340 corresponding to the shared library accxxxxkit that the first application depends on, based on the first identifier included in the software package 1332 of the first application video.
[0248] In step S970, the application development device sends the first software package of the first application to the first server.
[0249] After the software package for the first application is developed, the first server receives and stores the first software package for the first application. Based on the software package for the first application, the first server retrieves the shared library metadata corresponding to the first application.
[0250] The shared library metadata corresponding to the first application is used to indicate the acquisition information of at least one shared library that the first application depends on. Optionally, for each shared library, the shared library metadata includes at least one of the following: the shared library's package name, version information, download information, verification information, and package size.
[0251] The download information indicates the download address of the shared library's software package. The verification information verifies the shared library's software package to avoid issues such as packet loss or errors during download. The package size indicates the storage space required by the shared library's software package.
[0252] Optionally, the first server obtains a first identifier based on the software package of the first application; for each first sub-identifier included in the first identifier, the first server obtains the storage location of the software package of the shared library based on the first sub-identifier, so as to generate download information based on the storage location; the first server obtains shared library metadata based on the first sub-identifier and the download information of the software package of the shared library.
[0253] For example, the first sub-identifier includes the package name of the shared library, and the first server obtains the package name of the shared library from each of the first sub-identifiers. Then, the first server finds the download address of the shared library's software package based on the package name. If the first server stores multiple software packages with the same package name, the first server obtains the version information of the shared library based on the first sub-identifier; the first server selects a first version software package from the multiple software packages based on the version information. The first version is the version indicated by the version information. Then, the first server obtains the download address of the first version software package.
[0254] When the application's software package and the shared library's software package are independent, a first identifier is generated using the shared library's description file and carried in the application's software package, establishing a dependency relationship between the application and the shared library. By indicating the first identifier in the application's software package, on the one hand, third-party SDKs are not required, helping to reduce the application's software package size; on the other hand, by indicating the shared libraries the application depends on, the first electronic device can pre-install the shared libraries that the application depends on before running the application, thus ensuring the application's normal operation.
[0255] Furthermore, since the application's software package does not include the source code of third-party SDKs, the server's compliance checks on the application's software package will not result in situations where the application's software package cannot be released due to quality issues with third-party SDKs. Separating the application's software package from third-party SDKs helps reduce the difficulty for application developers in managing the quality of the application's software package code, and helps improve application development efficiency.
[0256] After the application software package and the shared library software package are uploaded to the first server, the first server provides the application software package and / or the shared library software package to the first electronic device. Since the inter-application shared library provided in this embodiment has an independent software package, the application management method on the first electronic device side supports scenarios such as installation, operation, upgrade, and aging-out of the shared library. Several embodiments are described below to illustrate these scenarios.
[0257] Please refer to the following: Figure 14 , Figure 14 This is a flowchart illustrating the application management method provided in an embodiment of this application. Figure 14 As shown, the execution subject of this method includes Figure 3 The method includes a first electronic device 100 and a first server 200. The method may include the following steps:
[0258] In step S1410, the first electronic device obtains the first software package from the first server.
[0259] The first software package is used to install the first application in the first electronic device, and the first software package is the software package of the first application.
[0260] For example, the first software package is the latest version of the first application software package. The first server is responsible for managing the software packages corresponding to each version of the first application. When the first application needs to be installed, the first electronic device obtains the latest version of the first application software package from the first server. By obtaining the latest version of the application software package, it helps to avoid frequent updates of the first application by the first electronic device after installing the first software package, simplifies the process of installing the first application by the first electronic device, and saves the download resources used to download the application software package.
[0261] Optionally, the first application can be any application available for download by the first electronic device. The specific type of the first application is determined according to actual usage needs and is not limited here. For example, after the application development device publishes the software package of the first application on an application distribution platform supported by the first server, the first electronic device can obtain the software package of the first application from the first server.
[0262] In some embodiments, in response to an operation to install a first application, a first electronic device generates an application download request for the first application; the first electronic device sends the application download request to a first server. Based on the application download request, the first server sends download information for a first software package to the first electronic device. For example, the application download request includes identification information for the first application and a download indication identifier. The download indication identifier indicates that the application download request is for downloading the application's software package.
[0263] The operation of installing the first application is used to instruct the installation of the first application on the first electronic device. Optionally, the operation of installing the first application is triggered by the user. For example, the operation of installing the first application includes, but is not limited to: downloading the first application from an app store, downloading the first application from an official download page, and installing the first application via command line.
[0264] The operation of installing the first application can be implemented in at least one of the following ways: click operation, long press operation, double click operation, swipe operation, button operation, gesture operation, etc. For example, in response to clicking the download control displayed in the application market interface, the first electronic device obtains the first software package from the first server. The download information includes the download address of the first application from the first server. The download information is also referred to as the download address.
[0265] For example, the operation of installing the first application can also be implemented as the operation of updating the first application. For instance, if the operation of installing the first application is configured to update the first application periodically, the first electronic device obtains the first software package of the first application from the first server when the update cycle of the first application is reached.
[0266] Optionally, in addition to sending download information for the first application's software package to the first electronic device, the first server also sends verification information for the first software package to the first electronic device; this allows the first electronic device to use the verification information to verify the downloaded first software package. The verification information is used to verify the correctness of the first software package downloaded by the first electronic device, so as to promptly detect problems such as packet loss that occur during the download process.
[0267] Optionally, after the first application development is completed, the first electronic device executes step S1410. The specific execution time of step S1410 is determined according to user requirements and is not set here.
[0268] In step S1420, the first electronic device obtains at least one second software package from the first server based on the first identifier carried by the first software package.
[0269] The first identifier is used to indicate the identification information of at least one shared library that the first application depends on. Optionally, at least one shared library that the first application depends on refers to all shared libraries that the first application depends on for operation. That is, at least one shared library has the same meaning as the second shared library in the above embodiment. For example, if the first application depends on shared library 1 and shared library 2 for operation, then at least one shared library refers to shared library 1 and shared library 2.
[0270] In some embodiments, the first identifier is generated during the development of the first application. Optionally, the first software package includes the first identifier. By carrying the first identifier in the first software package, the first electronic device, after obtaining the first software package, can determine all the shared libraries that the first application depends on for running, so that the first electronic device can install at least one shared library before the first application runs, and that the first electronic device can correctly call all the shared libraries required for the first application to run during the first application's operation.
[0271] During the initial application development process, a first identifier is carried within the first software package. This allows subsequent electronic devices to identify the shared libraries required for the application's operation simply by using the first identifier within the software package, without needing instructions from the server. Compared to a scheme where the server instructs electronic devices on the development kits or shared libraries required for the application's operation, this approach reduces the server's role in application management. The server primarily manages the software packages and does not need to edit their contents, thus reducing the server's processing load.
[0272] At the same time, this method ensures that the software package obtained by the first electronic device is consistent with the software package published by the second electronic device, which helps to avoid errors in the software package content. This helps to control factors that may cause errors in application operation and makes it easier for application developers to maintain the application.
[0273] For example, after obtaining the first software package, the first electronic device parses the first software package to obtain a first identifier; based on the first identifier, the first electronic device determines at least one shared library that the first application depends on. The second software package is an installation package for the shared library that the first application depends on, and the second software package is used to install the shared library that the first application depends on onto the first electronic device.
[0274] In some embodiments, after obtaining the first software package, the first electronic device obtains a first identifier based on the first software package; the first electronic device determines at least one shared library that the first application depends on based on the first identifier; if the target shared library in at least one shared library is not installed in the first electronic device, the second software package is downloaded from the first server.
[0275] The second software package is used to install the target shared libraries in the first electronic device. If multiple target shared libraries are not installed in the first electronic device, the first electronic device obtains the second software packages corresponding to each target shared library from the first server. For example, if the first electronic device has shared library 1, shared library 2, and shared library 3 installed, and the first application depends on shared libraries 1, 4, and 5, then shared libraries 4 and 5 are target shared libraries.
[0276] Optionally, the first electronic device determines at least one shared library that the first application depends on based on the first identifier; the first electronic device compares the at least one shared library with all shared libraries installed in the first electronic device; for any one of the at least one shared library, if the first electronic device does not install the shared library, the first electronic device determines the shared library as the target shared library, and the first electronic device obtains the second software package of the target shared library from the first server.
[0277] For example, the first electronic device maintains a list of shared libraries, which records the shared libraries installed in the first electronic device; for each shared library in at least one shared library, the first electronic device determines whether the shared library is recorded in the shared library list; if the shared library is recorded in the shared library list, the first electronic device does not need to obtain the second software package of the shared library from the first server; if the shared library is not recorded in the shared library list, the first electronic device determines that the shared library belongs to the target shared library, and the first electronic device obtains the second software package of the target shared library from the first server.
[0278] In one example, the first identifier includes the package name and version information of at least one shared library. If the version information of the shared library indicated by the first identifier is inconsistent with that of a shared library with the same name installed in the first electronic device, the first electronic device determines that the shared library belongs to the target shared library; if the version information of the shared library indicated by the first identifier is consistent with that of a shared library with the same name installed in the first electronic device, the first electronic device determines that the shared library has been installed in the first electronic device and does not belong to the target shared library.
[0279] For example, if the version information of the shared library already installed in the first electronic device matches the version information of the shared library in the first identifier, the first electronic device determines that the shared library is not the target shared library. If the version information of the shared library already installed in the first electronic device does not match the version information of the shared library in the first identifier, the first electronic device determines that the shared library belongs to the target shared library, and the first electronic device obtains the second software package of the target shared library from the first server.
[0280] In this example, for any shared library that the first application depends on, if the version information of the shared library installed on the first electronic device is inconsistent with the version information of the shared library that the first application depends on, then that shared library is considered the target shared library. In this case, the first electronic device needs to download the second software package of that shared library. This method ensures that the version information of the shared libraries installed on the electronic device and the shared libraries required for the first application to run are aligned, which helps ensure that the first application can run smoothly, thereby improving the stability of the application's operation and ensuring the user's application experience.
[0281] In some embodiments, for the same shared library, the developers of the shared library periodically share the shared library; that is, the first server stores second software packages corresponding to different versions of the same shared library. For a shared library with the same name, the first version of the shared library is forward compatible with the second version of the shared library, wherein the release of the first version of the shared library is later than the release of the second version of the shared library. Optionally, the first version of the shared library supports all the functionality of the second version of the shared library.
[0282] For example, the interface set of the second version of the shared library is a subset of the interface set of the first version of the shared library. In this case, for a shared library in at least one shared library library, if the version information of the shared library installed in the first electronic device is later than or equal to the version information of the shared library that the first application depends on, then the first electronic device does not consider that shared library to be a target shared library; if the version information of the shared library installed in the first electronic device is earlier than the version information of the shared library that the first application depends on, then the first electronic device identifies that shared library as a target shared library, and the first electronic device obtains the second software package of the target shared library. Optionally, the second software package of the target shared library corresponds to the latest version of the target shared library or corresponds to the version information indicated by the first identifier.
[0283] This method helps reduce the number of second software packages that the first electronic device needs to download, thus saving bandwidth resources used for downloading the second software packages.
[0284] In some embodiments, during the process of sending at least one second software package to the first electronic device, the first server also sends verification information for each of the at least one software package to the first electronic device, so that after the first electronic device downloads the second software package, it can verify the correctness of the second software package through the verification information.
[0285] Optionally, for any second software package, if the second software package is verified to be correct, the first electronic device installs the second shared library based on the second software package; if the second software package is verified to be incorrect, the first electronic device re-downloads the second software package through the first server.
[0286] In one example, download information for the second software package is obtained through an application download request for the first application. Upon receiving the application download request for the first application, the first server determines at least one shared library that the first application depends on, based on the shared library metadata of the first application. Subsequently, the first server sends the download information for the first software package and the download information for the at least one shared library to the first electronic device.
[0287] After receiving download information from the first server, the first electronic device determines at least one shared library that the first application depends on based on the first identifier in the first software package. If the first electronic device lacks at least one target shared library, it obtains the download information of at least one target shared library software package from the download information of the software packages of at least one shared library; the first electronic device then obtains at least one second software package from the second server according to the download information of the software packages of at least one target shared library. The software package of the target shared library is the second software package.
[0288] Thus, upon receiving any application download request, the first server sends the application download information, as well as the download information of the shared libraries that the application depends on, back to the first electronic device, unifying the steps that the server needs to perform during the application installation process.
[0289] In another example, the download information for the second software package is obtained based on a shared library download request. After step S1410, the first electronic device parses the first software package to obtain a first identifier; based on the first identifier, the first electronic device obtains at least one shared library that the first application depends on. If at least one target shared library is missing in the first electronic device, the first electronic device generates a shared library download request based on the first sub-identifier corresponding to each of the at least one target shared library. The first electronic device sends the shared library download request to the server. Based on the shared library download request, the first server obtains the download information for at least one target shared library from the shared library metadata. The first server feeds back the download information for the at least one target shared library to the first electronic device. After receiving the download information for the target shared library, the first electronic device downloads the second software package from the first server based on the download information.
[0290] In this way, the server needs to send fewer download information to the first electronic device, which helps save the communication bandwidth occupied by sending download information, thereby reducing the pressure on the server interface to concurrently send download information to multiple first electronic devices.
[0291] In step S1430, the first electronic device installs a first software package and at least one second software package.
[0292] Installing the first software package is used to install the first application on the first electronic device, and installing the second software package is used to install the target shared library on the first electronic device. If multiple second software packages are obtained from the first server in step S1420, the first electronic device installs each of the multiple second software packages.
[0293] The installation process for the first application is similar to that of the shared library; the following description uses the installation process of the first application as an example. Optionally, after obtaining the first software package, the first electronic device stores the first software package and creates an installation directory for the first application. The first electronic device decompresses the first software package to obtain the decompressed first software package; the first electronic device stores the decompressed first software package in the installation directory of the first application. For example, the first electronic device adds the first application to the registry.
[0294] The installation directory of the first application includes resource files for the first application. These resource files can be of at least one of the following types: binary files, configuration files, or resource files. When the first application needs to be run, the first electronic device retrieves the first resources from the installation directory of the first application to launch the first application.
[0295] In some embodiments, the first application and the target shared library are installed by a package management module in the operating system of the first electronic device. For example, after downloading the first package, the application distribution platform's client calls the package management module interface, triggering the package management module to install the first package. As another example, after downloading the second package, the application distribution platform's client calls the package management module interface, triggering the package management module to install the second package.
[0296] Optionally, the package management module maintains a shared library list. After the target shared library is installed, the package management module updates the shared library list based on the target shared library. The shared library list records the shared libraries installed on the first electronic device. For example, the shared library list includes the identifier information and installation information of the shared library. In one example, after installing the target shared library, the first electronic device adds the identifier information and installation information of the target shared library to the shared library list, resulting in an updated shared library list.
[0297] The shared library's identification information is used to identify the shared library. For example, the shared library's identification information is identical to the content included in the first sub-identifier corresponding to the shared library. For instance, the shared library's identification information includes the shared library's package name, module name, and version information. The shared library's installation information is used to characterize the access path to the shared library's installation directory, the shared library's package size, etc.
[0298] In some embodiments, the installation processes of the first software package and the second software package are independent of each other.
[0299] Optionally, the first software package and the second software package are installed simultaneously. Since the first application cannot run until the first software package is installed, installing the first and second software packages simultaneously allows the installation of the first application and the target shared library to overlap, which helps to shorten or eliminate the time the user waits to install the second software package. This makes the installation of the target shared library irrelevant to the user, thereby helping to shorten the time the user waits to run the first application.
[0300] Optionally, the installation of the first application and the target shared library may have a specific order. For example, the first application may be installed first, or the target shared library may be installed first. This application does not limit the installation order of the first application and the shared library.
[0301] In one example, the first installation package is installed before the second installation. Optionally, in response to launching the first application, the first electronic device obtains at least one shared library that the first application depends on based on a first identifier; if at least one target shared library is missing in the first electronic device, the first electronic device obtains at least one second software package, and the first electronic device installs at least one target shared library based on the at least one second software package.
[0302] That is, in this example, the first electronic device first executes step S1410, then executes step S1430 to install the first software package, then executes step S1420, and then executes step S1430 to install the second software package.
[0303] The operation to launch the first application includes, but is not limited to, at least one of the following: clicking the application icon of the first application, double-clicking, swiping, or pressing a button.
[0304] For example, when at least one target shared library is missing in the first electronic device, the first electronic device acquires at least one second software package, comprising: the first electronic device sending a shared library acquisition request to a first server; the first server acquiring the package name of at least one target shared library according to the shared library acquisition request; for each of the at least one target shared library, the first server acquiring at least one candidate version of the software package of that target shared library according to the package name of the target shared library. Each candidate version of the second software package corresponds to one version of the target shared library. The first server selects the target version of the second software package from the at least one candidate version of the software package. Subsequently, the first server sends download information for the target version of the second software package to the first electronic device.
[0305] For example, the target version matches the version information included in the first sub-identifier corresponding to the target shared library. For instance, if the version information in the first sub-identifier corresponding to a target shared library is 1.2.3, then the target version is 1.2.3.
[0306] For example, the target version is the latest version among at least one candidate version. Thus, by providing a second software package with the latest version, the first electronic device is able to install the latest version of the target shared library.
[0307] Compared to other versions of the target shared library, the new version may fix some defects. Therefore, installing the latest version of the shared library helps ensure the smooth operation of the first application. Instead of first installing an older version of the target shared library and then updating it, directly providing the latest version of the target shared library to the first electronic device helps reduce the number of downloads of the target shared library package, saving download resources. It also helps reduce the storage of useless packages or residual data on the first electronic device, thereby saving storage space.
[0308] In this embodiment, a first identifier included in the first software package indicates all shared libraries that the application depends on, so that the first electronic device can identify and install at least one shared library that the application depends on. This method ensures that the shared libraries that the application depends on are installed before the application runs, allowing the application to run normally and guaranteeing the stability of the application's operation on the terminal device.
[0309] In one example, after installing a first application and at least one shared library that the first application depends on in a first electronic device, the application management method provided in this application embodiment further includes: the first electronic device, in response to an operation instructing the installation of a second application, obtaining a software package of the second application from a first server. The software package of the second application is used by the first electronic device to install the second application, which is different from the first application. The first electronic device obtains at least one shared library that the second application depends on based on a first identifier carried in the software package of the second application.
[0310] Optionally, if the first application depends on at least one shared library, which is also a shared library depended on by the second application, then the first electronic device does not need to obtain the software packages corresponding to each of the at least one shared library depended on by the second application. If the first application depends on at least one shared library, which is also a shared library depended on by the second application, then the first electronic device obtains the software packages corresponding to each of the at least one shared library depended on by the second application.
[0311] Optionally, after the installation of at least one shared library dependent on the first application is completed, the first electronic device adds at least one shared library dependent on the application to its already installed shared libraries. Subsequently, in response to an instruction to install the second application, the first electronic device obtains the software package of the second application and, based on a first identifier carried in the software package of the second application, obtains at least one shared library dependent on the second application. If the target shared library in the at least one shared library dependent on the second application is missing from the electronic device, the electronic device obtains a second software package containing that target shared library.
[0312] By enabling applications in the first electronic device to share the same shared library, it helps improve the efficiency of shared library usage and also helps the first electronic device store redundant shared libraries. Figure 15 This is a diagram illustrating the interactions between functional modules during the application installation process. Figure 15 In the provided embodiments, the functional modules of the first electronic device include Figure 5 The application distribution platform client and software management module shown are illustrated; the functional modules of the first server include... Figure 5 The application distribution platform server shown. This method may include the following steps:
[0313] In step S1510, the application distribution platform client sends an application download request for the first application to the application distribution platform server. Optionally, the application download request for the first application includes an application identifier for the first application. The application identifier includes, but is not limited to, at least one of the following: the application name of the first application, the label of the first application, or the indication code of the first application.
[0314] Step S1520: The application distribution platform server queries the metadata of the first application and the shared library.
[0315] Optionally, after receiving the application download request of the first application, the application distribution platform server queries the first application based on its identification information to obtain the shared library metadata of the first application. For example, in step S1520, the application distribution platform server obtains the package name, version information, download information, verification information, package size, etc., of the first application and at least one shared library.
[0316] In step S1521, the application distribution platform server obtains the download information and verification information of the first application.
[0317] Step S1522: The application distribution platform server obtains the download information and verification information of the shared library.
[0318] In step S1523, the application distribution platform server returns download information and verification information of the first application and at least one shared library to the application distribution platform client.
[0319] Optionally, download information for at least one shared library is used to download the latest version software package corresponding to at least one shared library.
[0320] In step S1530, the application distribution platform client requests the first software package from the application distribution platform server.
[0321] Optionally, after obtaining the download information of the first application's software package, the application distribution platform client obtains the first software package based on the download information of the first application.
[0322] Step S1531: The application distribution platform server provides the first software package to the application distribution platform client.
[0323] Step S1532: The application distribution platform client verifies the first software package.
[0324] Optionally, the application distribution platform client verifies the first software package based on the verification information of the first software package. For example, if the first software package is complete, the application distribution platform client executes step S1533; if the first software package is incomplete, the application distribution platform client repeats step S1530.
[0325] In step S1533, the application distribution platform client instructs the package management module to install the first application.
[0326] Step S1534: The package management module installs the first application. Optionally, the package management module stores the first package, creates an installation directory for the first application, and stores the decompressed first package in the installation directory of the first application.
[0327] Step S1540: The application distribution platform client verifies whether the first electronic device has installed the target version of the target shared library.
[0328] Optionally, the application distribution platform client determines at least one shared library that the first application depends on based on the first identifier in the first software package; the application distribution platform client compares the shared libraries already installed in the first electronic device with at least one shared library to verify whether the target version of the target shared library is installed in the first electronic device.
[0329] Optionally, if the target version of the target shared library is not installed on the first electronic device, the application distribution platform client executes step S1550. If the target version of the target shared library is installed on the first electronic device, the installation process of the first application ends.
[0330] For example, there is no strict execution sequence between step S1540 and step S1532. For instance, step S1540 can be executed at any time after step S1531 has been completed. For instance, steps S1540 and S1532 can be executed in parallel.
[0331] In step S1550, the application distribution platform client requests the application distribution platform server to obtain the second software package.
[0332] Optionally, the application distribution platform client selects the download information of at least one target shared library from the download addresses of at least one shared library based on the package name of at least one target shared library. After obtaining the download information of the target shared library's software package, the application distribution platform client obtains a second software package from the application distribution platform's server based on the download information of the target shared library.
[0333] Step S1551: The application distribution platform server provides the second software package to the application distribution platform client.
[0334] Step S1552: The application distribution platform client verifies the second software package. Optionally, the application distribution platform client verifies the second software package based on the verification information of the second software package; if the second software package is complete, the application distribution platform client executes step S1553; if the second software package is incomplete, the application distribution platform client repeats step S1550.
[0335] Step S1555: The application distribution platform client calls the package management module to install the target shared library.
[0336] Step S1554: The package management module installs the target shared library.
[0337] In this embodiment, the shared libraries are not integrated into the application's software package, which helps reduce the size of the application's software package. It also helps avoid multiple applications including duplicate shared libraries. This helps avoid wasting storage space on the first electronic device caused by repeatedly storing shared libraries. Furthermore, if the first electronic device lacks the shared libraries required for the application to run, the shared library software package is downloaded and installed. This helps increase the frequency with which the first electronic device runs shared libraries, avoiding the storage of software packages containing useless shared libraries.
[0338] The following examples illustrate the process of an application running with the dependency of shared libraries. Figure 16 As shown, the execution subject of this method is Figure 3 The first electronic device 100 in the process. The method may include the following steps:
[0339] In step S1440, the first electronic device responds to the user's instruction to launch the first application and acquires the first resource.
[0340] Optionally, the operation that instructs the launch of the first application includes, but is not limited to, at least one of the following: a click operation, a double-click operation, a swipe operation, a key operation, a gesture operation, etc., for the first application.
[0341] Optionally, the operating system of the first electronic device creates an application process for the first application, and loads the first resource through the application process of the first application. The first resource is a resource obtained through the first software package.
[0342] For example, the first resource is a resource carried in the first software package that is used to support the operation of the first application.
[0343] The application process of the first application refers to the process created in the processor of the first electronic device for running the first application.
[0344] For example, the operating system accesses the installation directory of the first application and reads the first resource from the decompressed first software package stored in the installation directory of the first application. The first resource includes at least one of the following: the executable binary file of the first application, the configuration file, and the resource file.
[0345] In some embodiments, step S1440 is as follows: Figure 14 Step S1430 is executed after the first electronic device. That is, after the first application and at least one shared library are installed in the first electronic device, the first electronic device executes step S1440.
[0346] In step S1450, the first electronic device obtains the second resource based on the first identifier.
[0347] The second resource is a resource carried by at least one shared library that the first application depends on. The second resource is a shared library resource. For example, the shared library resource is obtained through the installation package of a shared library installed on the first electronic device. Optionally, the second resource is a runtime resource provided by the shared library for the first application. For example, the second resource includes at least one of the following: an executable binary file, a configuration file, a resource file, a library file, documentation, etc.
[0348] Optionally, the first electronic device obtains a first identifier based on a configuration file in the first software package; determines at least one shared library that the first application depends on based on the first identifier; and obtains a second resource from the at least one shared library. The at least one shared library is a shared library that the first application depends on for operation. For example, the configuration file in the first software package includes the first identifier.
[0349] For example, the operating system calls the package management module to obtain a list of shared libraries; based on the list of shared libraries, the operating system obtains the installation directory of at least one shared library; the operating system reads a second resource from the installation directory of the shared library. Subsequently, the operating system adds the second resource to the application process of the first application.
[0350] Figure 17 This is an interactive diagram illustrating the process of calling a shared library as provided in an embodiment of this application. In this embodiment, a first application installed in a first electronic device and at least one shared library that the first application depends on are involved. Figure 5 The operating systems shown participate in this process. This embodiment includes the following steps:
[0351] In step S1710, the operating system, upon user instruction to start the first application, creates an application process for the first application. Optionally, after creating the application process for the first application, the operating system adds a first resource to the application process of the first application.
[0352] In step S1720, the operating system obtains at least one shared library that the first application depends on, based on the first identifier.
[0353] In step S1730, the operating system searches for the installation directory of at least one shared library from the shared library list.
[0354] In step S1740, the operating system reads the second resource from the installation directory of at least one shared library. Optionally, the operating system adds the second resource to the application process of the first application. For details not described in this example, please refer to [link to relevant documentation]. Figure 16 Corresponding implementation examples.
[0355] In this way, by obtaining the second resource from the shared library, the necessary resource files are provided for the operation of the first application. Furthermore, since the second resource is added to the application process of the first application, the first application does not need to obtain the second resource from the shared library during operation; therefore, updates to the shared library's software packages will not affect the operation of the first application.
[0356] Step S1460: Start the first application using the first resource and the second resource.
[0357] Optionally, the application process of the first application runs the first application through the first resource and the second resource, and the first electronic device displays the application interface of the first application.
[0358] In this embodiment, a first identifier is used to determine the shared library that the first application depends on, so that the corresponding resources can be called from the shared library's software package to support the normal operation of the first application. In this way, the size of the first application's software package is reduced while ensuring the normal operation of the first application.
[0359] In one example, a first electronic device has a first application, a second application, and a shared library 1 installed, both of which depend on the shared library 1. In response to a user instruction to launch the first application, the first electronic device acquires a first resource from the first application; acquires a second resource 1 from the shared library 1 based on a first identifier included in the first application's software package; and runs the first application using the first resource from the first application and the second resource 1 from the shared library 1. Subsequently, in response to a user instruction to launch the second application, the first electronic device acquires a first resource from the second application; acquires a second resource 2 from the shared library 1 based on a first identifier included in the second application's software package; and runs the second application using the first resource from the second application and the second resource 2 from the shared library 1.
[0360] Since both the first identifier included in the first application's software package and the first identifier included in the second software package can point to shared library 1, the startup of both the first and second applications can utilize the resources in shared library 1. This method enables multiple applications included in the first electronic device to share the same shared library, improving the utilization efficiency of the shared library. Simultaneously, it helps avoid installing redundant shared libraries in the first electronic device, thus preventing the waste of storage space.
[0361] Figure 18 This is a schematic diagram illustrating the operation of an application that depends on a shared library, provided as an exemplary embodiment of this application. The application is executed by the operating system, and the application execution process may include the following steps.
[0362] Step S1810: The operating system starts the first application. (e.g.) Figure 18 The first application shown is the xxxxvideo application.
[0363] In step S1820, the operating system creates the application process for the first application. For example... Figure 18 The first application shown is application process 1800a.
[0364] In step S1830, the operating system loads the first resource from the installation directory of the first application. For example... Figure 18 The first resource shown is 1800b. Optionally, the operating system loads the executable binary file, configuration file, and resource file from the installation directory of the first application, xxxvideo.app. The operating system uses the obtained binary file, configuration file, and resource file as the first resource.
[0365] Step S1840: The operating system parses the configuration file of the first software package and obtains the first identifier. The configuration file module.json is as follows: Figure 18 As shown in 1800c.
[0366] In step S1850, the operating system obtains at least one shared library that the first application depends on based on the first identifier. As can be seen from the above embodiments, the configuration file may include the first identifier 1800d, and the operating system can read the first identifier 1800d from the configuration file 1800c. For example... Figure 18 As shown. The first identifier indicates that the package name of the shared library that the first application video depends on is accxxxxkit.
[0367] In step S1860, the operating system loads the second resource from the installation directory of the shared library. For example... Figure 18 As shown, the operating system loads the binary file, resource file, and configuration file of accxxxxkit from the installation directory of accxxxxkit, and obtains the second resource 1800e.
[0368] In step S1870, the operating system executes the first resource and the second resource to start the first application.
[0369] For a detailed description of this embodiment, please refer to the embodiments above. This embodiment ensures the normal operation of the first application by loading the second resource from the shared library's installation directory.
[0370] The following examples illustrate the shared library update process. Figure 19 As shown, the execution subject of this method is Figure 3 The first electronic device 100 in the process. The method may include the following steps:
[0371] In step S1470, the first electronic device obtains the first version information of the target shared library.
[0372] In some embodiments, the shared library update process provided in this embodiment can be executed for any installed shared library in the first electronic device. The following describes an update method for an installed shared library in the first electronic device, using a target shared library as an example. Exemplarily, step S1470 is executed after step S1430, or after step S1460.
[0373] The first version information of the target shared library is used to characterize the latest version of the target shared library. The server stores the first version information of the target shared library. The first version information allows determination of the version of the target shared library recently published by the second electronic device to the first server. Optionally, the first version information is obtained from the first server.
[0374] For example, a first electronic device sends version retrieval information to a first server, and the first server sends first version information to the first electronic device according to the version retrieval request. The version retrieval request includes identification information of the target shared library, and the first server queries the first version information based on the identification information of the target shared library.
[0375] For example, the first version information of the target shared library includes a number, and the value of the first version information is the largest or smallest value among the multiple version information of the target shared library stored in the first server.
[0376] In some embodiments, the first electronic device performs a shared library update process once every first time interval. The first time interval is preset, such as 1 hour, 1 day, 1 week, etc.
[0377] In step S1480, if the first version information differs from the second version information of the target shared library indicated by the second software package, the third software package corresponding to the first version information is downloaded from the first server.
[0378] The second version information refers to the version information of the target shared library installed in the first electronic device, and the third software package is used to update the target shared library in the first electronic device.
[0379] Optionally, after step S1430, if the first electronic device has not updated the target shared library, the second version information is the version information of the target shared library indicated by the second software package. In this case, the first electronic device obtains the second version information from the second software package, or the second electronic device obtains the second version information through the shared library list.
[0380] In some embodiments, after obtaining the first version information and the second version information, the first electronic device compares the first version information and the second version information. Optionally, if the first version information is greater than the second version information, the first electronic device requests the third installation package from the first server; if the first version information is equal to the second version information, the first electronic device determines not to update the target shared library for the time being.
[0381] Step S1490: The first electronic device installs the third installation package.
[0382] The installation process for the third software package is similar to that for the first software package; please refer to the examples above for details.
[0383] Optionally, after the third installation package is installed, the first electronic device removes information related to the second installation package from the shared library list and adds information related to the third installation package to the shared library list.
[0384] In this way, by regularly updating the shared libraries installed in the first electronic device, independent updates of the shared library versions are achieved, ensuring that the first electronic device has the latest version of the shared libraries installed. Updating the shared libraries helps to resolve issues existing in older versions of the shared libraries and thus helps to improve the stability of the application running on the first electronic device.
[0385] The aging and cleanup process of shared libraries is described below through several examples. Figure 20 As shown, the execution subject of this method is Figure 3 The first electronic device 100 in the process. The method may include the following steps:
[0386] Step S1495: Obtain the application dependency information of the target shared library.
[0387] In some embodiments, the shared library aging and cleanup step provided in this embodiment can be performed on any installed shared library in the first electronic device. The following describes the aging and cleanup method for installed shared libraries in the first electronic device, taking a target shared library as an example. Exemplarily, step S1475 is performed after step S1430, or after step S1460, or after step S1490, or before S1470.
[0388] The application dependency information of the target shared library is used to indicate applications in the first electronic device that depend on the target shared library. Optionally, the application dependency information of the target shared library can characterize the total number of applications that depend on the target shared library among the installed applications of the first electronic device. For example, the application dependency information includes the application identifiers of the installed applications that depend on the target shared library. For instance, before the first software package is uninstalled, the application dependency information of the target shared library includes the application identifier of the first application.
[0389] In some embodiments, the aging cleanup process is triggered in at least one of the following ways: periodically triggered, or triggered when the application package is uninstalled.
[0390] Optionally, the first electronic device performs a shared library aging cleanup process once every second time interval. The second time interval is preset, such as 0.5 hours, 1 hour, 1 day, 1 week, etc. The second time interval and the first time interval are independent of each other. For example, the second time interval may be equal to the first time interval, or the second time interval may be unequal to the first time interval.
[0391] For example, the second time interval is shorter than the first time interval. By setting the second time interval to be shorter than the first time interval, it helps to ensure that the aging and cleanup of shared libraries is performed before the shared library update process. This helps to prevent the first electronic device from updating the target shared library and then having the aging and cleanup process trigger the uninstallation of the target shared library's software package, which would render the target shared library update invalid, causing unnecessary waste of download resources and power consumption of the electronic device.
[0392] Optionally, in response to the uninstallation operation of the application's software package, the first electronic device obtains the application dependency information of the target shared library and performs subsequent steps.
[0393] In some embodiments, the first electronic device obtains application dependency information of the target shared library by: for any application software package installed in the first electronic device, obtaining a first identifier from the application software package; and obtaining the dependency information of the shared library based on the first identifier. For example, if a certain first identifier indicates target shared library 1, then the first electronic device adds the identifier of that application to the application dependency information of the target shared library.
[0394] Step S1496: If the application dependency information of the target shared library meets the conditions for shared library cleanup, uninstall the second software package.
[0395] The shared library cleanup criteria are used to determine whether to uninstall the second software package. Optionally, if the application dependency information of the target shared library meets the shared library cleanup criteria, the first electronic device uninstalls the second software package; if the application dependency information of the target shared library does not meet the shared library cleanup criteria, the first electronic device does not need to uninstall the second software package.
[0396] Optionally, the shared library cleanup conditions are related to the number of applications included in the dependent application information. For example, the shared library cleanup conditions include the number of applications included in the dependent application information being less than or equal to a threshold. Wherein, the threshold is a preset natural number, such as 0, 1, 2, etc. If the number of applications included in the dependent application information of a shared library is less than or equal to the threshold, the first electronic device uninstalls the shared library; if the number of applications included in the dependent application information of a shared library is greater than or equal to the threshold, the first electronic device determines that the shared library does not need to be uninstalled temporarily.
[0397] For example, if the threshold is 0, and the application dependency information indicates that there are 0 installed applications in the first electronic device that depend on the target shared library, then the target shared library is not depended on by any of the installed shared libraries in the first electronic device. In this case, the application dependency information equals the threshold, satisfying the shared library removal condition, and the first electronic device downloads the second software package corresponding to the target shared library.
[0398] For example, the threshold is equal to 'a', where 'a' is a positive integer. If the application dependency information indicates that there are 'b' installed applications in the first electronic device that depend on the target shared library, where 'b' is less than 'a', and the last startup time of each of the 'b' installed applications is greater than or equal to the latest running time, then the first electronic device uninstalls the second software package. In this way, during the shared library cleanup process, applications that have not been started for a long time are excluded from the first electronic device. Determining whether to uninstall the shared library based on the dependencies of frequently started installed applications in the first electronic device helps to remove unused shared libraries and those with low usage frequency.
[0399] In some embodiments, when it is determined that a second software package needs to be uninstalled, the first electronic device periodically cleans up the second software package determined in step S1496. Periodically cleaning up shared libraries that have no application dependencies helps reduce the storage space occupied by useless shared libraries on the first electronic device.
[0400] Figure 21 This embodiment provides a schematic diagram of module interactions during the shared library update process, which is an exemplary embodiment of this application. Figure 5 The application distribution platform client, application distribution platform server, and package management module are included. The shared library update process may include the following steps:
[0401] In step S2110, the application distribution platform client sends a shared library update request to the application distribution platform server. Optionally, the shared library update request includes identification information of at least one installed shared library. For example, the shared library update request includes the package name of at least one installed shared library.
[0402] For example, the application distribution platform client sends a shared library update request to the application distribution platform server once every first time interval.
[0403] In step S2120, the application distribution platform server obtains the version information and target version information of the installed shared library. Optionally, the application distribution platform server obtains the target version information from the shared library metadata based on the package name of the shared library.
[0404] In step S2130, the application distribution platform server compares the version information of the installed shared library with the target version information.
[0405] The version information of the installed shared library includes the second version information in the above embodiment, and the target version information includes the first version information in the above embodiment. Optionally, the target version information is stored on the server side of the application distribution platform, and the server side of the application distribution platform retrieves the target version information by the name of the installed shared library. The version information of the installed shared library is sent from the application distribution platform client to the server side of the application distribution platform.
[0406] Optionally, the application distribution platform server generates a comparison result between the version information of the installed shared library and the target version information. The comparison result is used to indicate whether the version of the installed shared library needs to be updated. For example, if the target version information is different from the version information of the installed shared library, the comparison result indicates that the version of the installed shared library should be updated; if the target version information is the same as the version information of the installed shared library, the comparison result indicates that the version of the installed shared library should not be updated for the time being.
[0407] Step S2140: The application distribution platform server generates the download address of the third software package.
[0408] The third-party software package is used to update installed shared libraries to the latest version. Optionally, the application distribution platform server also generates verification information for the third-party software package.
[0409] Subsequently, the application distribution platform server sends the download address of the third software package to the application distribution platform client.
[0410] Optionally, the application distribution platform server may also send at least one of the following to the application distribution platform client: comparison results and verification information of the third software package.
[0411] In step S2150, the application distribution platform client receives the download information of the third software package.
[0412] In step S2160, the application distribution platform client determines whether to download the third software package. Optionally, if the comparison result indicates that the installed shared library should be updated, the application distribution platform client executes step S2161; if the comparison result indicates that the installed shared library should not be updated for the time being, the process ends.
[0413] In step S2161, the application distribution platform client requests a third software package from the application distribution platform server. Optionally, after obtaining the download information of the third software package, the application distribution platform client obtains the first software package based on the download information of the third software package.
[0414] Step S2162: The application distribution platform server provides the first software package to the application distribution platform client.
[0415] Step S2163: The application distribution platform client verifies the third software package. Optionally, the application distribution platform client verifies the third software package based on the verification information of the third software package. For example, if the third software package is complete, the application distribution platform client executes step S2164; if the third software package is incomplete, the application distribution platform client repeats step S2161.
[0416] In step S2164, the application distribution platform client instructs the package management module to install the first application.
[0417] Step S2165: The package management system installs the third package.
[0418] By allowing independent updates to the shared library, the first electronic device can easily manage the version of the shared library.
[0419] Figure 22 This embodiment provides a schematic diagram of module interactions related to the shared library aging and cleanup process, as illustrated in an exemplary embodiment of this application. Figure 5 The application distribution platform client and package management module in the system. The shared library update process may include the following steps. The shared library aging cleanup process may include the following steps:
[0420] In step S2210, the application distribution platform client obtains the installed shared libraries based on the shared library list.
[0421] Optionally, the application distribution platform client invokes the package management module to periodically scan the shared library list. This shared library list records the shared libraries installed on the first electronic device. For example, at each second time interval, the package management module retrieves the package names of the installed shared libraries from the shared library list.
[0422] Step S2220: The package management module obtains application information of the installed shared libraries.
[0423] In step S2230, the application distribution platform client determines whether the application dependency information meets the shared library cleanup conditions. Optionally, if the application dependency information meets the shared library cleanup conditions, the application distribution platform client executes step S2240; if the application dependency information does not meet the shared library cleanup conditions, this process ends.
[0424] In step S2240, the application distribution platform client instructs the package management module to uninstall the package containing the installed shared library.
[0425] Step S2250: The package management module uninstalls the package containing the installed shared library.
[0426] If no application in the first electronic device depends on the shared library, the application distribution platform client calls the package management module to uninstall the shared library's package. If an application in the first electronic device depends on the shared library, the shared library's package is not processed.
[0427] By checking the dependencies of shared libraries between applications and performing aging cleanup on shared libraries in this embodiment, it is helpful to promptly remove the shared library installed in the first electronic device from the first electronic device when it is not depended on by any application.
[0428] The above combination Figures 9 to 22 The application management method provided in the embodiments of this application is described in detail below. Figure 23 , Figure 24 This application provides a detailed description of the first electronic device and server provided in its embodiments. All or part of any feature of any embodiment in this application can be freely combined. The resulting combined technical solutions also fall within the scope of this application.
[0429] In one possible design, Figure 23 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Optionally, electronic device 2300 represents... Figure 3 At least one of the first electronic device 100 and the second electronic device 300. For example... Figure 23As shown, the electronic device 2300 may include a transceiver unit 2301 and a processing unit 2302. The electronic device 2300 can be used to implement the functions of the electronic device involved in the above method embodiments.
[0430] Optionally, the transceiver unit 2301 is used to support the second electronic device in performing... Figure 9 S920, S930, S940, and S970; and / or, for supporting the first electronic device to perform Figure 14 S1410 in the example, and / or, for supporting the first electronic device to perform Figure 15 S1510, S1530, and S1550, and / or, and / or, are used to support the first electronic device in performing... Figure 19 S1470 in the middle.
[0431] Optionally, the processing unit 2302 is configured to support the second electronic device in performing [operations]. Figure 9 S910, S950, S960; and / or, for supporting the first electronic device to perform Figure 14 S1420 and S1430, and / or, are used to support the first electronic device in performing... Figure 15 S1532-S1540 and S1550-S1554; and / or, for supporting the first electronic device to perform Figure 16 S1440-S1460, and / or, are used to support the first electronic device in performing... Figure 17 S1710-S1740, and / or, are used to support the first electronic device in performing... Figure 18 S1810-S1870, and / or, are used to support the first electronic device in performing... Figure 19 S1480-S1490, and / or, are used to support the first electronic device in performing... Figure 20 S1495- and S1496 in the example.
[0432] The transceiver unit may include a receiving unit and a transmitting unit, and may be implemented by a transceiver or transceiver-related circuit components, and may be a transceiver or transceiver module. The operation and / or function of each unit in the electronic device 2300 are respectively for implementing the corresponding process of the application management method described in the above method embodiments. All relevant content of each step involved in the above method embodiments can be referred to the functional description of the corresponding functional unit, and for the sake of brevity, it will not be repeated here.
[0433] Optionally, Figure 23 The illustrated electronic device 2300 may also include a storage unit ( Figure 23 (not shown in the image), this storage unit stores a program or instruction. When the transceiver unit 2301 and the processing unit 2302 execute the program or instruction, it causes... Figure 23The electronic device 2300 shown can execute the application management method described in the above method embodiments.
[0434] Figure 23 The technical effects of the electronic device 2300 shown can be referred to the technical effects of the application management method described in the above method embodiments, and will not be repeated here.
[0435] In addition to being in the form of electronic device 2300, the technical solution provided in this application can also be a functional unit or chip in an electronic device, or a device used in conjunction with an electronic device.
[0436] Figure 23 The technical effects of the first electronic device 2300 shown can be referred to the technical effects of the application management method described in the above method embodiments, and will not be repeated here.
[0437] In addition to being in the form of the first electronic device 2300, the technical solution provided in this application may also be a functional unit or chip in the first electronic device, or a device used in conjunction with the first electronic device.
[0438] In one possible design, Figure 24 This is a schematic diagram of the server structure provided in an embodiment of this application. Optionally, the server is... Figure 3 The first server is 200 and / or the second server is 400. For example... Figure 24 As shown, server 2400 may include a transceiver unit 2401 and a processing unit 2402. Server 2400 can be used to implement the functions of the server involved in the above method embodiments.
[0439] Optionally, the transceiver unit 2401 is used to support the first server for execution. Figure 15 S1523, S1531 and S1551 in the example;
[0440] Optionally, the processing unit 2402 is configured to support the first server for execution. Figure 15 S1520-S1523 in the middle.
[0441] The transceiver unit may include a receiving unit and a transmitting unit, and may be implemented by a transceiver or transceiver-related circuit components, and may be a transceiver or transceiver module. The operation and / or function of each unit in server 2400 are respectively to implement the corresponding process of the application management method described in the above method embodiments. All relevant content of each step involved in the above method embodiments can be referred to the functional description of the corresponding functional unit, and will not be repeated here for the sake of brevity.
[0442] Optionally, Figure 24 The server 2400 shown may also include a storage unit ( Figure 24 (not shown in the image), this storage unit stores a program or instruction. When the transceiver unit 2401 and the processing unit 2402 execute the program or instruction, it causes... Figure 24 The server 2400 shown can execute the application management method described in the above method embodiments.
[0443] Figure 24 The technical effects of the server 2400 shown can be referred to the technical effects of the application management method described in the above method embodiments, and will not be repeated here.
[0444] Besides being in the form of a server 2400, the technical solution provided in this application can also be a functional unit or chip in a server, or a device used in conjunction with a server.
[0445] This application also provides a chip system, including: a processor coupled to a memory, the memory being used to store programs or instructions, wherein when the program or instructions are executed by the processor, the chip system implements the methods in any of the above method embodiments.
[0446] This application also provides a chip system, including: a processor coupled to a memory, the memory being used to store programs or instructions, wherein when the program or instructions are executed by the processor, the chip system implements the methods in any of the above method embodiments.
[0447] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.
[0448] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application embodiment does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application embodiment does not specifically limit the type of memory or the arrangement of the memory and processor.
[0449] For example, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.
[0450] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The method steps disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.
[0451] This application also provides a computer-readable storage medium storing a computer program. When the computer program is run on a computer, it causes the computer to perform the aforementioned steps to implement the application management method described in the above embodiments.
[0452] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the application management method described above.
[0453] In addition, this application also provides an apparatus. Specifically, the apparatus may be a component or module, and may include one or more processors and a memory connected together. The memory is used to store a computer program. When the computer program is executed by one or more processors, the apparatus performs the application management methods described in the above-described method embodiments.
[0454] In this application, the computer-readable storage medium, computer program product, or chip provided in the embodiments are all used to execute the corresponding methods described above. Therefore, the beneficial effects they can achieve can be referred to in the beneficial effects of the corresponding methods described above, and will not be repeated here.
[0455] The steps of the methods or algorithms described in conjunction with the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory, flash memory, read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, registers, hard disks, portable hard disks, optical discs, or any other form of storage medium well known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an application-specific integrated circuit (ASIC).
[0456] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, the division of the above functional modules is only used as an example. In practical applications, the above functions can be assigned to different functional modules as needed; that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0457] In the several embodiments provided in this application, it should be understood that the disclosed methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of modules or units may be electrical, mechanical or other forms.
[0458] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. Computer-readable storage media include, but are not limited to, any of the following: USB flash drive, portable hard drive, read-only memory, random access memory, magnetic disk, or optical disk, and other media capable of storing program code.
[0459] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An application management method characterized by comprising: The method is executed by a first electronic device, and the method comprises: In response to an operation of installing a first application, downloading a first software package of the first application from a first server; According to a first identifier carried by the first software package, determining at least one shared library relied on by the first application, the at least one shared library being used to provide a running resource required by the first application to run; In a case where a target shared library in the at least one shared library is not installed in the first electronic device, downloading a second software package from the first server, the second software package being used to install the target shared library in the first electronic device; Installing the first software package and the second software package.
2. The method of claim 1, wherein, After the installation of the first software package and the second software package, the method further comprises: In response to an operation of starting the first application, obtaining a first resource from the first software package; According to the first identifier, obtaining a second resource, the second resource being a shared library resource, and the second resource comprising a resource in the second software package; According to the first resource and the second resource, displaying a first interface of the first application.
3. The method according to claim 1 or 2, characterized in that, The method further comprises: In a case where the at least one shared library has been installed in the first electronic device, installing the first software package.
4. The method according to any one of claims 1 to 3, characterized in that, The first server comprises first version information of the target shared library, the second software package comprises second version information of the target shared library, and after the installation of the first software package and the second software package, the method further comprises: Obtaining the first version information from the first server; In a case where the first version information is different from the second version information, downloading a third software package corresponding to the first version information from the first server, the third software package being used to update the target shared library in the first electronic device; Installing the third software package.
5. The method according to any one of claims 1 to 4, characterized in that, After the installation of the first software package and the second software package, the method further comprises: Obtaining application dependency information of the target shared library, the application dependency information being used to indicate an application in the first electronic device that relies on the target shared library; In a case where the application dependency information of the target shared library satisfies a shared library clearing condition, uninstalling the second software package.
6. The method according to any one of claims 1 to 5, characterized in that, The first identifier comprises at least one first sub-identifier, and a first sub-identifier corresponding to each of the at least one shared library comprises at least one of a package name of the shared library, a module name of the shared library, and version information of the shared library.
7. The method of claim 6, wherein, The downloading of the second software package of the target shared library from the first server comprises: According to the first sub-identifier corresponding to the target shared library, sending a shared library downloading request to the first server, the shared library downloading request being used to request to download the second software package corresponding to the target shared library.
8. The method according to any one of claims 1 to 7, characterized in that, The first software package is generated according to a first description package in a development process of the first application, the first description package corresponds to a shared library used to provide a running resource required by the first application to run, and the first software package comprises the first identifier.
9. An application management method characterized by comprising: The method is executed by a second electronic device, and the method comprises: In response to the operation of developing the first application, a first description package is downloaded from a second server, the first description package corresponding to a first shared library of a development kit required for providing a development kit required for running the first application; According to the first description package, a first software package of the first application is generated, the first software package including a first identifier, the first identifier indicating a second shared library, the second shared library including the first shared library; The first software package is sent to the first server, the first software package being used for the first electronic device to download the first application and a target shared library not installed in the first electronic device from the second shared library from the first server.
10. The method of claim 9, wherein, The first software package includes: According to the first description package, the second shared library is determined; According to a description file corresponding to the second shared library, the first identifier is generated; The first identifier is added to the first software package.
11. The method of claim 10, wherein, The second shared library includes: According to a description file carried by the first description package, the first shared library is determined; According to dependency information carried by the first description package, a third shared library is determined, the first shared library depending on the third shared library; According to the first shared library and the third shared library, the second shared library is determined.
12. The method according to any one of claims 9 to 11, characterized in that, The first description package includes: In response to the operation of developing the first application, the position information of the first description package is obtained, the position information of the first description package being used to indicate a storage position of the first description package in the second server; According to the position information of the first description package, a description package download request is sent to the second server, the description package download request being used to request to download the first description package.
13. An application management system, characterized by The application management system includes a first server, a second server, a first electronic device, and a second electronic device; The second electronic device is configured to, in response to an operation of developing a first application, send a description package download request to the second server, the description package download request being used to request to download a first description package, the first description package corresponding to a first shared library of a development kit required for providing a development kit required for running the first application; The second server sends the first description package to the second electronic device; The second electronic device generates a first software package of the first application according to the first description package, the first software package including a first identifier, the first identifier indicating a second shared library, the second shared library including the first shared library; The second electronic device sends the first software package to the first server; The first electronic device sends an application download request to the first server in response to an operation of indicating to install the first application, the application download request being used to request to download a first software package of the first application; The first server sends the first software package to the first electronic device; The first electronic device determines the second shared library according to a first identifier carried by the first software package; In a case where a target shared library in the second shared library is not installed in the first electronic device, the first electronic device downloads a second software package of the target shared library from the first server; The first electronic device installs the first software package and the second software package.
14. An electronic device, comprising: The electronic device comprises: a display screen for interface display; a transceiver for sending and receiving radio signals; a memory for storing computer program instructions; a processor for executing the computer program instructions to support the first electronic device to implement the method of any one of claims 1 to 8, or implement the method of any one of claims 9 to 12.
15. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and when the computer program runs on a computer, the method of any one of claims 1 to 8 is implemented, or the method of any one of claims 9 to 12 is implemented.
16. A computer program product comprising instructions, characterized in that, When the computer program product runs on a computer, the computer executes the method of any one of claims 1 to 8, or implements the method of any one of claims 9 to 12.