Upgrading Method, Device, Storage Medium and Electronic Device for System Application

By dividing the system application into a function library and a system execution program, and using cross-process communication to obtain and load the upgrade library for self-upgrade, the problem of inconvenience in system application upgrades is solved, and convenient and low-cost frequent upgrades are achieved.

CN113986284BActive Publication Date: 2025-08-05SHENZHEN TCL NEW-TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111202923.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-15
Publication Date
2025-08-05
Estimated Expiration
2041-10-15

AI Technical Summary

Technical Problem

The upgrade of existing system applications requires waiting for the entire system to be upgraded, which makes the upgrade inconvenient, time-consuming and costly, which is particularly unfavorable for frequent upgrades.

Method used

Split the system application into a function library and a system execution program. Through non-system applications and system applications, the library information of the function library is obtained through cross-process communication between non-system applications and system applications, the upgrade library is determined, and the upgrade library is loaded to a specific location, so that the system execution program can run from a specific location for self-upgrade.

Benefits of technology

It improves the convenience of system applications and reduces the upgrade cost, and can be upgraded frequently without relying on the entire system upgrade.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113986284B_ABST
    Figure CN113986284B_ABST
Patent Text Reader

Abstract

The present application discloses an upgrade method, device, storage medium and electronic device for system applications, which relates to the field of computer technology. The system application is divided into a function library and a system execution program, and the function library is generated by a function implementation program. The method includes: obtaining library information of the function library based on cross-process communication between a non-system application and the system application; determining an upgrade library corresponding to the function library according to the library information; loading the upgrade library to a specific location based on the non-system application, so that the system execution program loads the upgrade library from the specific location for operation, and self-upgrades the function library. The present application effectively improves the upgrade convenience of system applications, has low upgrade time consumption and cost, and can effectively meet the requirements of frequent upgrades.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, storage medium, and electronic device for upgrading a system application. Background Art

[0002] System applications, also known as system processes, are applications used to complete various functions of the operating system. Currently, there is a need to upgrade system applications in many cases. For example, when a new system function needs to be implemented in a system application, the system application needs to be upgraded.

[0003] At present, the upgrade of system applications usually needs to wait for the upgrade of the entire system. The system applications are upgraded simultaneously based on the upgrade of the entire system. In this way, the upgrade of system applications is inconvenient, time-consuming and costly, which is particularly unfavorable for frequent upgrades. Summary of the Invention

[0004] The embodiments of the present application provide a solution that can effectively improve the upgrade convenience of system applications, reduce the upgrade time and cost, and effectively meet the needs of frequent upgrades.

[0005] To solve the above technical problems, the embodiments of the present application provide the following technical solutions:

[0006] According to one embodiment of the present application, a method for upgrading a system application is provided, wherein the system application is divided into a function library and a system execution program, and the function library is generated by a function implementation program. The method comprises: obtaining library information of the function library based on cross-process communication between a non-system application and the system application; determining an upgrade library corresponding to the function library based on the library information; and loading the upgrade library to a specific location based on the non-system application, so that the system execution program loads the upgrade library from the specific location for execution, thereby self-upgrading the function library.

[0007] In some embodiments of the present application, the specific location includes a first location, which is the installation path of the non-system application. The loading of the upgrade library to the specific location based on the non-system application includes: loading the upgrade library based on the non-system application, and storing the loaded upgrade library to the installation path of the non-system application.

[0008] In some embodiments of the present application, the specific location includes a second location, which is a target path outside the installation path of the non-system application. The loading of the upgrade library to the specific location based on the non-system application includes: loading the upgrade library based on the non-system application; and storing the upgrade library to the target path based on the cross-process call of the functional interface of the system application by the non-system application.

[0009] In some embodiments of the present application, the system execution program loads the upgrade library from the specific location for running and self-upgrades the function library, including: when the system application is started, the system execution program queries the upgrade library from the installation path, and when the upgrade library is found, loads the upgrade library, and makes the system application run based on the loaded upgrade library.

[0010] In some embodiments of the present application, the system execution program loads the upgrade library from the specific location for running and self-upgrades the function library, including: when the system application is started, the system execution program queries the upgrade library from the installation path and the target path, and loads the upgrade library with the highest version, and makes the system application run based on the loaded upgrade library.

[0011] In some embodiments of the present application, after determining the upgrade library corresponding to the function library according to the library information, the method further includes: if it is determined that there is no such upgrade library, when the system application is started, the system execution program loads the function library, and the system application runs based on the loaded function library.

[0012] In some embodiments of the present application, a function for setting specific system permissions is set in the upgrade library or the function library, and the level of the specific system permissions is the same as the root permission. The method further includes: when the system application is running, based on cross-process communication between the non-system application and the system application, calling an interface in the system application to run the function of the specific system permissions.

[0013] In some embodiments of the present application, a function for setting target system permissions is set in the upgrade library or the function library, and the level of the target system permissions is lower than the root permission. The method further includes: when the system application is running, based on the native method interface in the non-system application, calling the function interface in the upgrade library or the function library to run the function of the specific system permissions.

[0014] In some embodiments of the present application, the function library and the upgrade library are in the form of dynamic libraries.

[0015] In some embodiments of the present application, the library information is the version information of the function library.

[0016] According to an embodiment of the present application, an upgrade device for a system application, where the system application is divided into a function library and a system execution program, the function library is generated by a function implementation program, and the device includes: an acquisition module, configured to obtain library information of the function library based on cross-process communication between a non-system application and the system application; a determination module, configured to determine an upgrade library corresponding to the function library according to the library information; an upgrade module, configured to load the upgrade library to a specific location based on the non-system application, so that the system execution program loads the upgrade library from the specific location to run, and perform self-upgrade on the function library.

[0017] According to another embodiment of the present application, a storage medium stores a computer program, and when the computer program is executed by a processor of a computer, the computer is caused to execute the method described in the embodiments of the present application.

[0018] According to another embodiment of the present application, an electronic device may include: a memory storing a computer program; a processor reading the computer program stored in the memory to execute the method described in the embodiments of the present application.

[0019] [[ID=⑨]]In the embodiments of the present application, the system application is divided into a function library and a system execution program, the function library is generated by a function implementation program, and the upgrade method of the system application includes: obtaining library information of the function library based on cross-process communication between a non-system application and the system application; determining an upgrade library corresponding to the function library according to the library information; loading the upgrade library to a specific location based on the non-system application, so that the system execution program loads the upgrade library from the specific location to run, and perform self-upgrade on the function library.

[0020] [[ID=⑫]]In this way, by dividing the system application into a function library and a system execution program, the function library is generated by a function implementation program that can meet the general upgrade requirements. During upgrade, the upgrade library of the function library is obtained through a non-system application and placed at a specific location, and the system execution program in the system application loads the upgrade library from the specific location to run, and self-upgrades the functions in the function library of the system application to the functions in the upgrade library. Furthermore, it is not necessary to upgrade the entire machine system, effectively improving the upgrade convenience of the system application, with low upgrade time consumption and cost, and can effectively meet the requirements of frequent upgrades. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0022] Figure 1A schematic diagram of a system to which embodiments of the present application can be applied is shown.

[0023] Figure 2 A flowchart of an upgrade method applied to a system according to an embodiment of the present application is shown.

[0024] Figure 3 A block diagram of an upgrade device for a system application according to an embodiment of the present application is shown.

[0025] Figure 4 A block diagram of an electronic device according to an embodiment of the present application is shown. Detailed implementation manners

[0026] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.

[0027] In the following description, specific embodiments of the present application will be described by referring to steps and symbols executed by one or more computers, unless otherwise stated. Therefore, these steps and operations will be mentioned several times as being executed by a computer. As used herein, computer execution includes operations of a computer processing unit that represents electronic signals in a structured form of data. This operation transforms the data or maintains it at a position in the computer's memory system, which can be reconfigured or otherwise changed in a manner well known to those skilled in the art. The data structure maintained by the data is the physical location of the memory, which has specific characteristics defined by the data format. However, the principles of the present application are described in the above text, which does not represent a limitation. Those skilled in the art will understand that the following described multiple steps and operations can also be implemented in hardware.

[0028] Figure 1 A schematic diagram of a system 100 to which embodiments of the present application can be applied is shown. As Figure 1 shown, the system 100 may include a server 101 and a terminal 102. The terminal 102 may be any computer device, such as a computer, a mobile phone, a smart watch, and a home appliance device, etc. The server 101 may be a server cluster or a cloud server, etc.

[0029] In one implementation of this example, system applications can be installed on the terminal 102. The system applications are divided into a function library and a system execution program. The function library is generated by a function implementation program. The terminal 102 can: obtain the library information of the function library based on cross-process communication between a non-system application and the system application; determine the upgraded library corresponding to the function library according to the library information; load the upgraded library to a specific location based on the non-system application, so that the system execution program loads the upgraded library from the specific location to run and perform self-upgrade on the function library. Among them, the non-system application can load the upgraded library from the server 101.

[0030] Figure 2 Schematically shows a flowchart of a method for upgrading a system application according to an embodiment of the present application. The execution subject of the method for upgrading the system application can be any device, such as Figure 1 the terminal 102 shown.

[0031] The system application is divided into a function library and a system execution program. The function library is generated by a function implementation program. As Figure 2 shown, the method for upgrading the system application can include steps S210 to step S230.

[0032] Step S210, obtain the library information of the function library based on cross-process communication between a non-system application and the system application; step S220, determine the upgraded library corresponding to the function library according to the library information; step S230, load the upgraded library to a specific location based on the non-system application, so that the system execution program loads the upgraded library from the specific location to run and perform self-upgrade on the function library.

[0033] The system application, that is, the system process, is an application used to complete various functions of the operating system. The function implementation program is a program that implements various system permissions, and its functions usually have upgrade requirements.

[0034] The system execution program is the part that is pre-set in the system and cannot be changed. The system execution program can be executed by the system to start the system application; by configuring the system execution program, the system execution program can load the upgraded library from the specific location to run.

[0035] Divide the function code in the system application to obtain a function implementation program and a system execution program. Then, place the function implementation program in a separate module for compilation to obtain the function library. The function library can be a dynamic library or a program library in a specific form.

[0036] Non-system applications are also called user applications or third-party applications. Non-system applications can be upgraded independently without relying on the upgrade of the entire machine system. Library information is the description information of the function library, such as the version information or number of the function library, etc.

[0037] Non-system applications can communicate across processes with system applications based on cross-process interfaces and obtain the library information of the function libraries in the system applications. After obtaining the library information, non-system applications can determine the corresponding upgrade libraries of the function libraries from the target end (such as a server or a local terminal). An upgrade library is the upgraded function library, such as a function library with a higher version than the function library or a function library with a newer number, etc.

[0038] After obtaining the upgrade library, non-system applications place the upgrade library at a specific location that can be scanned by the system execution program. Furthermore, the system execution program can load the upgrade library from the specific location and run it, enabling the system application to run based on the upgrade library and complete the self-upgrade of functions.

[0039] In this way, based on steps S210 to S230, the system application is divided into a function library and a system execution program. The function library is generated based on a function implementation program that can meet the general upgrade requirements. During the upgrade, non-system applications obtain the upgrade library of the function library and place it at a specific location. The system execution program in the system application loads the upgrade library from the specific location and runs it, self-upgrading the functions in the function library of the system application to the functions in the upgrade library. Furthermore, without relying on the upgrade of the entire machine system, the upgrade convenience of the system application is effectively improved, the upgrade time and cost are low, and it can be upgraded frequently according to requirements.

[0040] The following describes the specific processes of each step when upgrading the system application.

[0041] In step S210, based on the cross-process communication between the non-system application and the system application, the library information of the function library is obtained.

[0042] In the implementation of this example, the system application and the non-system application correspond to two opposing processes. The non-system application can communicate across processes with the system application based on cross-process interfaces and obtain the library information of the function library in the system application.

[0043] Among them, the non-system application can be an application that needs to run a specific permission function based on the system application. If the function library does not have the function of this specific permission, a specific user can configure the function of this specific permission in the function library to form an upgrade library, and the upgrade library is placed at the target end (such as a server or a local terminal).

[0044] In step S220, the corresponding upgrade library of the function library is determined according to the library information.

[0045] In the implementation of this example, the library information is the description information of the function library. The library information is, for example, the version information or the serial number of the function library. The non-system application can determine whether there is information that is newer than the library information (such as a library information with a higher version or a newer serial number) from the target end based on the library information, and then determine whether there is an upgrade library corresponding to the function library.

[0046] In step S230, based on the non-system application, the upgrade library is loaded to a specific location, so that the system execution program loads the upgrade library from the specific location to run, and the function library is self-upgraded.

[0047] In the implementation of this example, after the non-system application obtains the upgrade library, the upgrade library is placed at a specific location, which is a location that can be scanned by the system execution program. Furthermore, the system execution program can load the upgrade library from the specific location to run, so that the system application runs based on the upgrade library, and the function self-upgrade is completed.

[0048] In one embodiment, the specific location includes a first location, and the first location is the installation path of the non-system application. In step S230, loading the upgrade library to the specific location based on the non-system application includes: loading the upgrade library based on the non-system application, and storing the loaded upgrade library to the installation path of the non-system application.

[0049] The non-system application can conveniently load the upgrade library to its own installation path by downloading an upgrade package, and just inform the system execution program of this installation path.

[0050] In one embodiment, the specific location includes a second location, and the second location is a target path outside the installation path of the non-system application. In step S230, loading the upgrade library to the specific location based on the non-system application includes: loading the upgrade library based on the non-system application; invoking the function interface of the system application across processes based on the non-system application, and storing the upgrade library to the target path.

[0051] The non-system application can agree with the system application on a second location, which is a target path outside the installation path of the non-system application. In this way, by invoking the function interface of the system application across processes by the non-system application and storing the upgrade library to the target path, it can be further ensured that the upgrade package can still be loaded by the system execution program when the non-system application has problems.

[0052] In one embodiment, in step S230, the system execution program loads the upgrade library from the specific location for running and performs self-upgrade on the function library, including: when the system application is started, the system execution program queries the upgrade library from the installation path, and when the upgrade library is found, loads the upgrade library so that the system application runs based on the loaded upgrade library.

[0053] When the system application in the system is started, the system execution program starts first. The system execution program queries the upgrade library from the first location (i.e., the installation path) based on an agreement, and when the upgrade library is found, loads the upgrade library so that the system application runs based on the loaded upgrade library.

[0054] In one embodiment, in step S230, the system execution program loads the upgrade library from the specific location for running and performs self-upgrade on the function library, including: when the system application is started, the system execution program queries the upgrade library from the installation path and the target path, and loads the upgrade library with the highest version so that the system application runs based on the loaded upgrade library.

[0055] When the system application in the system is started, the system execution program starts first. The system execution program queries the upgrade library from the first location (i.e., the installation path) and the second location (the target path) based on an agreement, compares the versions of the upgrade libraries at the two locations, and loads the upgrade library with the highest version so that the system application runs based on the loaded upgrade library.

[0056] In one example, if there is an upgrade library in one of the first location (i.e., the installation path) and the second location (the target path), the existing upgrade library is the one with the highest version.

[0057] In one embodiment, after determining the upgrade library corresponding to the function library according to the library information in step S220, it further includes: if it is determined that there is no such upgrade library, when the system application is started, the system execution program loads the function library, and the system application runs based on the loaded function library.

[0058] After the system execution program is started, it can query the upgrade library from the first location and / or the second location. If no upgrade library is found, it directly loads the initial function library to run, so that the system application runs based on the function library.

[0059] In one embodiment, a function for setting specific system permissions is set in the upgrade library or the function library. The level of the specific system permissions is the same as the root permission. The method further includes: when the system application is running, based on cross-process communication between the non-system application and the system application, an interface in the system application is called to run the function of the specific system permissions.

[0060] The root permission is the root privilege. The level of a specific system permission is the same as the root permission, that is, the level of the specific system permission is the highest system function, and the functions of the specific system permission may include the functions of the root permission.

[0061] When the system application runs, it may load an upgrade library or a function library to run. When the system application runs, the non-system application communicates with the system application across processes. By calling the interfaces in the system application, the functions of the specific system permission in the library (the loaded upgrade library or function library) running in the system application can be run, and the non-system application obtains the running result. Furthermore, the non-system application realizes the functions of the system permission based on the system application through cross-process communication.

[0062] In one embodiment, the functions of the target system permission are set in the upgrade library or the function library, and the level of the target system permission is lower than the root permission. The method further includes: when the system application runs, based on the native method interface in the non-system application, calling the function interface in the upgrade library or the function library to run the functions of the specific system permission.

