Method for managing shared library, apparatus and electronic device

By detecting the shared library version in the system and automatically loading the highest version, independent updates and uninstalling of the shared library are solved, and the problem of shared library updates and storage space is wasteful, reducing the cost and frequency of application developers and improving user experience.

WO2024244598A1PCT designated stage expired Publication Date: 2024-12-05HUAWEI TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/081001
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-26
Filing Date
2024-03-11
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

Existing shared libraries cannot be updated and uninstalled independently, resulting in increased application integration costs and wasted storage space, and a lack of an effective multi-version management mechanism.

Method used

By detecting the version of the shared library in the system and automatically loading the highest version when the application starts, providing independent updates and uninstall capabilities to achieve collaborative management of the shared library and the application.

Benefits of technology

It reduces the integration cost and update frequency of shared libraries, improves storage space utilization, simplifies the management and popularization of shared libraries, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024081001_05122024_PF_FP_ABST
    Figure CN2024081001_05122024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present application are a method for managing a shared library, an apparatus and an electronic device. The method, the apparatus and the electronic device can implement: when it is detected that version A of a first shared library is on release, determining whether version A of the first shared library is installed in a system; and, when it is determined that version A of the first shared library is not installed in the system, downloading version A of the first shared library, and can also implement: determining a third shared library list, the third shared library list comprising a shared library among full shared libraries on which an application does not depend, and / or an old-version shared library among the full shared libraries, and the full shared libraries comprising all shared libraries currently installed in the system; and uninstalling shared libraries in the third shared library list. As the shared library has a capability to be independently updated or uninstalled, the method, the apparatus and the electronic device can reduce the integration cost and the updating frequency of application developers for using shared libraries, and can also reduce occupancy of storage spaces.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device and electronic device for managing shared library

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on May 26, 2023, with application number 202310612762.6 and application name “Method, device and electronic device for managing shared libraries”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] Embodiments of the present application relate to the field of managing shared libraries, and more specifically, to a method, apparatus, and electronic device for managing shared libraries. Background Art

[0003] With the rapid evolution of the mobile internet market, third-party app developers often use third-party code, such as shared libraries, during the development process to improve efficiency and reduce costs. Currently, shared library providers can dynamically load their own application code capabilities and make them available to third-party apps. This eliminates the need for third-party apps to integrate related content (including code and resources) into their own installation packages, thereby reducing third-party app integration costs.

[0004] However, current shared libraries cannot update themselves, and all applications that rely on the shared library need to be updated and re-listed, which increases the cost of application integration. In addition, there is no effective uninstallation mechanism for multi-version shared libraries. Some redundant shared library versions stored in the system will take up a large amount of storage space, resulting in a waste of storage space.

[0005] Summary of the Invention

[0006] The present application provides a method, device, and electronic device for managing shared libraries. Through this method, device, and electronic device, shared libraries have independent update or uninstall capabilities, and the system can automatically load the highest version of the shared library it depends on when the application is started, so that updates to the shared library are reflected in real time, which can reduce the integration cost and update frequency of application developers using shared libraries. Timely uninstallation of redundant shared libraries can also reduce storage space usage.

[0007] In a first aspect, a method for managing shared libraries is provided, the method comprising: when it is detected that version A of a first shared library is put on the shelf, determining whether version A of the first shared library is installed in the system; when it is determined that version A of the first shared library is not installed in the system, downloading version A of the first shared library.

[0008] Among them, version A is the highest version of the first shared library.

[0009] In an embodiment of the present application, updates of multiple versions of shared libraries can be implemented, so that shared libraries have independent update capabilities, lowering the development threshold for shared library providers, making shared libraries easier to manage and popularize, and also reducing the integration costs and update frequency of application developers when using shared libraries.

[0010] In combination with the first aspect, in a possible implementation, the method also includes: installing version A of the first shared library; when it is detected that the first application is started, obtaining version A of the first shared library to run the first application, and the first shared library is a shared library that the first application depends on.

[0011] Among them, when it is detected that the first application is started, the Ath version of the first shared library is obtained, which can be to obtain the shared library path of the Ath version of the first shared library, so that the first application can use the Ath version of the first shared library according to the shared library path of the Ath version of the first shared library.

[0012] In an embodiment of the present application, after completing the update of multiple versions of shared libraries, the system can automatically load the highest version of the shared library on which it depends when the application starts, so that the update of the shared library can be reflected in real time, thereby reducing the integration cost and update frequency of application developers when using shared libraries.

[0013] In combination with the first aspect, in a possible implementation method, determining whether the Ath version of the first shared library is installed in the system includes: obtaining information about the first shared library, the information about the first shared library including information about one or more currently installed versions of the first shared library; and determining whether the Ath version of the first shared library is installed in the system based on the information about the first shared library.

[0014] In an embodiment of the present application, a method is provided in which an application market queries a system for information related to a shared library, which can enable the interaction of shared library information between the application market and the system.

[0015] In combination with the first aspect, in a possible implementation method, determining whether the Ath version of the first shared library is installed in the system includes: the application market obtains information about the highest version of the first shared library currently installed by querying the system; the application market determines whether the highest version is the Ath version based on the information of the highest version of the first shared library; if not, the application market determines that the Ath version of the first shared library is not installed in the system.

[0016] In an embodiment of the present application, another method is provided for an application market to query a system for information related to a shared library, which can realize the shared library information interaction between the application market and the system.

[0017] In combination with the first aspect, in a possible implementation method, determining whether the Ath version of the first shared library is installed in the system includes: the application market sends an inquiry message to the system, where the inquiry message is used to inquire whether the system has installed the Ath version of the first shared library, and the application market receives a reply message to the inquiry message. If the reply message is no, the application market determines that the Ath version of the first shared library is not installed in the system.

[0018] In an embodiment of the present application, another method is provided for an application market to query a system for information related to a shared library, which can realize the shared library information interaction between the application market and the system.

[0019] In combination with the first aspect, in a possible implementation method, whether the Ath version of the first shared library is installed in the system is determined based on the information of the first shared library, including: when the information of the first shared library does not include the Ath version of the first shared library, determining that the Ath version of the first shared library is not installed in the system.

[0020] In an embodiment of the present application, the information of the first shared library includes information of one or more versions of the first shared library currently installed in the system. After obtaining this information, the application market can further determine whether the one or more versions of the first shared library currently installed in the system include the Ath version of the first shared library, and then determine whether the Ath version of the first shared library is installed in the system.

[0021] In combination with the first aspect, in a possible implementation method, obtaining the information of the first shared library includes: the application market sends a first query message to the system, and the first query message is used to query the information of the first shared library; the application market receives a first reply message, and the first reply message includes the information of the first shared library.

[0022] In an embodiment of the present application, the system provides a query interface for the shared library version to the application market, so that the application market can implement information interaction with the system through the query interface, and then obtain the shared library version information from the system.

[0023] In combination with the first aspect, in a possible implementation, the method also includes: determining a third shared library list, the third shared library list including shared libraries in the full shared library that are not dependent on the application, and / or, the third shared library list including lower version shared libraries in the full shared library, the shared libraries in the third shared library list are all in a currently non-running state, and the full shared library includes all shared libraries currently installed in the system; uninstalling the shared libraries in the third shared library list.

[0024] Optionally, each shared library in the full shared library has its own version identifier.

[0025] Among them, the low version shared library is a shared library that is not the highest version.

[0026] In an embodiment of the present application, the shared library has an independent uninstall capability, which lowers the development threshold for shared library providers and makes shared libraries easier to manage and popularize; it can promptly uninstall shared libraries that are not relied upon by applications in the system and low-version shared libraries, which can reduce the storage space occupied in the system and thereby improve the user experience.

[0027] In combination with the first aspect, in a possible implementation, determining a third shared library list includes: obtaining information about the full shared library, the information about the full shared library includes version information of each shared library in the full shared library, and / or, the information about the full shared library includes dependency information of each shared library in the full shared library, the dependency information is used to characterize whether the shared library is dependent on the application, or the dependency information is used to characterize which applications depend on the shared library; determining a fourth shared library list based on the information about the full shared library, the fourth shared library list includes shared libraries in the full shared library that are not dependent on the application, and / or, the fourth shared library list includes lower-version shared libraries in the full shared library; obtaining running information of each shared library in the fourth shared library list, the running information is used to characterize whether the shared library is currently in a running state; determining the third shared library list based on the running information, the third shared library list includes shared libraries in the fourth shared library list that are not currently running.

[0028] Among them, optionally, the information of the full shared library is obtained at a first time, and the first time can be a periodic time, for example: it can be 22:00 every night, or 2:00 every morning, or every 30 hours, or any other periodic time; the first time can also be a time triggered by user operation, or a time automatically determined by the system according to the current storage or operation status of the device, and this application does not limit this.

[0029] In an embodiment of the present application, the application market can obtain version information and operation information of all shared libraries from the system, and then determine a list of shared libraries that need to be uninstalled, so as to facilitate subsequent uninstallation of the shared libraries in the shared library list.

[0030] In combination with the first aspect, in a possible implementation method, obtaining the information of the full shared library includes: the application market sends a second query message to the system, and the second query message is used to query the information of the full shared library; the application market receives a second reply message, and the second reply message includes the information of the full shared library.

[0031] In an embodiment of the present application, the system provides the application market with a query interface for the full shared library information, so that the application market can implement information interaction with the system through the query interface, and then obtain the full shared library information from the system.

[0032] In combination with the first aspect, in a possible implementation method, obtaining the operating information of each shared library in the fourth shared library list includes: the application market sends a third query message to the system, and the third query message is used to query the operating information of each shared library in the fourth shared library list; the application market receives a third reply message, and the third reply message is used to indicate the operating information of each shared library in the fourth shared library list.

[0033] In an embodiment of the present application, the system provides the application market with a query interface for the running information of the shared library, so that the application market can implement information interaction with the system through the query interface, and then obtain the running information of the shared library from the system.

[0034] In combination with the first aspect, in a possible implementation, the full shared library includes the first version of the first shared library and the Ath version of the first shared library, and the Ath version of the first shared library is the highest version of the first shared library. The method also includes: when uninstalling the first version of the first shared library, pointing the shared library version that the first application depends on to the Ath version of the first shared library.

[0035] Uninstalling the first version of the first shared library includes: deleting path information of the first version of the first shared library.

[0036] Among them, pointing the shared library version that the first application depends on to the Ath version of the first shared library can be understood as modifying the dependency relationship of the first application, that is, changing the dependency relationship of the first application from depending on the first version of the first shared library to depending on the Ath version of the first shared library.

[0037] In another possible implementation parallel to this embodiment, when the first version of the first shared library is uninstalled, the system does not modify the dependency of the first application, but obtains the Ath version of the first shared library each time the first application is started.

[0038] In an embodiment of the present application, when the shared library version used by an application is uninstalled, the shared library version used by the application automatically points to a higher version shared library. In this way, when the application is started, the higher version of the shared library is automatically enabled, and the application will not run abnormally due to the uninstallation of the shared library version, which can improve the user experience.

[0039] In combination with the first aspect, in a possible implementation, the method further includes: in response to a user operation of installing or updating the first application, obtaining a first shared library list that the first application depends on, the first shared library list including M shared libraries, where M is a positive integer greater than or equal to 1; determining a second shared library list based on the installation status of the M shared libraries, the second shared library list including uninstalled shared libraries among the M shared libraries; installing the shared libraries in the second shared library list, and installing or updating the first application.

[0040] In the embodiment of the present application, the shared library and the third-party application can be installed together, so that the application always has the shared library it depends on, which can reduce the occurrence of application operation failures and improve the user experience.

[0041] In combination with the first aspect, in a possible implementation, before determining the second shared library list based on the installation status of the M shared libraries, the method also includes: the application market sends a fourth query message to the system, and the fourth query message is used to query the installation status of the M shared libraries; the application market receives a fourth reply message, and the fourth reply message is used to indicate the installation status of the M shared libraries.

[0042] In an embodiment of the present application, the system provides the application market with a query interface for the installation information of the shared library, so that the application market can implement information interaction with the system through the query interface, and then obtain the installation information of the shared library from the system.

[0043] In combination with the first aspect, in a possible implementation, installing the shared libraries in the second shared library list includes: installing each shared library in the second shared library list in a different path.

[0044] In an embodiment of the present application, when the system installs different versions of shared libraries, it will install different versions of shared libraries in different version paths according to the version number. In this way, different versions of shared libraries can be relatively independent of each other, different versions of the same shared library can be treated as different applications, and operations such as updating or uninstalling a specific version of the shared library can be implemented.

[0045] In a second aspect, a method for managing shared libraries is provided, the method comprising: determining a third shared library list, the third shared library list including shared libraries in the full shared library that are not dependent on applications, and / or the third shared library list including lower version shared libraries in the full shared library, the full shared library including all shared libraries currently installed in the system; uninstalling shared libraries in the third shared library list, the shared libraries in the third shared library list are all in a currently non-running state.

[0046] Optionally, each shared library in the full shared library has its own version identifier.

[0047] In an embodiment of the present application, the shared library has an independent uninstall capability, which lowers the development threshold for shared library providers and makes shared libraries easier to manage and popularize; it can promptly uninstall shared libraries that are not relied upon by applications in the system and low-version shared libraries, which can reduce the storage space occupied in the system and thereby improve the user experience.

[0048] In combination with the second aspect, in a possible implementation, determining a third shared library list includes: obtaining information about the full shared library, the information about the full shared library includes version information of each shared library in the full shared library, and / or, the information about the full shared library includes dependency information of each shared library in the full shared library, the dependency information is used to characterize whether the shared library is dependent on the application, or the dependency information is used to characterize which applications depend on the shared library; determining a fourth shared library list based on the information about the full shared library, the fourth shared library list includes shared libraries in the full shared library that are not dependent on the application, and / or, the fourth shared library list includes lower-version shared libraries in the full shared library; obtaining running information of each shared library in the fourth shared library list, the running information is used to characterize whether the shared library is currently in a running state; determining the third shared library list based on the running information, the third shared library list includes shared libraries in the fourth shared library list that are not currently running.

[0049] Among them, optionally, the information of the full shared library is obtained at a first time, and the first time can be a periodic time, for example: it can be 22:00 every night, or 2:00 every morning, or every 30 hours, or any other periodic time; the first time can also be a time triggered by user operation, or a time automatically determined by the system according to the current storage or operation status of the device, and this application does not limit this.

[0050] In an embodiment of the present application, the application market can obtain version information and operation information of all shared libraries from the system, and then determine a list of shared libraries that need to be uninstalled, so as to facilitate subsequent uninstallation of the shared libraries in the shared library list.

[0051] In combination with the second aspect, in a possible implementation method, obtaining the information of the full shared library includes: the application market sends a second query message to the system, and the second query message is used to query the information of the full shared library; the application market receives a second reply message, and the second reply message includes the information of the full shared library.

[0052] In an embodiment of the present application, the system provides the application market with a query interface for the full shared library information, so that the application market can implement information interaction with the system through the query interface, and then obtain the full shared library information from the system.

[0053] In combination with the second aspect, in a possible implementation method, obtaining the operating information of each shared library in the fourth shared library list includes: the application market sends a third query message to the system, and the third query message is used to query the operating information of each shared library in the fourth shared library list; the application market receives a third reply message, and the third reply message is used to indicate the operating information of each shared library in the fourth shared library list.

[0054] In an embodiment of the present application, the system provides the application market with a query interface for the running information of the shared library, so that the application market can implement information interaction with the system through the query interface, and then obtain the running information of the shared library from the system.

[0055] In combination with the second aspect, in a possible implementation, the full shared library includes the first version of the first shared library and the Ath version of the first shared library, and the Ath version of the first shared library is the highest version of the first shared library. The method also includes: when uninstalling the first version of the first shared library, pointing the shared library version that the first application depends on to the Ath version of the first shared library, and the first shared library is the shared library that the first application depends on.

[0056] Uninstalling the first version of the first shared library includes: deleting path information of the first version of the first shared library.

[0057] Among them, pointing the shared library version that the first application depends on to the Ath version of the first shared library can be understood as modifying the dependency relationship of the first application, that is, changing the dependency relationship of the first application from depending on the first version of the first shared library to depending on the Ath version of the first shared library.

[0058] In another possible implementation parallel to this embodiment, when the first version of the first shared library is uninstalled, the system does not modify the dependency of the first application, but obtains the Ath version of the first shared library each time the first application is started.

[0059] In an embodiment of the present application, when the shared library version used by an application is uninstalled, the shared library version used by the application automatically points to a higher version shared library. In this way, when the application is started, the higher version of the shared library is automatically enabled, and the application will not run abnormally due to the uninstallation of the shared library version, which can improve the user experience.

[0060] In combination with the second aspect, in a possible implementation, the method further includes: in response to a user's operation of installing or updating a first application, obtaining a first shared library list that the first application depends on, the first shared library list including M shared libraries, where M is a positive integer greater than or equal to 1; determining a second shared library list based on the installation status of the M shared libraries, the second shared library list including uninstalled shared libraries among the M shared libraries; installing the shared libraries in the second shared library list, and installing or updating the first application.

[0061] In the embodiment of the present application, the shared library and the third-party application can be installed together, so that the application always has the shared library it depends on, which can reduce the occurrence of application operation failures and improve the user experience.

[0062] In combination with the second aspect, in a possible implementation, before determining the second shared library list based on the installation status of the M shared libraries, the method also includes: the application market sends a fourth query message to the system, and the fourth query message is used to query the installation status of the M shared libraries; the application market receives a fourth reply message, and the fourth reply message is used to indicate the installation status of the M shared libraries.

[0063] In an embodiment of the present application, the system provides the application market with a query interface for the installation information of the shared library, so that the application market can implement information interaction with the system through the query interface, and then obtain the installation information of the shared library from the system.

[0064] In conjunction with the second aspect, in a possible implementation, installing the shared libraries in the second shared library list includes: installing each shared library in the second shared library list in a different path.

[0065] In an embodiment of the present application, when the system installs different versions of shared libraries, it will install different versions of shared libraries in different version paths according to the version number. In this way, different versions of shared libraries can be relatively independent of each other, different versions of the same shared library can be treated as different applications, and operations such as updating or uninstalling a specific version of the shared library can be implemented.

[0066] In a third aspect, a device for managing shared libraries is provided, which includes: a judgment module for judging whether the Ath version of the first shared library is installed in the system when it is detected that the Ath version of the first shared library is put on the shelf; and a downloading module for downloading the Ath version of the first shared library when it is determined that the Ath version of the first shared library is not installed in the system.

[0067] Among them, version A is the highest version of the first shared library.

[0068] In an embodiment of the present application, updates of multiple versions of shared libraries can be implemented, so that shared libraries have independent update capabilities, lowering the development threshold for shared library providers, making shared libraries easier to manage and popularize, and also reducing the integration costs and update frequency of application developers when using shared libraries.

[0069] In combination with the third aspect, in a possible implementation, the device also includes: an installation module for installing the Ath version of the first shared library; an acquisition module for acquiring the Ath version of the first shared library when detecting that the first application is started, so as to run the first application, and the first shared library is a shared library that the first application depends on.

[0070] Among them, when it is detected that the first application is started, the acquisition module obtains the Ath version of the first shared library. The acquisition module may obtain the shared library path of the Ath version of the first shared library, so that the first application can use the Ath version of the first shared library according to the shared library path of the Ath version of the first shared library.

[0071] In an embodiment of the present application, after completing the update of multiple versions of shared libraries, the system can automatically load the highest version of the shared library on which it depends when the application starts, so that the update of the shared library can be reflected in real time, thereby reducing the integration cost and update frequency of application developers when using shared libraries.

[0072] In combination with the third aspect, in a possible implementation method, the acquisition module is used to obtain information about the first shared library, and the information about the first shared library includes information about one or more versions of the first shared library that are currently installed; the judgment module is specifically used to: determine whether version A of the first shared library is installed in the system based on the information about the first shared library.

[0073] In an embodiment of the present application, a device is provided for an application market to query a system for information related to a shared library, which can realize the shared library information interaction between the application market and the system.

[0074] In combination with the third aspect, in one possible implementation, the acquisition module is used to obtain information about the highest version of the first shared library currently installed by querying the system; the judgment module is specifically used to: determine whether the highest version is version A based on the information of the highest version of the first shared library; if not, the determination module included in the device determines that version A of the first shared library is not installed in the system.

[0075] In an embodiment of the present application, another device is provided for the application market to query the system for information related to a shared library, which can realize the shared library information interaction between the application market and the system.

[0076] In combination with the third aspect, in a possible implementation, the device also includes a transceiver module for sending an inquiry message to the system, wherein the inquiry message is used to inquire whether the system has installed the Ath version of the first shared library. The transceiver module is also used to receive a reply message to the inquiry message, and a determination module for determining that the Ath version of the first shared library is not installed in the system when the reply message is no.

[0077] In an embodiment of the present application, another device is provided for the application market to query the system for information related to a shared library, which can realize the shared library information interaction between the application market and the system.

[0078] In combination with the third aspect, in a possible implementation, the judgment module is specifically used to: when the information of the first shared library does not include information of the Ath version of the first shared library, determine that the Ath version of the first shared library is not installed in the system.

[0079] In an embodiment of the present application, the information of the first shared library includes information of one or more versions of the first shared library currently installed in the system. After obtaining this information, the application market can further determine whether the one or more versions of the first shared library currently installed in the system include the Ath version of the first shared library, and then determine whether the Ath version of the first shared library is installed in the system.

[0080] In combination with the third aspect, in a possible implementation, the transceiver module is also used to send a first query message to the system, and the first query message is used to query the information of the first shared library; the transceiver module is also used to receive a first reply message, and the first reply message includes the information of the first shared library.

[0081] In an embodiment of the present application, the system provides a query interface for the shared library version to the application market, so that the application market can implement information interaction with the system through the query interface, and then obtain the shared library version information from the system.

[0082] In combination with the third aspect, in a possible implementation, the determination module is also used to: determine a third shared library list, the third shared library list includes shared libraries in the full shared library that are not dependent on the application, and / or, the third shared library list includes lower version shared libraries in the full shared library, the shared libraries in the third shared library list are all in a currently non-running state, and the full shared library includes all shared libraries currently installed in the system; the device also includes an uninstall module for uninstalling the shared libraries in the third shared library list.

[0083] Optionally, each shared library in the full shared library has its own version identifier.

[0084] Among them, the low version shared library is a shared library that is not the highest version.

[0085] In an embodiment of the present application, the shared library has an independent uninstall capability, which lowers the development threshold for shared library providers and makes shared libraries easier to manage and popularize; it can promptly uninstall shared libraries that are not relied upon by applications in the system and low-version shared libraries, which can reduce the storage space occupied in the system and thereby improve the user experience.

[0086] In combination with the third aspect, in a possible implementation, the acquisition module is also used to: obtain information about the full shared library, the information about the full shared library includes version information of each shared library in the full shared library, and / or, the information about the full shared library includes dependency information of each shared library in the full shared library, the dependency information is used to characterize whether the shared library is dependent on the application, or the dependency information is used to characterize which applications depend on the shared library; determine a fourth shared library list based on the information about the full shared library, the fourth shared library list includes shared libraries in the full shared library that are not dependent on the application, and / or, the fourth shared library list includes low-version shared libraries in the full shared library; obtain running information of each shared library in the fourth shared library list, the running information is used to characterize whether the shared library is currently in a running state; the determination module is specifically used to: determine the third shared library list based on the running information, the third shared library list includes shared libraries in the fourth shared library list that are not currently running.

[0087] Among them, optionally, the acquisition module obtains the information of the full shared library at a first time, and the first time can be a periodic time, for example: it can be 22:00 every night, or 2:00 every morning, or every 30 hours, or any other periodic time; the first time can also be a time triggered by user operation, or a time automatically determined by the system according to the current storage or operation status of the device, and this application does not limit this.

[0088] In an embodiment of the present application, the application market can obtain version information and operation information of all shared libraries from the system, and then determine a list of shared libraries that need to be uninstalled, so as to facilitate subsequent uninstallation of the shared libraries in the shared library list.

[0089] In combination with the third aspect, in a possible implementation, the transceiver module is also used to: send a second query message to the system, where the second query message is used to query the information of the full shared library; and receive a second reply message, where the second reply message includes the information of the full shared library.

[0090] In an embodiment of the present application, the system provides the application market with a query interface for information of the full shared library, so that the application market can implement information interaction with the system through the query interface, and then obtain the full shared library information from the system.

[0091] In combination with the third aspect, in a possible implementation method, the transceiver module is also used to: send a third query message to the system, which is used for the operation information of each shared library in the fourth shared library list; and receive a third reply message, which is used to indicate the operation information of each shared library in the fourth shared library list.

[0092] In an embodiment of the present application, the system provides the application market with a query interface for the running information of the shared library, so that the application market can implement information interaction with the system through the query interface, and then obtain the running information of the shared library from the system.

[0093] In combination with the third aspect, in a possible implementation, the full shared library includes the first version of the first shared library and the Ath version of the first shared library, and the Ath version of the first shared library is the highest version of the first shared library. The device also includes: a pointing module, which is used to point the shared library version that the first application depends on to the Ath version of the first shared library when uninstalling the first version of the first shared library.

[0094] Uninstalling the first version of the first shared library includes: deleting path information of the first version of the first shared library.

[0095] Among them, the pointing module points the shared library version on which the first application depends to the Ath version of the first shared library, which can be understood as the pointing module modifying the dependency of the first application, that is, changing the dependency of the first application from depending on the first version of the first shared library to depending on the Ath version of the first shared library.

[0096] In another possible implementation parallel to this embodiment, when the first version of the first shared library is uninstalled, the dependency of the first application is not modified. Instead, the Ath version of the first shared library is obtained through the acquisition module each time the first application is started.

[0097] In an embodiment of the present application, when the shared library version used by an application is uninstalled, the shared library version used by the application automatically points to a higher version shared library. In this way, when the application is started, the higher version of the shared library is automatically enabled, and the application will not run abnormally due to the uninstallation of the shared library version, which can improve the user experience.

[0098] In combination with the third aspect, in a possible implementation, the acquisition module is further used to: in response to the user's operation of installing or updating the first application, obtain a first shared library list that the first application depends on, the first shared library list including M shared libraries, M being a positive integer greater than or equal to 1; the determination module is further used to: determine a second shared library list based on the installation status of the M shared libraries, the second shared library list including the uninstalled shared libraries among the M shared libraries; the installation module is further used to: install the shared libraries in the second shared library list, and install or update the first application.

[0099] In the embodiment of the present application, the shared library and the third-party application can be installed together, so that the application always has the shared library it depends on, which can reduce the occurrence of application operation failures and improve the user experience.

[0100] In combination with the third aspect, in a possible implementation method, the transceiver module is also used to: send a fourth query message to the system, which is used to query the installation status of the M shared libraries; and receive a fourth reply message, which is used to indicate the installation status of the M shared libraries.

[0101] In an embodiment of the present application, the system provides the application market with a query interface for the installation information of the shared library, so that the application market can implement information interaction with the system through the query interface, and then obtain the installation information of the shared library from the system.

[0102] In conjunction with the third aspect, in a possible implementation, the installation module is specifically configured to: install each shared library in the second shared library list in a different path.

[0103] In an embodiment of the present application, when the system installs different versions of shared libraries, it will install different versions of shared libraries in different version paths according to the version number. In this way, different versions of shared libraries can be relatively independent of each other, different versions of the same shared library can be treated as different applications, and operations such as updating or uninstalling a specific version of the shared library can be implemented.

[0104] In a fourth aspect, a device for managing shared libraries is provided, which includes: a determination module for determining a third shared library list, wherein the third shared library list includes shared libraries in the full shared library that are not dependent on applications, and / or the third shared library list includes lower-version shared libraries in the full shared library, and the full shared library includes all shared libraries currently installed in the system; an uninstallation module for uninstalling shared libraries in the third shared library list, wherein the shared libraries in the third shared library list are all in a currently non-running state.

[0105] Optionally, each shared library in the full shared library has its own version identifier.

[0106] In an embodiment of the present application, the shared library has an independent uninstall capability, which lowers the development threshold for shared library providers and makes shared libraries easier to manage and popularize; it can promptly uninstall shared libraries that are not relied upon by applications in the system and low-version shared libraries, which can reduce the storage space occupied in the system and thereby improve the user experience.

[0107] In combination with the fourth aspect, in a possible implementation, the device also includes an acquisition module for acquiring information about the full shared library, the information about the full shared library including version information of each shared library in the full shared library, and / or the information about the full shared library including dependency information of each shared library in the full shared library, the dependency information being used to characterize whether the shared library is dependent on an application, or the dependency information being used to characterize which applications depend on the shared library; determining a fourth shared library list based on the information about the full shared library, the fourth shared library list including shared libraries in the full shared library that are not dependent on an application, and / or the fourth shared library list including lower-version shared libraries in the full shared library; the acquisition module is also used to acquire running information of each shared library in the fourth shared library list, the running information being used to characterize whether the shared library is currently in a running state; the determination module is specifically used to: determine the third shared library list based on the running information, the third shared library list including shared libraries in the fourth shared library list that are not currently running.

