System resource management method and device based on mobile terminal

By calculating and cleaning the resource usage scores of applications in the mobile terminal operating system, it solves the problem of CPU resource management and releases resources to ensure the smooth operation of foreground applications and improve user experience.

CN118535318APending Publication Date: 2024-08-23SHANGHAI DROI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311845221.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively manage the CPU resources of mobile terminals, resulting in the inability to release CPU resources when RAM resources are tight, affecting the running experience of foreground applications.

Method used

By determining the status value score, RAM occupation score and CPU usage score of each application in the mobile terminal operating system, the system resource status is updated according to the preset time interval, the resource usage score of the application is calculated, and the scores are ranked from high to low. Clean applications sequentially until target CPU and RAM usage thresholds are reached.

Benefits of technology

It realizes the step-by-step killing of high-CPU-using applications when CPU resources are tight, frees up CPU and RAM resources, ensures that foreground applications receive sufficient resources, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535318A
    Figure CN118535318A
Patent Text Reader

Abstract

The invention aims to provide a system resource management method and equipment based on a mobile terminal, background application activities are limited by taking the current CPU load and the available RAM size of an operating system of the mobile terminal as a strategy basis, so that when CPU resources are insufficient, processes of corresponding application programs can be killed step by step according to the CPU total utilization rate of the application programs, and the efficiency of system resource management is improved. Therefore, the CPU resources and the RAM resources are released to a reasonable range, so that the background applications are reserved as many as possible on the premise that the foreground applications can obtain sufficient system resources (CPU and RAM), and the user experience is further improved.
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 system resource management method and device based on a mobile terminal. Background Art

[0002] When using a mobile smart terminal normally, users use multiple applications, such as sending WeChat messages, browsing Weibo, watching Douyin, playing games, etc. In general, only one or two applications interact with users in the foreground, and other applications are switched to the background waiting for users to use them. Whether an application is in the foreground or in the background, it may consume system resources, especially foreground applications. Foreground applications need to obtain sufficient system resources to run smoothly and produce a good user experience, but background applications often also need to consume certain system resources, such as background downloads, message notifications, etc.

[0003] All applications hope to obtain sufficient system resources to run normally, which may cause the background application to consume too many system resources, resulting in the foreground application not being able to run normally due to insufficient system resources. This requires the mobile smart terminal to reasonably allocate system resources and retain as many background applications as possible while ensuring the foreground application.

[0004] Due to the limited system resources of mobile smart terminals, they are limited by the size, weight and current technical level of mobile smart terminals. With the rise of mobile Internet, various types of applications emerge in an endless stream, which brings convenience to users while also bringing great challenges to mobile smart terminal systems. It is necessary to ensure that as many applications as possible can be run simultaneously under the current limited system resources.

[0005] Taking the current mainstream mobile smart terminals as an example, 12G RAM (Random Access Memory) is standard, but the mobile smart terminal system itself may occupy about 2G, and the RAM occupancy of current mainstream applications is also very high. For example, social applications such as WeChat and QQ, short video applications such as Tik Tok and Kuaishou, shopping applications such as Tmall and Taobao, game applications such as Honor of Kings and Genshin Impact, etc., the RAM occupancy is basically around 1G. If these applications are run at the same time, it may cause system resources to be tight.

[0006] In the prior art, in order to ensure that the system resources of the mobile smart terminal are within a reasonable range, the mobile smart terminal system uses the application process priority to control the application's use of system resources. The mobile smart terminal system determines the priority value ADJ of the application according to the component status of the application process. The mobile smart terminal system kills the process with the lowest priority first according to a certain strategy, and then gradually kills the processes from low to high priority to recover the expected available system resources until the system resources return to a reasonable range, thereby ensuring the normal operation of the system.

[0007] Taking the Android system as an example, the general process priority is divided into: the priority value ADJ of the foreground process is 0, the priority value ADJ of the visible process is 100, the priority value ADJ of the service process is 500, the priority value ADJ of the background process is 700, and the priority value ADJ of the empty process is 900. The larger the priority value ADJ of the process, the lower the priority of the process. In order to prevent the system from having too low remaining RAM, the Android system uses a memory cleaning mechanism: Low Memory Killer (LMK) to execute process killing to reclaim memory. Each ADJ corresponds to an available RAM size. For example, when the current system available RAM is 400MB, the application process of ADJ 900 starts to be killed; when the current system available RAM is 300MB, the application process of ADJ 700 starts to be killed; when the current system available RAM is 200MB, the application process of ADJ 500 starts to be killed; when the current system available RAM is 100MB, the application process of ADJ 100 starts to be killed; when the current system available RAM is 70MB, the application process of ADJ 0 starts to be killed; that is, when the system available RAM is greater than 400M, LMK will not trigger the killing of processes. When the system available RAM is less than 400M, LMK starts from ADJ900 and kills processes in the order of ADJ from high to low until the system available RAM is greater than 400M. For application processes of the same ADJ, LMK sorts them according to the RAM occupied by the application processes and starts to kill them from high to low until the available RAM is greater than 400M, otherwise it continues to kill processes of the next higher priority.

[0008] The disadvantage of the prior art is that it only processes RAM in system resources and kills processes in time to reclaim memory, which can optimize the system resource shortage problem caused by low available RAM, but cannot solve the problem of low CPU resources. Some applications may not occupy much RAM, but occupy a lot of CPU, which may not be captured by LMK and killed, and CPU resources cannot be released. Summary of the invention

[0009] One purpose of the present application is to provide a system resource management method and device based on a mobile terminal, which limits background application activities based on the current CPU load and available RAM size of the mobile terminal's operating system as a policy basis to ensure that foreground applications can obtain sufficient system resources (CPU, RAM), while retaining as many background applications as possible to improve the user experience.

[0010] According to one aspect of the present application, a system resource management method based on a mobile terminal is provided, which is applied to a server, wherein the method comprises:

[0011] A system resource management method based on a mobile terminal is applied to a mobile terminal, wherein the method comprises:

[0012] Determine a status value score, a RAM occupancy score, and a CPU usage score for each of all applications currently running on the operating system of the mobile terminal;

[0013] At a preset time interval or when a foreground application of the mobile terminal is switched, updating and obtaining a current system resource status, wherein the current system resource status includes a current total CPU usage rate and a current total RAM availability rate;

[0014] If the current total CPU usage is greater than or equal to a preset first total CPU usage threshold, and / or the current total RAM availability is less than or equal to a preset first total RAM availability threshold, based on the RAM occupancy score, CPU usage score and status value score of each of the applications, respectively calculate the resource usage score of each of the applications;

[0015] Clean up currently running applications in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold and / or the updated total RAM availability is greater than a preset target total RAM availability threshold;

[0016] The first CPU total usage threshold is greater than the target CPU total usage threshold, and the first RAM total availability threshold is less than the target RAM total availability threshold.

[0017] Furthermore, in the above method, determining the status value score, RAM occupancy score and CPU usage score of each application program among all applications currently running on the operating system of the mobile terminal includes:

[0018] Obtain the process component status, RAM occupancy rate, and CPU usage rate of all applications currently running on the mobile terminal's operating system;

[0019] Based on the process component status of each of the applications, respectively calculate the status value score of each of the applications;

[0020] Based on the RAM occupancy rate of each of the applications, respectively calculating a RAM occupancy score of each of the applications;

[0021] Based on the CPU usage rate of each of the application programs, a CPU usage score of each of the application programs is calculated respectively.

[0022] Furthermore, in the above method, the process component state of the application includes: a process basic state and a process usage type state, and the process usage type state includes at least one usage state;

[0023] The step of calculating the status value score of each application program based on the process component status of each application program comprises:

[0024] Based on the process component state of each application process and a preset application priority mapping table, respectively obtain a priority value corresponding to each application, wherein the preset application priority mapping table includes at least one application process basic state and its corresponding priority value;

[0025] Calculating the usage type status score of each application program based on the process usage type status of each application program and a preset usage type score mapping table;

[0026] Based on the priority value and the usage type status score corresponding to each of the application programs, the status value score of each of the application programs is obtained by summing them up respectively.

[0027] Furthermore, in the above method, the method further comprises:

[0028] Acquiring the screen state of the mobile terminal screen;

[0029] Different preset time intervals are preset for different screen states.

[0030] Furthermore, in the above method, updating and obtaining the current system resource status at a preset time interval includes:

[0031] When the screen state of the mobile terminal is a bright screen state, updating and acquiring the current system resource state according to the preset time interval;

[0032] If the current system resource state is always at the first system resource state level, then based on the preset time interval, the interval time of the first duration threshold is increased each time until it reaches the first time interval threshold; the first duration threshold is less than the preset time interval;

[0033] If the current system resource status drops from the first system resource status level to the second system resource status level, the restoration interval is the preset time interval;

[0034] If the current system resource status drops from the first system resource status level or the second system resource status level to the third system resource status level, shortening the preset time interval to the first duration threshold;

[0035] If the current system resource status is upgraded from the third system resource status level to the second system resource status level or the first system resource status level, the restoration interval is the preset time interval.

[0036] Further, in the above method, if the current total CPU usage is greater than or equal to a preset first total CPU usage threshold, and / or the current total RAM availability is less than or equal to a preset first total RAM availability threshold, based on the RAM occupancy score, CPU usage score and status value score of each of the applications, the resource usage score of each of the applications is calculated respectively, including:

[0037] If the current total CPU usage is greater than or equal to the preset total CPU usage threshold, and the current total RAM availability is greater than the preset total RAM availability threshold, then based on the CPU usage score and status value score of each application, the resource usage score of each application is calculated respectively;

[0038] The step of clearing the currently running applications in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold and / or the updated total RAM availability is greater than a preset target total RAM availability threshold includes:

[0039] Clean up currently running applications one by one in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold;

[0040] The updated total CPU usage rate is the current total CPU usage rate minus the total CPU release rate, and the total CPU release rate is the sum of the CPU usage rates of the applications cleared one by one.

[0041] Further, in the above method, if the current total CPU usage is greater than or equal to a preset first total CPU usage threshold, and / or the current total RAM availability is less than or equal to a preset first total RAM availability threshold, based on the RAM occupancy score, CPU usage score and status value score of each of the applications, the resource usage score of each of the applications is calculated respectively, including:

[0042] If the current total CPU usage is less than the preset total CPU usage threshold, and the current total RAM availability is less than or equal to the preset total RAM availability threshold, then based on the RAM occupancy score and status value score of each application, the resource usage score of each application is calculated respectively;

[0043] The step of clearing the currently running applications in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold and / or the updated total RAM availability is greater than a preset target total RAM availability threshold includes:

[0044] Clean up currently running applications one by one in descending order of the resource usage scores until the updated total RAM availability is greater than a preset target total RAM availability threshold;

[0045] Among them, the updated total RAM availability is the sum of the current total RAM availability and the total RAM release rate; the total RAM release rate is the sum of the RAM release amounts of the applications cleared one by one, divided by the total RAM amount of the operating system.

[0046] Further, in the above method, if the current total CPU usage is greater than or equal to a preset first total CPU usage threshold, and / or the current total RAM availability is less than or equal to a preset first total RAM availability threshold, based on the RAM occupancy score, CPU usage score and status value score of each of the applications, the resource usage score of each of the applications is calculated respectively, including:

[0047] If the current total CPU usage is greater than or equal to the preset total CPU usage threshold, and the current total RAM availability is less than or equal to the preset total RAM availability threshold, then based on the CPU usage score and status value score of each application, the resource usage score of each application is calculated respectively;

[0048] The step of clearing the currently running applications in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold and / or the updated total RAM availability is greater than a preset target total RAM availability threshold includes:

[0049] Clean up currently running applications one by one in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold, and calculate the updated total RAM availability;

[0050] The updated total CPU usage rate is the current total CPU usage rate minus the total CPU release rate, and the total CPU release rate is the sum of the CPU usage rates of the applications cleared one by one; the updated total RAM availability rate is the sum of the current total RAM availability rate and the total RAM release rate; the total RAM release rate is the sum of the RAM release amounts of the applications cleared one by one, divided by the total RAM amount of the operating system;

[0051] If the updated total RAM availability is still less than the preset total RAM availability threshold, then based on the RAM occupancy score and status value score of each application that is still running after the cleanup, the updated resource usage score of each application is calculated respectively;

[0052] According to the order of the updated resource usage scores from high to low, the applications that are still running after the cleanup are cleaned up one by one again until the total RAM availability after the update is greater than the preset target RAM total availability threshold.

[0053] According to another aspect of the present application, a non-volatile storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions can be executed by a processor, the processor implements the system resource management method based on a mobile terminal as described above.

[0054] According to another aspect of the present application, a system resource management device based on a mobile terminal is also provided, wherein the device includes:

[0055] one or more processors;

[0056] A computer readable medium for storing one or more computer readable instructions,

[0057] When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the above-mentioned system resource management method based on the mobile terminal.

[0058] Compared with the prior art, the present application determines the status value score, RAM occupancy score and CPU usage score of each application currently running in the operating system of the mobile terminal; updates and obtains the current system resource status at a preset time interval or when the foreground application of the mobile terminal is switched, and the current system resource status includes the current total CPU usage rate and the current total RAM availability rate; if the current total CPU usage rate is greater than or equal to a preset first total CPU usage rate threshold, and / or the current total RAM availability rate is less than or equal to a preset first total RAM availability rate threshold, based on the RAM occupancy score, CPU usage score and status value score of each of the applications, respectively calculates the resource usage score of each of the applications; and clears the currently running applications in the order of the resource usage scores from high to low. until the updated total CPU usage is less than the preset target CPU total usage threshold and / or the updated total RAM availability is greater than the preset target RAM total availability threshold; wherein, the first total CPU usage threshold is greater than the target CPU total usage threshold, and the first total RAM availability threshold is less than the target RAM total availability threshold, thereby limiting the background application activities based on the current CPU load and available RAM size of the operating system of the mobile terminal as a policy basis, so that when CPU resources are tight, the corresponding application processes can be killed step by step according to the total CPU usage of the application, thereby releasing CPU resources and RAM resources to a reasonable range, so as to ensure that the foreground application can obtain sufficient system resources (CPU, RAM) Under the premise, retain as many background applications as possible, thereby further improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0060] Figure 1 A schematic diagram showing a flow chart of a system resource management method based on a mobile terminal according to one aspect of the present application;

[0061] Figure 2 A schematic diagram showing the process component states of an application program in an actual application scenario of a system resource management method based on a mobile terminal according to one aspect of the present application;

[0062] Figure 3 A schematic diagram of a processing flow of updating and acquiring the system resource status according to a mobile terminal-based system resource management method according to one aspect of the present application in an actual application scenario triggering different preset time intervals according to the current system resource status;

[0063] Figure 4 A schematic diagram of a processing flow of a system resource management method based on a mobile terminal in an actual application scenario according to one aspect of the present application is shown.

[0064] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION

[0065] The present application is described in further detail below in conjunction with the accompanying drawings.

[0066] In a typical configuration of the present application, the terminal, the device of the service network and the trusted party all include one or more processors (CPU), input / output interfaces, network interfaces and memories.

[0067] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0068] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0069] like Figure 1 As shown, Figure 1 A flowchart of a system resource management method based on a mobile terminal is provided as one aspect of the present application. The method is applied to a mobile terminal, wherein the method comprises: step S11, step S12, step S13 and step S14, specifically comprising the following steps:

[0070] Step S11, determining the status value score, RAM occupancy score and CPU usage score of each application among all applications currently running in the operating system of the mobile terminal; it should be noted that the status value score of the application includes the priority value corresponding to the application and the usage type status score corresponding to the usage status of the process component of the application, which is the sum of the two.

[0071] Step S12, updating and acquiring the current system resource status at a preset time interval or when the foreground application of the mobile terminal is switched, wherein the current system resource status includes the current total CPU usage and the current total RAM availability;

[0072] In the step S12, there are two triggering moments for updating and obtaining the current system resource status of the mobile terminal, and it is sufficient to meet one of the triggering moments. One triggering moment is when the foreground application of the mobile terminal is switched, for example, when the foreground application of the mobile terminal is switched from WeChat to Taobao application, etc. The other triggering moment is when the interval time accumulates to a preset time interval, so as to realize the update of the current system resource status. Each time the current system resource status of the mobile terminal is updated, it is necessary to obtain the current total CPU usage and the current total RAM availability, the current total CPU usage: CPU_LOADING, in a preferred embodiment of the present application, if the current total CPU usage of the mobile terminal is 72% or 46% or any other percentage; the current total RAM availability: MEM_AVAILABLE_PER, wherein the current total RAM available of the mobile terminal is MEM_AVAILABLE, and the ratio of the current total RAM available to the total RAM of the mobile terminal: MEM_TOTAL is the current total RAM availability MEM_AVAILABLE_PER. In a preferred embodiment of the present application, if the current total RAM of the mobile terminal is 8GB, the current total RAM available is 2.4GB, and the ratio of the total RAM available to the total RAM is 2.4 / 8=30%, that is, the current total RAM availability MEM_AVAILABLE_PER of the mobile terminal is 30%.

[0073] Step S13, if the current total CPU usage is greater than or equal to a preset first total CPU usage threshold, and / or the current total RAM availability is less than or equal to a preset first total RAM availability threshold, based on the RAM occupancy score, CPU usage score and status value score of each of the applications, respectively calculate the resource usage score of each of the applications;

[0074] Step S14, clearing currently running applications in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold and / or the updated total RAM availability is greater than a preset target total RAM availability threshold;

[0075] The first CPU total usage threshold is greater than the target CPU total usage threshold, and the first RAM total availability threshold is less than the target RAM total availability threshold.

[0076] Through the above steps S11 to S14, it is achieved to limit the background application activities based on the current CPU load and available RAM size of the operating system of the mobile terminal as a policy basis, so that when the CPU resources are tight, the corresponding application processes can be killed step by step according to the total CPU usage of the application, thereby releasing CPU resources and RAM resources to a reasonable range, so as to ensure that the foreground application can obtain sufficient system resources (CPU, RAM) and retain as many background applications as possible, thereby further improving the user experience.

[0077] In a preferred embodiment of the present application, before triggering the cleaning and recycling of the applications currently running in the operating system of the mobile terminal, it is necessary to update and obtain the resource occupancy of each application currently running in the system, including RAM occupancy and CPU usage, wherein the RAM occupancy of each application currently running in the operating system is: MEM_APP_XXX, for example: WeChat occupies 600MB of RAM, and the RAM occupancy of each application is divided by the total RAM of the mobile terminal to obtain the RAM occupancy of each application respectively, and the RAM occupancy of all running applications is accumulated to obtain the current total RAM occupancy of the mobile terminal; the CPU usage of each application currently running in the operating system is: CPU_APP_XXX, for example: WeChat CPU usage is 40%, and the CPU usage of all running applications is accumulated to obtain the current total CUP usage of the mobile terminal, and the current system resource status includes the current total CPU usage and the current total RAM availability, thereby realizing the acquisition of the current system resource status of the mobile terminal.