[0063] The level of the target system permission is lower than the root permission, that is, the target system permission is an ordinary permission with a lower level than the root permission. The native method interface can be a JNI interface. By defining the native method interface in the non-system application, the non-system application can, based on the native method interface, call the function interface in the upgrade library or the function library loaded when the system application runs to run the functions of the specific system permission.

[0064] In one embodiment, the forms of the function library and the upgrade library are dynamic libraries.

[0065] The dynamic library is the SO file. The function code in the system application is segmented to obtain the function implementation program and the system execution program. Then, the function implementation program is placed in a separate module and compiled into a dynamic library. The dynamic library can run reliably in the system, ensuring the reliability of the upgrade and the reliability of the non-system application borrowing the functions of the execution system permission.

[0066] To facilitate better implementation of the upgrade method of the system application provided by the embodiments of the present application, the embodiments of the present application also provide an upgrade device for the system application based on the above upgrade method of the system application. The meanings of the nouns are the same as those in the above upgrade method of the system application, and the specific implementation details can be referred to the description in the method embodiments. Figure 3 The block diagram of an upgrade device for a system application according to an embodiment of the present application is shown.

[0067] As Figure 3As shown, the system application is divided into a function library and a system execution program. The function library is generated by a function implementation program. In the upgrade device 300 of the system application, an acquisition module 310, a determination module 320, and an upgrade module 330 may be included.

[0068] The acquisition module 310 may be configured to acquire library information of the function library based on cross-process communication between a non-system application and the system application; the determination module 320 may be configured to determine an upgrade library corresponding to the function library according to the library information; the upgrade module 330 may be configured to load the upgrade library to a specific location based on the non-system application, so that the system execution program loads the upgrade library from the specific location to run and perform self-upgrade on the function library.

[0069] In some embodiments of the present application, the specific location includes a first location, and the first location is the installation path of the non-system application. The upgrade module 330 includes a first loading unit, configured to: load the upgrade library based on the non-system application and store the loaded upgrade library to the installation path of the non-system application.

[0070] In some embodiments of the present application, the specific location includes a second location, and the second location is a target path outside the installation path of the non-system application. The upgrade module 330 includes a second loading unit, configured to: load the upgrade library based on the non-system application; cross-process call a function interface of the system application based on the non-system application to store the upgrade library to the target path.

[0071] In some embodiments of the present application, the upgrade module 330 includes a first query unit, configured to: when the system application starts, the system execution program queries the upgrade library from the installation path, and when the upgrade library is found, load the upgrade library so that the system application runs based on the loaded upgrade library.

[0072] In some embodiments of the present application, the upgrade module 330 includes a second query unit, configured to: when the system application starts, the system execution program queries for the upgrade library from the installation path and the target path, and load the upgrade library with the highest version, so that the system application runs based on the loaded upgrade library.

[0073] In some embodiments of the present application, the device further includes a third query unit, configured to: if it is determined that there is no upgrade library, when the system application starts, the system execution program loads the function library, and the system application runs based on the loaded function library.

[0074] In some embodiments of the present application, a function for setting a specific system permission is provided in the upgrade library or the function library, and the level of the specific system permission is the same as the root permission. The device further includes a first operation unit, configured to: when the system application is running, perform cross-process communication with the system application based on the non-system application, and call an interface in the system application to run the function of the specific system permission.

[0075] In some embodiments of the present application, a function for setting a target system permission is provided in the upgrade library or the function library, and the level of the target system permission is lower than the root permission. The device further includes a second operation unit, configured to: when the system application is running, call a function interface in the upgrade library or the function library to run the function of the specific system permission based on the native method interface in the non-system application.

[0076] In some embodiments of the present application, the function library and the upgrade library are in the form of dynamic libraries.

[0077] In some embodiments of the present application, the library information is the version information of the function library.

[0078] In this way, based on the upgrade device 300 of the system application, by splitting the system application into a function library and a system execution program, the function library is generated based on a function implementation program that can meet the general upgrade requirements. During upgrade, the upgrade library of the function library is obtained by the non-system application and placed at a specific location, and the system execution program in the system application loads the upgrade library from the specific location to run, so that the functions in the function library in the system application are self-upgraded to the functions in the upgrade library. Furthermore, it is not necessary to upgrade the entire machine system, effectively improving the upgrade convenience of the system application, with low upgrade time and cost, and can effectively meet the requirements of frequent upgrades.