[0108] Among them, optionally, the acquisition module obtains the information of the full shared library at a first time, and the first time can be a periodic time, for example: it can be 22:00 every night, or 2:00 every morning, or every 30 hours, or any other periodic time; the first time can also be a time triggered by user operation, or a time automatically determined by the system according to the current storage or operation status of the device, and this application does not limit this.

[0109] In an embodiment of the present application, the application market can obtain version information and operation information of all shared libraries from the system, and then determine a list of shared libraries that need to be uninstalled, so as to facilitate subsequent uninstallation of the shared libraries in the shared library list.

[0110] In combination with the fourth aspect, in a possible implementation, the device also includes a transceiver module for sending a second query message to the system, where the second query message is used to query the information of the full shared library; and is also used to receive a second reply message, where the second reply message includes the information of the full shared library.

[0111] In an embodiment of the present application, the system provides the application market with a query interface for the full shared library information, so that the application market can implement information interaction with the system through the query interface, and then obtain the full shared library information from the system.

[0112] In combination with the fourth aspect, in a possible implementation, the transceiver module is also used to: send a third query message to the system, which is used for the operation information of each shared library in the fourth shared library list; and receive a third reply message, which is used to indicate the operation information of each shared library in the fourth shared library list.

[0113] In an embodiment of the present application, the system provides the application market with a query interface for the running information of the shared library, so that the application market can implement information interaction with the system through the query interface, and then obtain the running information of the shared library from the system.

[0114] In combination with the fourth aspect, in a possible implementation, the full shared library includes the first version of the first shared library and the Ath version of the first shared library, and the Ath version of the first shared library is the highest version of the first shared library. The device also includes: a pointing module, which is used to point the shared library version on which the first application depends to the Ath version of the first shared library when uninstalling the first version of the first shared library. The first shared library is the shared library on which the first application depends.

[0115] Uninstalling the first version of the first shared library includes: deleting path information of the first version of the first shared library.

[0116] Among them, the pointing module points the shared library version on which the first application depends to the Ath version of the first shared library, which can be understood as the pointing module modifying the dependency of the first application, that is, changing the dependency of the first application from depending on the first version of the first shared library to depending on the Ath version of the first shared library.

[0117] In another possible implementation parallel to this embodiment, when the first version of the first shared library is uninstalled, the dependency of the first application is not modified. Instead, the Ath version of the first shared library is obtained through the acquisition module each time the first application is started.

[0118] In an embodiment of the present application, when the shared library version used by an application is uninstalled, the shared library version used by the application automatically points to a higher version shared library. In this way, when the application is started, the higher version of the shared library is automatically enabled, and the application will not run abnormally due to the uninstallation of the shared library version, which can improve the user experience.

[0119] In combination with the fourth aspect, in a possible implementation, the acquisition module is further used to: in response to the user's operation of installing or updating the first application, obtain a first shared library list that the first application depends on, the first shared library list including M shared libraries, M being a positive integer greater than or equal to 1; the determination module is further used to: determine a second shared library list based on the installation status of the M shared libraries, the second shared library list including uninstalled shared libraries among the M shared libraries; the device also includes an installation module for installing the shared libraries in the second shared library list, and installing or updating the first application.

[0120] In the embodiment of the present application, the shared library and the third-party application can be installed together, so that the application always has the shared library it depends on, which can reduce the occurrence of application operation failures and improve the user experience.

[0121] In combination with the fourth aspect, in a possible implementation method, the transceiver module is also used to: send a fourth query message to the system, which is used to query the installation status of the M shared libraries; and receive a fourth reply message, which is used to indicate the installation status of the M shared libraries.

[0122] In an embodiment of the present application, the system provides the application market with a query interface for the installation information of the shared library, so that the application market can implement information interaction with the system through the query interface, and then obtain the installation information of the shared library from the system.

[0123] In conjunction with the fourth aspect, in a possible implementation, the installation module is specifically configured to: install each shared library in the second shared library list in a different path.

[0124] In an embodiment of the present application, when the system installs different versions of shared libraries, it will install different versions of shared libraries in different version paths according to the version number. In this way, different versions of shared libraries can be relatively independent of each other, different versions of the same shared library can be treated as different applications, and operations such as updating or uninstalling a specific version of the shared library can be implemented.

[0125] In a fifth aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store computer program code, and the processor is used to execute the computer program code stored in the memory to implement the method in the above-mentioned first aspect or any possible implementation of the first aspect, or to implement the method in the above-mentioned second aspect or any possible implementation of the second aspect.

[0126] In the sixth aspect, a computer-readable storage medium is provided, which stores a computer program or instruction. When the computer program or instruction is executed, it implements the method in the above-mentioned first aspect or any possible implementation of the first aspect, or implements the method in the above-mentioned second aspect or any possible implementation of the second aspect.

[0127] In the seventh aspect, a chip is provided, in which instructions are stored. When the chip is run on a device, the chip executes the method in the above-mentioned first aspect or any possible implementation of the first aspect, or executes the method in the above-mentioned second aspect or any possible implementation of the second aspect.

[0128] In an eighth aspect, a computer program product is provided, which includes a computer program code. When the computer program code runs on a computer, it implements the method in the above-mentioned first aspect or any possible implementation of the first aspect, or implements the method in the above-mentioned second aspect or any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0129] FIG1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0130] FIG2 is a software structure block diagram of an electronic device provided in an embodiment of the present application;

[0131] FIG3 is a schematic flow chart of a method for managing a shared library provided in an embodiment of the present application;

[0132] FIG4 is a schematic flow chart of another method for managing a shared library provided in an embodiment of the present application;

[0133] FIG5 is a schematic flow chart of a method for synchronously installing a shared library and an application provided in an embodiment of the present application;

[0134] FIG6 is a schematic flow chart of a method for installing a multi-version shared library provided in an embodiment of the present application;

[0135] FIG7 is a schematic flow chart of a method for updating a shared library provided in an embodiment of the present application;

[0136] FIG8 is a schematic flow chart of a method for uninstalling a shared library provided in an embodiment of the present application;

[0137] FIG9 is a schematic flow chart of another method for uninstalling a shared library provided in an embodiment of the present application;

[0138] FIG10 is a schematic flow chart of another method for updating a shared library provided in an embodiment of the present application;

[0139] FIG11 is a schematic flow chart of a method for updating and uninstalling a shared library provided in an embodiment of the present application;

[0140] 12 is a schematic diagram of functional modules of a device for synchronously installing an application and a shared library provided in an embodiment of the present application;

[0141] FIG13 is a schematic diagram of functional modules of a device for updating a shared library provided in an embodiment of the present application;

[0142] FIG14 is a schematic diagram of functional modules of a device for unloading a shared library provided in an embodiment of the present application. DETAILED DESCRIPTION

[0143] The technical solutions of this application will be described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, rather than all the embodiments.

[0144] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" or "multiple" refers to two or more than two.

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

[0146] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification of this application and the appended claims, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship.

[0147] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "one embodiment," "some embodiments," "another embodiment," and "other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically stated. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically stated.

[0148] The method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0149] Below, some terms involved in the embodiments of this application are first introduced in detail.

[0150] 1. Shared Libraries

[0151] A shared library is a library of shared functions that applications can link to at runtime, rather than at compile time. In Windows, shared libraries are called dynamic link libraries; in Mac OS X, they are called frameworks; and in Linux, they are called shared objects.

[0152] 1 shows a schematic structural diagram of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

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

[0154] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0155] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

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

[0157] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

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

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

[0160] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

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

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

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

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

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

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

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

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

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

[0170] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

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

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

[0173] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

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

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

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

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

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

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

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

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

[0182] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0183] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an App required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

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

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

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

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

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

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

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

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

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

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

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

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

[0196] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

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

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

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

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

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

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

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

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

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

[0206] It should be understood that the phone card in the embodiments of the present application includes but is not limited to a SIM card, an eSIM card, a universal subscriber identity module (USIM), a universal integrated circuit card (UICC), and the like.

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

[0208] Figure 2 is a software structure diagram of the electronic device 100 according to an embodiment of the present application. The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer, from top to bottom. The application layer can include a series of application packages.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0227] It should be understood that the technical solutions in the embodiments of the present application can be used in Android, IOS, Hongmeng and other systems.

[0228] The technical solutions of the embodiments of the present application can be applied to electronic devices.

[0229] The electronic device in the embodiment of the present application may be a television, a desktop computer, a laptop computer, or a portable electronic device such as a mobile phone, a tablet computer, a camera, a video camera, a video recorder, or other electronic devices with storage functions, electronic devices in a 5G network, or electronic devices in a future evolved public land mobile communication network (PLMN), etc. This application does not limit this.

[0230] With the rapid evolution of the mobile internet market, third-party app developers often use third-party code, such as shared libraries, during the development process to improve efficiency and reduce costs. Currently, shared library providers can dynamically load their own application code capabilities and make them available to third-party apps. This eliminates the need for third-party apps to integrate related content (including code and resources) into their own installation packages, thereby reducing third-party app integration costs.

[0231] Currently, the shared libraries in devices are different from the overall process of applications. Shared libraries do not have mechanisms such as application installation, and shared libraries cannot be updated. For example, when there is a problem with version 1.0 of a shared library, the shared library cannot solve the problem by updating to version 1.1 like the application. Instead, all applications that rely on the shared library need to be updated and re-updated to the update shelf to solve the problem, which will increase the integration cost of the application. In addition, when there are multiple versions of the same shared library in the system that are backward compatible, the multiple lower-version shared libraries are subsets of the highest-version shared library. Only the highest-version shared library is required to meet the application requirements. Since there is currently no effective uninstallation mechanism for shared libraries, undepended shared libraries and lower-version shared libraries are still stored in the system, occupying storage space and resulting in wasted storage space. In addition, the current system does not have an effective mechanism to detect the existence of shared libraries and the installation of shared libraries together with third-party applications. This will cause the third-party application to fail to install when the dependent shared library does not exist in the system, thereby affecting the user experience.