[0078] In a preferred embodiment of the present application, after updating and acquiring the current total CPU usage and the current total RAM availability in the current system resource status, the first total CPU usage threshold can be preferably 80%, the target total CPU usage threshold can be preferably 60%, the first total RAM availability threshold can be preferably 20%, and the target total RAM availability threshold can be preferably 40%. If the current total CPU usage CPU_LOADING of the operating system of the mobile terminal is above 80% and / or the current total RAM availability MEM_AVAILABLE_PER is lower than 20%, it is triggered to clean up and recycle the applications currently running in the operating system of the mobile terminal; wherein, the current total CPU usage CPU_LOADING is above 80%, and it tends to recycle the CPU resources of the mobile terminal, and reduce CPU_LOADING to When CPU_LOADING is below 80% and MEM_AVAILABLE_PER is below 20%, the mobile terminal's RAM resources tend to be reclaimed, and MEM_AVAILABLE_PER is increased to above 40% as the target MEM_TARGET, thereby limiting background application activities based on the current CPU load and available RAM size of the mobile terminal's operating system as a policy basis. When CPU resources are tight, the corresponding application processes can be killed step by step according to the total CPU usage of the application, thereby releasing CPU resources and RAM resources to a reasonable range, so as to ensure that the foreground application can obtain sufficient system resources (CPU, RAM), while retaining as many background applications as possible, thereby further improving the user experience.

[0079] Following the above embodiment of the present application, the step S11 determines the status value score, RAM occupancy score and CPU usage score of each application in all applications currently running by the operating system of the mobile terminal, including:

[0080] Obtain the process component status, RAM occupancy rate, and CPU usage rate of all applications currently running on the mobile terminal's operating system;

[0081] Based on the process component status of each of the applications, respectively calculate the status value score of each of the applications;

[0082] Based on the RAM occupancy rate of each of the applications, respectively calculating a RAM occupancy score of each of the applications;

[0083] Based on the CPU usage rate of each of the application programs, a CPU usage score of each of the application programs is calculated respectively.

[0084] It should be noted that if Figure 2The following are different types of application process component states:

[0085] -The basic state of the application process ADJ, marked as TYPE_ADJ;

[0086] -Whether the application is an input method application, marked as TYPE_IME;

[0087] -Whether the application is downloading, marked as TYPE_DOWNLOADING;

[0088] -Whether the application is playing sound (music, etc.), marked as TYPE_PLAYING;

[0089] -Whether the application is obtaining high-precision location information (navigation, etc.), marked as TYPE_NAV;

[0090] -Whether the application is recording sound, marked as TYPE_RECORDING_AUDIO;

[0091] -Whether the application is recording the screen, marked as TYPE_RECORDING_SCREEN;

[0092] -Whether the application is a system application, marked as TYPE_SYSTEM;

[0093] -Whether the application is the one that currently sets the wallpaper, marked as TYPE_WALLPAPER;

[0094] -Whether the application is a whitelist application set by the user, marked as TYPE_WHITELIST;

[0095] -Whether the application is one of the two most recently used applications by the user, marked as TYPE_RECENT;

[0096] -Whether the application is an application where the user has added a desktop widget, marked as TYPE_WIDGET;

[0097] Among these process component states, except for the basic process state, the other states have an "or" logical relationship with the basic process state, wherein TYPE_ADJ is the basic process state. In a preferred embodiment of the present application, the application may be preferably a music application, and the process component state may be one of the four states TYPE_ADJ|TYPE_PLAYING|TYPE_RECENT|TYPE_WIDGET, or may be only one state TYPE_ADJ. The state value score SCORE_STATE of the application may be calculated based on the process component state of the application, thereby obtaining the state value score SCORE_STATE of each application.

[0098] At the same time, based on the RAM occupancy rate of each application, the RAM occupancy score of each application is calculated respectively; for example, the RAM occupancy rate of an application is the RAM occupancy amount MEM_APP_XXX of the application divided by the total RAM amount MEM_TOTAL of the mobile terminal, then the RAM occupancy score SCORE_MEM corresponding to the application is:

[0099] MEM_APP_XXX / MEM_TOTAL*100, otherwise 0.

[0100] Based on the CPU usage rate of each of the applications, the CPU usage score of each of the applications is calculated separately. For example, the CPU usage score SCORE_CPU of an application is the CPU usage rate CPU_APP_XXX*100 of the application, otherwise it is 0, so as to calculate the CPU usage score of each application, and realize the separate calculation of the status value score, RAM occupancy score and CPU usage score of each application in all the applications currently running on the operating system of the mobile terminal, so as to subsequently calculate the resource usage score TOTAL of each application according to the status value score, RAM occupancy score and CPU usage score of the application, and then perform the cleaning operation of the applications one by one according to the order of the resource usage scores from high to low.

[0101] Following the above embodiment of the present application, the process component state of the application includes: a process basic state and a process usage type state, and the process usage type state includes at least one usage state; it should be noted that, in the process component state of the above application, other states except the process basic state TYPE_ADJ are all process usage type states of the application;

[0102] The step S11 of calculating the status value score of each application program based on the process component status of each application program includes:

[0103] Based on the process component state of each application process and a preset application priority mapping table, respectively obtain a priority value corresponding to each application, wherein the preset application priority mapping table includes at least one application process basic state and its corresponding priority value;

[0104] Calculating the usage type status score of each application program based on the process usage type status of each application program and a preset usage type score mapping table;

[0105] Based on the priority value and the usage type status score corresponding to each of the application programs, the status value score of each of the application programs is obtained by summing them up respectively.

[0106] In a preferred embodiment of the present application, taking the Android system as an example, the mapping table between the basic state of the application process and the process priority is divided into:

[0107] If the basic state of the process is a foreground process, the corresponding priority value ADJ is 0;

[0108] If the basic state of the process is a visible process, the corresponding priority value ADJ is 100;

[0109] If the basic state of the process is a service process, the corresponding priority value ADJ is 500;

[0110] If the basic status of the process is background process, the corresponding priority value ADJ is 700;

[0111] If the basic state of the process is an empty process, the corresponding priority value ADJ is 900;

[0112] The larger the corresponding priority value ADJ is, the lower the priority of the process is.

[0113] When calculating the status value score for each application based on the application's process component status:

[0114] - The score is based on the application's priority value TYPE_ADJ and its ADJ value

[0115] - If the application is marked as: TYPE_IME, TYPE_RECENT, TYPE_WHITELIST (these three process usage type status), the bonus value SCORE_WHITELIST is -500, otherwise it is 0;

[0116] - If the application does not receive SCORE_WHITELIST bonus points, but is marked as: TYPE_DOWNLOADING, TYPE_PLAYING, TYPE_NAV, TYPE_RECORDING_AUDIO, TYPE_RECORDING_SCREEN, TYPE_WALLPAPER, TYPE_WIDGET (these six process usage type states), the bonus value SCORE_IMPORTANCE is -300, otherwise it is 0;

[0117] - If the application does not receive SCORE_IMPORTANCE points, but is marked as TYPE_SYSTEM (this process usage type status), the score SCORE_SYSTEM is -100, otherwise it is 0;

[0118] That is, according to the usage type of the application, the status score SCORE_TYPE has four cases: -500, -300, -100, and 0;

[0119] Then, the state value score SCORE_STATE of each application program is equal to ADJ+SCORE_TYPE, so that the state value score of each application program is calculated based on the process component state of each application program.

[0120] Following the above embodiments of the present application, one aspect of the present application proposes a system resource management method based on a mobile terminal, further comprising:

[0121] Acquiring the screen state of the mobile terminal screen;

[0122] Different preset time intervals are preset for different screen states.

[0123] Here, the screen state of the mobile terminal's screen includes but is not limited to a screen-on state and a screen-off state. In order to effectively update and obtain the current system resource state while saving system resources, different preset time intervals are preset for different screen states. In a preferred embodiment of the present application, if the screen state of the mobile terminal's screen is a screen-on state, the preset time interval is preferably 1 minute; if the screen state of the mobile terminal's screen is an screen-off state, the preset time interval is preferably 1 hour, thereby satisfying the requirement of updating and obtaining the current system resource state of the mobile terminal at different preset time intervals under different screen states.

[0124] Following the above embodiment of the present application, the updating and obtaining of the current system resource status according to a preset time interval in step S12 includes:

[0125] When the screen state of the mobile terminal is a bright screen state, updating and acquiring the current system resource state according to the preset time interval;

[0126] If the current system resource state is always at the first system resource state level, then based on the preset time interval, the interval time of the first duration threshold is increased each time until it reaches the first time interval threshold; the first duration threshold is less than the preset time interval;

[0127] If the current system resource status drops from the first system resource status level to the second system resource status level, the restoration interval is the preset time interval;

[0128] If the current system resource status drops from the first system resource status level or the second system resource status level to the third system resource status level, shortening the preset time interval to the first duration threshold;

[0129] If the current system resource status is upgraded from the third system resource status level to the second system resource status level or the first system resource status level, the restoration interval is the preset time interval.

[0130] like Figure 3 As shown, in a preferred embodiment of the present application, when defining the level at which the current system resource status is, if the current total CPU usage CPU_LOADING in the current system resource status is above 80% or the total RAM occupancy MEM_AVAILABLE_PER in the current system resource status is below 20%, it is marked as "poor", that is, the third system resource status level; if the current total CPU usage CPU_LOADING is below 20% and the total RAM occupancy MEM_AVAILABLE_PER is above 40%, it is marked as "good", that is, the first system resource status; when the current total CPU usage CPU_LOADING and the total RAM occupancy MEM_AVAILABLE_PER are in other states, it is marked as "medium", that is, the second system resource status.

[0131] In this preferred embodiment Figure 3In the embodiment, when the screen state of the mobile terminal screen is the screen-on state, the preset time interval is preferably 1 minute, the first time length threshold value increased each time is preferably 30 seconds, and the first time interval threshold value is preferably 5 minutes, that is, when the screen state of the mobile terminal screen is the screen-on state, if it has not been updated within 1 minute by default, the current system resource status is updated and obtained. When the current system resource status value obtained is "good", the interval time is increased by 30s each time on the basis of 1 minute, and so on, until the maximum is 5 minutes. If it is always in "good", it continues to be updated every 5 minutes. Get the system resource status once; when the updated current system resource status value drops from level "good" to "medium", the interval time is restored to the default 1 minute; when the updated current system resource status value drops from level "medium" (or "good") to "poor", the adjustment interval time is shortened to 30s, that is, the system resource status needs to be updated once every 30s; when the updated current system resource status is upgraded from level "poor" to "medium" (or "good"), the interval time is restored to the default 1 minute, thereby completing the update and acquisition of the system resource status when the screen state of the mobile terminal is in the bright screen state.

[0132] In this preferred embodiment Figure 3 In the method, when the screen state of the mobile terminal screen is the screen-off state, when the screen-off state is within 30 minutes, the time interval strategy for updating and obtaining the system resource status is consistent with the screen-on state; when the screen-off state is greater than 30 minutes, the preset time interval is preferably set to 1 hour, and the first time length threshold that is increased each time is preferably set to 3 minutes, and the first time interval threshold is preferably set to 3 hours. That is, when the screen state of the mobile terminal screen is in the screen-off state for more than 30 minutes, it is defaulted that the screen is off and if it has not been updated within 1 hour, the current system resource status is updated and obtained. When the current system resource status value obtained is "good", the interval time is increased by 30 minutes each time on the basis of 1 hour, and so on, until Up to a maximum of 3 hours. If it is always in "Good", the system resource status will continue to be updated once every 3 hours. When the updated current system resource status value drops from level "Good" to "Medium", the interval time is restored to the default 1 hour. When the updated current system resource status value drops from level "Medium" (or "Good") to "Poor", the adjustment interval time is shortened to 30 minutes, that is, the system resource status needs to be updated once every 30 minutes. When the updated current system resource status is upgraded from level "Poor" to "Medium" (or "Good"), the interval time is restored to the default 1 hour, thereby completing the update and acquisition of the system resource status when the screen of the mobile terminal is in the off state.

[0133] Following the above embodiment of the present application, if the current total CPU usage is greater than or equal to the preset first total CPU usage threshold, and / or the current total RAM availability is less than or equal to the preset first total RAM availability threshold, based on the RAM occupancy score, CPU usage score and status value score of each of the applications, the resource usage score of each of the applications is calculated respectively, including:

[0134] If the current total CPU usage is greater than or equal to the preset total CPU usage threshold, and the current total RAM availability is greater than the preset total RAM availability threshold, then based on the CPU usage score and status value score of each application, the resource usage score of each application is calculated respectively;

[0135] The step of clearing the currently running applications in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold and / or the updated total RAM availability is greater than a preset target total RAM availability threshold includes:

[0136] Clean up currently running applications one by one in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold;

[0137] The updated total CPU usage rate is the current total CPU usage rate minus the total CPU release rate, and the total CPU release rate is the sum of the CPU usage rates of the applications cleared one by one.

[0138] In a preferred embodiment of the present application, the total amount of RAM on the mobile terminal, i.e., RAM_TOTAL, is 8GB, the current total available RAM, i.e., RAM_AVAILABLE, is 2.4GB, the current total CPU utilization, i.e., CPU_LOADING, is 90%, the CPU utilization of an application A is 30%, the RAM occupancy is 500MB, the process priority ADJ is 900, and no other component status marks are obtained, then the resource usage score TOTAL of application A is: 900(ADJ)+0(SCORE_TYPE)+30(SCORE_CPU)+0(SCORE_MEM)=930. That is, in the preferred embodiment, the current total CPU usage rate (90%) is greater than or equal to the preset total CPU usage rate threshold (80%), and the current total RAM availability rate is greater than the preset total RAM availability rate threshold (20%), then based on the CPU usage score and status value score of each application, the resource usage score of each application is calculated respectively. Since the current total CPU usage rate (90%) is greater than or equal to the preset total CPU usage rate threshold (80%) and the current total RAM availability rate is greater than the preset total RAM availability rate threshold (20%), the CPU resources of the mobile terminal tend to be recovered, that is, the resource usage score of each application TOTAL = ADJ + SCORE_TYPE + SCORE_CPU, thereby calculating the resource usage score of each application respectively. If there are 8 applications currently running on the mobile terminal, it is necessary to calculate the resource usage score of each application based on the above-mentioned method of calculating the resource usage score of application A. According to the resource usage scores of the eight applications, if the eight applications are respectively: application 1, application 2, application 3, application 4, application 5, application 6, application 7 and application 8, and if the eight applications are sorted in descending order according to the resource usage scores as: application 6, application 3, application 5, application 8, application 1, application 2, application 4 and application 7, then according to the resource usage scores from high to low, application 6, application 3, application 5, application 8, application 1, application 2, application 4 and application 7 are cleaned up in sequence until the updated total CPU usage is less than the preset target total CPU usage threshold (60%); if the updated total CPU usage is less than 60% after application 5 is cleaned up, the cleaning of the applications is stopped, and the normal operation of application 8, application 1, application 2, application 4 and application 7 is continued.In the process of sequentially cleaning up applications, the CPU usage rates of the cleaned applications are accumulated one by one in the order of the resource usage scores from high to low to obtain the CPU total release rate CPU_CLEAR, until the current CPU total usage rate CPU_LOADING-CPU total release rate CPU_CLEAR is less than CPU_TARGET, wherein the current CPU total usage rate CPU_LOADING-CPU total release rate CPU_CLEAR is the updated CPU total usage rate, so that when the current CPU total usage rate is greater than or equal to the preset CPU total usage rate threshold and the current RAM total availability rate is greater than the preset RAM total availability rate threshold, it tends to release RAM resources while releasing the CPU resources of the application, so that the updated CPU total usage rate is less than the target CPU total usage rate.

[0139] Following the above embodiment of the present application, if the current total CPU usage is greater than or equal to the preset first total CPU usage threshold, and / or the current total RAM availability is less than or equal to the preset first total RAM availability threshold, based on the RAM occupancy score, CPU usage score and status value score of each of the applications, the resource usage score of each of the applications is calculated respectively, including:

[0140] If the current total CPU usage is less than the preset total CPU usage threshold, and the current total RAM availability is less than or equal to the preset total RAM availability threshold, then based on the RAM occupancy score and status value score of each application, the resource usage score of each application is calculated respectively;

[0141] The step of clearing the currently running applications in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold and / or the updated total RAM availability is greater than a preset target total RAM availability threshold includes:

[0142] Clean up currently running applications one by one in descending order of the resource usage scores until the updated total RAM availability is greater than a preset target total RAM availability threshold;

[0143] Among them, the updated total RAM availability is the sum of the current total RAM availability and the total RAM release rate; the total RAM release rate is the sum of the RAM release amounts of the applications cleared one by one, divided by the total RAM amount of the operating system.

[0144] In a preferred embodiment of the present application, if the current total CPU usage is less than a preset total CPU usage threshold (80%), and the current total RAM availability is less than or equal to a preset total RAM availability threshold (20%), then based on the RAM occupancy score and the state value score of each application, the resource usage score of each application is calculated respectively. Since the current total CPU usage is less than the preset total CPU usage threshold and the current total RAM availability is less than or equal to the preset total RAM availability threshold, the RAM resources of the mobile terminal are tended to be reclaimed, that is, the resource usage score of each application TOTAL = ADJ + SCORE_TYPE + SCORE_MEM, thereby calculating the resource usage score of each application respectively. If the mobile terminal currently has 8 applications running, namely: application 1, application 2, application 3 , application 4, application 5, application 6, application 7 and application 8. If the resource usage scores of these 8 applications are sorted from high to low as: application 3, application 5, application 6, application 1, application 8, application 4, application 7 and application 2, then in the order of the resource usage scores from high to low, clean up application 3, application 5, application 6, application 1, application 8, application 4, application 7 and application 2 in sequence until the updated total RAM availability is greater than the preset target total RAM availability threshold (40%); if after cleaning up application 3, application 5 and application 6 in sequence, the updated total RAM availability is greater than 40%, stop cleaning the applications and continue to keep application 1, application 8, application 4, application 7 and application 2 running normally.In the process of sequentially cleaning up the applications, the RAM release amounts of the cleaned applications are accumulated one by one in the order of the resource usage scores from high to low, so as to accumulate the total RAM release amount MEM_CLEAR to obtain the total RAM release rate, until the sum of the current RAM total availability rate and the RAM total release rate is greater than the preset target RAM total availability rate threshold: MEM_TARGET, wherein the RAM total release rate is the sum of the RAM release amounts of the applications cleaned up one by one, divided by the RAM MEM_TOTAL of the operating system, that is, MEM_CLEAR / MEM_TOTAL, and the updated RAM total availability rate is the sum of the current RAM total availability rate and the RAM total release rate, that is, the updated RAM total availability rate is (MEM_CLEAR+MEM_AVAILABLE) / MEM_TOTAL, so that when the current CPU total usage rate is less than the preset CPU total usage rate threshold and the current RAM total availability rate is less than or equal to the preset RAM total availability rate threshold, it is preferred to release the CPU resources while releasing the RAM resources of the application, so that the updated RAM total availability rate is greater than the preset target RAM total availability rate threshold.

[0145] Following the above embodiment of the present application, if the current total CPU usage is greater than or equal to the preset first total CPU usage threshold, and / or the current total RAM availability is less than or equal to the preset first total RAM availability threshold, based on the RAM occupancy score, CPU usage score and status value score of each of the applications, the resource usage score of each of the applications is calculated respectively, including:

[0146] If the current total CPU usage is greater than or equal to the preset total CPU usage threshold, and the current total RAM availability is less than or equal to the preset total RAM availability threshold, then based on the CPU usage score and status value score of each application, the resource usage score of each application is calculated respectively;

[0147] The step of clearing the currently running applications in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold and / or the updated total RAM availability is greater than a preset target total RAM availability threshold includes:

[0148] Clean up currently running applications one by one in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold, and calculate the updated total RAM availability;

[0149] The updated total CPU usage rate is the current total CPU usage rate minus the total CPU release rate, and the total CPU release rate is the sum of the CPU usage rates of the applications cleared one by one; the updated total RAM availability rate is the sum of the current total RAM availability rate and the total RAM release rate; the total RAM release rate is the sum of the RAM release amounts of the applications cleared one by one, divided by the total RAM amount of the operating system;

[0150] If the updated total RAM availability is still less than the preset total RAM availability threshold, then based on the RAM occupancy score and status value score of each application that is still running after the cleanup, the updated resource usage score of each application is calculated respectively;

[0151] According to the order of the updated resource usage scores from high to low, the applications that are still running after the cleanup are cleaned up one by one again until the total RAM availability after the update is greater than the preset target RAM total availability threshold.

[0152] like Figure 4As shown, in a preferred embodiment of the present application, if the current total CPU usage is greater than or equal to the preset total CPU usage threshold (80%), and the current total RAM availability is less than or equal to the preset total RAM availability threshold (20%), the CPU resources are first tended to be released, and then whether to release the RAM resources is considered. The resource usage score of each application is calculated based on the CPU usage score and status value score of each application, that is, the resource usage score of each application is TOTAL=ADJ+SCORE_TYPE+SCORE_CPU, so as to calculate the resource usage score of each application. If there are 8 applications currently running on the mobile terminal, it is necessary to calculate the resource usage score of each application based on the above-mentioned method of calculating the resource usage score of application A. If these 8 applications are: application 1, application 2, application 3, application 4, application 5, application 6, application 7 and application 8, if the resource usage scores of these 8 applications are sorted from high to low as follows: : Application 6, Application 3, Application 5, Application 8, Application 1, Application 2, Application 4 and Application 7, then according to the order of the resource usage scores from high to low, clean up Application 6, Application 3, Application 5, Application 8, Application 1, Application 2, Application 4 and Application 7 in sequence until the updated total CPU usage is less than the preset target total CPU usage threshold (60%); if after cleaning up Application 6, Application 3 and Application 5 in sequence, the updated total CPU usage is less than the preset target total CPU usage threshold of 60%, it is necessary to continue to calculate the updated total RAM availability; wherein, the updated total CPU usage is the current total CPU usage minus the total CPU release rate, and the total CPU release rate is the sum of the CPU usages of the applications cleaned up one by one; the updated total RAM availability is the sum of the current total RAM availability and the total RAM release rate; the total RAM release rate is the sum of the RAM release amounts of the applications cleaned up one by one, divided by the total RAM amount of the operating system.

[0153] If the updated total RAM availability is still less than the preset total RAM availability threshold (20%), it is necessary to release RAM resources. Based on the RAM occupancy score and status value score of each of the applications that are still running after the cleanup, the updated resource usage score of each of the applications is calculated respectively. That is, based on the RAM occupancy score and status value score of each of the applications 8, application 1, application 2, application 4, and application 7 that are still running after the cleanup, the updated resource usage score of each of the applications 8, application 1, application 2, application 4, and application 7 is calculated respectively. If the resource usage scores of these five applications are sorted from high to low as follows: application 2, application 1, application 8, application 7, application 1, application 2, application 4, and application 7. If there is application 4, then according to the order of updated resource usage scores from high to low, clean up application 2, application 1, application 8, application 7, and application 4 that are still running after the cleanup, one by one, until the total RAM availability after updating is greater than the preset target RAM total availability threshold (40%); if after cleaning application 2 and application 1 in sequence, the total RAM availability after updating is greater than the preset target RAM total availability threshold of 40%, maintain the normal operation of application 8, application 7, and application 4, and stop the application cleanup operation, thereby realizing the reasonable cleanup and release of the CPU resources and RAM resources of the mobile terminal, so that the RAM resources and CPU resources of the mobile terminal meet different threshold conditions respectively, ensure the smooth use of the mobile terminal, and further guarantee the user experience.

[0154] According to another aspect of the present application, a non-volatile storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions can be executed by a processor, the processor implements the system resource management method based on the mobile terminal as described above.

[0155] According to another aspect of the present application, a system resource management device based on a mobile terminal is also provided, wherein the device includes:

[0156] one or more processors;

[0157] A computer readable medium for storing one or more computer readable instructions,

[0158] When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the above-mentioned system resource management method based on the mobile terminal.

[0159] Here, the detailed contents of each embodiment of the mobile terminal-based system resource management device may refer to the corresponding part of the above-mentioned mobile terminal-based system resource management method embodiment, which will not be described in detail here.

[0160] In summary, the present application determines the status value score, RAM occupancy score and CPU usage score of each application in all applications currently running on the operating system of the mobile terminal; updates and obtains the current system resource status at a preset time interval or when the foreground application of the mobile terminal is switched, and the current system resource status includes the current CPU total usage rate and the current RAM total availability rate; if the current CPU total usage rate is greater than or equal to a preset first CPU total usage rate threshold, and / or the current RAM total availability rate is less than or equal to a preset first RAM total availability rate threshold, based on the RAM occupancy score, CPU usage score and status value score of each of the applications, respectively calculates the resource usage score of each of the applications; and cleans up the currently running applications in descending order of the resource usage scores, Until the updated total CPU usage is less than the preset target CPU total usage threshold and / or the updated total RAM availability is greater than the preset target RAM total availability threshold; wherein, the first total CPU usage threshold is greater than the target CPU total usage threshold, and the first total RAM availability threshold is less than the target RAM total availability threshold, thereby realizing limiting background application activities based on the current CPU load and available RAM size of the operating system of the mobile terminal as a policy basis, so that when CPU resources are tight, the processes of the corresponding applications can be killed step by step according to the total CPU usage of the application, thereby releasing CPU resources and RAM resources within a reasonable range, so as to ensure that the foreground application can obtain sufficient system resources (CPU, RAM), while retaining as many background applications as possible, thereby further improving the user experience.