[0079] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0080] In addition, an embodiment of the present application further provides an electronic device, which can be a terminal or a server, as Figure 4 shown, which shows a schematic structural diagram of the electronic device involved in the embodiment of the present application. Specifically:

[0081] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art can understand that Figure 4 the structure of the electronic device shown in

[0082] does not limit the electronic device, and it may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Among them:

[0083] The processor 401 is the control center of the electronic device, connecting various parts of the entire computer device through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 402, and by calling the data stored in the memory 402, it executes various functions of the computer device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interfaces, and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above modem processor may not be integrated into the processor 401.

[0084] The electronic device further includes a power supply 403 that powers each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 403 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.

[0085] The electronic device may further include an input unit 404, which may be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0086] Although not shown, the electronic device may further include a display unit and the like, which will not be elaborated here. Specifically, in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more computer programs into the memory 402 according to the following instructions, and the processor 401 will run the computer programs stored in the memory 402 to implement various functions.

[0087] In some embodiments of the present application, the system application is divided into a function library and a system execution program. The function library is generated by a function implementation program. The processor 401 may execute: based on cross-process communication between the non-system application and the system application, obtain the library information of the function library; determine the upgraded library corresponding to the function library according to the library information; based on the non-system application, load the upgraded library to a specific location, so that the system execution program loads the upgraded library from the specific location for operation, and perform self-upgrade on the function library.

[0088] In some embodiments of the present application, the specific location includes a first location, and the first location is the installation path of the non-system application. When loading the upgraded library to the specific location based on the non-system application, the processor 401 may execute: load the upgraded library based on the non-system application, and store the loaded upgraded library to the installation path of the non-system application.

[0089] In some embodiments of the present application, the specific location includes a second location, and the second location is a target path outside the installation path of the non-system application. When loading the upgraded library to the specific location based on the non-system application, the processor 401 may execute: load the upgraded library based on the non-system application; call the function interface of the system application across processes based on the non-system application, and store the upgraded library to the target path.

[0090] In some embodiments of the present application, when the system execution program loads the upgraded library from the specific location for operation and performs self-upgrade on the function library, the processor 401 may execute: when the system application starts, the system execution program queries the upgraded library from the installation path, and loads the upgraded library when the upgraded library is found, so that the system application runs based on the loaded upgraded library.

[0091] In some embodiments of the present application, when the system execution program loads the upgrade library from the specific location for running and performs self-upgrade on the function library, the processor 401 may execute: when the system application starts, the system execution program queries the upgrade library from the installation path and the target path, and loads the upgrade library with the highest version, so that the system application runs based on the loaded upgrade library.

[0092] In some embodiments of the present application, the processor 401 may execute: if it is determined that there is no upgrade library, when the system application starts, the system execution program loads the function library, and the system application runs based on the loaded function library.

[0093] In some embodiments of the present application, a function for setting specific system permissions is set in the upgrade library or the function library, and the level of the specific system permissions is the same as the root permission. The processor 401 may execute: when the system application is running, based on the cross-process communication between the non-system application and the system application, call the interface in the system application to run the function of the specific system permissions.

[0094] In some embodiments of the present application, a function for setting target system permissions is set in the upgrade library or the function library, and the level of the target system permissions is lower than the root permission. The processor 401 may execute: when the system application is running, based on the local method interface in the non-system application, call the function interface in the upgrade library or the function library to run the function of the specific system permissions.

[0095] In some embodiments of the present application, the function library and the upgrade library are in the form of dynamic libraries.

[0096] In some embodiments of the present application, the library information is the version information of the function library.

[0097] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0098] For this reason, the embodiments of the present application further provide a storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any one of the methods provided by the embodiments of the present application.

[0099] Among them, the storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.

[0100] Since the computer program stored in the storage medium can execute the steps in any of the methods provided in the embodiments of the present application, the beneficial effects achievable by the methods provided in the embodiments of the present application can be realized. For details, refer to the previous embodiments and will not be elaborated here.

[0101] After considering the specification and practicing the disclosed embodiments herein, those skilled in the art will readily conceive of other implementations of the present application. The present application aims to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include well-known knowledge or conventional technical means in the technical field not disclosed in the present application.