[0232] In view of this, the embodiments of the present application provide a method, device and electronic device for managing shared libraries. The method can realize the application of shared libraries through collaboration between subjects such as mobile phone systems, application markets and cloud, so that shared libraries have the ability to be independently developed, distributed, installed, updated or uninstalled, lowering the development threshold for shared library providers and making shared libraries easy to manage and popularize; moreover, multiple versions of shared libraries can exist in the system, and the highest version of the shared library is automatically enabled when the application is started, so that updates of the shared library can be reflected in real time, reducing the integration cost and update frequency when application developers use shared libraries; in addition, the method can realize the joint installation of shared libraries and third-party applications through collaboration between the system framework and the application market, and can also uninstall shared libraries that are not relied upon by applications and low-version shared libraries at specific times, thereby improving user experience and reducing storage space occupied in the system.

[0233] For example, FIG3 shows a schematic flow chart of a method 300 for managing a shared library provided in an embodiment of the present application. As shown in FIG3 , the method 300 includes:

[0234] S301: When it is detected that version A of a first shared library is released, determining whether version A of the first shared library is installed in the system;

[0235] S302: When it is determined that the Ath version of the first shared library is not installed in the system, download the Ath version of the first shared library.

[0236] Among them, version A is the highest version of the first shared library.

[0237] S303: Install version A of the first shared library;

[0238] S304: When it is detected that the first application is started, the Ath version of the first shared library is obtained to run the first application, where the first shared library is a shared library that the first application depends on.

[0239] Among them, when it is detected that the first application is started, the Ath version of the first shared library is obtained, which can be to obtain the shared library path of the Ath version of the first shared library, so that the first application can use the Ath version of the first shared library according to the shared library path of the Ath version of the first shared library.

[0240] Among them, step S301 and step S302 are performed on the application market side; step S303 and step S304 are performed on the system side.

[0241] In one possible implementation, determining whether version A of the first shared library is installed in the system includes: the application market obtains information about the highest version of the first shared library currently installed by querying the system; the application market determines whether the highest version is version A based on the information about the highest version of the first shared library; if not, the application market determines that version A of the first shared library is not installed in the system.

[0242] In another possible implementation, determining whether version A of the first shared library is installed in the system includes: the application market sends an inquiry message to the system, where the inquiry message is used to inquire whether the system has installed version A of the first shared library, and the application market receives a reply message to the inquiry message; if the reply message is no, the application market determines that version A of the first shared library is not installed in the system.

[0243] For example, FIG4 shows a schematic flow chart of another method 400 for managing a shared library provided in an embodiment of the present application. As shown in FIG4 , the method 400 includes:

[0244] S401: Determine a third shared library list.

[0245] The third shared library list includes shared libraries in the full shared library that are not depended on by applications, and / or the third shared library list includes lower version shared libraries in the full shared library, and the full shared library includes all shared libraries currently installed in the system.

[0246] In one implementation, determining the third shared library list includes: obtaining information of the full shared library, the information of the full shared library including version information of each shared library in the full shared library, and / or including dependency information of each shared library in the full shared library.

[0247] The dependency information is used to indicate whether the shared library is dependent on an application, or the dependency information is used to indicate which applications depend on the shared library.

[0248] Among them, optionally, the information of the full shared library is obtained at a first time, and the first time can be a periodic time, for example: it can be 22:00 every night, or 2:00 every morning, or every 30 hours, or any other periodic time; the first time can also be a time triggered by user operation, or a time automatically determined by the system according to the current storage or operation status of the device, and this application does not limit this.

[0249] In some embodiments, all shared libraries in the third shared library list are in a non-running state. Specifically, the step of determining the third shared library list may be:

[0250] (1) Acquire information of a full shared library, where the information of the full shared library includes version information of each shared library in the full shared library and / or dependency information of each shared library in the full shared library.

[0251] (2) Determine a fourth shared library list based on information about the full shared library, wherein the fourth shared library list includes shared libraries in the full shared library that are not dependent on by applications, and / or the third shared library list includes lower-version shared libraries in the full shared library, and the current running status of the shared libraries in the fourth shared library list is unknown.

[0252] (3) Obtaining running information of each shared library in the fourth shared library list, where the running information is used to indicate whether the shared library is currently in a running state.

[0253] (4) Determine a third shared library list, where the third shared library list includes the currently non-running shared libraries in the fourth shared library list.

[0254] S402: Uninstall the shared libraries in the third shared library list.

[0255] Optionally, each shared library in the full shared library has its own version identifier.

[0256] For example, FIG5 shows a schematic flow chart of a method 500 for synchronously installing a shared library and an application provided by an embodiment of the present application. As shown in FIG5 , the method 500 includes:

[0257] S501: In response to a user's operation of installing / updating a first application, the application market downloads the installation package of the first application and obtains a list of first shared libraries that the first application depends on.

[0258] Optionally, the application market downloads the installation package of the first application from the cloud and parses a configuration file in the installation package of the first application to obtain a first shared library list on which the first application depends.

[0259] Among them, the first shared library list that the first application depends on includes one or more shared libraries that the first application depends on, and the one or more shared libraries have version information. That is, the first shared library list may include one or more different shared libraries, and may also include one or more versions of the same shared library with different versions.

[0260] In an example, the first shared library list includes a first version of the first shared library, a second version of the first shared library, a third version of the first shared library, a first version of the second shared library, a first version of the third shared library, and a second version of the third shared library.

[0261] S502: The application market sends a fourth query message to the package management, where the fourth query message is used to query the installation status of the shared libraries in the first shared library list.

[0262] Optionally, the application market queries the installation status of the shared libraries in the first shared library list by calling a package management query interface in the system framework.

[0263] The installation status of the shared libraries in the first shared library list may refer to the installation status of each shared library in the first shared library list (for example, whether it is installed in the system / whether it exists in the system).

[0264] S503: Receive a fourth reply message sent by the package manager, where the fourth reply message is used to indicate the installation status of the shared libraries in the first shared library list.

[0265] S504: The application market determines a second shared library list according to the fourth reply message.

[0266] The second shared library list includes the uninstalled shared libraries in the first shared library list, and / or the second shared library list includes the shared libraries of higher versions corresponding to the installed shared libraries in the first shared library list.

[0267] Optionally, the process of the application market determining the second shared library list according to the fourth reply message may be:

[0268] (1) Among one or more shared libraries in the first shared library list, which shared libraries are already installed (or exist in the system), and which shared libraries (or higher versions of shared libraries) are not installed (or do not exist in the system), and the shared libraries that are not installed (or do not exist in the system) are listed in the second shared library list;

[0269] (2) For the installed (existing) shared library, whether the version of the installed (existing) shared library is greater than or equal to the version of the shared library in the first shared library list; if not, the version of the shared library in the first shared library list or the higher version of the shared library in the first shared library list is included in the second shared library list.

[0270] S505: Download the shared libraries in the second shared library list.

[0271] S506: Install the shared library in the second shared library list, and install or update the first application.

[0272] In the embodiment of the present application, through the collaboration between the system framework and the application market, the shared library and the third-party application can be installed together, so that the application always has the shared library it depends on, which can reduce the occurrence of application operation failures and improve the user experience.

[0273] To more clearly understand the installation process of a multi-version shared library, illustratively, FIG6 shows a schematic flow chart of a method 600 for installing a multi-version shared library provided in an embodiment of the present application. As shown in FIG6 , the method 600 includes:

[0274] S601: When there is a first version of a first shared library and a second version of the first shared library to be installed, the first version of the first shared library is installed in a first path and first shared library information is generated; the second version of the first shared library is installed in a second path and second shared library information is generated.

[0275] The first shared library information includes identification information of the first shared library and version information of the first shared library; the second shared library information includes identification information of the second shared library and version information of the second shared library.

[0276] Optionally, to ensure system security, the permissions required by the shared library are applied for by the applications that depend on it. The shared library itself cannot apply for permissions, and the shared library itself does not have a data directory.

[0277] In an embodiment of the present application, when the system installs different versions of shared libraries, it will install different versions of shared libraries in different version paths according to the version number, and generate multiple shared library information in the system according to the version. In this way, different versions of shared libraries can be relatively independent of each other, different versions of the same shared library can be treated as different applications, and operations such as updating or uninstalling a specific version of the shared library can be implemented.

[0278] For example, FIG7 shows a schematic flow chart of a method 700 for updating a shared library provided in an embodiment of the present application. As shown in FIG7 , the method 700 includes:

[0279] S701: When the application market detects that a new version of the first shared library is released, it sends a first query message to the system, where the first query message is used to query information about the first shared library.

[0280] The information about the first shared library includes information about one or more versions of the first shared library that are currently installed (existing).

[0281] In an example, the one or more versions of the first shared library may include a first version of the first shared library, a second version of the first shared library, a third version of the first shared library, a first version of the second shared library, a first version of the third shared library, and a second version of the third shared library.

[0282] S702: The application market receives a first reply message sent by the system, where the first reply message is used to indicate information about the first shared library.

[0283] S703: The application market determines whether the first shared library needs to be updated based on the first reply message.

[0284] Specifically, the application market determines whether the new version of the first shared library on the shelf exists in the information of the first shared library based on the first reply message. In other words, the application market determines whether the new version of the first shared library on the shelf has been installed (that is, whether it already exists) based on the first reply message. If so, it is determined that the first shared library does not need to be updated; if not, the first shared library needs to be updated.

[0285] In one example, the application market detects that the third version of the first shared library is released. After obtaining the information of the first shared library, the application market determines whether the information of the third version of the first shared library exists in the information of the first shared library. If not, it determines that the first shared library needs to be updated.

[0286] S704: When it is determined that the first shared library needs to be updated, a new version of the first shared library is downloaded.

[0287] In one example, the application market detects that the third version of the first shared library is released, and when it is determined that the first shared library needs to be updated, the third version of the first shared library is downloaded.

[0288] S705: Install the new version of the first shared library.

[0289] Optionally, the system installs a new version of the first shared library at a specific time.

[0290] Optionally, the specific timing may be, for example, when the application that depends on the first shared library is not running.

[0291] In one example, the application market detects that the third version of the first shared library is released, and when it is determined that the first shared library needs to be updated, the third version of the first shared library is downloaded and installed.

[0292] S706: When the application that depends on the first shared library is started, the highest version of the first shared library is obtained.

[0293] Obtaining the highest version of the first shared library may include obtaining a shared library path of the highest version of the first shared library.

[0294] In one example, after the first shared library is updated, the third version of the first shared library is the highest version of the first shared library. Then, when an application that depends on the first shared library is started, the third version of the first shared library is enabled.

[0295] In a possible implementation, the current system is compatible with multiple versions of shared libraries. For example, after a first shared library is updated, when an application that depends on the first shared library is started, the shared library path of the highest version of the first shared library is obtained.

[0296] In another possible implementation, the current system is incompatible with multiple versions of shared libraries. For example, after a first shared library is updated, when an application that depends on the first shared library is started, the path of the shared library configured by the system is obtained.

[0297] In the embodiment of the present application, the update of multiple versions of shared libraries is achieved through the collaboration between the mobile phone system and the application market, so that the shared libraries have independent update capabilities, lowering the development threshold for shared library providers, and making shared libraries easier to manage and popularize; and, the system can automatically enable the highest version of the shared library it depends on when the application is started, so that the update of the shared library can be reflected in real time, thereby reducing the integration cost and update frequency of application developers when using shared libraries.

[0298] For example, FIG8 shows a schematic flow chart of a method 800 for uninstalling a shared library provided by an embodiment of the present application. As shown in FIG8 , the method 800 includes:

[0299] S801: The application market sends a second query message to the system at a first timing, where the second query message is used to query information of a full shared library in the device.

[0300] Optionally, the application market calls a system interface to query information of the full shared library in the device.

[0301] The full shared library includes one or more shared libraries that are installed (already exist) in the current system, and the one or more shared libraries carry version information.

[0302] The information of the full shared library includes version information of each shared library in the full shared library, and / or includes dependency information of each shared library in the full shared library.

[0303] The dependency information is used to indicate whether the shared library is dependent on an application, or the dependency information is used to indicate which applications depend on the shared library.

[0304] In one example, the one or more shared libraries may include a first version of a first shared library, a second version of the first shared library, a third version of the first shared library, a first version of the second shared library, a first version of the third shared library, and a second version of the third shared library.

[0305] S802: The application market receives a second reply message sent by the system, where the second reply message is used to indicate information about the full shared library.

[0306] S803: Determine a fourth shared library list according to the second reply message.

[0307] The fourth shared library list includes shared libraries in the full shared library that are not depended on by applications, and / or the third shared library list includes low-version shared libraries in the full shared library, and the current running status of the shared libraries in the fourth shared library list is unknown.

[0308] S804: The application market sends a third query message to the system, wherein the third query message is used to query the running information of each shared library in the fourth shared library list, wherein the running information is used to indicate whether the shared library is currently running. Optionally, the application market calls a system interface based on the information of all shared libraries to query the running information of each shared library in the fourth shared library list.

[0309] In one example, the information of the full shared library includes information of multiple shared libraries, which may, for example, include the first version of the first shared library, the second version of the first shared library, the third version of the first shared library, the first version of the second shared library, the first version of the third shared library, and the second version of the third shared library.

[0310] S805: The application market receives a third reply message sent by the system, where the third reply message is used to indicate the running information of each shared library in the fourth shared library list.

[0311] S806: The application market determines a third shared library list according to the third reply message, where the third shared library list includes the currently non-running shared libraries in the fourth shared library list.

[0312] That is, the application market determines the third shared library list according to the fourth shared library list and the running information of each shared library in the fourth shared library list.

[0313] Among them, the third shared library list includes shared libraries in the full shared library that are not dependent on the application and / or includes low-version shared libraries in multiple versions of shared libraries that are dependent on the application, wherein the low-version shared libraries are non-highest-version shared libraries, and the shared libraries in the third shared library list are all in a currently non-running state.

[0314] S807: Uninstall the shared libraries in the third shared library list.

[0315] In the embodiments of the present application, through the collaboration between the system and the application market, the shared library has an independent uninstallation capability, which lowers the development threshold of the shared library provider and makes the shared library easier to manage and popularize; it is also possible to uninstall shared libraries that are not relied upon by the application and low-version shared libraries at specific times, which improves the user experience and reduces the storage space occupied in the system; and in terms of the uninstallation (aging) mechanism, it is specifically divided into two cases: compatible with multi-version shared libraries and incompatible with multi-version shared libraries. For the case of compatible with multi-version shared libraries, the low-version shared libraries can be aged; for the case of incompatible with multi-version shared libraries, unused or infrequently used shared libraries can be aged, making the scope of application of this solution wider.

[0316] In order to more clearly understand the method for uninstalling a shared library in the embodiment shown in FIG8 , FIG9 shows, for example, a schematic flow chart of another method 900 for uninstalling a shared library provided in an embodiment of the present application. As shown in FIG9 , the method 900 includes:

[0317] In this embodiment, after being updated, the first shared library includes the first version of the first shared library and the A-th version of the first shared library, where the A-th version is the highest version of the first shared library.

[0318] S901: When uninstalling the first version of the first shared library, delete the path information of the first version of the first shared library.

[0319] It can be understood that after the first version of the first shared library is uninstalled, only the path information of the first version of the first shared library is deleted, and the path information of other versions of the first shared library is still retained.

[0320] In an embodiment of the present application, different versions of the same shared library are treated as different applications. When the target version of the shared library is uninstalled, only the target version of the shared library is uninstalled, and other versions of the shared library are still retained, so that multiple versions of the shared library have independent uninstall capabilities.

[0321] In one achievable manner, when a first application is uninstalled, it is first determined whether a first shared library on which the first application depends is also depended on by other applications. If not, the first shared library is uninstalled at the same time.

[0322] For example, FIG10 shows a schematic flow chart of another method 1000 for managing a shared library provided in an embodiment of the present application. As shown in FIG10 , the method 1000 includes:

[0323] In this embodiment, the shared library currently relied upon by the first application is the first version of the first shared library. After being updated, the first shared library includes the first version of the first shared library and the Ath version of the first shared library, where the Ath version is the highest version of the first shared library.

[0324] S1001: When uninstalling the first version of a first shared library, automatically point the shared library on which the first application depends to the Ath version of the first shared library.

[0325] In an embodiment of the present application, when the shared library version that the application depends on is uninstalled, the shared library version that the application depends on automatically points to the highest version of the shared library. In this way, when the application is started, the path of the shared library with the highest version is automatically obtained, and the application will not run abnormally due to the uninstallation of the shared library version, which can improve the user experience.

[0326] For example, FIG11 shows a schematic flow chart of a method 100 for updating and uninstalling a shared library provided in an embodiment of the present application. As shown in FIG11 , the method 1100 includes:

[0327] S1101: A shared library provider (or a shared library user) develops, distributes, and installs the shared library as a special type of application.

[0328] S1102: The shared library provider exports an interface package (har module) and an execution package from a shared library module (library module).

[0329] S1103: Upload the interface package (har module) and execution package to the application market to ensure backward compatibility of the shared library version.

[0330] S1104: The shared library user completes its own application development through the application market integration interface package.

[0331] S1105: Put the developed application on the application market.

[0332] S1106: When the user triggers the installation operation of the application, execute step S1107.

[0333] S1107: Download the shared libraries that the application depends on.

[0334] S1108: Install the shared libraries that the application depends on.

[0335] S1109: Install the application.

[0336] S1110: When the user triggers the start of the application, step S1111 is further executed.

[0337] S1111: The operation management module obtains information related to the application from the package management.

[0338] S1112: The operation management module passes startup parameters to the application incubation module (AppSpawn).

[0339] S1113: The application incubation module searches for a shared library path from the shared library module.

[0340] S1114: The application incubation module obtains the shared library path of the highest version that the application depends on and enters the application process.

[0341] For example, FIG12 shows a functional module diagram of an apparatus 1200 for synchronously installing an application and a shared library provided in an embodiment of the present application. As shown in FIG12 , the apparatus 1200 includes:

[0342] The first acquisition module 1210 is configured to, in response to a user's operation of installing / updating a first application, download an installation package of the first application and acquire a first shared library list on which the first application depends.

[0343] Optionally, the first acquisition module 1210 downloads the installation package of the first application from the cloud and parses a configuration file in the installation package of the first application to obtain a first shared library list on which the first application depends.

[0344] Among them, the first shared library list that the first application depends on includes one or more shared libraries that the first application depends on, and the one or more shared libraries have version information. That is, the first shared library list may include one or more different shared libraries, and may also include one or more versions of the same shared library with different versions.

[0345] In an example, the first shared library list includes a first version of the first shared library, a second version of the first shared library, a third version of the first shared library, a first version of the second shared library, a first version of the third shared library, and a second version of the third shared library.

[0346] The first transceiver module 1220 is configured to send a fourth query message to the package management module, where the fourth query message is used to query the installation status of the shared libraries in the first shared library list.

[0347] Optionally, the application market queries the installation status of the shared libraries in the first shared library list by calling a package management query interface in the system framework.

[0348] The installation status of the shared libraries in the first shared library list may refer to the installation status of each shared library in the first shared library list (for example, whether it is installed in the system / whether it exists in the system).

[0349] The first transceiver module 1220 is further configured to receive a fourth reply message sent by the package management module, where the fourth reply message is used to indicate the installation status of the shared libraries in the first shared library list.

[0350] The first determining module 1230 is configured to determine a second shared library list according to the fourth reply message.