[0161] It should be noted that the present application can be implemented in software and / or a combination of software and hardware, for example, can be implemented using an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of the present application (including relevant data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and similar devices. In addition, some steps or functions of the present application can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform each step or function.

[0162] In addition, a part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. The program instruction for calling the method of the present application may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-bearing medium, and / or stored in a working memory of a computer device that runs according to the program instruction. Here, according to an embodiment of the present application, a device is included, the device including a memory for storing computer program instructions and a processor for executing program instructions, wherein, when the computer program instruction is executed by the processor, the device is triggered to run the method and / or technical solution based on the aforementioned multiple embodiments according to the present application.

[0163] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

Claims

1. A system resource management method based on a mobile terminal, applied to a mobile terminal, wherein: The method includes: Determine a status value score, a RAM occupancy score, and a CPU usage score for each of all applications currently running on the operating system of the mobile terminal; At a preset time interval or when a foreground application of the mobile terminal is switched, updating and obtaining a current system resource status, wherein the current system resource status includes a current total CPU usage rate and a current total RAM availability rate; If the current total CPU usage is greater than or equal to a preset first total CPU usage threshold, and / or the current total RAM availability is less than or equal to a preset first total RAM availability threshold, based on the RAM occupancy score, CPU usage score and status value score of each of the applications, respectively calculate the resource usage score of each of the applications; Clean up currently running applications in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold and / or the updated total RAM availability is greater than a preset target total RAM availability threshold; The first CPU total usage threshold is greater than the target CPU total usage threshold, and the first RAM total availability threshold is less than the target RAM total availability threshold.

2. The method according to claim 1, wherein: The step of determining the status value score, RAM occupancy score, and CPU usage score of each application program among all applications currently running on the operating system of the mobile terminal includes: Obtain the process component status, RAM occupancy rate, and CPU usage rate of all applications currently running on the mobile terminal's operating system; Based on the process component status of each of the applications, respectively calculate the status value score of each of the applications; Based on the RAM occupancy rate of each of the applications, respectively calculating a RAM occupancy score of each of the applications; Based on the CPU usage rate of each of the application programs, a CPU usage score of each of the application programs is calculated respectively.

3. The method according to claim 2, wherein: The process component state of the application includes: a process basic state and a process usage type state, wherein the process usage type state includes at least one usage state; The step of calculating the status value score of each application program based on the process component status of each application program comprises: Based on the process component state of each application process and a preset application priority mapping table, respectively obtain a priority value corresponding to each application, wherein the preset application priority mapping table includes at least one application process basic state and its corresponding priority value; Calculating the usage type status score of each application program based on the process usage type status of each application program and a preset usage type score mapping table; Based on the priority value and the usage type status score corresponding to each of the application programs, the status value score of each of the application programs is obtained by summing them up respectively.

4. The method according to claim 1, wherein: The method further comprises: Acquiring the screen state of the mobile terminal; Different preset time intervals are preset for different screen states.

5. The method according to claim 4, wherein: The updating and obtaining of the current system resource status according to a preset time interval includes: When the screen state of the mobile terminal is a bright screen state, updating and acquiring the current system resource state according to the preset time interval; If the current system resource state is always at the first system resource state level, then based on the preset time interval, the interval time of the first duration threshold is increased each time until it reaches the first time interval threshold; the first duration threshold is less than the preset time interval; If the current system resource status drops from the first system resource status level to the second system resource status level, the restoration interval is the preset time interval; If the current system resource status drops from the first system resource status level or the second system resource status level to the third system resource status level, shortening the preset time interval to the first duration threshold; If the current system resource status is upgraded from the third system resource status level to the second system resource status level or the first system resource status level, the restoration interval is the preset time interval.

6. The method according to claim 1, wherein: If the current total CPU usage is greater than or equal to a preset first total CPU usage threshold, and / or the current total RAM availability is less than or equal to a preset first total RAM availability threshold, based on the RAM occupancy score, CPU usage score and status value score of each of the applications, respectively calculating the resource usage score of each of the applications, including: If the current total CPU usage is greater than or equal to the preset total CPU usage threshold, and the current total RAM availability is greater than the preset total RAM availability threshold, then based on the CPU usage score and status value score of each application, the resource usage score of each application is calculated respectively; The step of clearing the currently running applications in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold and / or the updated total RAM availability is greater than a preset target total RAM availability threshold includes: Clean up currently running applications one by one in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold; The updated total CPU usage is the current total CPU usage minus the total CPU release rate, and the total CPU release rate is the sum of the CPU usages of the applications cleared one by one.

7. The method according to claim 1, wherein: If the current total CPU usage is greater than or equal to a preset first total CPU usage threshold, and / or the current total RAM availability is less than or equal to a preset first total RAM availability threshold, based on the RAM occupancy score, CPU usage score and status value score of each of the applications, respectively calculating the resource usage score of each of the applications, including: If the current total CPU usage is less than the preset total CPU usage threshold, and the current total RAM availability is less than or equal to the preset total RAM availability threshold, then based on the RAM occupancy score and status value score of each application, the resource usage score of each application is calculated respectively; The step of clearing the currently running applications in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold and / or the updated total RAM availability is greater than a preset target total RAM availability threshold includes: Clean up currently running applications one by one in descending order of the resource usage scores until the updated total RAM availability is greater than a preset target total RAM availability threshold; Among them, the updated total RAM availability is the sum of the current total RAM availability and the total RAM release rate; the total RAM release rate is the sum of the RAM release amounts of the applications cleared one by one, divided by the total RAM amount of the operating system.

8. The method according to claim 1, wherein: If the current total CPU usage is greater than or equal to a preset first total CPU usage threshold, and / or the current total RAM availability is less than or equal to a preset first total RAM availability threshold, based on the RAM occupancy score, CPU usage score and status value score of each of the applications, respectively calculating the resource usage score of each of the applications, including: If the current total CPU usage is greater than or equal to the preset total CPU usage threshold, and the current total RAM availability is less than or equal to the preset total RAM availability threshold, then based on the CPU usage score and status value score of each application, the resource usage score of each application is calculated respectively; The step of clearing the currently running applications in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold and / or the updated total RAM availability is greater than a preset target total RAM availability threshold includes: Clean up currently running applications one by one in descending order of the resource usage scores until the updated total CPU usage is less than a preset target total CPU usage threshold, and calculate the updated total RAM availability; The updated total CPU usage rate is the current total CPU usage rate minus the total CPU release rate, and the total CPU release rate is the sum of the CPU usage rates of the applications cleared one by one; the updated total RAM availability rate is the sum of the current total RAM availability rate and the total RAM release rate; the total RAM release rate is the sum of the RAM release amounts of the applications cleared one by one, divided by the total RAM amount of the operating system; If the updated total RAM availability is still less than the preset total RAM availability threshold, then based on the RAM occupancy score and status value score of each application that is still running after the cleanup, the updated resource usage score of each application is calculated respectively; According to the order of the updated resource usage scores from high to low, the applications that are still running after the cleanup are cleaned up one by one again until the total RAM availability after the update is greater than the preset target RAM total availability threshold.

9. A non-volatile storage medium having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executable by a processor, the processor is enabled to implement the method according to any one of claims 1 to 8.

10. A system resource management device based on a mobile terminal, wherein: The equipment includes: one or more processors; A computer readable medium for storing one or more computer readable instructions, When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.