[0102] It should be understood that the present application is not limited to the embodiments described above and shown in the drawings, but various modifications and changes can be made without departing from its scope.

Claims

1. A method for upgrading a system application, characterized in that: The function code in the system application is divided into a function implementation program and a system execution program, and the function implementation program is placed in a separate module and compiled into a function library. The method includes: acquiring library information of the function library based on cross-process communication between a non-system application and the system application, wherein the non-system application is an application that needs to run a function with a specific permission based on the system application; Determining an upgrade library corresponding to the function library according to the library information; Loading the upgrade library to a specific location based on the non-system application, so that the system execution program loads the upgrade library from the specific location to run, and self-upgrades the function library; When a function of a specific system permission is set in the upgrade library or the function library and the level of the specific system permission is the same as the root permission, the method further includes: when the system application is running, based on cross-process communication between the non-system application and the system application, calling an interface in the system application to run the function of the specific system permission; Alternatively, when the function of the target system permission is set in the upgrade library or the function library and the level of the target system permission is lower than the root permission, the method further includes: when the system application is running, based on the local method interface in the non-system application, calling the function interface in the upgrade library or the function library to run the function of the specific system permission.

2. The method according to claim 1, characterized in that The specific location includes a first location, the first location is an installation path of the non-system application, and the loading of the upgrade library to the specific location based on the non-system application includes: The upgrade library is loaded based on the non-system application, and the loaded upgrade library is stored in the installation path of the non-system application.

3. The method according to claim 2, characterized in that The specific location includes a second location, where the second location is a target path other than the installation path of the non-system application. The step of loading the upgrade library to the specific location based on the non-system application includes: Loading the upgrade library based on the non-system application; Based on the non-system application calling the functional interface of the system application across processes, the upgrade library is stored in the target path.

4. The method according to claim 2, characterized in that The system execution program loads the upgrade library from the specific location to run, and performs self-upgrade on the function library, including: When the system application is started, the system execution program queries the upgrade library from the installation path, and loads the upgrade library when the upgrade library is found, so that the system application runs based on the loaded upgrade library.

5. The method according to claim 3, characterized in that The system execution program loads the upgrade library from the specific location to run, and performs self-upgrade on the function library, including: When the system application is started, the system execution program searches for an upgrade library from the installation path and the target path, and loads the upgrade library with the highest version, so that the system application runs based on the loaded upgrade library.

6. The method according to claim 1, characterized in that After determining the upgrade library corresponding to the function library according to the library information, the method further includes: If it is determined that the upgrade library does not exist, when the system application is started, the system execution program loads the function library, and the system application runs based on the loaded function library.

7. A system application upgrade device, characterized in that: The function codes in the system application are divided into a function implementation program and a system execution program. The function implementation program is placed in a separate module and compiled into a function library. The device includes: an acquisition module, configured to acquire library information of the function library based on cross-process communication between a non-system application and the system application, wherein the non-system application is an application that needs to run a function with a specific permission based on the system application; A determination module, configured to: determine an upgrade library corresponding to the function library according to the library information; An upgrade module is configured to: load the upgrade library to a specific location based on the non-system application, so that the system execution program loads the upgrade library from the specific location for execution, and self-upgrades the function library; A first running unit is configured to: when a function with a specific system permission is set in the upgrade library or the function library and the level of the specific system permission is the same as the root permission, call an interface in the system application to run the function with the specific system permission based on cross-process communication between the non-system application and the system application when the system application is running; Alternatively, the second operating unit is used to: when the function of the target system permission is set in the upgrade library or the function library and the level of the target system permission is lower than the root permission, when the system application is running, based on the local method interface in the non-system application, call the function interface in the upgrade library or the function library to run the function of the specific system permission.

8. A storage medium having a computer program stored thereon, which, when executed by a processor of a computer, causes the computer to execute the method according to any one of claims 1 to 6.

9. An electronic device, characterized in that: include: a memory storing a computer program; A processor reads a computer program stored in a memory to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • BMC firmware run method, repair method, device and apparatus and medium

    CN109189501A

  • Self-recognition upgrading method and device of SP (Service Provider) upgrade package and computer equipment

    CN112860283A