[0351] The second shared library list includes the uninstalled shared libraries in the first shared library list, and / or the second shared library list includes the shared libraries of higher versions corresponding to the installed shared libraries in the first shared library list.

[0352] Optionally, the process of the first determining module 1230 determining the second shared library list according to the fourth reply message may be:

[0353] (1) among the one or more shared libraries in the first shared library list, which shared libraries are already installed (or exist in the system), and which shared libraries (or higher versions of shared libraries) are not installed (or do not exist in the system), the first determining module 1230 lists the shared libraries that are not installed (or do not exist in the system) in the second shared library list;

[0354] (2) For the installed (existing) shared library, whether the version of the installed (existing) shared library is greater than or equal to the version of the shared library in the first shared library list; if not, the first determination module 1230 includes the version of the shared library in the first shared library list or a higher version of the shared library in the first shared library list in the second shared library list.

[0355] The first obtaining module 1210 is further configured to download the shared libraries in the second shared library list.

[0356] The first installation module 1240 is configured to install the shared libraries in the second shared library list and install or update the first application.

[0357] In the embodiment of the present application, through the collaboration between the system framework and the application market, the shared library and the third-party application can be installed together, so that the application always has the shared library it depends on, which can reduce the occurrence of application operation failures and improve the user experience.

[0358] For example, FIG13 shows a functional module diagram of an apparatus 1300 for updating a shared library provided in an embodiment of the present application. As shown in FIG13 , the apparatus 1300 includes:

[0359] The second transceiver module 1310 is configured to send a first query message to the system when detecting that a new version of the first shared library is released, where the first query message is used to query information about the first shared library.

[0360] The information about the first shared library includes information about one or more versions of the first shared library that are currently installed (existing).

[0361] In an example, the one or more versions of the first shared library may include a first version of the first shared library, a second version of the first shared library, a third version of the first shared library, a first version of the second shared library, a first version of the third shared library, and a second version of the third shared library.

[0362] The second transceiver module 1310 is further configured to receive a first reply message sent by the system, where the first reply message is used to indicate information about the first shared library.

[0363] The second determining module 1320 is configured to determine whether the first shared library needs to be updated according to the first reply message.

[0364] Specifically, the second determination module 1320 determines whether there is a new version of the first shared library in the information of the first shared library based on the first reply message. In other words, the second determination module 1120 determines whether the new version of the first shared library has been installed (that is, whether it already exists) based on the first reply message. If so, it is determined that the first shared library does not need to be updated; if not, the first shared library needs to be updated.

[0365] In one example, when it is detected that the third version of the first shared library is released, after the second transceiver module 1310 obtains the information of the first shared library, the second determination module 1320 determines whether the information of the third version of the first shared library exists in the information of the first shared library. If not, the second determination module 1320 determines that the first shared library needs to be updated.

[0366] The second obtaining module 1330 is configured to download a new version of the first shared library when it is determined that the first shared library needs to be updated.

[0367] In one example, it is detected that the third version of the first shared library is released. When the second determination module 1320 determines that the first shared library needs to be updated, the second acquisition module (or downloading module) 1330 downloads the third version of the first shared library.

[0368] The second installation module 1340 is used to install the new version of the first shared library.

[0369] Optionally, the second installation module 1340 installs the new version of the first shared library at a specific time.

[0370] Optionally, the specific timing may be, for example, when the application that depends on the first shared library is not running.

[0371] The second obtaining module 1330 is further configured to obtain the highest version of the first shared library when an application that depends on the first shared library is started.

[0372] Obtaining the highest version of the first shared library may include obtaining a shared library path of the highest version of the first shared library.

[0373] In one example, after the first shared library is updated, the third version of the first shared library is the highest version of the first shared library. Then, when an application that depends on the first shared library is started, the third version of the first shared library is enabled.

[0374] In the embodiment of the present application, the update of multiple versions of shared libraries is achieved through the collaboration between the mobile phone system and the application market, so that the shared libraries have independent update capabilities, lowering the development threshold for shared library providers, and making shared libraries easier to manage and popularize; and, the system can automatically enable the highest version of the shared library it depends on when the application is started, so that the update of the shared library can be reflected in real time, thereby reducing the integration cost and update frequency of application developers when using shared libraries.

[0375] For example, FIG14 shows a functional module diagram of an apparatus 1400 for uninstalling a shared library provided in an embodiment of the present application. As shown in FIG14 , the apparatus 1400 includes:

[0376] The third transceiver module 1410 is configured to send a second query message to the system at a first timing, where the second query message is used to query information of the full shared library in the device.

[0377] Optionally, the third transceiver module 1410 calls a system interface to obtain information about the full shared library in the device.

[0378] The full shared library refers to one or more shared libraries that are currently installed (existing), and the one or more shared libraries have version information.

[0379] The information of the full shared library includes version information of each shared library in the full shared library, and / or includes dependency information of each shared library in the full shared library.

[0380] The dependency information is used to indicate whether the shared library is dependent on an application, or the dependency information is used to indicate which applications depend on the shared library.

[0381] In one example, the one or more shared libraries may include a first version of a first shared library, a second version of the first shared library, a third version of the first shared library, a first version of the second shared library, a first version of the third shared library, and a second version of the third shared library.

[0382] The third transceiver module 1410 is further configured to receive a second reply message sent by the system, where the second reply message is used to indicate information about the full shared library.

[0383] The third determining module 1420 is configured to determine a fourth shared library list according to the second reply message.

[0384] The fourth shared library list includes shared libraries in the full shared library that are not depended on by applications, and / or the third shared library list includes low-version shared libraries in the full shared library, and the current running status of the shared libraries in the fourth shared library list is unknown.

[0385] The third transceiver module 1410 is further configured to send a third query message to the system. The third query message is configured to query the running information of each shared library in the fourth shared library list. The running information is configured to indicate whether the shared library is currently in a running state.

[0386] Optionally, the third transceiver module 1410 calls a system interface according to the information of the full shared library to obtain the running information of each shared library in the fourth shared library list.

[0387] In one example, the information of the full shared library includes information of multiple shared libraries, which may, for example, include the first version of the first shared library, the second version of the first shared library, the third version of the first shared library, the first version of the second shared library, the first version of the third shared library, and the second version of the third shared library.

[0388] The third transceiver module 1410 is further configured to receive a third reply message sent by the system, where the third reply message is used to indicate the running information of each shared library in the fourth shared library list.

[0389] The third determining module 1420 is configured to determine a third shared library list according to the third reply message, where the third shared library list includes the currently non-running shared libraries in the fourth shared library list.

[0390] That is, the third determining module 1420 is configured to determine the third shared library list according to the fourth shared library list and the running information of each shared library in the fourth shared library list.

[0391] Among them, the third shared library list includes shared libraries in the above-mentioned full sharing that are not dependent on the application, and / or includes low-version shared libraries among multiple versions of shared libraries that are dependent on the application, wherein the low-version shared libraries are non-highest-version shared libraries, and the shared libraries in the third shared library list are all in a currently non-running state.

[0392] The uninstall module 1430 is configured to uninstall the shared libraries in the third shared library list.

[0393] In the embodiments of the present application, through the collaboration between the system and the application market, the shared library has an independent uninstallation capability, which lowers the development threshold of the shared library provider and makes the shared library easier to manage and popularize; it is also possible to uninstall shared libraries that are not relied upon by the application and low-version shared libraries at specific times, which improves the user experience and reduces the storage space occupied in the system; and in terms of the uninstallation (aging) mechanism, it is specifically divided into two cases: compatible with multi-version shared libraries and incompatible with multi-version shared libraries. For the case of compatible with multi-version shared libraries, the low-version shared libraries can be aged; for the case of incompatible with multi-version shared libraries, unused or infrequently used shared libraries can be aged, making the scope of application of this solution wider.

[0394] An embodiment of the present application further provides a computer-readable medium storing a program code. When the computer program code runs on a computer, the computer executes any one of the methods in FIG. 3 to FIG. 11 .

[0395] An embodiment of the present application also provides a chip, comprising: at least one processor and a memory, wherein the at least one processor is coupled to the memory and is used to read and execute instructions in the memory to execute any one of the methods in Figures 3 to 11 above.

[0396] An embodiment of the present application also provides an electronic device, comprising: at least one processor and a memory, wherein the at least one processor is coupled to the memory and is used to read and execute instructions in the memory to execute any one of the methods in Figures 3 to 11 above.

[0397] The above embodiments can be used alone or in combination with each other to achieve different technical effects.

[0398] For example, the above apparatus 1200 , apparatus 1300 , and apparatus 1400 may be used alone or in combination with each other.

[0399] One or more of the modules or units described herein can be implemented in software, hardware, or a combination of the two. When any of the above modules or units is implemented in software, the software exists in the form of computer program instructions and is stored in a memory, and a processor can be used to execute the program instructions and implement the above method flow. The processor may include, but is not limited to, at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller (MCU), or an artificial intelligence processor, etc., a computing device that runs software, each computing device may include one or more cores for executing software instructions to perform operations or processing. The processor may be built into an SoC (system on chip) or an application specific integrated circuit (ASIC), or it may be an independent semiconductor chip. In addition to the core for executing software instructions to perform operations or processing within the processor, it may further include necessary hardware accelerators, such as a field programmable gate array (FPGA), a PLD (programmable logic device), or a logic circuit that implements dedicated logic operations.

[0400] When the modules or units described in this document are implemented in hardware, the hardware can be any one or any combination of a CPU, a microprocessor, a DSP, an MCU, an artificial intelligence processor, an ASIC, a SoC, an FPGA, a PLD, a dedicated digital circuit, a hardware accelerator, or a non-integrated discrete device, which can run the necessary software or not rely on the software to execute the above method flow.

[0401] When the modules or units described herein are implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium with a configuration capability similar to a cache that a computer can access, or a data storage device such as a server, a data center, etc. that includes one or more available media integrated with a configuration capability similar to a cache.

[0402] Those skilled in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0403] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0404] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0405] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0406] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0407] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0408] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for managing a shared library, characterized in that: The method comprises: When it is detected that the Ath version of the first shared library is released, determining whether the Ath version of the first shared library is installed in the system; When it is determined that the Ath version of the first shared library is not installed in the system, the Ath version of the first shared library is downloaded.

2. The method according to claim 1, characterized in that The method further comprises: Installing version A of the first shared library; When it is detected that the first application is started, the Ath version of the first shared library is obtained to run the first application, where the first shared library is a shared library that the first application depends on.

3. The method according to claim 1 or 2, characterized in that: The determining whether the Ath version of the first shared library is installed in the system includes: Acquire information about the first shared library, where the information about the first shared library includes information about one or more versions of the first shared library that are currently installed; It is determined whether the Ath version of the first shared library is installed in the system according to the information of the first shared library.

4. The method according to claim 3, characterized in that The determining, according to the information of the first shared library, whether the Ath version of the first shared library is installed in the system includes: When the information of the first shared library does not include information of the Ath version of the first shared library, it is determined that the Ath version of the first shared library is not installed in the system.

5. The method according to claim 3 or 4, characterized in that: The obtaining the information of the first shared library includes: The application market sends a first query message to the system, where the first query message is used to query information of the first shared library; The application market receives a first reply message, where the first reply message includes information about the first shared library.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Determine a third shared library list, wherein the third shared library list includes shared libraries in the full shared library that are not relied upon by the application, and / or the third shared library list includes lower-version shared libraries in the full shared library, and all shared libraries in the third shared library list are currently not running, and the full shared library includes all shared libraries currently installed in the system; The shared libraries in the third shared library list are uninstalled.

7. The method according to claim 6, characterized in that Determining the third shared library list includes: Acquire information of the full shared library, wherein the information of the full shared library includes version information of each shared library in the full shared library, and / or the information of the full shared library includes dependency information of each shared library in the full shared library, wherein the dependency information is used to indicate whether the shared library is dependent on an application, or the dependency information is used to indicate which applications depend on the shared library; Determine a fourth shared library list according to the information of the full shared library, wherein the fourth shared library list includes shared libraries in the full shared library that are not relied upon by the application, and / or the fourth shared library list includes low-version shared libraries in the full shared library; Acquire running information of each shared library in the fourth shared library list, where the running information is used to indicate whether the shared library is currently in a running state; The third shared library list is determined according to the running information, and the third shared library list includes the currently non-running shared libraries in the fourth shared library list.

8. The method according to claim 7, characterized in that The obtaining of the information of the full shared library includes: The application market sends a second query message to the system, where the second query message is used to query information of the full shared library; The application market receives a second reply message, where the second reply message includes information about the full shared library.

9. The method according to claim 7 or 8, characterized in that: The obtaining the running information of each shared library in the fourth shared library list includes: The application market sends a third query message to the system, where the third query message is used to query the running information of each shared library in the fourth shared library list; The application market receives a third reply message, where the third reply message is used to indicate the running information of each shared library in the fourth shared library list.

10. The method according to any one of claims 6 to 9, characterized in that The full shared library includes a first version of the first shared library and an Ath version of the first shared library, the Ath version of the first shared library being the highest version of the first shared library, and the method further includes: When the first version of the first shared library is uninstalled, the shared library version on which the first application depends is pointed to the Ath version of the first shared library.

11. The method according to any one of claims 1 to 10, characterized in that The method further comprises: In response to a user's operation of installing or updating the first application, obtaining a first shared library list that the first application depends on, the first shared library list including M shared libraries, where M is a positive integer greater than or equal to 1; Determine a second shared library list according to the installation status of the M shared libraries, wherein the second shared library list includes the shared libraries among the M shared libraries that are not installed; The shared libraries in the second shared library list are installed, and the first application is installed or updated.

12. The method according to claim 11, characterized in that Before determining the second shared library list according to the installation conditions of the M shared libraries, the method further includes: The application market sends a fourth query message to the system, where the fourth query message is used to query the installation status of the M shared libraries; The application market receives a fourth reply message, where the fourth reply message is used to indicate the installation status of the M shared libraries.

13. The method according to claim 11 or 12, characterized in that: The step of installing the shared library in the second shared library list comprises: Each shared library in the second shared library list is installed in a different path.

14. A method for managing a shared library, characterized in that: The method comprises: Determine a third shared library list, wherein the third shared library list includes shared libraries in the full shared library that are not relied upon by the application, and / or the third shared library list includes lower-version shared libraries in the full shared library, and all shared libraries in the third shared library list are currently not running, and the full shared library includes all shared libraries currently installed in the system; The shared libraries in the third shared library list are uninstalled.

15. The method according to claim 14, characterized in that Determining the third shared library list includes: Acquire information of the full shared library, wherein the information of the full shared library includes version information of each shared library in the full shared library, and / or the information of the full shared library includes dependency information of each shared library in the full shared library, wherein the dependency information is used to indicate whether the shared library is dependent on an application, or the dependency information is used to indicate which applications depend on the shared library; Determine a fourth shared library list according to the information of the full shared library, wherein the fourth shared library list includes shared libraries in the full shared library that are not relied upon by the application, and / or the fourth shared library list includes low-version shared libraries in the full shared library; Acquire running information of each shared library in the fourth shared library list, where the running information is used to indicate whether the shared library is currently in a running state; The third shared library list is determined according to the running information, and the third shared library list includes the currently non-running shared libraries in the fourth shared library list.

16. The method according to claim 15, characterized in that The obtaining of the information of the full shared library includes: The application market sends a second query message to the system, where the second query message is used to query information of the full shared library; The application market receives a second reply message, where the second reply message includes information about the full shared library.

17. The method according to claim 15 or 16, characterized in that The obtaining the running information of each shared library in the fourth shared library list includes: The application market sends a third query message to the system, where the third query message is used to query the running information of each shared library in the fourth shared library list; The application market receives a third reply message, where the third reply message is used to indicate the running information of each shared library in the fourth shared library list.

18. The method according to any one of claims 14 to 17, characterized in that The full shared library includes a first version of the first shared library and an Ath version of the first shared library, the Ath version of the first shared library being the highest version of the first shared library, and the method further includes: When the first version of the first shared library is uninstalled, the shared library version on which the first application depends is pointed to the Ath version of the first shared library, where the first shared library is the shared library on which the first application depends.

19. The method according to any one of claims 14 to 18, characterized in that The method further comprises: In response to a user's operation of installing or updating a first application, a first shared library list dependent on the first application is obtained, wherein the first shared library list The library list includes M shared libraries, where M is a positive integer greater than or equal to 1; Determine a second shared library list according to the installation status of the M shared libraries, wherein the second shared library list includes the shared libraries among the M shared libraries that are not installed; The shared libraries in the second shared library list are installed, and the first application is installed or updated.

20. The method according to claim 19, characterized in that Before determining the second shared library list according to the installation conditions of the M shared libraries, the method further includes: The application market sends a fourth query message to the system, where the fourth query message is used to query the installation status of the M shared libraries; The application market receives a fourth reply message, where the fourth reply message is used to indicate the installation status of the M shared libraries.

21. The method according to claim 19 or 20, characterized in that The step of installing the shared library in the second shared library list comprises: Install each shared library in the second shared library list in a different path.

22. A device for managing a shared library, characterized in that: The device comprises: A determination module, configured to determine whether the Ath version of the first shared library is installed in the system when detecting that the Ath version of the first shared library is released; The download module is used to download the Ath version of the first shared library when it is determined that the Ath version of the first shared library is not installed in the system.

23. The device according to claim 22, characterized in that The device also includes: An installation module, used for installing the Ath version of the first shared library; The acquisition module is used to acquire the Ath version of the first shared library to run the first application when detecting that the first application is started, wherein the first shared library is a shared library that the first application depends on.

24. A device for managing a shared library, characterized in that: The device comprises: A determination module, configured to determine a third shared library list, wherein the third shared library list includes shared libraries in the full shared library that are not relied upon by the application, and / or the third shared library list includes lower-version shared libraries in the full shared library, wherein the full shared library includes all shared libraries currently installed in the system; The uninstall module is used to uninstall the shared libraries in the third shared library list.

25. The device according to claim 24, characterized in that The device also includes: An acquisition module, used for acquiring information of the full shared library, wherein the information of the full shared library includes dependency information of each shared library in the full shared library, and each shared library in the full shared library carries a version identifier; The acquisition module is further used to acquire the operation information of each shared library in the full shared library; A determination module is used to determine the third shared library list according to the information of the full shared library and the operation information of each shared library in the full shared library.

26. An electronic device, characterized in that: include processor; Memory; And a computer program, wherein the computer program is stored in the memory, and the computer program includes instructions, which, when executed by the processor, enable the electronic device to perform the method as described in any one of claims 1 to 13, or perform the method as described in any one of claims 14 to 21.

27. A computer-readable storage medium, characterized in that: The storage medium stores a program or an instruction, and when the program or the instruction is executed, the method according to any one of claims 1 to 13 or the method according to any one of claims 14 to 21 is implemented.

28. A chip, characterized in that: include: processor; A memory, wherein the processor is coupled to the memory and configured to read and execute instructions in the memory to execute the method according to any one of claims 1 to 13, or to execute the method according to any one of claims 14 to 21.

29. A computer program product, characterized in that The computer program product includes computer program codes, and when the computer program codes are run on a computer, the method according to any one of claims 1 to 13 is implemented, or the method according to any one of claims 14 to 21 is implemented.

Citation Information

Patent Citations

  • Shared library management method and system

    CN102393845A

  • Software package management method and system

    CN103425512A

  • Shared library upgrading method and apparatus

    CN107085514A

  • Shared software libraries for computing devices

    CN109791483A

  • Application upgrading method, display equipment and server

    CN112667285A