CN-122019174-A - Dynamic configuration method, system, computer equipment and storage medium for application resources
Abstract
The invention provides a dynamic configuration method, a system, computer equipment and a storage medium of application resources, wherein the method comprises the steps of presetting a white list, carrying out system resource allocation based on the white list, storing white list applications and application information of each white list application, wherein the application information at least comprises an initial process priority coefficient, an initial resource weight coefficient and at least two kinds of identity signature information, carrying out identity verification of a target application through the at least two kinds of identity signature information when a configuration request of the target application is received, and updating the white list according to a target process priority coefficient and a target resource weight coefficient in the configuration request after the identity verification is passed. According to the scheme, more accurate verification of the white list application can be realized, the risk of identity forging is avoided, the compliance requirement of the sensitive field is met, the required resources of each white list application can be dynamically configured, different business requirements are met, and the overall resource allocation of the system is more reasonable.
Inventors
- XIE YUAN
- LIN ZHE
Assignees
- 上海商米科技集团股份有限公司
- 商米智能科技(浙江)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260203
Claims (10)
- 1. The dynamic configuration method of the application resource is characterized by comprising the following steps: presetting a white list, and carrying out system resource allocation based on the white list, wherein the white list stores white list applications and application information of each white list application, and the application information at least comprises an initial process priority coefficient, an initial resource weight coefficient and at least two identity signature information; when a configuration request of a target application is received, carrying out identity verification of the target application through the at least two kinds of identity signature information; And after the authentication is passed, updating the white list according to the target process priority coefficient and the target resource weight coefficient in the configuration request, and reallocating the system resources by using the updated white list.
- 2. The method for dynamically configuring application resources according to claim 1, further comprising: Dividing a plurality of resource weight coefficients based on a predefined dividing rule, and configuring corresponding system resources for each resource weight coefficient, wherein the system resources comprise a CPU and a memory; When a configuration request of a target application is received, determining a target CPU and a target memory corresponding to the target resource weight coefficient according to the target resource weight coefficient in the configuration request, and reallocating the system resources by the target CPU and the target memory.
- 3. The method for dynamically configuring application resources according to claim 1, further comprising: presetting a plurality of process priority coefficients, and configuring the corresponding relation between the process priority coefficients and the keep-alive level based on a predefined mapping rule, wherein the higher the process priority order is, the higher the keep-alive level is, or the lower the process priority order is, the higher the keep-alive level is; After passing the authentication, updating the process priority sequence of each white list application in the white list according to the target process priority coefficient in the configuration request; And when the process needs to be killed, killing the process according to the process priority order.
- 4. The method for dynamically configuring application resources according to claim 1, wherein the whitelist application is divided into at least five resource scheduling levels based on a process priority coefficient and a resource weight coefficient of the whitelist application; White list application under first resource scheduling level can configure high performance core and strong memory protection; The whitelist application at the second resource scheduling level may use a foreground schedule group and medium memory protection; white list applications at the third resource scheduling level may allow for the use of foreground scheduling and lightweight memory protection; scheduling the white list application under the fourth resource scheduling level according to the default behavior of the system; the whitelist application at the fifth resource scheduling level may allow background operation but limit CPU usage and may provide basic memory protection.
- 5. The method for dynamically configuring application resources according to claim 1, further comprising: Configuring a unique unified identifier for each application supported by the system; When a configuration request of a target application is received, judging whether the target application is a white list application or not by comparing the uniform identifier of the target application with the uniform identifiers of all white list applications in the white list; if the target application is a non-white list application, adding the target application to the white list, and taking a target process priority coefficient and a target resource weight coefficient of the target application as an initial process priority coefficient and an initial resource weight coefficient of the target application; And if the target application is a white list application, carrying out identity verification of the target application through the at least two kinds of identity signature information.
- 6. The method for dynamically configuring application resources according to claim 5, wherein the identity signature information includes application package name information and application signature information, the application package name information and the application signature information being stored in the form of hash values; When the identity verification of the target application is carried out through the at least two types of identity signature information, the target packet name hash and the target signature hash of the target application are respectively compared with the stored packet name hash and the stored signature hash of the target whitelist application corresponding to the target application stored in the whitelist, and when the comparison results are consistent, the identity verification of the target application is judged to be passed.
- 7. The method for dynamically configuring application resources according to claim 2, wherein the system resources corresponding to each resource weight coefficient are adjustable, and when the system resources corresponding to each resource weight coefficient are adjusted, identity verification is performed through the at least two kinds of identity signature information.
- 8. An application resource dynamic configuration system, comprising: The storage module is used for storing a preset white list, wherein the white list is stored with white list applications and application information of each white list application, and the application information at least comprises an initial process priority coefficient, an initial resource weight coefficient and at least two identity signature information; the resource allocation module is used for allocating system resources based on the white list; The receiving module is used for receiving a configuration request of the target application; The identity verification module is used for carrying out identity verification of the target application through the at least two types of identity signature information; And the updating module is used for updating the white list according to the target process priority coefficient and the target resource weight coefficient in the configuration request after the authentication is passed.
- 9. A computer device comprising a memory, a processor and a computer program stored on the memory, characterized in that the processor executes the computer program to carry out the steps of the application resource dynamic configuration method of any of claims 1-7.
- 10. A computer storage medium having stored thereon a computer program or instructions, which when executed by a processor, implement the steps of the method for dynamic configuration of application resources of any of claims 1-7.
Description
Dynamic configuration method, system, computer equipment and storage medium for application resources Technical Field The present invention relates to the field of application management technologies, and in particular, to a method, a system, a computer device, and a storage medium for dynamically configuring application resources. Background The Android system generally adopts a hierarchical architecture to manage process priority, and in order to ensure the stability of key applications (such as payment service and real-time communication application), the industry generally adopts an application whitelist mechanism, namely a system administrator adds the identifier of a trusted application into a whitelist, and a memory management mechanism in an Android kernel skips the application in the whitelist during memory recovery, so that the normal use of the key applications is ensured. However, in the existing Android keep-alive scheme, the application white list mechanism usually performs identity verification only through a single package name, a certain security risk exists, and malicious applications can be disguised into trusted applications in the white list by modifying, for example, android management.xml files to forge package names, so that high-priority keep-alive authorities are illegally acquired. In addition, the existing keep-alive scheme has single function, can only simply divide the application into a white list application or a non-white list application, and cannot flexibly adjust required resources according to specific types, requirements and the like of the application, so that the overall resource allocation is unreasonable. Thus, there is a need for a method that enables dynamic configuration of the required resources of an application. Disclosure of Invention The invention aims to provide a dynamic allocation method, a system, computer equipment and a storage medium for application resources, which can realize more accurate verification of whitelist application, avoid identity forging risks, meet compliance requirements in the sensitive field, dynamically allocate required resources of each whitelist application, meet different business requirements and enable the overall allocation of resources of the system to be more reasonable. The technical scheme provided by the invention is as follows: in a first aspect, the present application provides a method for dynamically configuring application resources, including the steps of: presetting a white list, and carrying out system resource allocation based on the white list, wherein the white list stores white list applications and application information of each white list application, and the application information at least comprises an initial process priority coefficient, an initial resource weight coefficient and at least two identity signature information; when a configuration request of a target application is received, carrying out identity verification of the target application through the at least two kinds of identity signature information; And after the authentication is passed, updating the white list according to the target process priority coefficient and the target resource weight coefficient in the configuration request, and reallocating the system resources by using the updated white list. In some embodiments, the method for dynamically configuring application resources provided by the present application further includes: Dividing a plurality of resource weight coefficients based on a predefined dividing rule, and configuring corresponding system resources for each resource weight coefficient, wherein the system resources comprise a CPU and a memory; When a configuration request of a target application is received, determining a target CPU and a target memory corresponding to the target resource weight coefficient according to the target resource weight coefficient in the configuration request, and reallocating the system resources by the target CPU and the target memory. In some embodiments, the method for dynamically configuring application resources provided by the present application further includes: presetting a plurality of process priority coefficients, and configuring the corresponding relation between the process priority coefficients and the keep-alive level based on a predefined mapping rule, wherein the higher the process priority order is, the higher the keep-alive level is, or the lower the process priority order is, the higher the keep-alive level is; After passing the authentication, updating the process priority sequence of each white list application in the white list according to the target process priority coefficient in the configuration request; And when the process needs to be killed, killing the process according to the process priority order. In some embodiments, the whitelist application is partitioned into at least five resource scheduling levels based on a process priority coefficient and a r