CN109726003B - Application unfreezing processing method, electronic device and computer readable storage medium - Google Patents

Application unfreezing processing method, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN109726003B
CN109726003B CN201910008617.0A CN201910008617A CN109726003B CN 109726003 B CN109726003 B CN 109726003B CN 201910008617 A CN201910008617 A CN 201910008617A CN 109726003 B CN109726003 B CN 109726003B
Authority
CN
China
Prior art keywords
unfrozen
applications
application
occupancy rate
unfreezing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910008617.0A
Other languages
Chinese (zh)
Other versions
CN109726003A (en
Inventor
赵梦亚
张俊
林志泳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910008617.0A priority Critical patent/CN109726003B/en
Publication of CN109726003A publication Critical patent/CN109726003A/en
Application granted granted Critical
Publication of CN109726003B publication Critical patent/CN109726003B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application provides a processing method for application unfreezing, an electronic device and a computer readable storage medium, and relates to the technical field of communication, wherein the method comprises the following steps: when a unfreezing task is triggered, acquiring the category, the unfreezing priority and the expected processor resource occupancy rate of an application to be unfrozen; carrying out weighted average processing on the obtained base numbers and weight values corresponding to the classes of the applications to be unfrozen, the unfreezing priorities and the expected processor resource occupancy rates respectively to obtain a comprehensive evaluation value of the applications to be unfrozen; and selecting part or all of the application to be unfrozen according to the comprehensive evaluation value. According to the application, the application to be unfrozen is comprehensively evaluated according to the category of the application to be unfrozen, the unfreezing priority and the expected resource occupancy rate of the processor, and the unfreezing strategy is dynamically adjusted according to the evaluation result, so that the system is depressurized, and the situations of application blockage and no response of the system can be avoided.

Description

Application unfreezing processing method, electronic device and computer readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a processing method for application unfreezing, an electronic device, and a computer-readable storage medium.
Background
With the development of communication technology and electronic terminal technology, the popularity of intelligent electronic terminals such as mobile phones, tablet computers, and portable computers is increasing. In order to implement various functions, a plurality of application programs are generally run in the terminal, and each running program occupies system resources, which causes excessive power consumption, thereby reducing the cruising ability of the terminal.
In order to solve the above problem, it is conventional to freeze an application when it is no longer needed. Then, when the application needs to be used, the application is unfrozen again. In some situations, the number of applications needing to be thawed is large, so that the system is busy in a certain period of time, a certain pressure is applied to the system, and the problems of application blockage and no response of the system can occur.
Disclosure of Invention
The embodiment of the application unfreezing processing method, the electronic device and the computer readable storage medium can be used for dynamically adjusting the unfreezing strategy so as to reduce the pressure of a system and avoid the situations of application blockage and no response of the system.
An aspect of the present embodiment provides a processing method for application thawing, where the method includes: when a unfreezing task is triggered, acquiring the category, the unfreezing priority and the expected processor resource occupancy rate of an application to be unfrozen; carrying out weighted average processing on the obtained base numbers and weight values corresponding to the classes of the applications to be unfrozen, the unfreezing priorities and the expected processor resource occupancy rates respectively to obtain a comprehensive evaluation value of the applications to be unfrozen; and selecting to unfreeze part or all of the applications to be unfrozen according to the comprehensive evaluation value.
An aspect of an embodiment of the present application further provides an electronic apparatus, where the electronic apparatus includes: the acquisition module is used for acquiring the category, the unfreezing priority and the expected processor resource occupancy rate of the application to be unfrozen when the unfreezing task is triggered; the evaluation module is used for carrying out weighted average processing on the obtained base numbers and weight values corresponding to the categories and the unfreezing priorities of the applications to be unfrozen and the expected resource occupancy rates of the processors to obtain a comprehensive evaluation value of the applications to be unfrozen; and the unfreezing module is used for selecting to unfreeze part or all of the applications to be unfrozen according to the comprehensive evaluation value.
An aspect of an embodiment of the present application further provides an electronic apparatus, including: the application unfreezing processing method comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the computer program, the processing method for unfreezing the application is realized.
An aspect of the embodiments of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the processing method for unfreezing an application is implemented as provided in the foregoing embodiments.
According to the embodiments, when the unfreezing task is triggered, the comprehensive evaluation is carried out on the applications to be unfrozen according to the types of the applications to be unfrozen, the unfreezing priority and the expected occupancy rate of the processor resources, the unfreezing strategy is dynamically adjusted according to the evaluation result, and part or all of the applications to be unfrozen are selected to be unfrozen, so that the flexibility of the unfreezing operation is improved, the unfreezing operation can be more consistent with the actual situation of the processor resource occupation, the situation that the system is subjected to huge pressure due to one-time excessive unfreezing of a plurality of applications can be avoided, and the situations that the applications are blocked and the system is not.
Drawings
Fig. 1 is a schematic flow chart illustrating an implementation of a processing method for thawing provided in an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating an implementation of a processing method for thawing application according to another embodiment of the present application;
fig. 3 is a schematic flow chart illustrating an implementation of a processing method for thawing application according to another embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to another embodiment of the present application;
fig. 6 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present application;
fig. 7 is a schematic diagram of a hardware structure of an electronic device.
Detailed Description
In order to make the objects, features and advantages of the present invention more apparent and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Please refer to fig. 1, which is a schematic flow chart illustrating an implementation of a processing method for thawing an application according to an embodiment of the present application. The method can be applied to intelligent electronic terminals provided with a plurality of Applications (APP), such as: the mobile terminal comprises electronic devices such as mobile phones, tablet computers, laptop computers, smart watches and smart glasses which can perform data processing in a mobile mode, and electronic devices such as desktop computers, all-in-one machines and smart televisions which cannot perform data processing in a mobile mode. As shown in fig. 1, the method mainly includes:
s101, when a unfreezing task is triggered, acquiring the category, the unfreezing priority and the expected resource occupancy rate of a processor of an application to be unfrozen;
s102, carrying out weighted average processing on the base number and the weight value corresponding to the category and the unfreezing priority of the application to be unfrozen and the expected resource occupancy rate of the processor respectively to obtain a comprehensive evaluation value of the application to be unfrozen;
s103, according to the comprehensive evaluation value, selecting to unfreeze part or all of applications to be unfrozen for unfreezing.
Specifically, freeze refers to the system placing an application process in a "controllable" suspended state when the application is suspended. Through freezing, unnecessary resource occupation of the application can be reduced, so that the effects of saving power, prolonging the standby time of the terminal and reducing the probability of privacy disclosure of a user are achieved, and meanwhile, hot start of the application can be realized.
The terminal can be preset with a plurality of freezing strategies and corresponding unfreezing strategies, and when the application meets the freezing conditions defined by the freezing strategies, the application is frozen. When the system environment meets the thawing conditions defined by the thawing strategy, the frozen application will be thawed. Among them, the freezing conditions are, for example: the system resource occupation ratio is larger than the preset ratio, or the screen locking state is entered, and the like. Thawing conditions are, for example: unlocking the screen, or restoring the screen to a bright state, or forcing the system resources to be released due to the forced closing of the application, or monitoring the operation of the user for unfreezing all the frozen applications, and the like.
When the system environment meets the unfreezing condition defined by the unfreezing strategy, the unfreezing task is triggered, and the category, the unfreezing priority and the expected processor resource occupancy rate of the application to be unfrozen are obtained. Then, obtaining the base number and the weight value corresponding to the category, the unfreezing priority and the expected processor resource occupancy rate of each application to be unfrozen, carrying out weighted average operation on the obtained base number and weight value, and taking the obtained weighted average as the comprehensive evaluation value of the application to be unfrozen. The sum of the weighted values corresponding to the categories, the thawing priority and the expected processor resource occupancy rates may be equal to 1, or may not be equal to 1, and is preferably equal to 1. By utilizing the parameters, the comprehensive evaluation value of each application to be unfrozen is obtained through calculation, and the comprehensive evaluation value can be used for better determining the unfreezing sequence, so that the unfreezing operation is more reasonable, and better balance is achieved between reducing the system pressure and meeting the user requirements.
The terminal can be preset with a weight value table, which is used for recording the categories of a plurality of applications and the corresponding relation between the bases and the weight values corresponding to the categories, the unfreezing priorities of the applications and the corresponding relation between the bases and the weight values corresponding to the thawing priorities, and the corresponding relation between the processor resource occupancy rates and the bases and the weight values corresponding to the base and the weight values corresponding to the processor resource occupancy rates. Optionally, the corresponding weight values are respectively in the following order from high to low: thawing priority, CPU occupancy, category.
The category of the application to be thawed can be determined according to the function of the application to be thawed, such as: social communication, payment, video playing, shooting beautification, traffic navigation, education and learning, travel and system optimization, and the like. The terminal can also be preset with the corresponding relationship between a plurality of applications and the corresponding categories.
The unfreezing priority may alternatively be considered to be importance, or interactivity with the user, or perceptibility of the user. It can be understood that the higher the thawing priority, the more important the application is, the stronger the interactivity with the user is, the less perceptive the user is, the higher the user's engagement, and the higher the corresponding cardinality and weight value are. The unfreezing priority is related to the category and the use frequency, such as: the unfreezing priority of the social communication application is higher than that of the system optimization application, the unfreezing priority of the application in the same category is higher than that of the application with lower use frequency, and the application with higher use frequency corresponds to the application with higher use frequency. The terminal can also be preset with the corresponding relation between a plurality of applications and the corresponding unfreezing priorities.
The expected CPU (Central Processing Unit) occupancy of an application to be thawed refers to a ratio of CPU time expected to be consumed by a process corresponding to the application in a time period to the length of the time period, and is calculated according to a formula, for example:
the CPU time expected to be consumed by the process is the kernel-state time expected to be consumed by the process + the user-state time expected to be consumed by the process, i.e., costTime is kernelTime + UserTime
Predicted CPU occupancy of a process is the CPU time/refresh period the process is predicted to consume
The kernel-mode time expected to be consumed by the process and the user-mode time expected to be consumed by the process can be determined according to the task amount to be processed by the application to be unfrozen. The higher the CPU occupancy, the greater the pressure on the system, and the lower the corresponding cardinality and weight values.
It will be appreciated that the above-mentioned correspondence relationships can be customized by the user in practical applications.
Optionally, in another embodiment of the present application, the CPU occupancy of the application to be thawed when the application to be thawed is suspended may also be used as the expected CPU resource occupancy of the application to be thawed.
And according to the comprehensive evaluation value, selecting to unfreeze part or all of applications to be unfrozen for unfreezing, specifically comprising the following steps: and selecting the application to be unfrozen with the maximum comprehensive evaluation value for unfreezing, or selecting the application to be unfrozen with the comprehensive unfreezing evaluation value larger than a preset value for unfreezing.
In the embodiment, when the unfreezing task is triggered, the comprehensive evaluation is carried out on the applications to be unfrozen according to the types of the applications to be unfrozen, the unfreezing priority and the expected occupancy rate of the processor resources, the unfreezing strategy is dynamically adjusted according to the evaluation result, and part or all of the applications to be unfrozen are selected to be unfrozen, so that the flexibility of the unfreezing operation is improved, the unfreezing operation can better accord with the actual situation of the processor resource occupation, the situation that the system is greatly stressed due to one-time excessive unfreezing of a plurality of applications can be avoided, and the situations that the applications are blocked and the system does not have response.
Please refer to fig. 2, which is a schematic flow chart illustrating an implementation of a processing method for thawing an application according to an embodiment of the present application. The method can be applied to intelligent electronic terminals provided with a plurality of applications, such as: the mobile terminal comprises electronic devices such as mobile phones, tablet computers, laptop computers, smart watches and smart glasses which can perform data processing in a mobile mode, and electronic devices such as desktop computers, all-in-one machines and smart televisions which cannot perform data processing in a mobile mode. As shown in fig. 2, the method mainly includes:
s201, when a unfreezing task is triggered, acquiring the total occupancy rate of processor resources, the number of applications to be unfrozen and a comprehensive evaluation value of the applications to be unfrozen;
frozen means that the system puts the application process in a "controllable" pause state when the application is suspended. Through freezing, unnecessary resource occupation of the application can be reduced, so that the effects of saving power, prolonging the standby time of the terminal and reducing the probability of privacy disclosure of a user are achieved, and meanwhile, hot start of the application can be realized.
The terminal can be preset with a plurality of freezing strategies and corresponding unfreezing strategies, and when the application meets the freezing conditions defined by the freezing strategies, the application is frozen. When the system environment meets the thawing conditions defined by the thawing strategy, the frozen application will be thawed. Among them, the freezing conditions are, for example: the system resource occupation ratio is larger than the preset ratio, or the screen locking state is entered, and the like. Thawing conditions are, for example: unlocking the screen, or restoring the screen to a bright state, or forcing the system resources to be released due to the forced closing of the application, or monitoring the operation of the user for unfreezing all the frozen applications, and the like.
When the system environment meets the unfreezing condition defined by the unfreezing strategy, the unfreezing task is triggered, and the total occupancy rate of the current processor resources, the number of applications to be unfrozen and the comprehensive evaluation value of the applications to be unfrozen are obtained.
The total occupancy rate of processor resources, i.e., the total occupancy rate of a Central Processing Unit (CPU) or the total utilization rate of the CPU, refers to the ratio of the time that the CPU is busy in a refresh cycle of the task manager to the total refresh cycle.
Optionally, the number of applications to be thawed may be determined according to a preset thawing strategy, for example: if the unfreezing strategy is to unfreeze all frozen applications after unlocking the screen, determining the number of all applications in the frozen state in the system as the number of applications to be unfrozen; if the unfreezing strategy is to unlock the last frozen application, the number of applications to be unfrozen is 1.
The comprehensive evaluation value of the application to be thawed can be obtained by step S102 in the embodiment shown in fig. 1.
S202, according to the acquired total occupancy rate of the processor resources, the number of the applications to be unfrozen and the comprehensive evaluation value of the applications to be unfrozen, selecting to unfreeze part or all of the applications to be unfrozen.
Specifically, a corresponding specific thawing strategy is determined according to the acquired total occupancy rate of the processor resources, the number of applications to be thawed and the comprehensive evaluation value of the applications to be thawed. For example, if the total occupancy rate of the current processor resources is small and the number of applications to be thawed is small, all the applications to be thawed can be directly thawed; if the total resource occupancy rate of the current processor is too high and the number of applications to be unfrozen is large, unfreezing the applications to be unfrozen in batches and in batches according to the comprehensive evaluation value of each application to be unfrozen; or, if the total occupation of the processor resources is increased suddenly after the application to be defrosted is defrosted partially although the total occupation of the processor resources is not high, and the application to be defrosted may be jammed, all the remaining applications to be defrosted are forcibly closed.
In the embodiment, when the unfreezing task is triggered, the unfreezing strategy is dynamically adjusted according to the total occupancy rate of processor resources, the number of applications to be unfrozen and the comprehensive evaluation value of the applications to be unfrozen, and part or all of the applications to be unfrozen are selected to be unfrozen, so that the flexibility of unfreezing operation is improved, the unfreezing operation can be more consistent with the actual situation of processor resource occupation, the situation that a system is subjected to huge pressure due to excessive unfreezing of a plurality of applications at one time can be avoided, and the situations that the applications are blocked and the system has no response can be avoided.
Please refer to fig. 3, which is a schematic flow chart illustrating an implementation of a processing method for thawing according to another embodiment of the present application. The method can be applied to intelligent electronic terminals provided with a plurality of applications, such as: the mobile terminal comprises electronic devices such as mobile phones, tablet computers, laptop computers, smart watches and smart glasses which can perform data processing in a mobile mode, and electronic devices such as desktop computers, all-in-one machines and smart televisions which cannot perform data processing in a mobile mode. As shown in fig. 3, the method mainly includes:
s301, when a unfreezing task is triggered, acquiring the total occupancy rate of processor resources, the number of applications to be unfrozen and a comprehensive evaluation value of the applications to be unfrozen;
frozen means that the system puts the application process in a "controllable" pause state when the application is suspended. Through freezing, unnecessary resource occupation of the application can be reduced, so that the effects of saving power, prolonging the standby time of the terminal and reducing the probability of privacy disclosure of a user are achieved, and meanwhile, hot start of the application can be realized.
The terminal can be preset with a plurality of freezing strategies and corresponding unfreezing strategies, and when the application meets the freezing conditions defined by the freezing strategies, the application is frozen. When the system environment meets the thawing conditions defined by the thawing strategy, the frozen application will be thawed. Among them, the freezing conditions are, for example: the occupation ratio of the CPU resource or the system resource is larger than the preset ratio, or the screen locking state is entered, and the like. Thawing conditions are, for example: unlocking the screen, or restoring the screen to a bright state, or forcing the system resources to be released due to the forced closing of the application, or monitoring the operation of the user for unfreezing all the frozen applications, and the like.
When the system environment meets the unfreezing condition defined by the unfreezing strategy, the unfreezing task is triggered, and the total occupancy rate of the current processor resources, the number of applications to be unfrozen and the comprehensive evaluation value of the applications to be unfrozen are obtained. The total occupancy rate of the processor resources, i.e., the total occupancy rate of the CPU or the total utilization rate of the CPU, refers to a ratio of a time during which the CPU is busy in a refresh cycle of the task manager to a whole refresh cycle.
Optionally, the number of applications to be thawed may be determined according to a preset thawing strategy, for example: if the unfreezing strategy is to unfreeze all frozen applications after unlocking the screen, determining the number of all applications in the frozen state in the system as the number of applications to be unfrozen; if the unfreezing strategy is to unlock the last frozen application, the number of applications to be unfrozen is 1.
Optionally, the comprehensive evaluation value of the application to be thawed may be determined according to the category of the application to be thawed, the thawing priority, and the expected occupancy rate of the processor resource. The specific determination method may refer to the related description of step 102 in the embodiment shown in fig. 1, and is not described herein again.
S302, when the total occupancy rate of the processor resources is greater than a first preset rate, the unfreezing operation is suspended;
s303, monitoring the change of the total occupancy rate of the processor resources in real time;
s304, when the total occupancy rate of the processor resources is monitored to be smaller than a second preset rate, according to the monitored total occupancy rate of the processor resources, the number of applications to be unfrozen and the comprehensive evaluation value of the applications to be unfrozen, selecting to unfreeze part or all of the applications to be unfrozen.
When the total occupancy rate of the CPU resources is greater than a first predetermined ratio (e.g., 90%), indicating that the CPU resources are in short supply, if the application to be thawed is thawed at this time, there is a greater probability that a jam will occur, and therefore, the thawing operation is suspended. And simultaneously monitoring the change of the total occupancy rate of the CPU resource in real time, and when the total occupancy rate of the CPU resource is monitored to be smaller than a second preset rate, selecting to unfreeze part or all of the applications to be unfrozen according to the monitored total occupancy rate of the CPU resource, the number of the applications to be unfrozen and the comprehensive evaluation value of the applications to be unfrozen. The first preset ratio may be the same as the second preset ratio, or may be greater than the second preset ratio.
It can be understood that, in practical applications, the preset ratio involved in the present embodiment can be customized by the user according to the needs.
Optionally, when it is monitored that the total occupancy of the processor resources is less than the second preset ratio, a specific implementation method for selecting to unfreeze part or all of the applications to be unfrozen according to the monitored total occupancy of the processor resources, the number of the applications to be unfrozen, and the comprehensive evaluation value of the applications to be unfrozen may include the following steps:
step one, when the total occupancy rate of the processor resources is monitored to be smaller than a second preset rate, whether the number of applications to be unfrozen is smaller than a preset number is determined.
And on the one hand, if the number of the applications to be unfrozen is less than the preset number, unfreezing all the applications to be unfrozen. On the other hand, if the number of the applications to be thawed is not less than the preset number, thawing the applications to be thawed one by one according to the sequence of the comprehensive evaluation value from high to low.
After an application to be defrosted is defrosted, whether the total occupancy rate of the processor resources exceeds a third preset ratio during the first preset monitoring period is determined. On one hand, if the total occupancy rate of the processor resources exceeds the third preset ratio, the next application to be unfrozen is unfrozen, and the step of determining whether the total occupancy rate of the processor resources exceeds the third preset ratio during the first preset monitoring period is returned to be executed until all the applications to be unfrozen are unfrozen. On the other hand, if the total occupancy rate of the processor resources exceeds the third preset rate, the execution of unfreezing operation is suspended, when the total occupancy rate of the processor resources is monitored to be smaller than the third preset rate, the next application to be unfrozen is unfrozen, and the step of determining whether the total occupancy rate of the processor resources exceeds the third preset rate in the first preset monitoring period is executed until all applications to be unfrozen are unfrozen.
For example, when the total occupancy rate of the CPU is detected to be less than 70%, if the number of applications to be thawed is less than 3, all the applications to be thawed are thawed. If there are 4 applications to be defrosted, which are A, B, C, D respectively, and the corresponding comprehensive evaluation values are a-70, B-50, C-90 and D-10 respectively, the applications C are defrosted first according to the sequence of the comprehensive evaluation values from high to low, and then the change of the total CPU occupancy rate within 1 minute is monitored.
On one hand, if the total occupancy rate of the CPU in 1 minute is increased to the third preset rate and exceeds the third preset rate by 75%, which indicates that the unfreezing application C occupies more CPU resources, the current system pressure is higher, and the probability of system jam caused by the continuous unfreezing application A is higher, the unfreezing application A is firstly suspended, after the fact that the total occupancy rate of the CPU falls below the third preset rate by 75% is monitored, the unfreezing application A is continuously unfrozen, the change condition of the total occupancy rate of the CPU in 1 minute is monitored, and whether the application B is continuously unfrozen or not is determined according to the monitoring result.
On the other hand, if the total occupancy rate of the CPU is always less than 75% of the third preset rate within 1 minute after the application C is thawed, which indicates that the influence of the thawing application C on the system pressure is small, the current CPU resources are abundant, and the probability of system locking caused by continuously thawing the application a is small, the application a is continuously thawed, and then the change condition of the total occupancy rate of the CPU within 1 minute after the application a is thawed is monitored, and whether the thawing B is continuously performed is determined according to the monitoring result. And so on until all applications to be thawed are thawed A, B, C, D.
Thus, according to the change condition of the total occupancy rate of the CPU, the unfreezing strategy is dynamically adjusted by combining the comprehensive evaluation value of each application to be unfrozen, and various requirements of users can be gradually met while the system is ensured to be stable.
Optionally, in another embodiment of the present application, in addition to the above steps S302 to S304, a part or all of the applications to be defrosted may be selected to be defrosted according to the acquired total occupancy rate of the processor resources, the number of applications to be defrosted, and the comprehensive evaluation value of the applications to be defrosted.
Specifically, when the number of applications to be thawed is one, the applications to be thawed are thawed. And when the number of the applications to be unfrozen is multiple, acquiring the expected processor resource occupancy rate of each application to be unfrozen. And determining at least one first application to be thawed from the applications to be thawed to perform thawing according to the current total occupancy rate of the processor resources, the comprehensive evaluation value of each application to be thawed and the expected occupancy rate of the processor resources, wherein after the first application to be thawed is thawed, the total occupancy rate of the processor resources is not greater than a fourth preset rate. And then, after the first application to be unfrozen is unfrozen, all the remaining applications to be unfrozen are selected to be unfrozen or closed according to the change of the total occupancy rate of the processor resources.
Optionally, the higher the comprehensive evaluation value is, the higher the corresponding application to be thawed is. And determining an alternative unfreezing sequence of each application to be unfrozen according to the comprehensive evaluation value, and then determining the first application to be unfrozen according to the alternative unfreezing sequence, the expected processor resource occupancy rate of each application to be unfrozen, the fourth preset ratio and the current total processor resource occupancy rate.
Optionally, after the first application to be thawed is thawed, a method for implementing thawing or closing all remaining applications to be thawed is selected according to a change in the total occupancy rate of processor resources, and specifically includes:
on one hand, after the first application to be thawed is thawed, if the total occupancy rate of the processor resources is monitored to be in a second preset monitoring period and to rise and exceed a fifth preset rate to reach a preset time length, closing all the remaining applications to be thawed. On the other hand, after the first application to be thawed is thawed, if it is monitored that the total occupancy rate of the processor resources is reduced to a sixth preset ratio in a preset monitoring period, based on the monitored current total occupancy rate of the processor resources and the remaining applications to be thawed, the step of determining at least one first application to be thawed from the applications to be thawed to thaw at least one first application to be thawed according to the total occupancy rate of the processor resources, the comprehensive evaluation value of each application to be thawed and the expected occupancy rate of the processor resources is executed until all the applications to be thawed are thawed, or when the total occupancy rate of the processor resources is monitored to be increased and exceeds the fifth preset ratio to reach a preset time length, all the remaining applications to be thawed are closed.
Optionally, the implementation method for determining at least one first application to be thawed from each application to be thawed for thawing according to the total occupancy rate of processor resources, the comprehensive evaluation value of each application to be thawed, and the expected occupancy rate of processor resources specifically includes:
and determining whether at least one first application to be thawed exists in each application to be thawed according to the total occupancy rate of the processor resources, the comprehensive evaluation value of each application to be thawed and the expected occupancy rate of the processor resources. On the one hand, if at least one first application to be thawed exists, the first application to be thawed is thawed. On the other hand, if the first application to be unfrozen does not exist, the change of the total occupancy rate of the processor resources is monitored in real time, and when the total occupancy rate of the processor resources is reduced to a target rate, the step of determining whether at least one first application to be unfrozen exists in each application to be unfrozen is executed according to the total occupancy rate of the processor resources, the comprehensive evaluation value of each application to be unfrozen and the expected occupancy rate of the processor resources based on the monitored total occupancy rate of the processor resources.
For example, when a unfreezing task is triggered, if only 1 application to be unfrozen exists, the application to be unfrozen is unfrozen regardless of the total occupancy rate of the CPU. If 4 applications to be unfrozen are A, B, C, D, the total occupancy rate of the current CPU is 70%; the expected CPU occupancy of the application A, B, C, D is obtained separately: 5% of A, 4% of B, 0.5% of C and 7% of D; the comprehensive evaluation values of the applications A, B, C, D are acquired: a is 10, B is 15, C is 17 and D is 20. And then, determining whether at least one first application to be unfrozen exists according to the acquired total CPU occupancy rate, the estimated CPU occupancy rate of the application A, B, C, D and the comprehensive evaluation value of the application A, B, C, D. And after the first application to be unfrozen is unfrozen, the total occupancy rate of the CPU is not more than 80% of the fourth preset rate.
It can be understood that, according to the comprehensive evaluation value, the alternative thawing orders can be determined as follows: application D, application C, application B and application A. The fourth preset ratio is 80%, the current total CPU occupancy is 70%, and the predicted CPU occupancy of the application A, B, C, D is: 5% of A, 4% of B, 0.5% of C and 7% of D. After the first application to be thawed is thawed, the total CPU occupancy rate is not more than 80%, so that the sum of the estimated CPU occupancy rates of the first application to be thawed is not more than 10%, namely 80% -70%. From this it can be determined that the first applications to be thawed are applications D and C. Assuming again that the expected CPU occupancy of application D is 15%, it can be determined that there are no first applications to be thawed.
On one hand, if the first application to be thawed is determined to be the applications D and C, the applications D and C are thawed first, then the change of the total occupancy rate of the CPU at the moment is monitored in real time, if the total occupancy rate of the CPU is monitored to rise within 5 minutes and exceeds the fifth preset rate by 95% to reach the preset duration, it is indicated that no redundant resources are available for use in the short term of the CPU, and then the remaining applications A and B to be thawed which are not needed by the user are closed, so that other system resources (such as memory resources) occupied by the remaining applications A and B are released, and the processing capacity of the system is improved. Otherwise, if the total occupancy rate of the CPU is reduced to a sixth preset rate of 78% within 5 minutes, it indicates that the CPU resources are relatively abundant, and a new first application to be unfrozen is determined from the applications A and B by referring to the manner of determining the applications D and C, and then the applications are unfrozen.
On the other hand, if the first application to be thawed is determined not to be available, the change of the total occupancy rate of the CPU is monitored in real time, and when the total occupancy rate of the CPU is monitored to be reduced to a target rate, the first application to be thawed is determined again according to the monitored total occupancy rate of the CPU.
In this way, the applications to be thawed are thawed in batches according to the real-time change of the total occupancy rate of the CPU and the height of the comprehensive score value of the applications to be thawed, so that the method can adapt to the change of the total occupancy rate of the CPU and select the most appropriate thawing objects and thawing quantity on the one hand, and can meet the main requirements of users to the maximum extent on the other hand.
In the embodiment, when the unfreezing task is triggered, the unfreezing strategy is dynamically adjusted according to the total occupancy rate of processor resources, the number of applications to be unfrozen and the comprehensive evaluation value of the applications to be unfrozen, and part or all of the applications to be unfrozen are selected to be unfrozen, so that the flexibility of unfreezing operation is improved, the unfreezing operation can be more consistent with the actual situation of processor resource occupation, the situation that a system is subjected to huge pressure due to excessive unfreezing of a plurality of applications at one time can be avoided, and the situations that the applications are blocked and the system has no response can be avoided.
Please refer to fig. 4, which is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device can be used for realizing the processing method for thawing the application provided by the embodiment shown in the figure 1. As shown in fig. 4, the electronic device includes: an acquisition module 401, an evaluation module 402 and a thawing module 403.
An obtaining module 401, configured to obtain a category of an application to be defrosted, a defreezing priority, and a predicted processor resource occupancy rate when a defreezing task is triggered;
an evaluation module 402, configured to perform weighted average processing on the cardinal numbers and the weighted values corresponding to the categories, the thawing priorities, and the expected processor resource occupancy rates, to obtain a comprehensive evaluation value of the application to be thawed;
and a unfreezing module 403, configured to select to unfreeze part or all of the application to be unfrozen according to the comprehensive evaluation value.
It should be noted that, in the embodiment of the electronic device illustrated in fig. 4, the division of the functional modules is only an example, and in practical applications, the above functions may be distributed by different functional modules according to needs, for example, configuration requirements of corresponding hardware or convenience of implementation of software, that is, the internal structure of the electronic device is divided into different functional modules to complete all or part of the functions described above. In practical applications, the corresponding functional modules in this embodiment may be implemented by corresponding hardware, or may be implemented by corresponding hardware executing corresponding software. The above description principles can be applied to various embodiments provided in the present specification, and are not described in detail below.
For a specific process of each function module in the electronic device provided in this embodiment to implement each function, please refer to the specific content described in the embodiment shown in fig. 1, which is not described herein again.
The electronic device that this embodiment provided, through when triggering the task of unfreezing, according to the classification of treating the application of unfreezing, the priority of unfreezing and prediction treater resource occupancy, treat the application of unfreezing and carry out comprehensive evaluation, and according to the evaluation result dynamic adjustment strategy of unfreezing, select to wait to unfreeze partially or totally and use and unfreeze, improve and know the flexibility of freezing the operation, can make the actual conditions that the operation of unfreezing more accords with treater resource and occupy, thereby can avoid appearing because of once only excessively unfreezing a plurality of applications and cause the condition of huge pressure for the system, consequently can avoid appearing using the card pause, the condition of system no response.
Please refer to fig. 5, which is a schematic structural diagram of an electronic device according to another embodiment of the present application. The electronic device can be used for realizing the processing method for application unfreezing provided by the embodiment shown in fig. 1 to 3. As shown in fig. 5, unlike the embodiment shown in fig. 4, in the present embodiment:
further, the obtaining module 401 is further configured to obtain a total occupancy rate of processor resources and a number of applications to be thawed when the thawing task is triggered;
the unfreezing module 403 is further configured to select to unfreeze part or all of the applications to be unfrozen according to the acquired total occupancy rate of the processor resources, the number of the applications to be unfrozen, and the comprehensive evaluation value of the applications to be unfrozen.
Further, the thawing module 403 includes:
a suspending module 4031, configured to suspend performing a defrosting operation when the total occupancy rate of the processor resources is greater than a first preset ratio;
the monitoring module 4032 is used for monitoring the change of the total occupancy rate of the processor resources in real time;
a first processing module 4033, configured to, when it is monitored that the total occupancy rate of the processor resources is less than a second preset ratio, select to unfreeze part or all of the applications to be unfrozen according to the monitored total occupancy rate of the processor resources, the number of the applications to be unfrozen, and the comprehensive evaluation value of the applications to be unfrozen.
Further, the first processing module 4033 is specifically configured to determine whether the number of the applications to be thawed is less than a preset number when it is monitored that the total occupancy rate of the processor resources is less than the second preset ratio; if the quantity is less than the preset quantity, unfreezing all the applications to be unfrozen; if the number of the applications to be unfrozen is not less than the preset number, unfreezing the applications to be unfrozen one by one according to the sequence of the comprehensive evaluation values from high to low;
after one application to be unfrozen is unfrozen, determining whether the total occupancy rate of the processor resources exceeds a third preset ratio in a first preset monitoring period; if the total occupancy rate of the processor resources does not exceed the third preset ratio, unfreezing the next application to be unfrozen, and executing the step of determining whether the total occupancy rate of the processor resources exceeds the third preset ratio during the first preset monitoring period until all the applications to be unfrozen are unfrozen; and if the total occupancy rate of the processor resources exceeds the third preset ratio, pausing the execution of the unfreezing operation, unfreezing the next application to be unfrozen when the total occupancy rate of the processor resources is monitored to be smaller than the third preset ratio, and executing the step of determining whether the total occupancy rate of the processor resources exceeds the third preset ratio during the first preset monitoring period until all the applications to be unfrozen are unfrozen.
Further, the thawing module 403 further includes:
a second processing module 4034, configured to unfreeze the application to be unfrozen when the number of the applications to be unfrozen is one;
a determining module 4035, configured to determine, when the number of the applications to be thawed is multiple, at least one first application to be thawed from each of the applications to be thawed according to the total occupancy rate of the processor resources, the comprehensive evaluation value of each application to be thawed, and the expected occupancy rate of the processor resources;
a third processing module 4036, configured to unfreeze at least one first application to be unfrozen determined by the determining module 4035, where after the first application to be unfrozen is unfrozen, the total occupancy rate of processor resources is not greater than a fourth preset ratio;
the third processing module 4036 is further configured to, after the first application to be thawed is thawed, select to thaw or close all remaining applications to be thawed according to a change in the total occupancy rate of the processor resource.
Further, the third processing module 4036 is specifically configured to, after the first application to be thawed is thawed, if it is monitored that the total occupancy rate of the processor resources rises and exceeds a fifth preset rate for a preset duration in a second preset monitoring period, close all remaining applications to be thawed;
the third processing module 4036 is further specifically configured to, if it is monitored that the total occupancy rate of the processor resource falls to a sixth preset rate in the second preset monitoring period, execute the step of determining at least one first application to be thawed from each application to be thawed according to the monitored total occupancy rate of the processor resource, the comprehensive evaluation value of each application to be thawed, and a predicted occupancy rate of the processor resource, based on the monitored current total occupancy rate of the processor resource and the remaining applications to be thawed, until all the applications to be thawed are thawed, or close all the remaining applications to be thawed when it is monitored that the total occupancy rate of the processor resource rises and exceeds the fifth preset rate to reach the preset time length.
Further, the third processing module 4036 is further specifically configured to determine whether at least one of the first applications to be thawed exists in each application to be thawed according to the total processor resource occupancy rate, the comprehensive evaluation value of each application to be thawed, and the expected processor resource occupancy rate;
the third processing module 4036 is further specifically configured to, if there is at least one first application to be thawed, thaw the first application to be thawed;
the third processing module 4036 is further specifically configured to, if the first application to be thawed does not exist, monitor a change in the total occupancy rate of the processor resource in real time, and when it is monitored that the total occupancy rate of the processor resource decreases to a target rate, execute, based on the monitored total occupancy rate of the processor resource, the step of determining whether at least one of the first application to be thawed exists in each application to be thawed according to the total occupancy rate of the processor resource, the comprehensive evaluation value of each application to be thawed, and the expected occupancy rate of the processor resource.
For a specific process of each function module in the electronic device provided in this embodiment to implement each function, please refer to the specific contents described in the embodiments shown in fig. 1 to fig. 3, which is not described herein again.
The electronic device that this embodiment provided, through when triggering the task of unfreezing, according to the total occupancy of treater resource, wait to unfreeze the quantity of using and wait to unfreeze the comprehensive evaluation value of using, the dynamic adjustment strategy of unfreezing, select to wait to unfreeze partially or totally and use and unfreeze, improve and know the flexibility of operation of freezing, can make the operation of unfreezing more accord with the actual conditions that treater resource occupy, thereby can avoid appearing because of once only excessively unfreezing a plurality of applications and cause the condition of huge pressure for the system, consequently can avoid appearing using the jam, the condition that the system does not have a response.
Referring to fig. 6, fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
The electronic apparatus described in this embodiment includes:
a memory 801, a processor 802 and a computer program stored in the memory 801 and executable on the processor 802, wherein the processor 802 implements the processing method for thawing the application described in the embodiments of fig. 1 to 3 when executing the computer program.
Further, the electronic device further includes:
at least one input device 803 and at least one output device 804.
The memory 801, the processor 802, the input device 803, and the output device 804 are connected by a bus 805.
The input device 803 may be a camera, a touch panel, a physical button, or the like. The output device 804 may specifically be a display screen.
The Memory 801 may be a high-speed Random Access Memory (RAM) Memory or a non-volatile Memory (non-volatile Memory), such as a disk Memory. The memory 801 is used to store a set of executable program code, and the processor 802 is coupled to the memory 801.
Further, an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium may be an electronic device configured in the foregoing embodiments, and the computer-readable storage medium may be a storage unit configured in the main control chip and the data acquisition chip in the foregoing embodiments. The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the processing method of applying unfreezing described in the foregoing embodiment shown in fig. 1 to 3.
For example, the electronic device may be any of various types of computer system apparatuses that are mobile or portable and perform wireless communication. In particular, the electronic apparatus may be a mobile phone or a smart phone (e.g., iPhone-based, Android-based phone), a portable game device (e.g., Nintendo DS, playstatio portable, Gameboy Advance, iPhone), a laptop, a PDA, a portable internet appliance, a music player, and a data storage device, other handheld devices, and a head-mounted device (HMD) such as a watch, a headset, a pendant, a headset, etc., and other wearable devices (e.g., electronic glasses, electronic clothes, an electronic bracelet, an electronic necklace, an electronic tattoo, an electronic device, or a smart watch).
The electronic apparatus may also be any of a number of electronic devices including, but not limited to, cellular phones, smart phones, other wireless communication devices, personal digital assistants, audio players, other media players, music recorders, video recorders, cameras, other media recorders, radios, medical devices, vehicle transportation equipment, calculators, programmable remote controllers, pagers, laptop computers, desktop computers, printers, netbook computers, Personal Digital Assistants (PDAs), Portable Multimedia Players (PMPs), moving picture experts group (MPEG-1 or MPEG-2) audio layer 3(MP3) players, portable medical devices, and digital cameras and combinations thereof.
In some cases, the electronic device may perform a variety of functions (e.g., playing music, displaying video, storing pictures, and receiving and sending telephone calls). If desired, the electronic apparatus may be a portable device such as a cellular telephone, media player, other handheld device, wristwatch device, pendant device, earpiece device, or other compact portable device.
As shown in fig. 7, the electronic device 10 may include control circuitry, which may include storage and processing circuitry 30. The storage and processing circuitry 30 may include memory, such as hard drive memory, non-volatile memory (e.g., flash memory or other electronically programmable erase limit memory used to form solid state drives, etc.), volatile memory (e.g., static or dynamic random access memory, etc.), and so forth, although the embodiments of the present application are not limited thereto. Processing circuitry in the storage and processing circuitry 30 may be used to control the operation of the electronic device 10. The processing circuitry may be implemented based on one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio codec chips, application specific integrated circuits, display driver integrated circuits, and the like.
The storage and processing circuitry 30 may be used to run software within the electronic device 10 such as, for example, an Internet browsing application, a Voice Over Internet Protocol (VOIP) telephone call application, an email application, a media playing application, operating system functions, etc. Such software may be used to perform control operations such as, for example, camera-based image capture, ambient light measurement based on an ambient light sensor, proximity sensor measurement based on a proximity sensor, information display functionality based on status indicators such as status indicator lights of light emitting diodes, touch event detection based on a touch sensor, functionality associated with displaying information on multiple (e.g., layered) displays, operations associated with performing wireless communication functions, operations associated with collecting and generating audio signals, control operations associated with collecting and processing button press event data, and other functions in the electronic device 10, and the like, without limitation of the embodiments of the present application.
The electronic device 10 may also include input-output circuitry 42. The input-output circuitry 42 may be used to enable the electronic device 10 to enable input and output of data, i.e., to allow the electronic device 10 to receive data from external devices and also to allow the electronic device 10 to output data from the electronic device 10 to external devices. The input-output circuitry 42 may further include the sensor 32. The sensors 32 may include ambient light sensors, optical and capacitive based proximity sensors, touch sensors (e.g., optical based touch sensors and/or capacitive touch sensors, where the touch sensors may be part of a touch display screen or may be used independently as a touch sensor structure), acceleration sensors, and other sensors, among others.
Input-output circuitry 42 may also include one or more displays, such as display 14. The display 14 may include one or a combination of liquid crystal displays, organic light emitting diode displays, electronic ink displays, plasma displays, displays using other display technologies. The display 14 may include an array of touch sensors (i.e., the display 14 may be a touch display screen). The touch sensor may be a capacitive touch sensor formed by a transparent touch sensor electrode (e.g., an Indium Tin Oxide (ITO) electrode) array, or may be a touch sensor formed using other touch technologies, such as acoustic wave touch, pressure sensitive touch, resistive touch, optical touch, and the like, and the embodiments of the present application are not limited thereto.
The electronic device 10 may also include an audio component 36. The audio component 36 may be used to provide audio input and output functionality for the electronic device 10. Audio components 36 in electronic device 10 may include speakers, microphones, buzzers, tone generators, and other components for generating and detecting sound.
The communication circuitry 38 may be used to provide the electronic device 10 with the ability to communicate with external devices. The communication circuit 38 may include analog and digital input-output interface circuits, and wireless communication circuits based on radio frequency signals and/or optical signals. The wireless communication circuitry in communication circuitry 38 may include radio-frequency transceiver circuitry, power amplifier circuitry, low noise amplifiers, switches, filters, and antennas. For example, the wireless Communication circuitry in Communication circuitry 38 may include circuitry to support Near Field Communication (NFC) by transmitting and receiving Near Field coupled electromagnetic signals. For example, the communication circuitry 38 may include a near field communication antenna and a near field communication transceiver. The communications circuitry 38 may also include a cellular telephone transceiver and antenna, a wireless local area network transceiver circuit and antenna, and the like.
The electronic device 10 may further include a battery, power management circuitry, and other input-output units 40. The input-output unit 40 may include buttons, joysticks, click wheels, scroll wheels, touch pads, keypads, keyboards, cameras, light emitting diodes and other status indicators, etc.
A user may enter commands through input-output circuitry 42 to control the operation of electronic device 10, and may use output data of input-output circuitry 42 to enable receipt of status information and other outputs from electronic device 10.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a readable storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned readable storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In view of the above description of the processing method for thawing application, the electronic device and the computer-readable storage medium provided by the present application, those skilled in the art will recognize that the scope of the present application can be varied from the detailed description to the specific application.

Claims (8)

1. A method of processing using thawing, the method comprising:
when a unfreezing task is triggered, acquiring the category, the unfreezing priority and the expected processor resource occupancy rate of an application to be unfrozen;
carrying out weighted average processing on the obtained base numbers and weight values corresponding to the classes of the applications to be unfrozen, the unfreezing priorities and the expected processor resource occupancy rates respectively to obtain a comprehensive evaluation value of the applications to be unfrozen;
acquiring the total occupancy rate of processor resources and the number of applications to be unfrozen;
according to the acquired total occupancy rate of processor resources, the number of applications to be unfrozen and the comprehensive evaluation value of the applications to be unfrozen, selecting to unfreeze part or all of the applications to be unfrozen;
the method for unfreezing part or all of the applications to be unfrozen according to the acquired total occupancy rate of the processor resources, the number of the applications to be unfrozen and the comprehensive evaluation value of the applications to be unfrozen comprises the following steps:
when the total occupancy rate of the processor resources is greater than a first preset rate, pausing the execution of the unfreezing operation;
monitoring the change of the total occupancy rate of the processor resources in real time;
and when the total occupancy rate of the processor resources is monitored to be smaller than a second preset ratio, selecting to unfreeze part or all of the applications to be unfrozen according to the monitored total occupancy rate of the processor resources, the number of the applications to be unfrozen and the comprehensive evaluation value of the applications to be unfrozen.
2. The processing method according to claim 1, wherein when it is monitored that the total processor resource occupancy is less than a second preset ratio, selecting to unfreeze part or all of the applications to be unfrozen according to the monitored total processor resource occupancy, the number of the applications to be unfrozen, and the comprehensive evaluation value of the applications to be unfrozen, specifically comprising:
when the total occupancy rate of the processor resources is monitored to be smaller than the second preset rate, determining whether the number of the applications to be unfrozen is smaller than a preset number;
if the quantity is smaller than the preset quantity, unfreezing all the applications to be unfrozen;
if the comprehensive evaluation value is not less than the preset quantity, unfreezing the applications to be unfrozen one by one according to the sequence of the comprehensive evaluation value from high to low;
after one application to be unfrozen is unfrozen, determining whether the total occupancy rate of the processor resources exceeds a third preset ratio in a first preset monitoring period;
if the total occupancy rate of the processor resources does not exceed the third preset ratio, unfreezing the next application to be unfrozen, and executing the step of determining whether the total occupancy rate of the processor resources exceeds the third preset ratio during the first preset monitoring period until all the applications to be unfrozen are unfrozen;
and if the total occupancy rate of the processor resources exceeds the third preset rate, pausing the execution of unfreezing operation, unfreezing the next application to be unfrozen when the total occupancy rate of the processor resources is monitored to be smaller than the third preset rate, and executing the step of determining whether the total occupancy rate of the processor resources exceeds the third preset rate during the first preset monitoring period until all the applications to be unfrozen are unfrozen.
3. The processing method according to claim 1, wherein said selecting to unfreeze part or all of the applications to be unfrozen according to the obtained total occupancy rate of processor resources, the number of applications to be unfrozen, and the comprehensive evaluation value of the applications to be unfrozen further comprises:
when the number of the applications to be unfrozen is one, unfreezing the applications to be unfrozen;
when the number of the applications to be unfrozen is multiple, determining at least one first application to be unfrozen from the applications to be unfrozen for unfreezing according to the total processor resource occupancy rate, the comprehensive evaluation value of each application to be unfrozen and the estimated processor resource occupancy rate, wherein after the first application to be unfrozen is unfrozen, the total processor resource occupancy rate is not greater than a fourth preset rate;
and after the first batch of applications to be unfrozen are unfrozen, all the remaining applications to be unfrozen are selected to be unfrozen or closed according to the change of the total occupancy rate of the processor resources.
4. The processing method according to claim 3, wherein after the first application to be thawed is thawed, according to a change in the total occupancy rate of the processor resources, all remaining applications to be thawed are selected to be thawed or closed, specifically including:
after the first application to be unfrozen is unfrozen, if the total occupancy rate of the processor resources is monitored to rise and exceed a fifth preset rate in a second preset monitoring period to reach a preset time length, closing all the remaining applications to be unfrozen;
if it is monitored that the total occupancy rate of the processor resources is reduced to a sixth preset rate in the second preset monitoring period, based on the monitored current total occupancy rate of the processor resources and the remaining applications to be thawed, the step of determining at least one first application to be thawed from each application to be thawed according to the total occupancy rate of the processor resources, the comprehensive evaluation value of each application to be thawed and the expected occupancy rate of the processor resources is executed until all the applications to be thawed are thawed, or when it is monitored that the total occupancy rate of the processor resources is increased and exceeds the fifth preset rate to reach the preset time length, all the remaining applications to be thawed are closed.
5. The process of claim 4, wherein said step of determining at least one first application to be thawed from each of said applications to be thawed according to said total processor resource occupancy, said composite rating value for each of said applications to be thawed, and said estimated processor resource occupancy comprises:
determining whether at least one first batch of applications to be unfrozen exists in each application to be unfrozen according to the total processor resource occupancy rate, the comprehensive evaluation value of each application to be unfrozen and the expected processor resource occupancy rate;
if at least one first application to be unfrozen exists, unfreezing the first application to be unfrozen;
and if the first to-be-unfrozen application does not exist, monitoring the change of the total occupancy rate of the processor resources in real time, and when the total occupancy rate of the processor resources is monitored to be reduced to a target ratio, executing the step of determining whether at least one first to-be-unfrozen application exists in each to-be-unfrozen application according to the total occupancy rate of the processor resources, the comprehensive evaluation value of each to-be-unfrozen application and the estimated occupancy rate of the processor resources based on the monitored total occupancy rate of the processor resources.
6. An electronic device, comprising:
the first acquisition module is used for acquiring the category, the unfreezing priority and the expected processor resource occupancy rate of the application to be unfrozen when the unfreezing task is triggered;
the evaluation module is used for carrying out weighted average processing on the obtained base numbers and weight values corresponding to the categories and the unfreezing priorities of the applications to be unfrozen and the expected resource occupancy rates of the processors to obtain a comprehensive evaluation value of the applications to be unfrozen;
the second acquisition module is used for acquiring the total occupancy rate of processor resources and the number of applications to be unfrozen;
the unfreezing module is used for selecting to unfreeze part or all of the applications to be unfrozen according to the acquired total occupancy rate of the processor resources, the number of the applications to be unfrozen and the comprehensive evaluation value of the applications to be unfrozen;
the method for unfreezing part or all of the applications to be unfrozen according to the acquired total occupancy rate of the processor resources, the number of the applications to be unfrozen and the comprehensive evaluation value of the applications to be unfrozen comprises the following steps:
when the total occupancy rate of the processor resources is greater than a first preset rate, pausing the execution of the unfreezing operation;
monitoring the change of the total occupancy rate of the processor resources in real time;
and when the total occupancy rate of the processor resources is monitored to be smaller than a second preset ratio, selecting to unfreeze part or all of the applications to be unfrozen according to the monitored total occupancy rate of the processor resources, the number of the applications to be unfrozen and the comprehensive evaluation value of the applications to be unfrozen.
7. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the processing method of application unfreezing according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a processing method of application thawing according to any one of claims 1 to 5.
CN201910008617.0A 2019-01-04 2019-01-04 Application unfreezing processing method, electronic device and computer readable storage medium Active CN109726003B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910008617.0A CN109726003B (en) 2019-01-04 2019-01-04 Application unfreezing processing method, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910008617.0A CN109726003B (en) 2019-01-04 2019-01-04 Application unfreezing processing method, electronic device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109726003A CN109726003A (en) 2019-05-07
CN109726003B true CN109726003B (en) 2020-09-15

Family

ID=66298791

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910008617.0A Active CN109726003B (en) 2019-01-04 2019-01-04 Application unfreezing processing method, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109726003B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112540666A (en) * 2019-09-20 2021-03-23 中兴通讯股份有限公司 Application unfreezing method, terminal device, computer device and computer readable medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853610A (en) * 2012-12-07 2014-06-11 腾讯科技(深圳)有限公司 Resource optimization method and resource optimization device
CN104142862A (en) * 2013-12-16 2014-11-12 腾讯科技(深圳)有限公司 Overload protection method and device for server
CN107368400A (en) * 2017-08-01 2017-11-21 广东欧珀移动通信有限公司 CPU monitoring methods, device, computer-readable recording medium and mobile terminal
CN107665147A (en) * 2017-09-26 2018-02-06 厦门美图移动科技有限公司 The cleaned system method and mobile device of a kind of mobile device
CN107908271A (en) * 2017-10-19 2018-04-13 上海闻泰信息技术有限公司 Prophylactic applications influence the method, apparatus and intelligent terminal of intelligent terminal power consumption
CN108536529A (en) * 2018-03-30 2018-09-14 努比亚技术有限公司 A kind of multitask regulation and control method, equipment and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853610A (en) * 2012-12-07 2014-06-11 腾讯科技(深圳)有限公司 Resource optimization method and resource optimization device
CN104142862A (en) * 2013-12-16 2014-11-12 腾讯科技(深圳)有限公司 Overload protection method and device for server
CN107368400A (en) * 2017-08-01 2017-11-21 广东欧珀移动通信有限公司 CPU monitoring methods, device, computer-readable recording medium and mobile terminal
CN107665147A (en) * 2017-09-26 2018-02-06 厦门美图移动科技有限公司 The cleaned system method and mobile device of a kind of mobile device
CN107908271A (en) * 2017-10-19 2018-04-13 上海闻泰信息技术有限公司 Prophylactic applications influence the method, apparatus and intelligent terminal of intelligent terminal power consumption
CN108536529A (en) * 2018-03-30 2018-09-14 努比亚技术有限公司 A kind of multitask regulation and control method, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN109726003A (en) 2019-05-07

Similar Documents

Publication Publication Date Title
CN108681475B (en) Application program preloading method and device, storage medium and mobile terminal
EP3567477B1 (en) Method for preloading application, storage medium, and terminal
CN109906437B (en) Processor core stall and frequency selection based on thread importance
WO2015035870A1 (en) Multiple cpu scheduling method and device
CN108983211B (en) Proximity sensor, method of controlling the same, electronic device, and computer-readable storage medium
CN106776036A (en) A kind of resource allocation methods and device
CN110083450A (en) Method for recovering internal storage, device, electronic equipment and storage medium
CN109684011B (en) Interface display control method, electronic device and computer readable storage medium
CN110837343B (en) Snapshot processing method and device and terminal
CN110187752A (en) Application operation method and device and terminal equipment
CN110429696B (en) Battery charging method, electronic device and computer readable storage medium
CN110058980B (en) Terminal start time early warning method, electronic device and computer readable storage medium
CN110602772A (en) WiFi module control method, control device, electronic device and storage medium
CN109726003B (en) Application unfreezing processing method, electronic device and computer readable storage medium
CN111767136B (en) Process management method, terminal and device with storage function
WO2019072179A1 (en) Application running control method and apparatus
US20230281021A1 (en) Electronic device and application execution method for electronic device
CN109753352A (en) Using processing method, electronic device and the computer readable storage medium freezed
CN109410846B (en) Screen backlight setting method, electronic device and computer readable storage medium
CN109739577A (en) Using exempting from freezing method, electronic device and computer readable storage medium
CN117130454A (en) Power consumption adjustment method and electronic equipment
CN110505344B (en) Battery power supply method, electronic device and computer readable storage medium
CN109902484B (en) Processing method of associated application and terminal
CN110611347A (en) Charging control method and related product
CN109740538B (en) Fingerprint acquisition method, electronic device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant