Application management method and electronic device
By storing the development toolkit in a shared library, multiple applications can share the same shared library, enabling independent updates and management. This solves the problems of wasted storage space and difficult version management, and improves the stability and security of applications.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2026-04-02
AI Technical Summary
Integrated development kits in applications lead to wasted storage space and difficulties in version management. Furthermore, the quality auditing of application software packages is complex and prone to security vulnerabilities.
By storing development toolkits in a shared library, multiple applications can share the same shared library. The software packages in the shared library are independent of the application and the operating system, and can be updated and managed independently.
It reduces the size of application packages, saves storage space, simplifies version management of development kits, and improves application stability and security.
Smart Images

Figure CN2025100185_02042026_PF_FP_ABST
Abstract
Description
An application management method and electronic device
[0001] The present application claims priority from the Chinese patent application No. 202411398149.X filed on September 30, 2024, and entitled "An application management method and electronic device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the technical field of computer, and in particular, to an application management method and electronic device. BACKGROUND
[0003] With the development and prosperity of application (APP) ecology, the types and quantity of applications have experienced explosive growth. In application development, using existing function modules can improve the speed of application development.
[0004] In a possible implementation, a developer uses a development kit (such as a software development kit (SDK)) to assist in developing an application. During the development of the application, the developer integrates a published development kit into the software engineering of the application to be developed, and obtains a software package of the application by compiling the software engineering. The software package includes the development kit. Subsequently, the developer uploads the software package of the application to a server, and a first electronic device can download the software package of the application from the server to install the application into the operating system of the first electronic device.
[0005] However, the development kit integrated in the application occupies a large amount of storage space. SUMMARY
[0006] To solve the above technical problems, the present application provides an application management method and electronic device. In the technical solution provided by the present application, the development kit relied on by the application is stored in a shared library. The shared library has an independent software package. By installing the software package of the shared library in the first electronic device, multiple applications share the development kit in the shared library. Thus, when multiple applications that refer to the same shared library are installed in the first electronic device, multiple copies of the shared library do not appear on the first electronic device.
[0007] To achieve the above technical purposes, the present application provides the following technical solutions:
[0008] In a first aspect, a method for application management is provided, and is applied to a first electronic device. 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; determining at least one shared library relied on by the first application according to a first identifier carried by the first software package, the at least one shared library being used to provide a running resource required by the first application; 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; and installing the first software package and the second software package.
[0009] In this way, the decoupling of the development kit and the software package of the application and the operating system is achieved. On the one hand, the shared library supports providing a running resource for multiple applications, so that multiple applications share the same shared library. Compared with the way of integrating the SDK in the software package of the application, this way helps to reduce the size of the software package of the application. And avoid the case that the same SDK is carried in the software development package of multiple applications, which helps to save the storage space in the first electronic device.
[0010] On the other hand, the software package of the shared library supports being independently acquired from the first server, so that the update of the shared library is no longer dependent on the version update of the operating system or the application. In this way, the first electronic device supports independent update of the shared library, which helps to acquire the repaired running resource in time by updating the shared library in the case where the running resource provided by the shared library has a problem, so as to provide the correct running resource for the first application, and helps to improve the usability of the shared library.
[0011] In addition, in the scheme provided in the embodiments of the present application, since the software package of the shared library and the software package of the application are independent of each other, the shared library is not included in the software package of the application, and therefore the application developer does not need to be responsible for the qualification detection process of the shared library. In this way, the case that the application cannot be launched due to the problem of the shared library can be avoided, and the workload of the application developer is reduced.
[0012] In a possible implementation manner, after the first software package and the second software package are installed, the method further comprises: in response to an operation of starting the first application, acquiring a first resource from the first software package; acquiring a second resource according to the first identifier, the second resource being a shared library resource, and the second resource including a resource in the second software package; and displaying a first interface of the first application according to the first resource and the second resource.
[0013] In this way, the shared library relied on by the first application is determined through the first identifier, so as to call the corresponding running resource from the shared library to support the normal running of the first application. In this way, the size of the first software package is reduced while the normal running of the first application is ensured.
[0014] In a possible implementation, the application management method further includes: in a case where the at least one shared library is already installed in the first electronic device, installing the first software package.
[0015] In this way, the shared library already installed in the first electronic device is shared by multiple applications. In a case where the at least one shared library relied on by the first application is already installed in the first electronic device, the first application can normally run in the first electronic device after the first software package is installed, without the need to reinstall the at least one shared library relied on by the first application. Compared with independently configuring a shared library for each application or carrying an SDK in a software package of an application, this approach helps to avoid installing multiple same shared libraries redundantly in the first electronic device, thereby helping to save storage space in the first electronic device.
[0016] In a possible implementation, the first server includes first version information of the target shared library, the second software package includes second version information of the target shared library, and after the first software package and the second software package are installed, the method further includes: obtaining the first version information of the target shared library from the first server; in a case where the first version information is different from the second version information, downloading, from the first server, a third software package corresponding to the first version information, the third software package being used to update the target shared library in the first electronic device; and installing the third software package.
[0017] In this way, by updating the version of the target shared library already installed in the first electronic device, independent updating of the target shared library is implemented, and the flexibility of updating a shared library is improved. In this way, after a new version of the target shared library is uploaded to the first server, the first electronic device can install the latest version of the target shared library in a timely manner. By supporting independent updating of a shared library, a new shared library can be obtained and installed in a timely manner in a case where an old version of the target shared library has a problem, and the stability of an application in a process of running in dependence on the target shared library is improved.
[0018] In a possible implementation, after the first software package and the second software package are installed, the method further includes: 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 depends on the target shared library; and in a case where the application dependency information of the target shared library satisfies a shared library removal condition, uninstalling the second software package.
[0019] In this way, by checking the dependency of a shared library between applications, the shared library is aged and cleaned up, which helps to clean up a shared library already installed in the first electronic device in a case where the shared library is not depended on by an application. Periodically cleaning up a shared library that is not depended on by an application helps to reduce the occupation of storage space in the first electronic device by the shared library, without affecting the normal running of an application in the first electronic device.
[0020] In a possible implementation, the first identifier includes at least one first sub-identifier, and the first sub-identifier corresponding to each of the at least one shared library includes 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.
[0021] In this way, by including the first sub-identifier corresponding to each of the shared libraries depended on by the first application in the first identifier, the first electronic device can determine all the shared libraries depended on by the first application according to the first identifier after obtaining the first software package, and then verify whether the shared libraries are installed according to the first sub-identifier, and obtain the second software package from the first server through the sub-identifier of the target shared library in a case where the target shared library is not installed.
[0022] Moreover, the package name of the shared library, the module name of the shared library, and the version information of the shared library can indicate a specific shared library, so as to ensure that the second software package downloaded by the first electronic device from the first server is the software package corresponding to the target shared library depended on by the first application. This helps to avoid the case where the first electronic device obtains the second software package with incorrect version information from the first server, so that the version information of the target shared library installed in the first electronic device does not match the version information of the target shared library depended on by the first application, and the first application cannot run, and helps to improve the stability of the first application.
[0023] In a possible implementation, downloading the second software package of the target shared library from the first server includes: sending, to the first server, a shared library download request according to the first sub-identifier corresponding to the target shared library, where the shared library download request is used to request to download the second software package corresponding to the target shared library.
[0024] In this way, after obtaining the first software package, the first electronic device automatically requests to obtain the second software package from the first server according to the first sub-identifier corresponding to the target shared library in a case where it is determined that the target shared library required for running the first application is missing. That is, the processing logic of determining whether the target shared library is missing and requesting to obtain the shared library are triggered by the first electronic device, and the first server only needs to be responsible for managing the first software package and the second software package. In this way, it is helpful to simplify the service logic required for the first server to provide the software package download service for multiple electronic devices, and to reduce the computing pressure of the first server.
[0025] In a possible implementation, 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 of a running resource required for running the first application, and the first software package includes the first identifier.
[0026] Thus, the first software package is generated according to the description package of the shared library during development of the first application, so that the first software package carries the first identifier. The establishment of the dependency relationship between the application and the shared library during the application development process enables the application developer to directly check and verify the correctness of the first identifier, which helps to ensure that the first electronic device, after obtaining the first software package, directly determines all shared libraries on which the first application depends according to the first identifier.
[0027] In a second aspect, an application management method is provided, which is applied to 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 used to provide a development kit required for running the first application; generating 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; and sending the first software package to a 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 server.
[0028] Thus, in the case that the software package of the application and the software package of the shared library are independent of each other, the first identifier is generated through the description file of the shared library, and the first identifier is carried in the first software package, thereby establishing the dependency relationship between the application and the shared library. Through the first identifier of the software package of the application, on the one hand, the third-party SDK does not need to be integrated in the software package of the application, which helps to reduce the size of the software package of the application; on the other hand, the shared library on which the application depends is indicated through the first identifier, which helps the first electronic device to install the shared library on which the application depends in advance before running the application, thereby ensuring the normal running of the application.
[0029] In addition, since the source code of the third-party SDK is not included in the software package of the application, the situation that the software package of the application cannot be published due to the quality problem of the third-party SDK does not occur during the detection of the server on whether the software package of the application is compliant. The software package of the application and the third-party SDK are separated from each other, which helps to reduce the management difficulty of the application developer on the code quality of the software package of the application, and helps to improve the development efficiency of the application.
[0030] In a possible implementation, the first software package of the first application is generated according to the first description package, including: determining the second shared library according to the first description package; generating the first identifier according to the description file corresponding to the second shared library; and adding the first identifier to the first software package.
[0031] The first description package is uploaded to the second server by the shared library developer, so that during the development of the application, the application developer can determine all shared libraries required by the first application according to the data carried in the first description package. This helps to avoid missing the shared libraries required by the first application in the first identification, and improves the accuracy of the first identification.
[0032] In a possible implementation, the second shared library is determined according to the first description package, including: determining the first shared library according to the description file carried in the first description package; determining the third shared library according to the dependency information carried in the first description package, the first shared library depending on the third shared library; and determining the second shared library according to the first shared library and the third shared library.
[0033] In this way, all shared libraries required by the first application can be determined, so that the first electronic device on the application side installs all shared libraries required by the first application before the first application runs according to the first identification in the first software package, so that the first application can obtain running resources from these shared libraries, and then runs smoothly, which helps to improve the running stability of the first application.
[0034] In a possible implementation, the first description package is downloaded from the second server in response to the operation of developing the first application, including: obtaining location information of the first description package in response to the operation of developing the first application, the location information of the first description package being used to indicate a storage location of the first description package in the second server; and sending a description package download request to the second server according to the location information of the first description package, the description package download request being used to request to download the first description package.
[0035] Uploading the description package of the shared library to the second server helps to freely obtain the description package of the shared library from the second server according to the location information of the description package in any case of application development. Thus, the difficulty of obtaining the description package of the shared library is reduced.
[0036] In a third aspect, an application management system is provided, and 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 from 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 used to provide 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 relied on by the first application for running, and 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 is configured to, in response to an operation of indicating to install the first application, send an application download request to the first server, the application download request being used to request to download 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 according to the first identifier carried in 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.
[0037] In this way, the development kit is decoupled from the software package of the application and the operating system. On the one hand, the shared library supports providing running resources for multiple applications, so that multiple applications share the same shared library. Compared with the way of integrating the SDK in the software package of the application, this way helps to reduce the size of the software package of the application. And avoids the case that the same SDK is carried in the software development package of multiple applications, which helps to save the storage space in the first electronic device.
[0038] On the other hand, the software package of the shared library is supported to be independently acquired from the first server, so that the update of the shared library is no longer dependent on the version update of the operating system or the application. In this way, the first electronic device is supported to independently update the shared library, which helps to timely acquire the repaired running resources by updating the shared library in the case where the running resources provided by the shared library have a problem, so as to provide correct running resources for the first application, and helps to improve the usability of the shared library.
[0039] In addition, in the scheme provided in the embodiments of the present application, since the software package of the shared library and the software package of the application are independent of each other, the shared library is not included in the software package of the application, and therefore the application developer does not need to be responsible for the qualification detection process of the shared library. In this way, the case that the application cannot be put on the market due to a problem of the shared library can be avoided, and the workload of the application developer can be reduced.
[0040] In a fourth aspect, a first electronic device is provided, which includes at least one processor and a memory. The at least one processor is configured to execute instructions stored in the memory, so that the electronic device performs the method in the first aspect and any possible implementation manner of the first aspect. The first electronic device downloads a first software package of a first application from a first server in response to an operation of indicating to install the first application; determines at least one shared library relied on by the first application according to a first identifier carried by the first software package, the at least one shared library being used to provide a running resource required by the first application; downloads a second software package from the first server in a case where a target shared library in the at least one shared library is not installed in the first electronic device, 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.
[0041] In a possible implementation manner, when the processor reads the computer instructions from the memory, the electronic device further performs: in response to an operation of starting the first application, obtaining a first resource from the first software package; and obtaining a second resource according to the first identifier, the second resource being a shared library resource, the second resource including a resource in the second software package; and displaying a first interface of the first application according to the first resource and the second resource.
[0042] In a possible implementation manner, when the processor reads the computer instructions from the memory, the electronic device further performs: in a case where the at least one shared library is installed in the first electronic device, installing the first software package.
[0043] In a possible implementation manner, 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 the computer instructions from the memory, the electronic device further performs: obtaining the first version information of the target shared library 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; and installing the third software package.
[0044] In a possible implementation manner, when the processor reads the computer instructions from the memory, the electronic device further performs: 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; and uninstalling the second software package in a case where the application dependency information of the target shared library satisfies a shared library clearing condition.
[0045] In a possible implementation manner, the first identifier includes at least one first sub-identifier, and the first sub-identifier corresponding to each shared library in the at least one shared library includes at least one of the following: a package name of the shared library, a module name of the shared library, and version information of the shared library.
[0046] In a possible implementation, the second software package of the target shared library is downloaded from the first server, including: sending a shared library download request to the first server according to the first sub-identifier corresponding to the target shared library, the shared library download request being used to request to download the second software package corresponding to the target shared library.
[0047] In a possible implementation, the first software package is generated according to a first description package in a first application development process, the first description package corresponding to a shared library of a running resource required by running of the first application, and the first software package includes the first identifier.
[0048] In a fifth aspect, a second electronic device is provided. The second electronic device includes a processor and a memory, and the at least one processor is configured to execute instructions stored in the memory, so that the electronic device executes the method in the second aspect and any possible implementation of the second aspect. The second electronic device downloads a first description package from a second server in response to an operation of developing a first application, the first description package corresponding to a first shared library of a development kit required for providing a running of the first application; 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, and 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 for the first electronic device to download the first application from the first server and to download a target shared library in the second shared library which is not installed in the first electronic device.
[0049] In a possible implementation, the second electronic device generates the first software package of the first application according to the first description package, including: determining the second shared library according to the first description package; generating the first identifier according to a description file corresponding to the second shared library; and adding the first identifier to the first software package.
[0050] In a possible implementation, the second electronic device determines the second shared library according to the first description package, including: determining a first shared library according to a description file carried by the first description package; determining a third shared library according to dependency information carried by the first description package, the first shared library depending on the third shared library; and determining the second shared library according to the first shared library and the third shared library.
[0051] In a possible implementation, the second electronic device downloads the first description package from the second server in response to the operation of developing the first application, including: obtaining position information of the first description package in response to the operation of developing the first application, the position information of the first description package being used to indicate a storage position of the first description package in the second server; and sending a description package download request to the second server according to the position information of the first description package, the description package download request being used to request to download the first description package.
[0052] In a sixth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores computer program instructions. The computer program instructions, when executed by a processing circuit, implement the method according to any possible implementation of the first aspect or the method according to any possible implementation of the second aspect.
[0053] In a seventh aspect, a chip system is provided. The chip system includes a processing circuit, and a storage medium. The storage medium stores computer program instructions. The computer program instructions, when executed by the processing circuit, implement the method according to any possible implementation of the first aspect or the method according to any possible implementation of the second aspect.
[0054] In an eighth aspect, a computer program product is provided. The computer program product, when executed on a computer, causes the computer to perform the method according to any possible implementation of the first aspect or the method according to any possible implementation of the second aspect.
[0055] The technical effects of the method according to any possible implementation of the fourth aspect to the eighth aspect can refer to the technical effects of the method according to any possible implementation of the first aspect or the method according to any possible implementation of the second aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0056] FIG. 1 is a schematic diagram of a software package according to the related art;
[0057] FIG. 2 is a schematic diagram of another software package according to the related art;
[0058] FIG. 3 is a schematic diagram of an application management system according to an embodiment of the present application;
[0059] FIG. 4 is an interaction diagram of an application management system according to an embodiment of the present application;
[0060] FIG. 5 is a functional module diagram of an application management system according to an embodiment of the present application;
[0061] FIG. 6 is a structural diagram of a first electronic device according to an embodiment of the present application;
[0062] FIG. 7 is a software structure block diagram of a first electronic device according to an embodiment of the present application;
[0063] FIG. 8 is a structural diagram of a server according to an embodiment of the present application;
[0064] FIG. 9 is a flow diagram of an application management method according to an embodiment of the present application;
[0065] FIG. 10 is a content diagram of a description package of a shared library according to an embodiment of the present application;
[0066] FIG. 11 is a content diagram of a software package of a shared library according to an embodiment of the present application;
[0067] FIG. 12 is a compilation diagram of a shared library development process according to an embodiment of the present application;
[0068] FIG. 13 is a generation diagram of a software package of an application according to an embodiment of the present application;
[0069] FIG. 14 is a flow diagram of an application installation method according to an embodiment of the present application;
[0070] FIG. 15 is a module interaction diagram of application installation according to an embodiment of the present application;
[0071] FIG. 16 is a running diagram of an application dependent on a shared library according to an embodiment of the present application;
[0072] FIG. 17 is an interaction diagram of a shared library process call according to an embodiment of the present application;
[0073] FIG. 18 is a running diagram of an application dependent on a shared library according to an embodiment of the present application;
[0074] FIG. 19 is a flow diagram of a shared library update according to an embodiment of the present application;
[0075] FIG. 20 is a flow diagram of a shared library aging cleanup according to an embodiment of the present application;
[0076] FIG. 21 is a module interaction diagram of a shared library update according to an embodiment of the present application;
[0077] FIG. 22 is a module interaction diagram of a shared library aging cleanup according to an embodiment of the present application;
[0078] FIG. 23 is a structural diagram of an electronic device according to an embodiment of the present application;
[0079] FIG. 24 is a structural diagram of a server according to an embodiment of the present application. DETAILED DESCRIPTION
[0080] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] 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.
[0085] 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:
[0086] In an implementation, the development kit is embedded in the application. That is, the development kit is imported into the source code of the application in the application development state by the method of embedded integration and distribution, and then a software package of the application is generated by compiling. The development kit is released together with the software package of the application, and is installed together with the application on the first electronic device through the software package of the application. The first electronic device switches the application from the storage state to the running state in response to the application running instruction, and the binary source code in the development kit can be run in the running state application to implement the functions supported by the development kit.
[0087] In this case, the development kit is included in the software package of the application, the life cycle of the development kit completely overlaps the life cycle of the application, the version of the development kit is updated with the update of the application, and the development kit is deleted with the uninstallation of the application. The type and version of the development kit integrated in the application are determined by the application developer, and different applications can respectively integrate the same development kit.
[0088] As shown in FIG. 1, three applications are installed on the first electronic device, and the existing development kits are integrated in the three applications. For example, SDK1 of version 1.0, SDK2 of version 1.0 and SDK3 of version 1.0 are integrated in APP1; SDK1 of version 2.0, SDK2 of version 2.0 and SDK3 of version 2.0 are integrated in APP2; and SDK1 of version 3.0, SDK2 of version 3.0 and SDK3 of version 3.0 are integrated in APP3.
[0089] In this implementation, on the one hand, since the software package of each application needs to carry the development kit dependent thereon, multiple applications can integrate the same development kit, which causes the repeated development kits to occupy the 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 versions of the development kit in different applications can be different, the development kit is bound with the software package of the application, needs to be released together with the software package of the application, and the development kit cannot be upgraded independently, causing difficulty in version management of the development kit.
[0090] In addition, in order to ensure the quality of the software package of the application, the code quality, security and the like of the software package of the application need to be audited before the application is put on the application distribution platform. Since the development kit is integrated in the software package of the application, the developer of the application needs to manage the code and content quality of the development kit, so as to avoid the software package of the application being rejected by the application distribution platform due to the quality problem of the development kit.
[0091] Due to the lack of control over the quality of the versions of the SDK, integrating the source code of the SDK in the software package of the application can easily lead to security vulnerabilities, malicious behavior, privacy leaks, and other problems in the software package of the application.
[0092] In another implementation, a running application dynamically loads a system library to implement a corresponding function. The application development state declares a system library to be loaded, and the application compilation state builds the source code of the application itself, without the need to package the system library in the software package of the application. Optionally, the system library includes a plurality of development tool kits. The operating system of the first electronic device provides the system library, and after the application is converted from the storage state to the running state, the running application dynamically scans the system library according to the file directory, so as to call the system library to implement a corresponding function. For example, the running application scans a dynamic library in a specified directory, and loads the system library into the namespace linked by the application, and the running application executes a native call to the system library.
[0093] As shown in FIG. 2, three applications, APP-1, APP-2, and APP-3, are installed on the first electronic device; the three applications include a system library loading declaration "System.loadLibrary". The three applications can depend on the same system library, and the system library does not need to be packaged in the software package of the application. The running application calls the system library according to the system library loading declaration.
[0094] In this implementation, the type and version of the system library are related to the operating system, and the system library is updated, added, or deleted along with the operating system. Since the version of the operating system determines the type and version of the available system library, and the running of the application depends on the system library, this leads to the fact that the version of the application strictly depends on the version of the operating system. In the case where the version of the application does not match the version of the operating system, the application can not run due to the lack of a corresponding system library in the operating system. In addition, the system library is released along with the operating system, resulting in a long update cycle of the system library, and in the case where the system library has a problem, the timeliness of repairing the system library is poor.
[0095] Based on the above problems, an application management method is proposed in the embodiments of the present application. In response to an installation operation for a first application, a first electronic device acquires a first software package of the first application. In the case where at least one shared library that the first application depends on is missing, the first electronic device acquires at least one second software package according to the first software package, the shared library being used to provide a development tool kit required by the first application for running; installs the at least one shared library according to the at least one second software package, and installs the first application according to the first software package. Optionally, the at least one shared library refers to all shared libraries that the first application depends on.
[0096] In this way, the development kit is decoupled from the software package of the application and the operating system. On the one hand, the shared library supports the development kit for multiple applications, so that multiple applications share the same shared library. Compared with the way of integrating the development kit in the software package of the application, this way helps to reduce the size of the software package of the application and avoid the case that the software development package of multiple applications carries the same development kit, thereby helping to save the storage space in the first electronic device.
[0097] On the other hand, the software package of the shared library can be obtained independently, so that the update of the development kit is no longer dependent on the version update of the operating system or the application. In this way, the shared library is supported to be updated independently, which helps to provide the new development kit in time by updating the shared library in the case that the development kit in the shared library has a problem, that is, the original version of the development kit has a problem, and improves the usability of the shared library.
[0098] In addition, in the scheme provided in the embodiments of the present application, since the software package of the shared library and the software package of the application are independent of each other, the shared library is not included in the software package of the application, so the application developer does not need to be responsible for the qualification detection process of the shared library. In this way, the case that the application cannot be put on the shelf due to the problem of the shared library can be avoided, which helps to improve the convenience of the application using the shared library.
[0099] Exemplarily, FIG. 3 is a schematic diagram of an application management system to which the application management method provided in the embodiments of the present application is applied. As shown in FIG. 3, the application management system includes a first electronic device 100 and a first server 200.
[0100] In some embodiments, the first electronic device 100 can also be referred to as a terminal device, an access terminal, a subscriber unit, a subscriber station, a mobile station, a mobile, a remote station, a remote terminal, a mobile device, a user terminal, a wireless communication device, a user agent, or a user equipment, etc. The first electronic device 100 in the embodiments of the present application can be a mobile phone, a personal computer, a tablet computer (Pad), a computer with wireless transceiver function, a smart watch, a smart bracelet, a virtual reality (VR) first electronic device, an augmented reality (AR) first electronic device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a vehicle-mounted terminal, a road side unit (RSU) with terminal function, etc.
[0101] Optionally, the operating system installed by the first electronic device 100 includes, but is not limited to or other operating systems, and the operating system can run an application to realize corresponding functions. For example, the operating system installed by 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, uninstalling, etc. of shared libraries and applications. The first electronic device 100 supports a user to obtain a software package of an application and a software package of a shared library from the application market.
[0102] In some embodiments, the first server 200 can be a cloud server or a network server, etc. a device or server with computing function. The above-mentioned server can be a server, a server cluster composed of multiple servers, or a cloud computing service center. The first server 200 can be a background server with an application market, providing services such as auditing, shelving, distribution, etc. of installation packages of shared libraries and applications. For example, the first server 200 can be referred to as a cloud of an application market, also known as an application distribution platform server.
[0103] Optionally, the first server 200 is configured to manage software packages of the application and the shared library, and in the case that the first electronic device 100 needs to install the application or the shared library, the first electronic device 100 sends a request to the server 200, the server 200 provides download information to the first electronic device 100, and the first electronic device 100 acquires the installation package of the application or the shared library from the first server according to the download information, so as to subsequently install the application or the shared library by the first electronic device 100.
[0104] Optionally, the application management system further comprises at least one of the second electronic device 300 and the second server 400. The first electronic device 100 and the first server 200 in the application management system participate in the user-side application management method, and the first server 200, the second electronic device 300 and the second server 400 participate in the development-side application management method.
[0105] In some embodiments, the second electronic device 300 can be a computer device with software development function. The second electronic device 300 includes but is not limited to a mobile phone, a tablet computer, a notebook computer, a smart screen, a vehicle-mounted terminal, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a wearable device, an artificial intelligence (AI) device, etc. The second electronic device 300 is configured to provide an integrated development environment (IDE), and the shared library or the application can be developed in the IDE. The second electronic device 300 includes a software project of the application to be developed, and the software package of the application can be generated by compiling the software project.
[0106] The second electronic device 300 is divided into two categories according to different development subjects: an application development device and a shared library development device. The application development device is an electronic device used by a developer of the application, and the shared library development device is an electronic device used by a developer of the shared library.
[0107] Optionally, the application development device and the shared library development device are different electronic devices, or the application development device and the shared library development device are the same electronic device. For example, the application 1 and the shared library 1 are developed by the same developer, and the application development device and the shared library development device are the same electronic device.
[0108] In some embodiments, the second server 400 is configured to manage information about the at least one shared library. The second server 400 can be a cloud server or a network server, or any other device or server having a computing function. The server can be a single server, a server cluster composed of multiple servers, or a cloud computing data center. The second server 400 is configured to provide information about the shared library to a developer of an application during development of the application, so that the developer establishes a dependency relationship between the application and the shared library.
[0109] Optionally, the first server 200 and the second server 400 are the same server, which is configured to manage both the software package of the shared library and the description package of the shared library. The description package of the shared library is configured to establish a dependency relationship between the application and the shared library during development of the application. During development of the application, the application development device 320 obtains the description package of the shared library from the second server 400, and sets an integration dependency between the application and the shared library according to the description package of the shared library.
[0110] The software package of the shared library is configured to install the shared library in the first electronic device 100, so that the application calls the development kit in the shared library when the application runs in the first electronic device 100.
[0111] Optionally, the first server 200 and the second server 400 are different servers. The first server 200 is configured to provide the software package of the shared library to the first electronic device 100 on the usage side, and the second server 400 is configured to provide the description package of the shared library during development of the application.
[0112] FIG. 4 is an interaction diagram of an application management system according to an embodiment of the present application. The application management system includes the hardware devices as shown in FIG. 3. In this example, the second electronic device 300 in FIG. 3 is divided into a shared library development device 310 and an application development device 320 for the purpose of clarity of description.
[0113] As shown in FIG. 4, the shared library development device 310 is responsible for developing the shared library. After the development of the shared library is completed, the shared library development device 310 publishes the description package of the shared library to the second server 400, and publishes the software package of the shared library to the first server 200.
[0114] For the development of the application, the application development device 320 obtains the description package of the shared library required during running of the application from the second server 400, and generates a shared library identifier (e.g., a first identifier in the following embodiment) according to the description package. The software package of the application can carry the shared library identifier. After the development of the application is completed, the application development device 320 publishes the software package of the application to the first server 200.
[0115] The first electronic device 100 acquires the corresponding software package from the first server 200 in the case where the software package of the application needs to be downloaded, or the software package of the shared library needs to be downloaded.
[0116] In the process of implementing the application management method, the operation steps performed by each hardware device in the application management system and the interaction between the hardware devices are completed by the software functions in the hardware devices. The following describes the function modules included in the application management system.
[0117] FIG. 5 is a schematic diagram of function modules of the application management system provided by the embodiment of the present application. As shown in FIG. 5, the application management system includes the following function modules: a tool module, a package manager (PM), an application distribution platform server, an application distribution platform client, and an operating system.
[0118] The tool module is a function module in the second electronic device 400. The tool module is configured to provide a developer tool to support a developer to develop the software package of the application based on the shared library and the software package specification of the application. Optionally, the tool module includes an IDE and a compilation and building tool. The IDE is responsible for software engineering management of the application, and the compilation and building tool is configured to compile the software engineering of the application to build the software package of the application. For example, the compilation and building tool is also called a debugging tool or a compilation and packaging tool.
[0119] The package manager is a function module in the second server 400 in FIG. 4. The package manager is responsible for version management of the shared library and dependency management of the shared library. The package manager is configured to assist a developer to create the application dependent on the shared library during the development of the application.
[0120] The application distribution platform server is a function module in the first server 200. The application distribution platform server includes an application shelf sub-module and an application distribution sub-module. The application shelf sub-module is responsible for submission, detection, audit, and shelving of the software package of the shared library and the software package of the application. The application distribution sub-module is responsible for distributing the latest version of the software package of the shared library and the software package of the application to the first electronic device 100.
[0121] The application distribution platform client is a function module in the first electronic device 100. The application distribution platform client includes an application query sub-module, an application download sub-module, an application installation sub-module, an application upgrade sub-module, and a declaration lifecycle management sub-module.
[0122] The query submodule is configured to obtain the software package of the application and the shared library identifier from the application distribution platform server; the application download submodule is configured to download the installation package of the application and the software package of the shared library from the application distribution platform server; the application installation submodule is configured to call an installation module in the operating system to install the corresponding application according to the software package of the application and install the corresponding shared library according to the software package of the shared library; the application upgrade submodule is configured to detect the version of the application and the shared library and download and install a new version of the application or the shared library; and the lifecycle management submodule is configured to perform version aging management on the shared library. For example, in a case where a certain shared library in the first electronic device is not relied on by an application, the lifecycle management submodule calls a software management module in the operating system to uninstall the shared library.
[0123] The operating system is included in the first electronic device 100. The operating system includes a software package management module responsible for installing and managing the software package of the application and the software package of the shared library.
[0124] For ease of understanding, refer to FIG. 6, which shows a structural schematic diagram of an electronic device. The electronic device is the first electronic device 100 and / or the second electronic device 300 in FIG. 3. Hereinafter, the first electronic device 100 is taken as an example for description. As shown in FIG. 6, the first electronic device 100 can include a processor 110, a memory 120, a communication module 130, and a display screen 140.
[0125] The processor 110 can include one or more processing units. For example, the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors.
[0126] The memory 120 includes an external memory and an internal memory. The internal memory can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various function applications and data processing of the first electronic device 100 by running the instructions stored in the internal memory. The internal memory can include a program storage area and a data storage area. The memory 120 can be disposed in the processor 110 to store instructions and data. The external memory refers to a memory card connected with the first electronic device 100 through an external memory interface.
[0127] The communication module 130 is configured to implement the communication function of the first electronic device 100. Optionally, the communication module 130 includes an antenna, a mobile communication module, a wireless communication module, a modem processor, a baseband processor and the like. Optionally, at least part of the functions of the mobile communication module can be arranged in the processor. The wireless communication module is configured to support the first electronic device to perform wireless communication.
[0128] The first electronic device 100 implements the display function through the GPU and the display screen 140. The display screen 140 is configured to display images, videos and the like. In some embodiments, the first electronic device 100 can include one or N display screens 140, where N is a positive integer greater than 1. The GPU and the display screen 140 can be configured to support the first electronic device 100 to display an interactive interface of a system tool or a third-party application, where the interactive interface displays an interactive interface generated by a running application.
[0129] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the first electronic device 100. In other embodiments of the present application, the first electronic device 100 can include more or fewer components than those illustrated, or combine certain components, or split certain components, or different arrangement of components. The illustrated components can be implemented in hardware, software or a combination of software and hardware.
[0130] In some embodiments, the software system of the first electronic device 100 adopts a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture or a cloud architecture. The embodiments of the present application take the layered architecture of the HarmonyOS system as an example to illustrate the software structure of the first electronic device 100.
[0131] FIG. 7 is a software structure block diagram of the first electronic device according to an embodiment of the present application. The first electronic device is the first electronic device 100 in FIG. 3. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the TS (arkts runtime) runtime and the system library, and the kernel layer.
[0132] The application layer can include a series of application software packages. As shown in FIG. 7, the application layer includes the application query sub-module, the application download sub-module, the application installation sub-module, the application upgrade sub-module, the declaration lifecycle management sub-module and the software package management module illustrated in FIG. 5. In the embodiments of the present application, the application store, the shared library and the first application are located in the application layer.
[0133] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications of the application layer. The application framework layer includes some pre-defined functions. As shown in the figure, the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc.
[0134] The window manager is configured to manage window programs. The window manager can acquire a display screen size, determine whether there is a status bar, lock a screen, and capture a screen, etc.
[0135] The content provider is configured to store and acquire data, and make the data accessible by applications. The data can include videos, images, audios, dialed and received calls, browsing history and bookmarks, phone books, etc.
[0136] The view system includes visual controls, such as a control for displaying text, a control for displaying pictures, etc. The view system can be used to build an application. A display interface can be composed of one or more views. For example, a display interface including a short message notification icon can include a view for displaying text and a view for displaying pictures.
[0137] The phone manager is configured to provide communication functions of the first electronic device 100. For example, management of a call state (including call connection, call hang-up, etc.).
[0138] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.
[0139] The notification manager enables an application to display notification information in a status bar. The notification manager can be used to convey a notification type of message, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify a download completion, a message reminder, etc. The notification manager can also be a notification in a form of a chart or a scroll bar text appearing in a system top status bar, such as a notification of an application running in the background, and can also be a notification in a form of a dialogue window appearing on a screen. For example, a text information is prompted in a status bar, a prompt sound is emitted, the electronic device is vibrated, an indicator light is blinked, etc.
[0140] The system library can include a plurality of functional modules. For example, a surface manager, media libraries, a three-dimensional graphics processing library (e.g., OpenGL ES), a two-dimensional graphics engine (e.g., SGL), etc.
[0141] The surface manager is used to manage the display subsystem and provides a fusion of two-dimensional (2D) and three-dimensional (3D) layers for multiple applications.
[0142] The media library supports playback and recording of a plurality of commonly used audio, video formats, and static image files, etc. The media library can support a plurality of audio and video encoding formats, such as: moving picture experts group 4 (MPEG4), high efficiency 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), portable network graphics (PNG), etc.
[0143] The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, synthesis, and layer processing, etc. The two-dimensional graphics engine is a drawing engine for 2D drawing.
[0144] The kernel layer is a layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, and a sensor driver.
[0145] Exemplarily, FIG. 8 shows a structure of a server. The server corresponds to the first server 200 and / or the second server 400 in FIG. 3. As shown in FIG. 8, 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 can also be included in the processor 801.
[0146] The processor 801 can be a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs of the solutions of the present application.
[0147] The communication line 802 can include at least one channel for transmitting information between the above-mentioned components.
[0148] The memory 803 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk storage 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 that can be accessed by a computer, but is not limited to this. The memory 803 can exist independently, and is connected to the processor 801 through the communication line 802. The memory 803 can also be integrated with the processor 801.
[0149] The memory 803 is configured to store computer-executed instructions for implementing the solutions of the present application, and the processor 801 is configured to control the execution of the computer-executed instructions stored in the memory 803. The processor 801 is configured to execute the computer-executed instructions stored in the memory 803, so as to implement the application management method provided in the following embodiments of the present application.
[0150] The communication interface 804 is configured to communicate with other devices. In the embodiments of the present application, the communication interface 804 can be a module, a circuit, a bus, an interface, a transceiver or other device capable of realizing the communication function. Optionally, when the communication interface 804 is a transceiver, the transceiver can be a transmitter arranged independently, which can be used to send information to other devices. The transceiver can also be a receiver arranged independently, which can be used to receive information from other devices. The transceiver can also be a component integrating the functions of sending and receiving information. The specific implementation of the transceiver is not limited in the embodiments of the present application.
[0151] Optionally, the computer-executed instructions in the embodiments of the present application can also be referred to as application program codes, instructions, computer programs or other names, which are not limited in the embodiments of the present application.
[0152] In a particular implementation, as an example, the processor 801 can include one or more CPUs, such as CPU0 and CPU1 in FIG. 8. In a particular implementation, as an example, the server 200 can include multiple processors, such as the processor 801 and the processor 807 in FIG. 8. Each of these processors can be a single-CPU processor or a multi-CPU processor. A processor here can refer to one or more devices, circuits, and / or processing cores for processing data, such as computer program instructions.
[0153] It can be understood that the structure as shown in FIG. 7 does not constitute a specific limitation on the implementation of the server structure. In other embodiments of the present application, the server can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0154] The application management method provided by the present application is described below with the application management system as the execution subject. The application management method of the application management system mainly includes two parts of the development side and the application side. For the convenience of understanding, the overall scheme is introduced first, and the implementation details of the method in the development side and the application side are introduced in the following embodiments.
[0155] Please refer to FIG. 9, which is a flowchart of the application management method provided by the embodiments of the present application. As shown in FIG. 9, the execution subject of the method includes the first server 200, the shared library development device 310, the application development device 320, and the second server 400 in FIG. 4. The application management method provided by the embodiments of the present application can include steps S910 to S970.
[0156] In step S910, the shared library development device develops a shared library.
[0157] The shared library is used to provide running resources required by the application. Optionally, the running resources include, but are not limited to, library files, and binary files for implementing preset functions such as development kits. In some embodiments, the shared library cannot be independently run in the first electronic device; the shared library is called by the application under the triggering condition of the application in the first electronic device. Optionally, the application dependent on the shared library needs to be smoothly run under the support of the shared library. If the shared library dependent by the application is not installed in the first electronic device, the application cannot run. For example, in the case that a certain application in the first electronic device is converted from a storage state to a running state, the application calls the development kit from the shared library.
[0158] Exemplarily, the development kit includes a third-party SDK. The shared library includes a set composed of the library files and the third-party SDK, and an interface for calling the development kit. Different library files and development kits are called through different interfaces. The types and quantities of the library files and the development kits included in the shared library are designed by the shared library developer, which are not limited in the present application.
[0159] In some embodiments, the shared library provided by the embodiments of the present application belongs to an inter-application shared library, and the life cycle of the shared library in the first electronic device is not bound to the life cycle of the application, and the first electronic device supports independent acquisition, updating, and deletion of the shared library. After a certain shared library is installed in the first electronic device, multiple applications can share the shared library, for example, multiple applications can call the development kit in the shared library.
[0160] For example, application 1, application 2, and application 3 in the first electronic device all need to use development kit 1 during running, and shared library 1 includes development kit 1, so that application 1, application 2, and application 3 can all call development kit 1 from shared library 1. In this way, the same shared library is only stored in the first electronic device, which helps to avoid repeated storage of the shared library in the first electronic device.
[0161] Optionally, the shared library is developed by any open source team or company. The shared library development device is a device used by a developer of the shared library. After the development of the shared library is completed, the shared library development device can send a software package of the shared library to the first server, and provide the software package of the shared library to the first electronic device through the first server, so as to install the software package of the shared library in the first electronic device.
[0162] In one example, the shared library development device supports an IDE, and the shared library is developed in the IDE. Exemplarily, during the development of the shared library, the developer performs a development operation based on a shared library development specification, and the shared library development device establishes a software engineering file set of the shared library based on the development operation, so as to subsequently compile the software engineering file set to generate a software package of the shared library and a description package of the shared library. The generation process of the description package of the shared library is introduced below in step S920, and the generation process of the software package of the shared library is introduced in step S930.
[0163] In step S920, the shared library development device sends the description package of the shared library to the second server.
[0164] The description package of the shared library is used to assist in developing an application dependent on the shared library. The application dependent on the shared library refers to an application that needs to call the development kit in the shared library during running. Optionally, the description package of the shared library is used in the application development process, and the first electronic device on the user side is not aware of the description package of the shared library. For example, the developer of the application can locate the shared library through the description file in the description package of the shared library, so as to establish a dependency relationship between the application and the shared library during the application development process.
[0165] Optionally, the application is a program software for implementing a corresponding function in the first electronic device, and the application can implement the corresponding function through user interaction. The application can be a third-party application or a native application of an operating system. Illustratively, the types of the application include but are not limited to a video application, a picture application, a social application, a shopping application, a game application, an office auxiliary application, and the like. The type of the application is determined according to business requirements, which is not limited herein.
[0166] The second server is a background server of a component warehouse, and the component warehouse is a warehouse for storing development components such as shared libraries. The component warehouse is also referred to as a remote component warehouse or a central warehouse. Optionally, the component warehouse stores at least one description package of a shared library. Illustratively, the component warehouse also stores at least one software package of a shared library.
[0167] During the application development process, the application developer accesses the second server through the application development device to obtain the auxiliary program code required in the application development process from the component warehouse.
[0168] In some embodiments, the description package of the shared library includes a description file for identifying the shared library. Optionally, the description package of the shared library includes at least one of the following: coordinate information, a description file, and dependency information.
[0169] The coordinate information is used to indicate the storage location of the description package of the shared library in the component warehouse. Optionally, the coordinate information of the shared library includes the storage coordinates of the software package of the shared library in the component warehouse. The storage coordinates are the access path of the description package of the shared library in the component warehouse. Through the storage coordinates, the software package of the shared library can be obtained from the component warehouse. For example, the coordinate information of a certain shared library is "@accxxxxkit":"1.0.1". In the "@accxxxxkit":"1.0.1" coordinates, the name is accxxxxkit, and the version is 1.01.
[0170] In one example, during the process of compiling the description package of the shared library, the shared library development device specifies coordinate information which can be included in the description package of the shared library. After uploading the description package of the shared library to the component warehouse, the component warehouse obtains the coordinate information from the description package of the shared library, and stores the description package of the shared library if the coordinate is not occupied, or generates and sends prompt information to the shared library development device if the coordinate is occupied, the prompt information being used to prompt the uploading failure of the description package of the shared library. In this case, the shared library development device re-specifies the coordinate information, and repeats the above steps until the description package of the shared library is successfully uploaded.
[0171] In one example, during the process of compiling the software package of the shared library, the shared library development device specifies coordinate information of the software package of the shared library, the coordinate information being included in the software package of the shared library. After uploading the software package of the shared library to the component warehouse, the component warehouse obtains the coordinate information from the software package of the shared library. The component warehouse stores the software package of the shared library if the coordinate is not occupied, or generates and sends prompt information to the shared library development device if the coordinate is occupied, the prompt information being used to prompt the uploading failure of the software package of the shared library. In this case, the shared library development device re-specifies the coordinate information, and repeats the above steps until the software package of the shared library is successfully uploaded.
[0172] In another example, the coordinate information is generated by a second server, the shared library development device requests the second server to generate the coordinate information, the second server generates and sends the coordinate information to the shared library development device, and the shared library development device adds the coordinate information to the description package of the shared library. Subsequently, the shared library development device sends the description package of the shared library to the second server. The second server stores the description package of the shared library according to the coordinate information.
[0173] Illustratively, the second server also stores the software package of the shared library according to the coordinate information. That is, the description package of the shared library or the software package of the shared library can be obtained from the second server through the coordinate information. By uploading the software package of the shared library to the second server, it is convenient to call the capability of the shared library in the application development process.
[0174] The description file is used to identify the shared library, and the shared library can be distinguished from other shared libraries through the description file. Illustratively, the description file is a module.json file in the description package of the shared library. Optionally, the description file includes at least one of the following: the software package name of the shared library, the module name, the version information, and the package type.
[0175] Exemplarily, the bundle name (bundName) is used to indicate the name of the shared library, different shared libraries have different bundle names. The module name (moduleName) is used to represent the module name of the shared library. The version information (versionCode) is used to indicate the version of the shared library. The bundle type (bundType) is used to indicate the type of the bundle. For the shared library, the bundle type of the shared library is: shared type.
[0176] In one example, the description file includes the bundle name, the module name, the version information and the bundle type; specifically includes the following contents: the bundle name "bundName":"com.xxx.id"; the module name "moduleName":"accxxxxkit"; the version information of the shared library "versionCode":"100001"; and the bundle type "bundType":"shared".
[0177] As shown in FIG. 10, the description bundle of the shared library accxxxxkit includes the coordinate information 1010 of the shared library and the description file 1020.
[0178] Optionally, the dependency information is used to indicate at least one upper shared library on which the shared library depends. Exemplarily, in addition to including at least one development kit, the shared library can also indicate other shared libraries referenced by the shared library through the dependency information. The referenced shared library is the upper shared library of the shared library. For example, the dependency information included in the description bundle of the shared library 1 is used to indicate the shared library 2, and the shared library 2 is the upper shared library of the shared library 1.
[0179] In one example, the dependency information includes the coordinate information of at least one upper shared library. In another example, the dependency information includes the description file of at least one upper shared library.
[0180] In some embodiments, the application development device generates the description bundle of the shared library in response to the description bundle generation operation, compiles the software project of the shared library, and generates the description bundle of the shared library. The application development device sends the description bundle of the shared library to the component warehouse. The component warehouse stores the description bundle of the shared library in the case of receiving the description bundle of the shared library.
[0181] Optionally, the component warehouse obtains the coordinate information of the description bundle of the shared library through the description bundle of the shared library, and generates the shared library document according to the coordinate information of the description bundle of the shared library. The shared library document is used to record the coordinates of the description bundle of at least one shared library in the component warehouse. Exemplarily, the shared library document includes the identification information of the shared library and the coordinate information of the description bundle of the shared library.
[0182] In one example, in a case where the description package of the first shared library is received, the component warehouse updates the shared library document according to the coordinate information of the description package of the first shared library. For example, the second server adds the coordinate information of the description package of the first shared library to the shared library document to obtain an updated shared library document.
[0183] In this way, the description package of the shared library stored in the second server can be located through the coordinate information. In a case where the shared library is developed and an application dependent on the shared library needs to be developed, the developer of the application can find the coordinate information of the required description package through the shared library document, and can quickly obtain the description package of the shared library from the second server according to the coordinate information. Compared with the search method of traversing all the description packages of the shared library by the second server, directly indicating the coordinate information of the required description package of the shared library in this way helps to improve the efficiency of obtaining the description package of the shared library.
[0184] In step S930, the shared library development device sends the software package of the shared library to the server.
[0185] The software package of the shared library includes resources required for running the shared library. Optionally, the software package of the shared library includes at least one of the following: a resource file, a binary file, and a description file. The resource file and the binary file include program codes corresponding to the development kit, and the description file is used to identify the shared library. For specific content of the shared library, please refer to the above embodiments.
[0186] As shown in FIG. 11, the software package of the shared library accxxxxkit includes a description file 1110: module.json.
[0187] The following takes the first server as an application distribution platform server and the second server as a component warehouse as an example to introduce and describe the publishing process of the shared library. As shown in FIG. 12, the engineering directory of the shared library accxxxxkit stores files included in the software engineering file set, and generates the description package “accxxxxkit.har” and the software package “accxxxxkit.app” of the shared library by compiling the software engineering file set. Subsequently, the shared library development device sends the description package “accxxxxkit.har” of the shared library to the component warehouse, and sends the software package “accxxxxkit.app” of the shared library to the server.
[0188] After the server receives the software package of the shared library, the server stores the software package of the shared library, so as to return the download information of the software package of the shared library to the first electronic device in a case where the first electronic device requests to download the software package of the shared library.
[0189] It should be noted that there is no limitation on the execution timing between step S920 and step S930; step S920 can be executed prior to step S930, step S920 can be executed after step S930, or step S920 and step S930 can be executed synchronously.
[0190] In some embodiments, the development process of the shared package is completed in the case that the description package of the shared library is sent to the second server and the software package of the shared library is sent to the first server. Optionally, the shared library development device also sends the software package of the shared library to the second server. The application development device can obtain the description package and the software package of the shared library from the component warehouse to develop an application dependent on the shared library. The first electronic device can obtain the software package of the shared library from the server to invoke the shared library during the running of the application in the first electronic device. Optionally, the shared library development device and the application development device are the same electronic device.
[0191] The embodiments generate the software package of the shared library and the description package of the shared library, so that the shared library does not need to be integrated in the software package of the application and does not need to be bound with the operating system, and the decoupling between the development kit in the shared library and the software package of the application and the operating system is achieved. This manner helps to reduce the software package size of the application dependent on the shared library and helps to save the storage space in the first electronic device.
[0192] On the other hand, the software package of the shared library is stored in the server to support flexible acquisition, which helps to improve the flexibility of the first electronic device in the use and update process of the shared library.
[0193] Next, the development process of the first application dependent on the shared library is introduced through the embodiments in steps S940-S970. It should be noted that the shared library dependent by the first application includes at least one of the following two types: the first shared library, the third shared library. The first shared library is a shared library directly dependent by the first application. Optionally, the first shared library is configured by the application developer in the software engineering of the first application during the development process of the first application. The third shared library is a shared library indirectly dependent by the first application. For each third shared library, the third shared library is an upper shared library of 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.
[0194] In step S940, the application development device obtains at least one first description package.
[0195] The application development device is used to develop the first application. Optionally, an integrated development environment is arranged in the application development device, and the software engineering file set of the first application is developed by the application developer in the integrated development environment.
[0196] The first description package is a description package of the first shared library, and each first shared library corresponds to a first description package respectively. Optionally, the first shared library is a shared library relied on by the first application. After the first application is developed, the first shared library is used to provide a development kit for running of the first application. For example, the first shared library is a shared library directly relied on by the first application.
[0197] In some embodiments, the application development device acquires the at least one first description package, including: for each first description package in the at least one first description package, the application development device acquires the first description package in response to an operation of developing the first application. Optionally, the application development device acquires coordinate information of the first description package in response to the operation of developing the first application; and the application development device acquires the first description package from the second server according to the coordinate information of the first description package. The second server includes a component warehouse, and the component warehouse stores and manages the description package of the shared library. For example, the application development device can also acquire a first software package according to the location information, and the first software package and the first description package correspond to the same shared library.
[0198] Optionally, the operation of developing the first application is used to edit a software engineering file set of the first application. For example, the operation of developing the first application includes an operation of indicating the coordinate information of the first description package. For example, the operation of developing the first application can be implemented as an input operation for the coordinate information of the first description package.
[0199] According to the above embodiments, the shared library document is used to record coordinate information of the description package of the shared library in the component warehouse. In an example, the application development device performs a search operation according to the shared library document to acquire the coordinate information of the first description package. For example, the application developer inputs identification information of the shared library; and the application development device searches for the coordinate information of the first description package from the shared library document according to the identification information of the shared library. After the coordinate information of the first description package is acquired, the application developer inputs a location of the first description package to implement the operation of developing the first application. The identification information of the shared library includes but is not limited to a package name, a module name, version information, and the like of the shared library.
[0200] In some embodiments, the application development device acquires the first description package from the second server according to the coordinate information of the first description package, including: after the coordinate information of the at least one first description package is acquired, the application development device adds the coordinate information of the at least one first description package to a configuration file of the first application in a development state; and in a case where a software engineering file set of the application is triggered to be compiled, the application development device acquires the at least one first description package from the second server according to the configuration file.
[0201] Optionally, the configuration file is used to indicate at least one first shared library relied on by the first application. Illustratively, the configuration file is a file named "oh-package.json5" in the software engineering of the first application. Illustratively, the configuration file includes the coordinate information of the first description package of each of the at least one first shared library. For example, the first application relies on 3 first shared libraries, and the coordinate information of the description package of each of the 3 first shared libraries is position 1, position 2 and position 3 respectively, and the application development device generates the configuration file including position 1, position 2 and position 3.
[0202] Optionally, the application development device reads the coordinate information of the at least one first description package from the configuration file in response to the software package compiling operation, and then acquires the at least one first description package from the second server through the coordinate information. The first description package indicates the description package of the first shared library. Illustratively, the application development device can also acquire the software package of the shared library corresponding to the at least one first description package from the component warehouse through the coordinate information, so as to test whether the first application can successfully call the shared library in the running process in the process of developing the first application.
[0203] In some embodiments, the application development device generates a first software package of the first application according to the first description package, and the first software package includes the first identifier. The process is introduced below by taking the second server as an example of the component warehouse. Illustratively, the application development device reads the coordinate information of the at least one first description package from the configuration file, generates a description package acquisition request according to the coordinate information of the at least one first description package, and sends the description package acquisition request to the component warehouse. The component warehouse sends the at least one first description package to the application development device based on the description package acquisition request. Illustratively, the description package acquisition request carries the coordinate information of the at least one first description package.
[0204] In step S950, the application development device acquires the first identifier according to the at least one first description package.
[0205] The first identifier is used to indicate at least one shared library relied on by the first application. The at least one shared library is used to represent all shared libraries relied on by the first application. Optionally, the at least one shared library includes the first shared library. In addition, the at least one shared library can also include a third shared library. In the case where the first application relies on multiple shared libraries, the at least one shared library indicated by the first identifier can be multiple shared libraries that do not repeat. Here, "multiple" means two or more.
[0206] For convenience of description, all shared libraries relied on by the first application are also referred to as second shared libraries. That is, in the embodiments of the present application, the 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.
[0207] In some embodiments, the second shared library comprises the first shared library. Optionally, the second shared library is the first shared library in the case that the first shared library does not depend on an upper shared library. Optionally, the second shared library comprises the first shared library and at least one other shared library other than the first shared library in the case that the first shared library depends on an upper shared library. Illustratively, the second shared library further comprises a third shared library, and the third shared library is the upper shared library on which the first shared library depends.
[0208] In some embodiments, the first identifier comprises at least one first sub-identifier corresponding to each of the at least one shared library. The first sub-identifier corresponding to a shared library is used to identify the shared library. Optionally, the first identifier can indicate the first shared library. Illustratively, in the case that the second shared library comprises the first shared library, the first identifier comprises a first sub-identifier corresponding to the first shared library.
[0209] Optionally, the first sub-identifier corresponding to a shared library comprises at least one of a package name, a module name, version information, and a package type of the shared library. Illustratively, the first identifier corresponding to a shared library comprises a package name, a module name, version information, and a package type of the shared library. By including the version information and the package name in the first sub-identifier, the first identifier can indicate a shared library determined by name and version, which helps to distinguish multiple versions of a shared library with the same package name.
[0210] In some embodiments, the application development device obtains the first identifier according to the at least one first description package, comprising: the application development device determines the second shared library according to the at least one first description package; for each shared library in the second shared library, the application development device generates a first sub-identifier used to indicate the shared library according to a description file of the shared library; and the first identifier comprises at least one first sub-identifier.
[0211] Optionally, the first identifier comprises a first sub-identifier corresponding to each of the second shared library.
[0212] As can be known from the above embodiments, the description package of a shared library can comprise dependency information used to indicate an upper shared library in addition to a description file used to indicate the shared library itself. Therefore, the application development device can obtain one or more than one shared library according to a description package of a shared library. For example, the application development device obtains q shared libraries according to p first description packages, and the q shared libraries are all the shared libraries on which the first application depends, p is a positive integer, and q is a positive integer greater than or equal to p.
[0213] Optionally, the application development device determines the second shared library according to the first description package, including: for any one of the at least one first description package, the application development device acquires a description file according to the first description package; the application development device determines a first shared library according to the description file; in the case that the first description package includes dependency information, the application development device acquires at least one third shared library that the first shared library depends on according to 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 according to the at least one first shared library and the at least one third shared library.
[0214] Exemplarily, the application development device performs deduplication processing on the p first shared libraries and the t third shared libraries to obtain the at least one shared library, p is a positive integer, and t is a natural number. The deduplication processing is used to retain one of the repeatedly appearing first shared libraries and third shared libraries.
[0215] For example, the application development device can acquire p first shared libraries and t third shared libraries according to the p first description packages, p+t=q.
[0216] In one example, the application development device acquires a shared library dependency tree according to the at least one first description package; and the application development device determines the second shared library according to the shared library dependency tree. In the shared library dependency tree, the dependency relationship between the at least one shared library is represented, the first shared library is a leaf node in the shared library dependency tree, and the third shared library is a parent node in the shared library dependency tree.
[0217] Exemplarily, for each of the at least one first description package, the application development device determines a first shared library according to the first description package; the application development device takes the first shared library as a first node in the shared library dependency tree, and the first node is a leaf node in the shared library dependency tree; in the case that the dependency information in the first description package indicates that the first shared library has a dependent third shared library, the application development device takes the third shared library as a second node in the shared library dependency tree, and the second node is a parent node of the first node.
[0218] In one example, in the case that the first shared library has a third shared library, the application development device determines whether a node corresponding to the third shared library is included in the shared library dependency tree. In the case that the node corresponding to the third shared library exists in the shared library dependency tree, the node corresponding to the third shared library does not need to be re-created. In the case that the node corresponding to the third shared library exists in the shared library dependency tree, the application development device performs the step of taking the third shared library as a second node in the shared library dependency tree.
[0219] In the case that the third shared library has an upper shared library that depends on it, the application development device takes the upper shared library as a third node in the shared library dependency tree, and the third node is a parent node of the second node. Subsequently, the application development device takes the upper shared library as the third shared library, and repeats the step of “in the case that the third shared library has an upper shared library that depends on it, the application development device takes the upper shared library as a third node in the shared library dependency tree” until the third shared library does not depend on other upper shared libraries.
[0220] Subsequently, the application development device selects a new first description package from the at least one first description package, and the application development device obtains a new first shared library according to the new first description package. In the case that the node corresponding to the new first shared library does not exist in the shared library dependency tree, the application development device repeats the step from “taking the first shared library as a first node in the shared library dependency tree”.
[0221] In the case that the node corresponding to the new first shared library exists in the shared library dependency tree, the application development device re-performs the step of selecting a new first description package from the at least one first description package until the at least one first description package is selected once. After the at least one first description package is traversed in the above manner, the application development device determines a second shared library according to the shared library dependency tree.
[0222] Optionally, the second shared library includes a shared library corresponding to each node in the shared library dependency tree.
[0223] In this way, the shared library dependency tree is constructed by the first description package, and the second shared library is determined based on the shared library dependency tree. On the one hand, all shared libraries required for application running can be accurately determined, and missing of essential shared libraries that affect application running can be avoided. On the other hand, in the process of generating the shared library dependency tree, repeated shared libraries can be removed, which helps to avoid repeated shared libraries in the at least one shared library indicated by the first identifier, thereby avoiding the first electronic device from downloading the same shared library software package multiple times according to the indication of the first identifier, and helps to reduce the waste of storage space in the first electronic device.
[0224] For example, the application development device constructs a shared library dependency tree starting from a description package 1 in at least one first description package. For the first description package 1, the application development device determines a first shared library 1 through a description file in the first description package, takes the first shared library 1 as a node 1 in the shared library dependency tree, and the node 1 belongs to a leaf node. The application development device obtains a third shared library 1 and a third shared library 2 through dependency information in the first description package. The application development device takes the third shared library 1 as a node 2 in the shared library dependency tree, takes the third shared library 2 as a node 3 in the shared library dependency tree, and takes the node 2 and the node 3 as parent nodes of the node 1. In the case that the third shared library depends on a third shared library 3, the application development device takes the third shared library 3 as a node 4, and takes the node 4 as a parent node of the node 2.
[0225] In some embodiments, after the second shared library is determined, the application development device generates the first identifier according to a description file corresponding to the second shared library.
[0226] Optionally, the description file corresponding to the second shared library includes identification information of the second shared library. For example, the description file corresponding to the second shared library is obtained from a second description package. For example, in the case that the second shared library includes a plurality of 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.
[0227] Optionally, the description file corresponding to the first shared library is obtained from a description file in 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.
[0228] In some embodiments, in the case that the second shared library includes a plurality of shared libraries, the first identifier includes a plurality of first sub-identifiers. The first sub-identifier is used to indicate a different shared library in the second shared library, and each second shared library corresponds to a first sub-identifier.
[0229] In some embodiments, the application development device generates the first identifier according to 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 according to the description file of the shared library; and the application development device generates the first identifier based on the plurality of first sub-identifiers.
[0230] 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 according to 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 a file name of the description file in the first description package.
[0231] Optionally, in the case that the dependency information is included in the first description package, the application development device acquires a description file of the third shared library according to the dependency information; and the application development device generates the first sub-identifier corresponding to the third shared library according to the description file of the third shared library.
[0232] Optionally, in the case that the dependency information is included in the first description package, the application development device acquires a description file of the third shared library according to the dependency information; and the application development device generates the first sub-identifier corresponding to the third shared library according to the description file of the third shared library.
[0233] In a possible implementation, the description package of the shared library is stored in a shared warehouse supported by the second server, the dependency information includes coordinate information of the at least one second description package in the component warehouse; the application development device acquires the at least one description package from the component warehouse according to the coordinate information of the at least one description package; for each shared library in the at least one second shared library, the application development device acquires a description file of the shared library from the description package of the shared library; and the application development device generates the first sub-identifier corresponding to the second shared library according to the description file of the shared library.
[0234] In another possible implementation, the dependency information includes a description file of the at least one third shared library; and the application development device generates the first sub-identifier corresponding to the third shared library according to the description file of the third shared library.
[0235] In some embodiments, after determining the first sub-identifier corresponding to each of the at least one shared library, the application development device generates the first identifier according to the first sub-identifier corresponding to each of the at least one shared library. Optionally, the application development device takes the set of the at least one first sub-identifier as the first identifier.
[0236] 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 the configuration file in the software engineering file set. The first identifier is also referred to as a dependency configuration list.
[0237] In step S960, the application development device generates the software package of the first application according to the first identifier.
[0238] After the first application is developed, the application development device generates the software package of the first application based on the software engineering file set of the first application in response to a compilation operation. In some embodiments, the first identifier is included in the software package of the first application.
[0239] As shown in FIG. 13, the process of generating the software package of the first application includes the following steps:
[0240] 1. The description package of the shared library is located.
[0241] For the first application video which 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.json 5 in the software engineering file set 1310 of the first application video through the application development device, and the configuration file oh-package.json 5 includes the coordinate information of the description package of the shared library accxxxxkit in the component warehouse.
[0242] As shown in 1312 in FIG. 13, the configuration file oh-package.json 5 includes the coordinate information of the description package of the shared library accxxxxkit: @accountkit":"1.0.1".
[0243] As shown in FIG. 13, the description package 1320 of the shared library is stored in the component warehouse. In the case that the software engineering file set of the first application video is compiled and built by the application development device, the application development device downloads the description package accxxxxkit.har of the shared library from the component warehouse according to the configuration file oh-package.json 5 through the compilation and building tool.
[0244] The compilation and building tool obtains all the shared libraries depended by the first application video by parsing the description package accxxxxkit.har of the shared library.
[0245] 2. The software package of the application is compiled and built.
[0246] 3. The description package of the shared library is obtained and parsed from the component warehouse, and the first identifier is generated.
[0247] As shown in FIG. 13, the compilation and packaging tool determines the first sub-identifier 1331 corresponding to the shared library accxxxxkit according to the description package 1320 of the shared library accxxxxkit. Specifically: "bundType":"shared", "bundName":"com.hw.id", "moduleName":"accountkit", "versionCode":10000001. The compilation and building tool adds the first identifier including the first sub-identifier 1331 to the configuration file 1330 of the first application video: and packs the configuration file 1330 to the software package 1332 of the first application video, so as to realize the dependence integration of the software package of the first application video on the shared library accxxxxkit during the development of the first application.
[0248] After the first electronic device acquires the software package 1332 of the first application video, the first electronic device acquires, according to the first identifier included in the software package 1332 of the first application video, a shared library software package 1340 corresponding to the shared library accxxxxkit depended by the first application.
[0249] At step S970, the application development device sends the first software package of the first application to the first server.
[0250] After the software package of the first application is developed, the first server receives and stores the first software package of the first application. According to the software package of the first application, the first server acquires shared library metadata corresponding to the first application.
[0251] The shared library metadata corresponding to the first application is used to indicate the acquisition information of at least one shared library depended by the first application. Optionally, for each shared library in the at least shared library, the shared library metadata includes at least one of the following: package name of the shared library, version information, download information, verification information, and package size.
[0252] The download information is used to indicate the download address of the software package of the shared library. The verification information is used to verify the software package of the shared library, so as to avoid problems such as packet loss and packet error in the download process of the software package of the shared library. The package size is used to represent the storage space size required by the software package of the shared library.
[0253] Optionally, according to the software package of the first application, the first server acquires the first identifier; for each first sub-identifier included in the first identifier, the first server acquires, according to the first sub-identifier, the storage location of the software package of the shared library, so as to generate the download information according to the storage location; and the first server acquires the shared library metadata according to the first sub-identifier and the download information of the software package of the shared library.
[0254] For example, the first sub-identifier includes the package name of the shared library, and the first server acquires the package name of the shared library from each first sub-identifier respectively. Then, the first server finds the download address of the software package of the shared library according to the package name of the shared library. In the case where the first server stores a plurality of software packages with the same package name, the first server acquires, according to the first sub-identifier, the version information of the shared library; and the first server selects, according to the version information, the software package of the first version from the plurality of software packages. The first version is the version indicated by the version information. Then, the first server acquires the download address of the software package of the first version.
[0255] In the case that the software package of the application and the software package of the shared library are independent of each other, the first identifier is generated through the description file of the shared library, and the first identifier is carried in the software package of the application, thereby establishing the dependency relationship between the application and the shared library. Through the first identifier of the software package of the application, on the one hand, the third-party SDK does not need to be integrated in the software package of the application, which helps to reduce the size of the software package of the application; on the other hand, the first identifier indicates the shared library depended by the application, which helps the first electronic device to install the shared library depended by the application in advance before running the application, thereby ensuring the normal running of the application.
[0256] In addition, since the source code of the third-party SDK is not included in the software package of the application, the situation that the software package of the application cannot be published due to the quality problem of the third-party SDK does not occur in the process of detecting whether the software package of the application is compliant by the server. The separation of the software package of the application and the third-party SDK helps to reduce the management difficulty of the code quality of the software package of the application for the application developer, and helps to improve the development efficiency of the application.
[0257] After the software package of the first application and the software package of the shared library are uploaded to the first server, the first server provides the software package of the first application and / or the software package of the shared library to the first electronic device. Since the application-shared library provided in the embodiments of the present application has an independent software package, the application management method on the first electronic device side supports the installation, running, upgrading, and aging clearing of the shared library, and the following several embodiments will be introduced and described.
[0258] Please refer to FIG. 14, which is a flowchart of the application management method provided in the embodiments of the present application. As shown in FIG. 14, the execution subject of the method includes the first electronic device 100 and the first server 200 in FIG. 3. The method can include the following steps:
[0259] In step S1410, the first electronic device obtains the first software package from the first server.
[0260] 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.
[0261] Exemplarily, the first software package is the software package of the latest version of the first application. The first server is responsible for managing the software package corresponding to each version of the first application. In the case that the first application needs to be installed, the first electronic device obtains the software package of the latest version of the first application from the first server. Through the software package of the latest version of the application, it is helpful to avoid frequent updating of the first application after the first electronic device installs the first software package, to simplify the process of installing the first application of the first electronic device, and to save the download resources used for downloading the application software package.
[0262] Optionally, the first application is any one of applications available for download by the first electronic device. The specific type of the first application is determined according to actual needs, which is not limited herein. 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.
[0263] In some embodiments, the first electronic device generates an application download request for the first application in response to the operation of installing the first application, and sends the application download request to the first server. The first server sends the download information of the first software package to the first electronic device according to the application download request. For example, the application download request includes identification information of the first application and a download instruction identifier. The download instruction identifier is used to indicate that the application download request is used to request to download the software package of the application.
[0264] Optionally, the operation of installing the first application is triggered by a user. For example, the operation of installing the first application includes, but is not limited to, a download operation of the first application in an application market, a download operation of the first application in an official download page, and a download operation of the first application through a command line installation.
[0265] The operation of installing the first application is implemented by at least one of a click operation, a long press operation, a double-click operation, a sliding operation, a key operation, a gesture operation, etc. For example, the first electronic device obtains the first software package from the first server in response to a click operation on a download control displayed in an application market interface. The download information includes a download address of the first application in the first server. The download information is also referred to as a download address.
[0266] Optionally, the operation of installing the first application is also implemented by an operation of updating the first application. For example, the operation of installing the first application is an operation of setting a periodic update of the first application, and the first electronic device obtains the first software package of the first application from the first server when the update period of the first application is reached.
[0267] Optionally, in addition to sending the download information of the first software package of the first application to the first electronic device, the first server also sends verification information of the first software package to the first electronic device, so that the first electronic device verifies the downloaded first software package using the verification information. The verification information is used to verify the correctness of the first software package downloaded by the first electronic device, so as to timely detect problems such as packet loss of the first software package during the download process.
[0268] Optionally, the first electronic device performs step S1410 after the first application is developed. The specific execution time of step S1410 is determined according to user needs, which is not set herein.
[0269] In step S1420, the first electronic device acquires at least one second software package from the first server according to the first identifier carried by the first software package.
[0270] The first identifier is used to indicate identification information of at least one shared library relied on by the first application. Optionally, the at least one shared library relied on by the first application refers to all shared libraries relied on by the first application. That is, the at least one shared library has the same meaning as the second shared library in the above embodiment. For example, the first application relies on shared library 1 and shared library 2, and the at least one shared library refers to the shared library 1 and the shared library 2.
[0271] In some embodiments, the first identifier is generated in the development process of the first application. Optionally, the first identifier is included in the first software package. By carrying the first identifier in the first software package, the first electronic device can determine all shared libraries relied on by the first application according to the first identifier after obtaining the first software package, so as to install the at least one shared library before the first application runs, and correctly call all shared libraries required by the first application during the running of the first application.
[0272] In the development process of the first application, the first identifier is carried in the first software package, so that the subsequent electronic device can determine the shared libraries relied on by the first application through the first identifier included in the first software package without the indication of the server. Compared with the scheme that the server indicates the development kit or shared library required by the first application to the electronic device, the role of the server in the application management process is weakened in this way. The server is mainly used for managing software packages and does not need to edit the content included in the software package, thereby helping to reduce the processing pressure of the server.
[0273] At the same time, this way ensures that the software package obtained by the first electronic device is consistent with the content of the software package published by the second electronic device, which helps to avoid errors in the content of the software package, thereby helping to control the factors that cause errors in the running of the application and facilitating the maintenance of the application by the developer of the application.
[0274] For example, after obtaining the first software package, the first electronic device parses the first software package to obtain the first identifier, and determines at least one shared library relied on by the first application according to the first identifier. The second software package is an installation package of the shared library relied on by the first application, and the second software package is used to install the shared library relied on by the first application to the first electronic device.
[0275] In some embodiments, after obtaining the first software package, the first electronic device obtains a first identifier according to the first software package; the first electronic device determines at least one shared library relied on by the first application according to the first identifier; in a case where a target shared library in the at least one shared library is not installed in the first electronic device, the first electronic device downloads a second software package from the first server.
[0276] The second software package is used to install the target shared library in the first electronic device. In a case where a plurality of target shared libraries are not installed in the first electronic device, the first electronic device obtains a second software package corresponding to each of the plurality of target shared libraries from the first server. For example, the first electronic device has installed shared library 1, shared library 2 and shared library 3; the shared library relied on by the first application is shared library 1, shared library 4 and shared library 5, and shared library 4 and shared library 5 belong to the target shared library.
[0277] Optionally, the first electronic device determines at least one shared library relied on by the first application according to 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 shared library in the at least one shared library, if the first electronic device does not install the shared library, the first electronic device determines that the shared library is a target shared library, and the first electronic device obtains a second software package of the target shared library from the first server.
[0278] For example, the first electronic device maintains a shared library list, and the shared library list is used to record shared libraries installed in the first electronic device; for each shared library in the at least one shared library, the first electronic device determines whether the shared library is recorded in the shared library list; in a case where the shared library is recorded in the shared library list, the first electronic device does not need to obtain a second software package of the shared library from the first server; in a case where the shared library is not recorded in the shared library list, the first electronic device determines that the shared library belongs to a target shared library, and the first electronic device obtains a second software package of the target shared library from the first server.
[0279] In one example, the first identifier includes a package name and version information of the at least one shared library. In a case where the shared library indicated by the first identifier is inconsistent with the version information 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 a target shared library; in a case where the shared library indicated by the first identifier is consistent with the version information 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 the shared library does not belong to a target shared library.
[0280] For example, in a case that the version information of the shared library installed in the first electronic device is consistent with the version information of the shared library in the first identification, the first electronic device determines that the shared library is not the target shared library. In a case that the version information of the shared library installed in the first electronic device is inconsistent with the version information of the shared library in the first identification, the first electronic device determines that the shared library belongs to the target shared library, and the first electronic device acquires the second software package of the target shared library from the first server.
[0281] In the present example, for any shared library relied on by the first application, if the version information of the shared library installed in the first electronic device is inconsistent with the version information of the shared library relied on by the first application, the shared library belongs to the target shared library. In this case, the second software package of the shared library needs to be downloaded in the first electronic device. In this way, the version information of the shared library installed in the electronic device and the shared library required for the first application to run is aligned, which helps to ensure that the first application can run smoothly, thereby improving the stability of the application running process and ensuring the user's application use experience.
[0282] In some embodiments, for the same shared library, the developer of the shared library will periodically share the shared library, that is, the first server stores the second software package 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 first version of the shared library is released later than the second version of the shared library. Optionally, the first version of the shared library supports all the functions of the second version of the shared library.
[0283] For example, the interface set of the second version of the shared library is a subset of the interface of the first version of the shared library. In this case, for a certain shared library in the at least one shared 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 relied on by the first application, the first electronic device determines that the shared library is not the 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 relied on by the first application, the first electronic device determines that the shared library is the target shared library, and the first electronic device acquires 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 identification.
[0284] In this way, it helps to reduce the number of second software packages that the first electronic device needs to download, and helps to save the resource bandwidth used for downloading the second software package.
[0285] In some embodiments, in the process of sending the at least one second software package to the first electronic device, the first server further sends the first electronic device the verification information of the at least one software package respectively, so that the first electronic device, after downloading the second software package, checks the correctness of the second software package through the verification information.
[0286] Optionally, for any one second software package, in the case that the second software package is verified to be correct, the first electronic device installs the second shared library according to the second software package; in the case that the second software package is verified to be incorrect, the first electronic device re-downloads the second software package through the first server.
[0287] In one example, the download information of the second software package is obtained through an application download request for the first application. After receiving the application download request for the first application, the first server determines the at least one shared library relied on by the first application according to the shared library metadata of the first application. Then, the first server sends the first electronic device the download information of the first software package and the download information of the software package of the at least one shared library.
[0288] After receiving the download information sent by the first server, the first electronic device determines the at least one shared library relied on by the first application according to the first identifier in the first software package. In the case that the first electronic device lacks the at least one target shared library, the first electronic device obtains the download information of the software package of the at least one target shared library from the download information of the software package of the at least one shared library; and the first electronic device acquires the at least one second software package from the second server according to the download information of the software package of the at least one target shared library. Wherein, the software package of the target shared library is the second software package.
[0289] In this way, after receiving any application download request, the first server feeds back to the first electronic device the download information of the application and the download information of the shared library relied on by the application, which unifies the steps required to be performed by the server in the process of application installation.
[0290] In another example, the download information of the second software package is obtained according to a download request of the shared library. After step S1410, the first electronic device parses the first software package to obtain a first identifier; and the first electronic device obtains at least one shared library depended by the first application according to the first identifier. In a case where the at least one target shared library is absent in the first electronic device, the first electronic device generates a shared library download request according to a 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. The first server obtains, based on the shared library download request, download information of the at least one target shared library from the shared library metadata. The first server feeds back the download information of the at least one target shared library to the first electronic device. After receiving the download information of the target shared library, the first electronic device downloads the second software package from the first server according to the download information.
[0291] In this way, the server needs to send less download information to the first electronic device, which helps to save the communication bandwidth occupied by sending the download information, thereby helping to reduce the pressure of the interface of the server to send the download information to multiple first electronic devices concurrently.
[0292] At step S1430, the first electronic device installs the first software package and the at least one second software package.
[0293] The installation of the first software package is used to implement the installation of the first application in the first electronic device, and the installation of the second software package is used to implement the installation of the target shared library in the first electronic device. In a case where the plurality of second software packages are obtained from the first server at step S1420, the first electronic device installs the plurality of second software packages respectively.
[0294] The installation process of the first application is similar to that of the shared library, and the installation process of the first application is taken as an example for description below. Optionally, after obtaining the first software package, the first electronic device stores the first software package and creates an installation directory of the first application. The first electronic device decompresses the first software package to obtain a decompressed first software package; and the first electronic device stores the decompressed first software package under the installation directory of the first application. Illustratively, the first electronic device adds the first application in the registry.
[0295] The installation directory of the first application includes resource files of the first application. The types of the resource files include at least one of the following: binary files, configuration files, and resource files. In a case where the first application needs to be run, the first electronic device obtains a first resource from the installation directory of the first application to start the first application.
[0296] In some embodiments, the first application and the target shared library are installed by a package management module in an operating system of the first electronic device. For example, after downloading the first software package, a package management module interface is invoked by a client of the application distribution platform, triggering the package management module to install the first software package. For another example, after downloading the second software package, a package management module interface is invoked by a client of the application distribution platform, triggering the package management module to install the second software package.
[0297] Optionally, the package management module maintains a shared library list. After the installation of the target shared library is completed, the package management module updates the shared library list according to the target shared library. The shared library list is used to record the installed shared libraries in the first electronic device. For example, the shared library list includes the identification information of the shared library and the installation information of the shared library. In one example, after the installation of the target shared library is completed, the first electronic device adds the identification information of the target shared library and the installation information of the target shared library to the shared library list, obtaining an updated shared library list.
[0298] The identification information of the shared library is used to identify the shared library. For example, the identification information of the shared library is the same as the content included in the first sub-identifier corresponding to the shared library. For example, the identification information of the shared library includes the package name, the module name, and the version information of the shared library. The installation information of the shared library is used to represent the access path of the installation directory of the shared library, the package volume of the shared library, and the like.
[0299] In some embodiments, the installation processes of the first software package and the second software package are independent of each other.
[0300] Optionally, the first software package and the second software package are synchronously installed. Since the first application cannot be run before the installation of the first software package is completed, the synchronous installation of the first software package and the second software package makes the installation of the first application and the installation of the target shared library overlap, which helps to shorten or eliminate the user waiting time for the installation of the second software package, so that the user is irrelevant to the installation of the target shared library, thereby helping to shorten the user waiting time for running the first application.
[0301] Optionally, the installation of the first application and the installation of the target shared library have a sequence. For example, the installation of the first application is prior, or the installation of the target shared library is prior, and the application does not limit the installation sequence of the first application and the shared library.
[0302] In one example, the first installation package is installed before the second installation. Optionally, the first electronic device acquires at least one shared library relied on by the first application according to the first identification in response to an operation of starting the first application; in the case that the first electronic device lacks at least one target shared library, the first electronic device acquires at least one second software package, and the first electronic device installs at least one target shared library according to the at least one second software package.
[0303] That is, in the present example, the first electronic device first performs step S1410, then performs step S1430 to install the first software package, then performs step S1420, and then performs step S1430 to install the second software package.
[0304] The operation of starting the first application includes, but is not limited to, at least one of the following: a click operation, a double-click operation, a sliding operation, a key operation, and the like on an application icon of the first application.
[0305] Exemplarily, in the case where the first electronic device lacks at least one target shared library, the first electronic device acquires at least one second software package, including: the first electronic device sends a shared library acquisition request to the first server; the first server acquires a package name of at least one target shared library according to the shared library acquisition request; for each target shared library in the at least one target shared library, the first server acquires a software package of at least one candidate version of the target shared library according to the package name of the target shared library. Each candidate version of the second software package corresponds to a version of the target shared library. The first server selects a second software package of a target version from the at least one candidate version of the software package. Subsequently, the first server sends download information of the second software package of the target version to the first electronic device.
[0306] Exemplarily, the target version matches the version information included in the first sub-identifier corresponding to the target shared library. For example, for a certain target shared library, the version information in the first sub-identifier corresponding to the target shared library is 1.2.3, and the target version is 1.2.3.
[0307] Exemplarily, the target version is the latest version among the at least one candidate version. In this way, by providing the second software package of the latest version, the first electronic device can install the latest version of the target shared library.
[0308] Compared with other versions of the target shared library, the new version of the target shared library may fix some defects. Therefore, installing the latest version of the shared library helps to ensure the smooth running of the first application. Compared with the method of first installing an old version of the target shared library and then updating the target shared library, by directly providing the latest version of the target shared library to the first electronic device, it helps to save the number of downloads of the software package of the target shared library, save download resources. At the same time, it helps to reduce the storage of useless software packages or residual data in the first electronic device, thereby saving the storage space in the first electronic device.
[0309] By the embodiment, the first electronic device determines and installs the at least one shared library relied by the application according to the first identification in the first software package. By this method, the shared library relied by the application is installed in advance before the application runs, so that the application runs normally, and the running stability of the application on the terminal device is ensured.
[0310] In one example, after the first application and the at least one shared library relied by the first application are installed in the first electronic device, the application management method provided by the embodiment further includes: the first electronic device acquires a software package of a second application from the first server in response to an operation of indicating to install the second application. The software package of the second application is used to install the second application on the first electronic device, and the second application is different from the first application. The first electronic device acquires the at least one shared library relied by the second application according to the first identification carried in the software package of the second application.
[0311] Optionally, in the case that the at least one shared library relied by the first application includes the at least one shared library relied by the second application, the first electronic device does not need to acquire the respective software package of the at least one shared library relied by the second application. In the case that the at least one shared library relied by the first application does not include the at least one shared library relied by the second application, the first electronic device acquires the respective software package of the at least one shared library relied by the second application.
[0312] Optionally, after the installation of the at least one shared library relied by the first application is completed, the at least one shared library relied by the second application is added to the installed shared libraries in the first electronic device. Subsequently, the first electronic device acquires the software package of the second application in response to the operation of indicating to install the second application, and acquires the at least one shared library relied by the second application according to the first identification carried in the software package of the second application. In the case that the target shared library in the at least one shared library relied by the second application is missing in the first electronic device, the first electronic device acquires the second software package of the target shared library.
[0313] By supporting the application in the first electronic device to share the same shared library, the use efficiency of the shared library is improved, and the redundant shared library is stored in the first electronic device. FIG. 15 is an interaction diagram of functional modules in the application installation process. In the embodiment provided in FIG. 15, the functional modules of the first electronic device include the application distribution platform client and the software management module shown in FIG. 5; the functional modules of the first server include the application distribution platform server shown in FIG. 5. The method can include the following steps:
[0314] At step S1510, the application distribution platform client sends an application download request of the first application to the application distribution platform server. Optionally, the application download request of the first application comprises an application identifier of the first application. The application identifier comprises at least one of the following: an application name of the first application, a serial number of the first application, an indication code of the first application, and the like.
[0315] At step S1520, the application distribution platform server queries the first application and the shared library metadata.
[0316] Optionally, after receiving the application download request of the first application, the application distribution platform server queries the first application according to the identification information of the first application, and obtains the shared library metadata of the first application. For example, the application distribution platform server obtains the package name, version information, download information, verification information, and package size of the first application and the at least one shared library at step S1520.
[0317] At step S1521, the application distribution platform server obtains the download information and the verification information of the first application.
[0318] At step S1522, the application distribution platform server obtains the download information and the verification information of the shared library.
[0319] At step S1523, the application distribution platform server returns the download information and the verification information of the first application and the at least one shared library to the application distribution platform client.
[0320] Optionally, the download information of the at least one shared library is used to download the latest version of the software package corresponding to the at least one shared library.
[0321] At step S1530, the application distribution platform client requests the application distribution platform server to obtain the first software package.
[0322] Optionally, after obtaining the download information of the first application software package, the application distribution platform client obtains the first software package according to the download information of the first application.
[0323] At step S1531, the application distribution platform server provides the first software package to the application distribution platform client.
[0324] At step S1532, the application distribution platform client verifies the first software package.
[0325] Optionally, the application distribution platform client verifies the first software package according to the verification information of the first software package. For example, when the first software package is complete, the application distribution platform client performs step S1533; when the first software package is incomplete, the application distribution platform client re-performs step S1530.
[0326] Step S1533, the application distribution platform client instructs the software package management module to install the first application.
[0327] Step S1534, the software package management module installs the first application. Optionally, the software package management module stores the first software package, creates an installation directory of the first application, and stores the decompressed first software package under the installation directory of the first application.
[0328] Step S1540, the application distribution platform client verifies whether the target version of the target shared library has been installed in the first electronic device.
[0329] Optionally, the application distribution platform client determines at least one shared library relied on by the first application according to the first identifier in the first software package; the application distribution platform client compares the installed shared library in the first electronic device with the at least one shared library, and verifies whether the target version of the target shared library has been installed in the first electronic device.
[0330] Optionally, in the case where the target version of the target shared library has not been installed in the first electronic device, the application distribution platform client executes step S1550. In the case where the target version of the target shared library has been installed in the first electronic device, the installation process of the first application ends.
[0331] Exemplarily, step S1540 does not have strict execution timing between step S1532. For example, step S1540 can be executed at any time after step S1531 is executed. For example, step S1540 and step S1532 are executed in parallel.
[0332] Step S1550, the application distribution platform client requests the application distribution platform server to obtain the second software package.
[0333] Optionally, the application distribution platform client selects the download information of the at least one target shared library from the download address of the at least one shared library according to the package name of the at least one target shared library. After obtaining the download information of the software package of the target shared library, the application distribution platform client obtains the second software package from the application distribution platform server according to the download information of the target shared library.
[0334] Step S1551, the application distribution platform server provides the second software package to the application distribution platform client.
[0335] Step S1552, the application distribution platform client verifies the second software package. Optionally, the application distribution platform client verifies the second software package according to the verification information of the second software package; in the case where the second software package is complete, the application distribution platform client executes step S1553; in the case where the second software package is incomplete, the application distribution platform client re-executes step S1550.
[0336] At step S1555, the application distribution platform client invokes the software package management module to install the target shared library.
[0337] At step S1554, the software package management module installs the target shared library.
[0338] In this embodiment, the shared library is not integrated in the software package of the application, which helps to reduce the size of the software package of the application. It also helps to avoid including duplicate shared libraries in the software packages of multiple applications. In this way, it helps to avoid wasting storage space in the first electronic device caused by storing duplicate shared libraries. In addition, in the case where the first electronic device lacks a shared library required for the application to run, the software package of the shared library is downloaded and installed. In this way, it helps to improve the frequency of the first electronic device running the shared library and avoid the first electronic device storing the software package of the useless shared library.
[0339] The process of the application running in dependence on the shared library will be described below through several embodiments. As shown in FIG. 16, the execution subject of the method is the first electronic device 100 in FIG. 3. The method can include the following steps:
[0340] At step S1440, the first electronic device acquires the first resource in response to the operation of the user indicating to start the first application.
[0341] Optionally, the operation of indicating to start the first application includes, but is not limited to, at least one of the following: a click operation, a double-click operation, a sliding operation, a key operation, a gesture operation, etc. for the first application.
[0342] Optionally, the operating system of the first electronic device creates an application process of the first application, and loads the first resource through the application process of the first application. The first resource is a resource acquired through the first software package.
[0343] For example, the first resource is a resource carried in the first software package for supporting the running of the first application.
[0344] The application process of the first application refers to a process created in the processor of the first electronic device for running the first application.
[0345] Illustratively, 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: an executable binary file of the first application, a configuration file, a resource file.
[0346] In some embodiments, step S1440 is performed after step S1430 as shown in FIG. 14. That is, after the first electronic device installs the first application and at least one shared library, the first electronic device performs step S1440.
[0347] At step S1450, the first electronic device acquires the second resource according to the first identifier.
[0348] The second resource is a resource carried by at least one shared library relied on by the first application. The second resource is a shared library resource. Illustratively, the shared library resource is acquired through an installation package of a shared library installed in the first electronic device. Alternatively, the second resource is a running resource provided by the shared library for the first application. Illustratively, the second resource includes at least one of the following: an executable binary file, a configuration file, a resource file, a library file, a documentation file, etc.
[0349] Alternatively, the first electronic device acquires the first identifier according to a configuration file in the first software package, and determines the at least one shared library relied on by the first application according to the first identifier. The first electronic device acquires the second resource from the at least one shared library. The at least one shared library is a shared library relied on by the first application for running. Illustratively, the first identifier is included in the configuration file in the first software package.
[0350] Illustratively, the operating system calls the software package management module to acquire the shared library list, acquires the installation directory of the at least one shared library according to the shared library list, and reads the 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.
[0351] FIG. 17 is an interaction diagram of a process of calling a shared library according to an embodiment of the present application. In this embodiment, the first application installed in the first electronic device, the at least one shared library relied on by the first application, and the operating system shown in FIG. 5 jointly participate. This embodiment includes the following steps:
[0352] At step S1710, the operating system creates an application process of the first application in response to a user instruction to start the first application. Alternatively, after creating the application process of the first application, the operating system adds the first resource to the application process of the first application.
[0353] At step S1720, the operating system acquires the at least one shared library relied on by the first application according to the first identifier.
[0354] At step S1730, the operating system searches for the installation directory of the at least one shared library from the shared library list.
[0355] At step S1740, the operating system reads the second resource from the installation directory of the at least one shared library. Alternatively, the operating system adds the second resource to the application process of the first application. For parts not described in detail in this example, please refer to the corresponding embodiment of FIG. 16.
[0356] In this way, the second resource is obtained from the shared library, and the first application is provided with necessary resource files for running. In addition, 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 running, and thus the updating of the software package of the shared library does not affect the running of the first application.
[0357] In step S1460, the first application is started by using the first resource and the second resource.
[0358] Optionally, the application process of the first application runs the first application by using the first resource and the second resource, and the first electronic device displays an application interface of the first application.
[0359] In this embodiment, the shared library relied on by the first application is determined by using the first identifier, so that corresponding resources are called from the software package of the shared library to support the normal running of the first application. In this way, the size of the software package of the first application is reduced, and the normal running of the first application is ensured.
[0360] In one example, the first electronic device has installed the first application, the second application and the shared library 1, and the first application and the second application both rely on the shared library 1. The first electronic device obtains the first resource from the first application in response to an operation of starting the first application indicated by a user, obtains the second resource 1 from the shared library 1 according to the first identifier included in the software package of the first application, and runs the first application by using the first resource from the first application and the second resource 1 from the shared library 1. Subsequently, the first electronic device obtains the first resource of the second application in response to an operation of starting the second application indicated by a user, obtains the second resource 2 from the shared library 1 according to the first identifier included in the software package of the second application, and runs the second application by using the first resource from the second application and the second resource 2 from the shared library 1.
[0361] Since the first identifier included in the software package of the first application and the first identifier included in the second software package both indicate the shared library 1, the first application and the second application can both use the resources in the shared library 1. In this way, multiple applications included in the first electronic device share the same shared library, which helps to improve the utilization efficiency of the shared library. At the same time, it helps to avoid installing redundant shared libraries in the first electronic device, and wasting the storage space in the first electronic device.
[0362] FIG. 18 is a schematic diagram of running of an application relying on a shared library according to an example embodiment of the present application. The running of the application is performed by an operating system, and the application running process can include the following steps.
[0363] In step S1810, the operating system starts the first application. As shown in FIG. 18, the first application is an xxxxvideo application.
[0364] Step S1820, the operating system creates an application process of the first application. As shown in FIG. 18, the application process 1800a of the first application.
[0365] Step S1830, the operating system loads the first resource from the installation directory of the first application. As shown in FIG. 18, the first resource is 1800b. Optionally, the operating system loads the executable binary file, the configuration file, and the resource file from the installation directory xxxvideo.app of the first application. The operating system obtains the binary file, the configuration file, and the resource file as the first resource.
[0366] Step S1840, the operating system parses the configuration file of the first software package to obtain the first identifier. The configuration file module.json is shown as 1800c in FIG. 18.
[0367] Step S1850, the operating system obtains at least one shared library depended by the first application according to the first identifier. As known from the above embodiment, the first identifier 1800d can be included in the configuration file, and the operating system can read the first identifier 1800d from the configuration file 1800c. As shown in FIG. 18, the first identifier indicates that the package name of the shared library depended by the first application video is accxxxxkit.
[0368] Step S1860, the operating system loads the second resource from the installation directory of the shared library. As shown in FIG. 18, the operating system loads the binary file, the resource file, and the configuration file of accxxxxkit from the installation directory of accxxxxkit to obtain the second resource 1800e.
[0369] Step S1870, the operating system executes the first resource and the second resource to start the first application.
[0370] For details of the present embodiment, please refer to the above embodiment. The present embodiment can ensure the normal operation of the first application by loading the second resource of the shared library from the installation directory of the shared library.
[0371] The updating process of the shared library will be introduced and described through several embodiments. As shown in FIG. 19, the execution subject of the present method is the first electronic device 100 in FIG. 3. The method can include the following steps:
[0372] Step S1470, the first electronic device obtains the first version information of the target shared library.
[0373] In some embodiments, the shared library updating process provided by the embodiments can be performed for any installed shared library in the first electronic device. The following describes the updating method of the installed shared library in the first electronic device by taking the target shared library as an example. Exemplarily, step S1470 is performed after step S1430 or after step S1460.
[0374] The first version information of the target shared library is used to represent the latest version of the target shared library. The first version information of the target shared library is stored in the server. The version of the target shared library recently published in the first server by the second electronic device can be determined through the first version information. Optionally, the first version information is obtained through the first server.
[0375] Exemplarily, the first electronic device sends the version obtaining information to the first server, and the first server sends the first version information to the first electronic device according to the version obtaining request. The identification information of the target shared library is included in the version obtaining request, and the first server queries the first version information according to the identification information of the target shared library.
[0376] For example, the first version information of the target shared library includes a number, and the value of the first version information is the value of the largest or smallest one of the plurality of version information of the target shared library stored in the first server.
[0377] In some embodiments, the first electronic device performs the shared library updating process once every first time interval. The first time interval is pre-set. For example, the first time interval is 1 hour, 1 day, 1 week, etc.
[0378] Step S1480: In the case where the first version information is different from the second version information of the target shared library indicated by the second software package, downloading the third software package corresponding to the first version information from the first server.
[0379] 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.
[0380] Optionally, after step S1430, if the first electronic device does not update 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.
[0381] 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, in the case that the first version information is greater than the second version information, the first electronic device requests the first server to obtain a third installation package; in the case that the first version information is equal to the second version information, the first electronic device determines not to update the target shared library temporarily.
[0382] Step S1490, the first electronic device installs the third installation package.
[0383] The installation process of the third software package is similar to the installation process of the first software package. For details, please refer to the above embodiments.
[0384] Optionally, after the third installation package is installed, the first electronic device deletes the information related to the second installation package from the shared library list, and adds the information related to the third installation package to the shared library list.
[0385] In this way, by regularly updating the version of the shared library installed in the first electronic device, independent updating of the version of the shared library is realized, so that the first electronic device has the latest version of the shared library installed, and updating the shared library helps to solve the problems existing in the old version of the shared library, and helps to improve the stability of the application running in the first electronic device.
[0386] The aging cleaning process of the shared library will be introduced and described through several embodiments. As shown in FIG. 20, the execution subject of the method is the first electronic device 100 in FIG. 3. The method can include the following steps:
[0387] Step S1495, obtaining application dependency information of the target shared library.
[0388] In some embodiments, the shared library aging cleaning steps provided in this embodiment can be executed for any one of the installed shared libraries in the first electronic device. In the following, the aging cleaning method of the installed shared library in the first electronic device is introduced by taking the target shared library as an example. Illustratively, step S1475 is executed after step S1430, or after step S1460, or after step S1490, or before S1470.
[0389] The application dependency information of the target shared library is used to indicate the application in the first electronic device that depends on the target shared library. Optionally, the application dependency information of the target shared library can represent the total amount of the application in the installed application of the first electronic device that depends on the target shared library. Illustratively, the application dependency information includes the application identifier of the installed application that depends on the target shared library. For example, before the first software package is uninstalled, the application dependency information of the target shared library includes the application identifier of the first application.
[0390] In some embodiments, the triggering manner of the aging cleanup process comprises at least one of the following: periodic triggering, triggering along with uninstalling of the application software package.
[0391] Optionally, the first electronic device executes the shared library aging cleanup process once every second time interval. The second time interval is pre-set. For example, the second time interval is 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 is equal to the first time interval in value, or the second time interval and the first time interval are not equal in value.
[0392] For example, the second time interval is less than the first time interval. By setting the second time interval to be less than the first time interval, it is helpful to control the aging cleanup of the shared library to be executed before the shared library update process is executed, thereby avoiding the situation that the first electronic device just updates the target shared library, and then the software package of the target shared library is uninstalled due to the aging cleanup triggering, resulting in invalid update of the target shared library, unnecessary waste of download resources, and waste of power consumption of the electronic device.
[0393] Optionally, the first electronic device acquires the application dependency information of the target shared library in response to the uninstall operation of uninstalling the software package of the application, and executes the subsequent steps.
[0394] In some embodiments, the first electronic device acquires the application dependency information of the target shared library, comprising: for any one application software package installed in the first electronic device, the first electronic device acquires a first identifier from the application software package; and the first electronic device acquires the dependency information of the shared library according to the first identifier. For example, a certain first identifier indicates a target shared library 1, and the first electronic device adds the identifier of the application to the application dependency information of the target shared library.
[0395] Step S1496, uninstalling the second software package in a case where the application dependency information of the target shared library satisfies the shared library cleanup condition.
[0396] The shared library cleanup condition is used to determine whether to uninstall the second software package. Optionally, in a case where the application dependency information of the target shared library satisfies the shared library cleanup condition, the first electronic device uninstalls the second software package; and in a case where the application dependency information of the target shared library does not satisfy the shared library cleanup condition, the first electronic device does not need to uninstall the second software package.
[0397] Optionally, the shared library cleaning condition is related to the number of applications included in the dependent application information. For example, the shared library cleaning condition includes that the number of applications included in the dependent application information is less than or equal to a threshold. The threshold is a preset natural number, for example, the threshold is equal to 0, 1, 2, etc. In the case that the number of applications included in the dependent application information of a certain shared library is less than or equal to the threshold, the first electronic device uninstalls the shared library; in the case that the number of applications included in the dependent application information of a certain 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.
[0398] For example, the threshold is equal to 0. If the application dependency information indicates that there are 0 installed applications in the first electronic device that depend on the target shared library, it means that the target shared library is not dependent on any installed shared library in the first electronic device. At this time, the application dependency information is equal to the threshold, which satisfies the shared library cleaning condition, and the first electronic device downloads the second software package corresponding to the target shared library.
[0399] For example, the threshold is equal to a, and 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, b is less than a, and the last start time of the b installed applications is greater than or equal to the latest running time, the first electronic device uninstalls the second software package. In this way, in the shared library cleaning process, the applications that are not started for a long time in the first electronic device are excluded, and whether to uninstall the shared library is determined according to the dependence of the installed applications with high start frequency in the first electronic device on the shared library, which helps to clean the unused shared library and the shared library with low frequency.
[0400] In some embodiments, in the case that it is determined that the second software package needs to be uninstalled, the first electronic device periodically cleans the second software package determined in step S1496. By periodically cleaning the shared library without application dependence, it helps to reduce the occupation of the storage space of the first electronic device by the useless shared library.
[0401] FIG. 21 is a schematic diagram of module interaction of a shared library updating process provided by an exemplary embodiment of the present application. In the present embodiment, the application distribution platform client, the application distribution platform server and the software package management module in FIG. 5 are involved. The shared library updating process can include the following steps:
[0402] In step S2110, the application distribution platform client sends a shared library updating request to the application distribution platform server. Optionally, the shared library updating request includes identification information of at least one installed shared library. For example, the shared library updating request includes the package name of at least one installed shared library.
[0403] Exemplarily, the application distribution platform client sends a shared library update request to the application distribution platform server once every first time interval.
[0404] At step S2120, the application distribution platform server acquires the version information of the installed shared library and the target version information. Optionally, the application distribution platform server acquires the target version information from the shared library metadata according to the package name of the shared library.
[0405] At step S2130, the application distribution platform server compares the version information of the installed shared library and the target version information.
[0406] The version information of the installed shared library includes the second version information in the above embodiments, and the target version information includes the first version information in the above embodiments. Optionally, the target version information is stored in the server of the application distribution platform, and the server of the application distribution platform finds the target version information through the name of the installed shared library. The version information of the installed shared library is sent by the application distribution platform client to the server of the application distribution platform.
[0407] Optionally, the application distribution platform server generates a comparison result of the version information of the installed shared library and the target version information, and the comparison result is used to indicate whether the installed shared library needs to be updated in version. Exemplarily, in the case that the target version information is different from the version information of the installed shared library, the comparison result indicates that the installed shared library needs to be updated in version; in the case that the target version information is the same as the version information of the installed shared library, the comparison result indicates that the installed shared library does not need to be updated in version.
[0408] At step S2140, the application distribution platform server generates a download address of a third software package.
[0409] The third software package is used to update the installed shared library to the latest version. Optionally, the application distribution platform server further generates verification information of the third software package.
[0410] Subsequently, the application distribution platform server sends the download address of the third software package to the application distribution platform client.
[0411] Optionally, the application distribution platform server further sends at least one of the following to the application distribution platform client: the comparison result and the verification information of the third software package.
[0412] At step S2150, the application distribution platform client receives the download information of the third software package.
[0413] Step S2160, the application distribution platform client judges whether to download the third software package. Optionally, in the case that the comparison result indicates that the version of the installed shared library is updated, the application distribution platform client performs step S2161; in the case that the comparison result indicates that the version of the installed shared library is not updated, the present flow ends.
[0414] Step S2161, the application distribution platform client requests the 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 according to the download information of the third software package.
[0415] Step S2162, the application distribution platform server provides the first software package to the application distribution platform client.
[0416] Step S2163, the application distribution platform client verifies the third software package. Optionally, the application distribution platform client verifies the third software package according to the verification information of the third software package. Illustratively, in the case that the third software package is complete, the application distribution platform client performs step S2164; in the case that the third software package is incomplete, the application distribution platform client re-performs step S2161.
[0417] Step S2164, the application distribution platform client instructs the software package management module to install the first application.
[0418] Step S2165, the software package management system installs the third software package.
[0419] By updating the shared library independently, the first electronic device is facilitated to manage the version of the shared library.
[0420] FIG. 22 is a schematic diagram of module interaction in a shared library aging cleaning process according to an example embodiment of the present application. The present embodiment involves the application distribution platform client and the software package management module in FIG. 5. The shared library updating process can include the following steps, and the shared library aging cleaning process can include the following steps:
[0421] Step S2210, the application distribution platform client obtains the installed shared library according to the shared library list.
[0422] Optionally, the application distribution platform client calls the software package management module to periodically scan the shared library list. The shared library list is used to record the installed shared library in the first electronic device. Illustratively, the software package management module obtains the package name of the installed shared library from the shared library list every second time interval.
[0423] Step S2220, the software package management module obtains the application information of the installed shared library.
[0424] At step S2230, the application distribution platform client determines whether the application dependency information satisfies the shared library cleaning condition. Optionally, in a case where the application dependency information satisfies the shared library cleaning condition, the application distribution platform client performs step S2240; in a case where the application dependency information does not satisfy the shared library cleaning condition, the flow ends.
[0425] At step S2240, the application distribution platform client instructs the software package management module to uninstall the software package of the installed shared library.
[0426] At step S2250, the software package management module uninstalls the software package of the installed shared library.
[0427] In a case where there is no application in the first electronic device that depends on the shared library, the application distribution platform client calls the software package management module to uninstall the software package of the shared library. In a case where there is an application in the first electronic device that depends on the shared library, the software package of the shared library is not processed.
[0428] By checking the dependency of the shared library between applications in this embodiment, the shared library is cleaned up, which helps to clean up the installed shared library from the first electronic device in a case where the installed shared library in the first electronic device is not depended on by an application.
[0429] The application management method provided in the embodiments of the present application is described in detail above in combination with FIGS. 9 to 22. The first electronic device and the server provided in the embodiments of the present application are described in detail below in combination with FIGS. 23 and 24. All or part of any feature of any embodiment in the present application can be freely combined. The combined technical solutions also belong to the scope described in the present application.
[0430] In a possible design, FIG. 23 is a structural schematic diagram of an electronic device provided in an embodiment of the present application. Optionally, the electronic device 2300 represents at least one of the first electronic device 100 and the second electronic device 300 in FIG. 3. As shown in FIG. 23, the electronic device 2300 can 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.
[0431] Optionally, the transceiver unit 2301 is configured to support the second electronic device to perform S920, S930, S940 and S970 in FIG. 9; and / or, is configured to support the first electronic device to perform S1410 in FIG. 14, and / or, is configured to support the first electronic device to perform S1510, S1530 and S1550 in FIG. 15, and / or, and / or, is configured to support the first electronic device to perform S1470 in FIG. 19.
[0432] Optionally, the processing unit 2302 is configured to support the second electronic device to perform S910 and S950 and S960 in FIG. 9; and / or, is configured to support the first electronic device to perform S1420 and S1430 in FIG. 14, and / or, is configured to support the first electronic device to perform S1532-S1540 and S1550-S1554 in FIG. 15; and / or, is configured to support the first electronic device to perform S1440-S1460 in FIG. 16, and / or, is configured to support the first electronic device to perform S1710-S1740 in FIG. 17, and / or, is configured to support the first electronic device to perform S1810-S1870 in FIG. 18, and / or, is configured to support the first electronic device to perform S1480-S1490 in FIG. 19, and / or, is configured to support the first electronic device to perform S1495 and S1496 in FIG. 20.
[0433] The transceiver unit can include a receiving unit and a sending unit, can be implemented by a transceiver or a transceiver related circuit component, and can be a transceiver or a transceiver module. The operations and / or functions of each unit in the electronic device 2300 are respectively used to implement the corresponding processes of the application management method described in the above method embodiments. All related contents of each step involved in the above method embodiments can be referred to the function description of the corresponding functional unit, and will not be repeated here for the sake of brevity.
[0434] Optionally, the electronic device 2300 shown in FIG. 23 can further include a storage unit (not shown in FIG. 23), which stores programs or instructions. When the transceiver unit 2301 and the processing unit 2302 execute the programs or instructions, the electronic device 2300 shown in FIG. 23 can perform the application management method described in the above method embodiments.
[0435] The technical effects of the electronic device 2300 shown in FIG. 23 can refer to the technical effects of the application management method described in the above method embodiments, which will not be repeated here.
[0436] In addition to the form of the electronic device 2300, the technical solutions provided in the present application can also be a functional unit or a chip in the electronic device, or a device matched with the electronic device.
[0437] The technical effects of the first electronic device 2300 shown in FIG. 23 can refer to the technical effects of the application management method described in the above method embodiments, which will not be repeated here.
[0438] In addition to the form of the first electronic device 2300, the technical solutions provided in the present application can also be a functional unit or a chip in the first electronic device, or a device matched with the first electronic device.
[0439] In a possible design, FIG. 24 is a structural diagram of a server provided in an embodiment of the present application. Optionally, the server is the first server 200 and / or the second server 400 in FIG. 3. As shown in FIG. 24, the server 2400 can include a transceiver unit 2401 and a processing unit 2402. The server 2400 can be used to implement the functions of the server involved in the method embodiments.
[0440] Optionally, the transceiver unit 2401 is configured to support the first server to support performing S1523, S1531 and S1551 in FIG. 15.
[0441] Optionally, the processing unit 2402 is configured to support the first server to support performing S1520-S1523 in FIG. 15.
[0442] The transceiver unit can include a receiving unit and a sending unit, can be implemented by a transceiver or a transceiver related circuit component, and can be a transceiver or a transceiver module. The operations and / or functions of each unit in the server 2400 are respectively used to implement the corresponding procedures of the application management method described in the above method embodiments. All related contents of each step involved in the above method embodiments can be referred to the function description of the corresponding functional unit, and will not be repeated here for the sake of brevity.
[0443] Optionally, the server 2400 shown in FIG. 24 can further include a storage unit (not shown in FIG. 24), and the storage unit stores programs or instructions. When the transceiver unit 2401 and the processing unit 2402 execute the programs or instructions, the server 2400 shown in FIG. 24 can perform the application management method described in the above method embodiments.
[0444] The technical effects of the server 2400 shown in FIG. 24 can refer to the technical effects of the application management method described in the above method embodiments, which will not be repeated here.
[0445] In addition to the form of the server 2400, the technical solutions provided in the present application can also be a functional unit or a chip in the server, or a device matched with the server.
[0446] The embodiments of the present application also provide a chip system, which includes a processor and a memory coupled with the processor. The memory is used to store programs or instructions. When the programs or instructions are executed by the processor, the chip system implements the method in any of the above method embodiments.
[0447] The embodiments of the present application also provide a chip system, which includes a processor and a memory coupled with the processor. The memory is used to store programs or instructions. When the programs or instructions are executed by the processor, the chip system implements the method in any of the above method embodiments.
[0448] Optionally, the processor in the chip system can be one or more. The processor can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor, which is implemented by reading software code stored in a memory.
[0449] Optionally, the memory in the chip system can also be one or more. The memory can be integrated with the processor or arranged separately from the processor, and the embodiments of the present application do not limit the same. Exemplarily, the memory can be a non-transient processor, for example, a read-only memory (ROM), which can be integrated on the same chip as the processor or arranged on different chips respectively, and the embodiments of the present application do not limit the type of the memory and the arrangement manner of the memory and the processor.
[0450] Exemplarily, the chip system can 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 chip.
[0451] It should be understood that each step in the above method embodiments can be completed by the integrated logic circuit of hardware in the processor or the instruction in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as hardware processor execution completion or executed by the combination of hardware and software modules in the processor.
[0452] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program. When the computer program runs on a computer, the computer is caused to execute the above related steps to realize the application management method in the above embodiments.
[0453] The embodiment of the present application further provides a computer program product, which, when running on a computer, causes the computer to execute the related steps to realize the application management method in the above embodiment.
[0454] In addition, the embodiment of the present application further provides an apparatus. The apparatus can be specifically a component or a module, and can include one or more processors and memories connected thereto. The memories are used to store computer programs. When the computer programs are executed by the one or more processors, the apparatus executes the application management method in the above method embodiments.
[0455] The computer readable storage medium, the computer program product or the chip provided by the embodiment of the present application are used to execute the corresponding method provided above. Therefore, the beneficial effects achieved thereby can refer to the beneficial effects in the corresponding method provided above, which will not be described herein again.
[0456] The steps of the method or algorithm described in connection with the disclosure of the embodiment of the present application can be implemented in the form of hardware, or can be implemented by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in a random access memory, a flash memory, a read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, a register, a hard disk, a mobile hard disk, a read-only optical disk or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in a special integrated circuit.
[0457] From the above description of the embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example for illustration. In actual application, the above functions can be completed by different functional modules according to needs; that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above. The specific working process of the above-described system, apparatus and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described herein again.
[0458] In several embodiments provided in the present application, it should be understood that the disclosed method can be implemented in other ways. The above-described device embodiments are only illustrative. For example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, modules or units, which can be electrical, mechanical or other forms.
[0459] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit. The computer readable storage medium includes, but is not limited to, any one of the following: a U disk, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk, and various media that can store program codes.
[0460] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited to this. Any change or replacement within the technical scope disclosed in the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection 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.
Citation Information
Patent Citations
Shared software library for computing devices
CN114911519A
Application management method, server, electronic equipment and system
CN118227222A
Dependence library sharing method and device and readable storage medium
CN118312273A
Download server and method for installing and updating application program using partitioning of shared library
US20100017503A1
Automatic updating of application functionality
US20230102816A1