Application thawing method, terminal device, computer device and computer readable medium
By detecting and judging the events that trigger application thawing, and combining the number of thawing times and thresholds to determine whether the application is thawed, the power consumption problem caused by frequent wake-up of background applications is solved, and more effective energy saving and consumption reduction and battery life improvement is achieved.
Patent Information
- Application Number
- CN201910891608.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-20
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2039-09-20
AI Technical Summary
In the prior art, frequent wake-up of background applications leads to weakening the effect of the freezing scheme, and the static grouping strategy cannot effectively deal with the power consumption behavior of dynamically changing background applications.
By detecting the event that triggers the application to thaw, it is determined whether the preset condition is met. If it is met, it is determined whether the application is thawed based on the number of times and thresholds of the application to thaw within the preset time before the current time, and then the thawing time is recorded to adjust the strategy.
Effectively prevent power consumption abnormalities caused by frequent thawing of frozen applications, ensure the energy-saving and consumption reduction effect of the freezing solution, improve the battery life of terminal devices, and prevent power consumption behavior based on dynamic changes in background applications.
Smart Images

Figure CN112540666B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer network technology, and in particular to an application unfreezing method, a terminal device, a computer device, and a computer-readable medium. Background Art
[0002] Freezing technology is mainly a technology based on smart terminals to limit applications from occupying system resources. It mainly includes prohibiting the occupation of CPU resources, sensors, GPS (Global Positioning System), memory and other peripheral resources, which can effectively save power consumption and extend battery life.
[0003] The activities of background applications installed on the terminal are a major cause of power consumption. Freezing technology can effectively control background applications. When the freezing conditions are met, the background applications are frozen. When an event occurs that triggers the unfreezing of the application, it is determined whether the application can be unfrozen based on the application grouping strategy.
[0004] However, when an application is abnormal, for example, the application is frequently awakened, the grouping strategy cannot distinguish and restrict the application in time, resulting in the actual effect of the application freezing solution being weakened. Moreover, the grouping strategy is usually static, while the activity level and power consumption behavior of background applications are dynamic. Sometimes the preset grouping strategy cannot effectively prevent power consumption behavior. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, the present disclosure provides an application thawing method, a terminal device, a computer device and a computer-readable medium.
[0006] In a first aspect, an embodiment of the present disclosure provides an application thawing method, the method comprising:
[0007] When an event that triggers application unfreezing occurs is detected, determining whether the event meets a preset condition;
[0008] If the preset condition is met, it is determined whether to unfreeze the application at least based on the number of times the application is unfrozen within a preset time period before the current moment and a preset first threshold.
[0009] Preferably, determining whether to unfreeze the application at least based on the number of times the application is unfrozen within a preset time period before the current moment and a preset first threshold value includes:
[0010] If the number of times the application is unfrozen within a preset time period before the current moment is greater than or equal to a preset first threshold, determining an average power consumption of unfreezing the application once, and determining whether to unfreeze the application based on the average power consumption and a preset second threshold;
[0011] If the number of times the application is unfrozen within a preset time period before the current moment is less than a preset first threshold, the application is unfrozen.
[0012] Preferably, the determining whether to unfreeze the application according to the average power consumption and a preset second threshold value includes:
[0013] If the average power consumption is less than or equal to a preset second threshold, the application is unfrozen.
[0014] Preferably, determining the average power consumption of unfreezing the application once includes:
[0015] Determine an active period of the application before the current moment, the active period being a time period when the mobile terminal is in a non-dormant and non-standby state, and the total duration of the active period is equal to the preset duration;
[0016] determining a sum of power consumption of unfreezing the application during the active period;
[0017] The ratio of the sum of power consumption of the application when it is thawed during the active period to the number of thaws is calculated to obtain the average power consumption of the application when it is thawed once.
[0018] Preferably, the satisfying of the preset condition includes:
[0019] A policy corresponding to the type of application is satisfied.
[0020] Furthermore, after unfreezing the application, the application unfreezing method further includes: recording the time of the current unfreezing of the application.
[0021] On the other hand, the embodiment of the present disclosure further provides a terminal device, including: a detection module, a judgment module and a thawing module, wherein the detection module is used to detect an event that triggers the thawing of an application;
[0022] The judging module is used to judge whether the event that triggers application thawing satisfies a preset condition when the detecting module detects the occurrence of the event;
[0023] The thawing module is used to determine whether to thaw the application based on at least the number of times the application is thawed within a preset time period before the current moment and a preset first threshold when the judgment module determines that the event triggering the thawing of the application meets the preset condition.
[0024] Preferably, the thawing module is specifically used to determine the average power consumption of thawing the application once when the number of times the application is thawed within a preset time period before the current moment is greater than or equal to a preset first threshold, and determine whether to thaw the application based on the average power consumption and a preset second threshold; and thaw the application when the number of times the application is thawed within the preset time period before the current moment is less than the preset first threshold.
[0025] On the other hand, an embodiment of the present disclosure further provides a computer device, comprising: one or more processors and a storage device; wherein one or more programs are stored on the storage device, and when the one or more programs are executed by the one or more processors, the one or more processors implement the application unfreezing method provided in the aforementioned embodiments.
[0026] The embodiments of the present disclosure further provide a computer-readable medium on which a computer program is stored, wherein when the computer program is executed, the application thawing method provided in the aforementioned embodiments is implemented.
[0027] In the embodiment of the present disclosure, when an event that triggers the thawing of an application is detected, it is determined whether the event that triggers the thawing of the application meets the preset conditions. If the preset conditions are met, it is determined whether to thaw the application based on at least the number of times the application is thawed within a preset time period before the current moment and a preset first threshold value. The solution provided by the embodiment of the present disclosure can effectively prevent the frozen application from causing abnormal power consumption due to frequent thawing, ensure the energy-saving and consumption-reducing effect of the application freezing solution, and improve the battery life of the terminal device. Moreover, the solution provided by the embodiment of the present disclosure can effectively prevent power-consuming behavior from occurring according to the constantly changing activity level of the background application. Without affecting user use, the above solution can reduce the possibility of background application abnormalities and reduce the power consumption loss of the terminal device. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A flowchart of unfreezing an application provided in an embodiment of the present disclosure;
[0029] Figure 2 One of the flowcharts for determining whether to unfreeze an application provided in an embodiment of the present disclosure;
[0030] Figure 3 The second flowchart of determining whether to unfreeze an application provided in an embodiment of the present disclosure;
[0031] Figure 4 A flow chart for determining the average power consumption of an application that is unfrozen once provided by an embodiment of the present disclosure;
[0032] Figure 5 A flowchart for determining whether a preset condition is met provided in an embodiment of the present disclosure;
[0033] Figure 6 A schematic diagram of the structure of a terminal device provided in an embodiment of the present invention;
[0034] Figure 7 A schematic diagram of the structure of a terminal device provided in another embodiment of the present disclosure. DETAILED DESCRIPTION
[0035] Example embodiments will be described more fully below with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete and to enable those skilled in the art to fully understand the scope of the present disclosure.
[0036] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0037] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded.
[0038] The embodiments described herein may be described with reference to plan views and / or cross-sectional views by means of idealized schematic diagrams of the present disclosure. Therefore, the example illustrations may be modified according to manufacturing techniques and / or tolerances. Therefore, the embodiments are not limited to the embodiments shown in the accompanying drawings, but include modifications of the configurations formed based on the manufacturing process. Therefore, the regions illustrated in the accompanying drawings have schematic properties, and the shapes of the regions shown in the figures illustrate the specific shapes of the regions of the elements, but are not intended to be limiting.
[0039] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.
[0040] Based on its API (Application Programming Interface), smart terminals provide users with a variety of feature-rich applications (Application, App). However, the diversity of applications also poses a challenge to the battery life of terminals. Freezing technology can effectively control the behavior of background applications. By formulating different strategies, it limits the use of system resources by background applications. After the application is frozen, the application no longer consumes system resources, but the application itself is still alive. During the period when the background application is frozen, it can be unfrozen. After the application is unfrozen, it can be restored to normal state and can be called normally. After completing the relevant business, the application continues to be frozen.
[0041] An embodiment of the present disclosure provides an application thawing method, which is applied to a terminal device, and the application installed on the terminal device is in a freeze function-enabled state. When the freeze function is enabled, once the freeze condition of an application installed on the terminal device is met, the terminal device can automatically freeze the application in the background. An application scenario of the present disclosure is that at least one application installed on the terminal device is in a frozen state, and when an event that triggers the thawing of the application occurs, the terminal device determines whether to thaw the application. The freezing mentioned in the embodiment of the present disclosure is also called Freezer, which refers to the development of the Linux Cgroup Freezer subsystem, which limits the use of system resources by the application process without exiting the application process, thereby achieving the purpose of optimizing resource scheduling and use. The unfreezing (Unfreezer) mentioned in the embodiment of the present disclosure corresponds to the freezing operation, which refers to lifting the restrictions on the use of system resources by the application process.
[0042] The following combination Figure 1 , the application thawing method of the embodiment of the present disclosure is described in detail. Figure 1 As shown, the method comprises the following steps:
[0043] Step 11: When an event that triggers application thawing is detected, determine whether the event meets a preset condition.
[0044] The event that triggers the unfreezing of an application may include receiving a message that can trigger the unfreezing of an application, such as receiving a message sent by a broadcast or receiving service data of an application. The event that triggers the unfreezing of an application may also include a user's operation on a terminal device, such as a user turning on a screen.
[0045] In this step, when the freezing function is turned on, the terminal device detects in real time whether an event that triggers the unfreezing of the application occurs. Once an event that triggers the unfreezing of the application occurs, the judgment of the preset condition is started. The judgment of the preset condition can include judgment of the event type and policy judgment. The specific implementation method of the terminal device judging whether the event that triggers the unfreezing of the application meets the preset condition will be described later in conjunction with Figure 5 Please explain in more detail.
[0046] Step 12: If the preset condition is met, determining whether to unfreeze the application is based at least on the number of times the application is unfrozen within a preset time period before the current moment and a preset first threshold.
[0047] If the terminal device determines that the event triggering the unfreezing of the application meets the preset conditions, it means that the requirements for unfreezing the application are preliminarily met. In this step, it can be further determined whether the application can be finally unfrozen by at least judging the number of times the application is unfrozen within a period of time.
[0048] The specific implementation method for the terminal device to determine whether to thaw the application at least according to the number of times the application has been thawed within a preset duration before the current moment and a first threshold will be described in detail later in combination with Figure 2 , 3 and will be elaborated in more detail later.
[0049] As can be seen from steps 11-12, when it is detected that an event triggering the thawing of the application occurs, it is determined whether the event triggering the thawing of the application meets the preset conditions. If the preset conditions are met, it is determined whether to thaw the application at least according to the number of times the application has been thawed within a preset duration before the current moment and a preset first threshold. Through the solution provided by the embodiments of the present disclosure, it is possible to effectively prevent the frozen application from causing abnormal power consumption due to frequent thawing, ensure the energy-saving and consumption-reducing effect of the application freezing solution, improve the battery life of the terminal device. Moreover, the solution provided by the embodiments of the present disclosure can effectively prevent power-consuming behaviors from occurring in response to the continuously changing activity levels of background applications. Without affecting the user experience, the above solution can reduce the possibility of abnormal background applications and reduce the power consumption loss of the terminal device.
[0050] In another embodiment of the present disclosure, as Figure 2 shown, the determining whether to thaw the application at least according to the number of times the application has been thawed within a preset duration before the current moment and a preset first threshold (i.e., step 12) specifically includes the following steps:
[0051] Step 21: Compare the number of times the application has been thawed within a preset duration before the current moment with the preset first threshold. If the number of times the application has been thawed within a preset duration before the current moment is greater than or equal to the first threshold, then execute step 22; otherwise, execute step 24.
[0052] In this step, the terminal device first determines the number of times c that the application has been thawed within a preset duration before the current moment, and then compares the number of times c that the application has been thawed with the first threshold C. If c≥C, it means that the application has been thawed too frequently, that is, the application has been frequently awakened within a relatively short period of time, which is not conducive to energy saving and consumption reduction of the terminal device. Therefore, it is further determined whether to thaw the application this time by judging the average power consumption for thawing the application once (i.e., execute step 22). If c<C, it means that the application has not been thawed frequently, that is, the application has not been frequently awakened within a relatively short period of time. Therefore, the application can be thawed this time (i.e., execute step 24).
[0053] Step 22: Determine the average power consumption for thawing the application once.
[0054] The specific calculation method of the average power consumption for thawing the application once will be described in detail later in combination with the appendix Figure 4 and will be elaborated in more detail later.
[0055] Step 23: Determine whether to unfreeze the application according to the average power consumption and a preset second threshold.
[0056] Specifically, Figure 3 As shown, the step of determining whether to unfreeze the application according to the average power consumption and the preset second threshold value (i.e., step 23) specifically includes steps 231 and 232. In step 231, it is determined whether the average power consumption is less than or equal to the second threshold value. If so, step 232 is executed, i.e., the application is unfrozen; otherwise, the application is not unfrozen.
[0057] In step 231, if the terminal device determines that the average power consumption of the application is If the average power consumption of the application is less than or equal to the second threshold value P, it means that although the application is frequently awakened in a relatively short period of time, the power consumption of the application each time it is awakened is not high, and even if the application is unfrozen, it will not consume too much power of the terminal device. Therefore, the application can be unfrozen this time (i.e., executing step 232). If it is greater than the second threshold value P, it means that the application is frequently awakened in a relatively short period of time, and the power consumption of the application each time it is awakened is relatively high. If the application is unfrozen again, the power consumption of the terminal device will be further increased. Therefore, the application is not allowed to be unfrozen this time, and this process ends.
[0058] Step 24, unfreeze the application.
[0059] In this step, the terminal device sends a thawing command to the kernel (real-time operating system) to thaw the process group corresponding to the application.
[0060] It can be seen from steps 21-24 and steps 231-232 that in the embodiment of the present disclosure, when the event that triggers the thawing of the application meets the preliminary thawing conditions, the number of times the application is thawed and the average power consumption of each thawing are further determined. Only when the number of times the application is thawed within the preset time is small, or when the number of times the application is thawed within the preset time is large but the average power consumption of each thawing is small, is the application allowed to be thawed again. Taking into full consideration the power consumption loss caused by frequent thawing of the application, the solution for thawing the application is more reasonable.
[0061] The following combination Figure 4 , the process of determining the average power consumption of an application after unfreezing is described in detail. Figure 4 As shown, the determination of the average power consumption of unfreezing an application (i.e., step 22) specifically includes the following steps:
[0062] Step 221, determining the active period of the application within a preset time period before the current moment.
[0063] Among them, the active period refers to the time period when the terminal device is in a non-sleeping and non-standby state. It should be noted that the active period may be continuous or discontinuous. If the active period is continuous, that is, the number of active periods of the application within the preset duration is 1. If the active period is discontinuous, that is, the number of active periods of the application within the preset duration is multiple.
[0064] Step 222: Determine the sum of power consumption of unfreezing the application during the active period.
[0065] In this step, if there are multiple active periods, the sum of the power consumption of each unfreezing of the application in each active period is calculated. If there is only one active period, the sum of the power consumption of each unfreezing of the application in the active period is directly calculated.
[0066] Specifically, the terminal device collects statistics on the resource usage of the application during the active period, such as CPU usage time, network usage rate, terminal peripheral hardware usage rate, etc., and calculates the power consumption (i.e., power consumption) of the thawed application during the active period based on the resource usage.
[0067] Step 223 , calculating the ratio of the sum of the power consumption of the application during the active period to the number of defrosting times, to obtain the average power consumption of the application when it is defrosted once.
[0068] The scheme of steps 221-223 is described in detail below with reference to a specific example. For example, the preset duration is 30 minutes, the current time is 6:20, and the terminal device is in a dormant state in the time period from 1:00 to 6:00 before the current time (6:20), and is in a non-dormant and non-standby state before 1:00 and after 6:00. In this case, an application has two active periods, one from 23:50 to 1:00, and the other from 6:00 to 6:20, and the total duration of the two active periods is 30 minutes (i.e., equal to the preset duration). During the active period from 23:50 to 1:00, an application is thawed twice, and the power consumption of the two thaws of the application is p1 and p2 respectively. During the active period from 6:00 to 6:20, the application is thawed three times, and the power consumption of the three thaws of the application is p3, p4, and p5 respectively. Then, the sum of the power consumption of unfreezing the application during the active period = p1+p2+p3+p4+p5, and the average power consumption of unfreezing the application once is
[0069] The following combination Figure 5 The steps for determining whether the event that triggers the application to be unfrozen meets the preset conditions are described in detail. Figure 5 As shown, the step of determining whether the event triggering the application thawing meets the preset condition (i.e., step 11) includes:
[0070] Step 111 , determining whether the event type of the event triggering the application unfreezing is a preset type, if not, executing step 112 ; if yes, executing step 113 .
[0071] During the initialization phase, an event type list is configured on the terminal device, and the event type list is used to record the event types that must be unfrozen. For example, the event types that must be unfrozen may include lighting up the screen, receiving messages from instant messaging software, and the like.
[0072] In this step, the event type of the event that triggers the application to be unfrozen is searched in the event type list. If it is matched, it means that the preset condition is not met, and the application is directly unfrozen without executing step 12. If it is not matched, it means that the event that currently triggers the application to be unfrozen is not an event that requires the application to be unfrozen, and then it is further determined whether the corresponding grouping strategy is met (i.e., executing step 112) to determine whether the preset condition is met.
[0073] Step 112, determine whether the policy corresponding to the type of the application is satisfied, if satisfied, execute step 12,; if not satisfied, end this process.
[0074] In this step, if the terminal device determines that the policy corresponding to the type of the application is satisfied, it means that the event that triggers the unfreezing of the application meets the preset condition, and then step 12 can be executed. If the terminal device determines that the policy corresponding to the type of the application is not satisfied, it means that the event that triggers the unfreezing of the application does not meet the preset condition, then the application cannot be unfrozen this time, and this process ends directly.
[0075] It should be noted that policies corresponding to various application types are pre-set on the terminal device. In this step, the corresponding policy is determined according to the application type, and it is determined whether the policy is satisfied.
[0076] Step 113, unfreeze the application.
[0077] It should be noted that, in another embodiment of the present disclosure, after unfreezing the application (ie, step 24, step 232, step 113), the application unfreezing method may further include the following steps: recording the time of the current unfreezing of the application, so as to subsequently count the number of unfreezing times.
[0078] The application thawing method provided by the disclosed example monitors the number of times a frozen application in a terminal device is thawed and the average power consumption of the thawing application. If it is found that the number of times an application is thawed is abnormal and causes an increase in power consumption, the restricted application is thawed, thereby reducing the possibility of background application abnormalities without affecting user use, reducing the power consumption loss of the terminal device, and achieving the purpose of improving the battery life of the terminal device.
[0079] After the terminal device is started, the freezing policy takes effect and some applications are frozen. When an event occurs that triggers a thawing of an application, first determine whether the preliminary thawing conditions are met based on the event type that triggers the event and the grouping policy corresponding to the application type of the application. Specifically, if the preliminary thawing conditions are met and the number of thawing times of the application within the preset time is greater than the first threshold, determine whether the average power consumption of the application thawing once within the time is greater than the second threshold. If it is greater than the second threshold, the application is prohibited from being thawed this time. If it is less than the second threshold, the application is allowed to be thawed this time.
[0080] Based on the same technical concept, the present disclosure also provides a terminal device, such as Figure 6 As shown, the terminal device includes: a detection module 61, a judgment module 62 and a thawing module 63. The detection module 61 is used to detect the occurrence of an event that triggers the thawing of the application.
[0081] The judging module 62 is used to judge whether the event that triggers the application to be unfrozen satisfies a preset condition when the detecting module 61 detects the occurrence of the event.
[0082] The unfreezing module 63 is used to determine whether to unfreeze the application based on at least the number of times the application is unfrozen within a preset time period before the current moment and a preset first threshold value when the judging module 62 judges that the event triggering the unfreezing of the application meets the preset condition.
[0083] Preferably, the thawing module 63 is specifically used to determine the average power consumption of thawing the application once when the number of times the application is thawed within the preset time length before the current moment is greater than or equal to the preset first threshold, and determine whether to thaw the application based on the average power consumption and the preset second threshold; when the number of times the application is thawed within the preset time length before the current moment is less than the preset first threshold, thawing the application.
[0084] Preferably, the thawing module 63 is specifically configured to thaw the application when the average power consumption is less than or equal to a preset second threshold.
[0085] Preferably, the thawing module 63 is specifically used to determine the active period of the application before the current moment, the active period being the time period when the mobile terminal is in a non-sleeping and non-standby state, and the total duration of the active period is equal to the preset duration; determine the sum of the power consumption of thawing the application during the active period; calculate the ratio of the sum of the power consumption of thawing the application during the active period to the number of thawing times, so as to obtain the average power consumption of thawing the application once.
[0086] Preferably, the judging module 62 is specifically used to judge whether the event type of the event is a preset type, and when it is not a preset type, to judge whether a preset policy corresponding to the type of the application is satisfied.
[0087] The unfreezing module 63 is specifically used to determine whether to unfreeze the application based on at least the number of times the application is unfrozen within a preset time period before the current moment and a preset first threshold when the judgment module 62 determines that the event type of the event is not a preset type and the event satisfies a preset policy corresponding to the event type of the event.
[0088] Furthermore, the unfreezing module 63 is further configured to unfreeze the application when the determining module 62 determines that the event type of the event is the preset type.
[0089] Another embodiment of the present disclosure further provides a terminal device, such as Figure 7 As shown, the terminal device further includes a recording module 64, and the recording module 64 is used to record the time when the application is unfrozen this time.
[0090] The embodiments of the present disclosure also provide a computer device, which includes: one or more processors and a storage device; wherein one or more programs are stored on the storage device, and when the one or more programs are executed by the one or more processors, the one or more processors implement the application thawing method provided in the aforementioned embodiments.
[0091] The embodiments of the present disclosure further provide a computer-readable medium on which a computer program is stored, wherein when the computer program is executed, the application thawing method provided in the aforementioned embodiments is implemented.
[0092] It will be appreciated by those skilled in the art that all or some of the steps in the method disclosed above, the functional modules / units in the device may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0093] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the invention as set forth in the appended claims.
Claims
1. A method for thawing an application, the method comprising: When an event that triggers application unfreezing occurs is detected, determining whether the event meets a preset condition; If the preset condition is met, determining whether to unfreeze the application at least based on the number of times the application is unfrozen within a preset time period before the current moment and a preset first threshold; The satisfying of the preset condition includes: the event type of the event is not a preset type, and satisfies a policy corresponding to the type of the application; The determining whether to unfreeze the application at least based on the number of times the application is unfrozen within a preset time period before the current moment and a preset first threshold value includes: If the number of times the application is unfrozen within a preset time period before the current moment is greater than or equal to a preset first threshold, then determine the average power consumption of unfreezing the application once; if the average power consumption is less than or equal to a preset second threshold, then unfreeze the application; or, If the number of times the application is unfrozen within a preset time period before the current moment is less than a preset first threshold, the application is unfrozen.
2. The method of claim 1, wherein: The determining the average power consumption of unfreezing the application once includes: Determine an active period of the application before the current moment, the active period being a time period when the mobile terminal is in a non-dormant and non-standby state, and the total duration of the active period is equal to the preset duration; determining a sum of power consumption of unfreezing the application during the active period; The ratio of the sum of power consumption of the application when it is thawed during the active period to the number of thaws is calculated to obtain the average power consumption of the application when it is thawed once.
3. The method of claim 1, wherein: After the application is unfrozen, the method further includes: recording the time when the application is unfrozen this time.
4. A terminal device, comprising: A detection module, a judgment module and a thawing module, wherein the detection module is used to detect an event that triggers the thawing of the application; The judgment module is used to, when the detection module detects an event that triggers the unfreezing of the application, determine whether the event meets a preset condition; wherein, when the event type of the event is not a preset type and satisfies a policy corresponding to the type of the application, it is determined that the preset condition is met; The thawing module is used to determine whether to thaw the application based on at least the number of times the application is thawed within a preset time period before the current moment and a preset first threshold value when the judging module judges that the event triggering the thawing of the application meets the preset condition; The thawing module is specifically used to determine the average power consumption of thawing the application once when the number of times the application is thawed within a preset time period before the current moment is greater than or equal to a preset first threshold, and to thaw the application if the average power consumption is less than or equal to a preset second threshold; or to thaw the application when the number of times the application is thawed within a preset time period before the current moment is less than the preset first threshold.
5. A computer device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the application thawing method according to any one of claims 1 to 3.
6. A computer readable medium having a computer program stored thereon, wherein: When the program is executed, the application thawing method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Application program abnormality detection method and device and mobile terminal
CN104331357A