[go: up one dir, main page]

CN110908727A - Application freezing method and device, storage medium and electronic device - Google Patents

Application freezing method and device, storage medium and electronic device Download PDF

Info

Publication number
CN110908727A
CN110908727A CN201811076379.9A CN201811076379A CN110908727A CN 110908727 A CN110908727 A CN 110908727A CN 201811076379 A CN201811076379 A CN 201811076379A CN 110908727 A CN110908727 A CN 110908727A
Authority
CN
China
Prior art keywords
application
freezing
frozen
power consumption
blacklist
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.)
Withdrawn
Application number
CN201811076379.9A
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201811076379.9A priority Critical patent/CN110908727A/en
Priority to PCT/CN2019/104550 priority patent/WO2020052493A1/en
Publication of CN110908727A publication Critical patent/CN110908727A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/325Power saving in peripheral device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The invention provides an application freezing method and device, a storage medium and electronic equipment. Specifically, the freezing method of the application includes: and monitoring the power consumption behavior of the application running in the background, and freezing the application meeting the abnormal power consumption behavior. The invention solves the problems that the freezing strategy is very complex and the normal use and application of the user are interfered in the related technology, thereby achieving the effects of saving resources such as electric quantity and the like, not influencing the use of the user and improving the user experience.

Description

Application freezing method and device, storage medium and electronic device
Technical Field
The invention relates to the field of communication, in particular to an application freezing method and device, a storage medium and electronic equipment.
Background
With the development of intelligent terminal technology and the role of people in life and work, more and more applications are installed on the terminal, and the functions of the applications are richer and more powerful, so as to meet various application requirements of users in life and work.
However, with the diversification of applications and the powerful functions supported by the terminal, the following situations are often found in the use process of the terminal: the more applications installed on the terminal, the faster and faster the battery of the terminal is consumed and the less memory is available, even if some applications are not used. This is because some applications occupy system resources such as a CPU frequently in the background even if they are not used, which results in a large power consumption of the terminal; hardware resources such as terminal battery capacity and memory appear to be in front of various applications, thereby influencing user experience.
Disclosure of Invention
The embodiment of the invention provides an application freezing method and device, a storage medium and electronic equipment, which at least solve the problem of how to freeze and manage applications in the related technology so as to achieve the effects of effectively saving power consumption and prolonging battery life. Meanwhile, the application is subjected to freezing management under the condition of minimum influence on the user, the use of the user is not influenced, and the user experience is improved.
According to an embodiment of the present invention, there is provided a freezing method of an application, including: and monitoring the power consumption behavior of the application running in the background, and freezing the application meeting the abnormal power consumption behavior.
Optionally, after the freezing of the application, the method further includes: and when the frozen application is monitored to meet a thawing condition, thawing the frozen application.
Optionally, the abnormal power consumption behavior includes at least one of: the continuous occupation time of the application to the CPU exceeds a threshold value, the lock holding time of the application exceeds the threshold value, the memory occupation amount of the application to the CPU exceeds the threshold value, the continuous application positioning time of the application exceeds the threshold value, and the use time of the application to the sensor exceeds the threshold value.
Optionally, the thawing conditions comprise at least one of: the application is switched to a foreground, the terminal where the application is located is in a charging state, the freezing time of the application exceeds a threshold value, the WIFI connection of the terminal where the application is located is successful, and the application is in a set downloading/upgrading time period.
Optionally, the method further comprises: judging whether the freezing times of the application are larger than preset freezing times or not; and if the judgment result is yes, putting the application into a frozen blacklist.
Optionally, when monitoring that the application in the freeze blacklist is switched to the background operation, freezing the application.
Optionally, when the application in the frozen blacklist is monitored to be switched to the foreground, the application is unfrozen and removed from the frozen blacklist.
Optionally, when the determination that the application in the frozen blacklist satisfies the abnormal power consumption behavior is made, the threshold in the abnormal power consumption behavior is decreased, and/or when the determination that the application in the frozen blacklist satisfies the thawing condition is made, the thawing condition includes at least two of: the application is switched to a foreground, the terminal where the application is located is in a charging state, the freezing time of the application exceeds a threshold value, the WIFI connection of the terminal where the application is located is successful, and the application is in a set downloading/upgrading time period.
Optionally, when the application is frozen, the resources occupied by the application except the CPU resources are released first, and then the CPU resources occupied by the application are released.
According to another embodiment of the present invention, there is provided a freezing apparatus for an application, including: and the freezing module is used for monitoring the power consumption behavior of the application running in the background and freezing the application meeting the abnormal power consumption behavior.
Optionally, the freezing apparatus further comprises: and the unfreezing module is used for unfreezing the frozen application when the frozen application is monitored to meet the unfreezing condition.
Optionally, the freezing device is further configured to determine whether the freezing number of the application is greater than a preset freezing number; and if the judgment result is yes, putting the application into a frozen blacklist.
Optionally, the freezing module is further configured to freeze the application located in the frozen blacklist when it is monitored that the application is switched to a background run.
Optionally, the unfreezing module is further configured to unfreeze and remove the application from the frozen blacklist when it is monitored that the application located in the frozen blacklist is switched to a foreground.
Optionally, the freezing device is further configured to reduce the threshold in the abnormal power consumption behavior when the determination that the application in the frozen blacklist satisfies the abnormal power consumption behavior is made, and/or the unfreezing condition includes at least two of the following when the determination that the application in the frozen blacklist satisfies the unfreezing condition is made: the application is switched to a foreground, the terminal where the application is located is in a charging state, the freezing time of the application exceeds a threshold value, the WIFI connection of the terminal where the application is located is successful, and the application is in a set downloading/upgrading time period.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, one or more applications are frozen or unfrozen under the condition of meeting the preset conditions, and the freezing and unfreezing processes can be alternately and dynamically carried out. Thereby effectively saving power consumption. While satisfying the freezing condition.
Meanwhile, the freezing technology according to the embodiment of the invention is a method for limiting the application to occupy the system resource based on the intelligent terminal. The method mainly comprises the steps of dynamically freezing or unfreezing one or more managed applications by forbidding the managed applications to occupy external resources such as CPU resources, sensors, GPS, internal memory and the like, so as to achieve the effects of effectively saving power consumption and prolonging the battery endurance time.
Since the power consumption behavior of the application is monitored in the background and the freezing is performed according to the power consumption behavior, no complex freezing strategy is needed. Therefore, the problem that the freezing strategy is very complex and the normal use and application of the user are interfered in the related technology can be solved, and the effects of saving resources such as electric quantity and the like, not influencing the use of the user and improving the user experience can be achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a mobile terminal to which a freezing method of the present invention is applied;
FIG. 2 is a flow chart of a freezing method of an application according to an embodiment of the present invention;
FIG. 3 is a flow diagram of an application freeze management method according to another embodiment of the present invention;
FIG. 4 is a block diagram of a freezing apparatus for an application according to an embodiment of the present invention;
fig. 5 is a block diagram of a freezing apparatus according to another application of the embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking an example of the application running on a mobile terminal, fig. 1 is a hardware structure block diagram of the mobile terminal of an application freezing method according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal 10 may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used for storing computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the freezing method of the application in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a freezing method of an application running in the mobile terminal or the network architecture is provided, and fig. 2 is a flowchart of a freezing method of an application according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, monitoring the power consumption behavior of the application running in the background, and freezing the application meeting the abnormal power consumption behavior.
Optionally, after the freezing of the application, the method further includes: and when the frozen application is monitored to meet a thawing condition, thawing the frozen application.
Specifically, fig. 3 is a flowchart of an application freeze management method according to another embodiment of the present invention, and as shown in fig. 3, the freeze management method includes the following steps:
step S302: the terminal detects the power consumption of the application in the running state and determines whether the application with abnormal power consumption exists or not;
step S304: and judging whether the application with abnormal power consumption meets a preset freezing condition or not according to the detection result of the abnormal power consumption. Specifically, the application is that the terminal is switched from the foreground running state to the background running state when receiving another application opened by a user or receiving a switching control instruction.
If the preset freezing condition is met, the next step S306 is carried out; if not, continuing to keep the application running in the background, and meanwhile continuing to perform power consumption detection according to the step S302;
step S306: and when a preset freezing condition is met, freezing the application which consumes abnormal power and runs in the background. The freezing is to limit or prohibit the occupation of system resources by the application, including but not limited to CPU resources, and Sensor, GPS positioning, or memory and other external resources. In a specific application embodiment for the peripheral resource, a service request (Business request) of the application is to be limited or prohibited, for example, a service request such as applying or releasing Alarm clock, wakelock, GPS positioning, and the like is requested.
Step S308: activity events on the terminal for the frozen application are monitored. Specifically, the activity event includes a control instruction of the terminal for the frozen application or a message receiving module of the frozen application. For example, the control instruction for the frozen application may include the user re-opening the frozen application to the foreground by operation.
Step S310: and judging whether the frozen application meets a preset thawing condition or not according to the activity event, and when the preset thawing condition is met, performing S3012 to thaw the application. If the preset unfreezing condition is not met, the freezing state of the application is continuously kept, and the monitoring of the step S308 is continuously carried out;
step S312: the frozen application is thawed. And unfreezing, namely recovering the occupation of the system resources by the application, wherein the occupation comprises but is not limited to CPU resources, Sensor, GPS positioning or memory and other external resources. In a specific application embodiment, the Business request of the application is recovered, for example, the Business request of the Alarm clock Alarm, wakelock, GPS positioning, and the like is applied or released.
Finally, the abnormal power consumption detection of step S302 is continuously performed for the thawing application.
For a thawed application, if the application meets the abnormal power consumption behavior while running in the background, the thawed application will be frozen again. Meanwhile, for the application, the terminal records the freezing condition of each application, including but not limited to: number of freezes, cause of freeze, time of freeze, etc. Meanwhile, if the application re-entering the frozen state satisfies the thawing condition, it is thawed again.
Specifically, the abnormal power consumption behavior includes at least one of: the continuous occupation time of the application to the CPU exceeds a threshold value, the lock holding time of the application exceeds the threshold value, the memory occupation amount of the application to the CPU exceeds the threshold value, the continuous application positioning time of the application exceeds the threshold value, and the use time of the application to the sensor exceeds the threshold value.
For example, regarding the duration of the CPU occupied by the application, assuming that the CPU is occupied by the application for 2min continuously to reach more than 10 percent, or the CPU occupied by the application for 10min exceeds half of the time, and the like, it is considered that the duration of the CPU occupied by the application exceeds a threshold, and the abnormal power consumption behavior is satisfied.
As another example, for the lock holding time of an application, the time of the kernel lock or the frame lock of the application is mainly judged. If the time for holding the kernel lock continuously exceeds 10min or the accumulated lock holding time exceeds 10min within 20min, the lock holding time of the application is considered to exceed the threshold value, and the abnormal power consumption behavior is met.
For another example, regarding the memory occupation amount of the application, it is mainly determined whether there is an increase in the memory in the background process, and the determination may also be performed based on the absolute memory occupation amount and the first few applications relatively occupied. And assuming that the memory occupation amount of the application is increased from 5% to 25%, or the applications which are stable in the first three within 10min exist in the occupation area, and the like, the memory occupation amount of the application is considered to exceed the threshold value, and the abnormal power consumption behavior is met.
For another example, for an application to continuously apply for positioning time, it needs to be determined whether the application is a navigation-type application. If the navigation application is not the navigation application, but the continuous application positioning information exceeds the threshold, if the continuous application positioning information exceeds 2min, the continuous application positioning time exceeds the threshold, and the abnormal power consumption behavior is met.
Finally, for the application to the sensor service time, the continuous application of various sensors without release is mainly carried out. If the sensor is close and does not release after the Hall sensor exceeds 5min, the service time of the sensor exceeds a threshold value, and abnormal power consumption behaviors are met.
It should be noted that the time and parameters mentioned in the above examples are listed, but not exhaustive. Any time based on the idea of the present embodiment, the parameters are only within the protection scope of the present embodiment. The user can adjust the time and the parameters in real time according to the hardware and software states of the actual terminal, and redundant description is not repeated herein.
Optionally, the thawing conditions comprise at least one of: the application is switched to a foreground, the terminal where the application is located is in a charging state, the freezing time of the application exceeds a threshold value, the WIFI connection of the terminal where the application is located is successful, and the application is in a set downloading/upgrading time period.
Optionally, judging whether the freezing times of the application are greater than preset freezing times; and if the judgment result is yes, putting the application into a frozen blacklist.
For example, if an application freezes up to 3 times, the application is placed on the freeze blacklist.
Optionally, when monitoring that the application in the freeze blacklist is switched to the background operation, freezing the application.
Optionally, when the application in the frozen blacklist is monitored to be switched to the foreground, the application is unfrozen and removed from the frozen blacklist.
Specifically, considering that the application in the frozen blacklist has the repetition of the abnormal power consumption behavior, the application in the frozen blacklist directly enters the frozen state without being determined. Meanwhile, on one hand, in order to prevent the power consumption problem of the application with the repeated abnormal power consumption behavior without delaying the use of the application, the application can be unfrozen only when the application in the frozen blacklist is switched to the foreground. And if other thawing conditions, for example, the freezing time of the application exceeds a threshold, the WIFI connection of the terminal where the application is located is successful, and the like, the application cannot be thawed.
It should be noted that although the application in the frozen blacklist can be removed from the frozen blacklist for switching to the foreground, there is still a potential for repeatedly entering the frozen state if the application is subsequently switched to the background running. Thus, for applications that switch to the background that were once on the frozen blacklist, then they can be set in the potential frozen blacklist. Once the application again enters the frozen state, the application is placed on the frozen blacklist.
Optionally, when the determination that the application in the frozen blacklist satisfies the abnormal power consumption behavior is made, the threshold in the abnormal power consumption behavior is decreased, and/or when the determination that the application in the frozen blacklist satisfies the thawing condition is made, the thawing condition includes at least two of: the application is switched to a foreground, the terminal where the application is located is in a charging state, the freezing time of the application exceeds a threshold value, the WIFI connection of the terminal where the application is located is successful, and the application is in a set downloading/upgrading time period.
Specifically, by adjusting the expansion of the threshold value in the abnormal power consumption behavior and tightening the thawing condition, the application entering the frozen blacklist can be effectively controlled, and the power consumption problem of the application having the abnormal power consumption behavior repeatedly can be prevented.
In addition, in this embodiment, a frozen white list can also be set. For applications that are not frozen for the first time or within a period of time, the threshold reduction in abnormal power consumption behavior may be adjusted if the frozen state is entered, while relaxing the thawing conditions. In this way, the freezing and thawing of applications can be managed more intelligently, and thus the power of the terminal can be wasted less.
Optionally, when the application is frozen, the resources occupied by the application except the CPU resources are released first, and then the CPU resources occupied by the application are released.
Specifically, other resources are released, including an alarm, binder call, location request, broadcast listen, and so on. For example: if it has an application for alarm, it will put a temporary list for alarm or discard the alarm request. If it communicates through the Binder for IPC process while frozen, wait for the Binder call to complete.
Through the above-mentioned releasing of other resources except the CPU resource occupied by the application first and then releasing the CPU resource occupied by the application, one or more managed applications can be dynamically frozen or thawed, so as to achieve the effects of effectively saving power consumption and prolonging battery life
Specifically, CPU resources are released, and a process that needs to be frozen, including all sub-threads of the process, is executed. Write freeze flag is written in Cgroup. After the process enters the FROZEN state, the task is FROZEN. Does not participate in CPU scheduling.
In addition, the processing of the judgment of the application which repeatedly consumes high power may adjust the number of times of continuous monitoring, the number of times of monitoring in a period of time, and the like.
Specifically, after monitoring the power consumption behavior of the application running in the background, the system finds that the power consumption behavior of the application exists at the edge of the abnormal power consumption behavior for many times. For example, the application's continuous occupancy time of the CPU is close to the application's continuous occupancy time threshold for the CPU. For another example, the application of the continuous application positioning time is imminent by applying a threshold value of the continuous application positioning time. Although the application does not enter the frozen state, the power consumption is also very large due to the presence of edges at abnormal power consumption behavior many times. Thus, if the number of times an application reaches the edge of the abnormal power consumption behavior within a time period satisfies a certain threshold, the application will also be frozen. For example, assume that the abnormal power consumption behavior corresponds to an application-to-memory footprint threshold of 20%. If one application has 5 times of memory occupation of the application within 20min, freezing the application.
Through the steps, the problems that the freezing strategy is very complex and normal use and application of a user are interfered in the related technology are solved, resources such as electric quantity can be saved, the use of the user is not influenced, and the user experience is improved.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, an applied freezing device is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and the description of the device that has been already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of a freezing apparatus for an application according to an embodiment of the present invention, and as shown in fig. 4, the freezing apparatus includes a freezing module 42.
And the freezing module 42 is used for monitoring the power consumption behaviors of the applications running in the background and freezing the applications meeting the abnormal power consumption behaviors.
Fig. 5 is a block diagram of a freezing apparatus according to another application of the embodiment of the present invention, as shown in fig. 5, in addition to the modules included in fig. 4, further including: a defrost module 52, and a monitor module 54.
A unfreezing module 52, configured to unfreeze the frozen application when it is monitored that the frozen application satisfies a unfreezing condition.
A monitoring module 54 for monitoring power consumption behavior of applications running in the background and monitoring whether the frozen applications meet a thawing condition.
Optionally, the freezing device is further configured to determine whether the freezing number of the application is greater than a preset freezing number; and if the judgment result is yes, putting the application into a frozen blacklist.
Optionally, the freezing module 42 is further configured to freeze the application located in the frozen blacklist when it is monitored that the application is switched to the background running.
Optionally, the unfreezing module 52 is further configured to unfreeze and remove the application from the frozen blacklist when it is monitored that the application located in the frozen blacklist is switched to the foreground.
Optionally, the freezing device is further configured to reduce the threshold in the abnormal power consumption behavior when the determination that the application in the frozen blacklist satisfies the abnormal power consumption behavior is made, and/or the unfreezing condition includes at least two of the following when the determination that the application in the frozen blacklist satisfies the unfreezing condition is made: the application is switched to a foreground, the terminal where the application is located is in a charging state, the freezing time of the application exceeds a threshold value, the WIFI connection of the terminal where the application is located is successful, and the application is in a set downloading/upgrading time period.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
and S1, monitoring the power consumption behavior of the application running in the background, and freezing the application meeting the abnormal power consumption behavior.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
and S1, monitoring the power consumption behavior of the application running in the background, and freezing the application meeting the abnormal power consumption behavior.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (17)

1. A method for freezing an application, comprising:
and monitoring the power consumption behavior of the application running in the background, and freezing the application meeting the abnormal power consumption behavior.
2. The method of claim 1, wherein after the application is frozen, the method further comprises:
and when the frozen application is monitored to meet a thawing condition, thawing the frozen application.
3. The method of claim 1, wherein the abnormal power consumption behavior comprises at least one of:
the continuous occupation time of the application to the CPU exceeds a threshold value, the lock holding time of the application exceeds the threshold value, the memory occupation amount of the application to the CPU exceeds the threshold value, the continuous application positioning time of the application exceeds the threshold value, and the use time of the application to the sensor exceeds the threshold value.
4. The method of claim 2, wherein the thawing conditions comprise at least one of:
the application is switched to a foreground, the terminal where the application is located is in a charging state, the freezing time of the application exceeds a threshold value, the WIFI connection of the terminal where the application is located is successful, and the application is in a set downloading/upgrading time period.
5. The method of claim 1, further comprising:
judging whether the freezing times of the application are larger than preset freezing times or not;
and if the judgment result is yes, putting the application into a frozen blacklist.
6. The method of claim 5, further comprising:
and when monitoring that the application in the freezing blacklist is switched to the background operation, freezing the application.
7. The method of claim 5, further comprising:
when the application in the frozen blacklist is monitored to be switched to the foreground, the application is unfrozen and removed from the frozen blacklist.
8. The method of claim 5, further comprising:
reducing the threshold in the abnormal power consumption behavior and/or reducing the threshold in the abnormal power consumption behavior when determining that the application located in the frozen blacklist satisfies the abnormal power consumption behavior
When the application in the frozen blacklist is judged to meet the unfreezing condition, the unfreezing condition comprises at least two of the following: the application is switched to a foreground, the terminal where the application is located is in a charging state, the freezing time of the application exceeds a threshold value, the WIFI connection of the terminal where the application is located is successful, and the application is in a set downloading/upgrading time period.
9. The method of any of claims 1 to 8, further comprising:
when the application is frozen, other resources except the CPU resource occupied by the application are released firstly, and then the CPU resource occupied by the application is released.
10. A freezing apparatus for an application, comprising:
and the freezing module is used for monitoring the power consumption behavior of the application running in the background and freezing the application meeting the abnormal power consumption behavior.
11. The apparatus of claim 10, wherein the freezing means further comprises:
and the unfreezing module is used for unfreezing the frozen application when the frozen application is monitored to meet the unfreezing condition.
12. The apparatus of claim 9, wherein the freezing means is further configured to determine whether the freezing number of the application is greater than a preset freezing number; and if the judgment result is yes, putting the application into a frozen blacklist.
13. The apparatus of claim 12, wherein the freezing module is further configured to freeze the application located in the frozen blacklist when it is monitored that the application is switched to a background operation.
14. The apparatus of claim 12, wherein the unfreezing module is further configured to unfreeze and remove the application from the frozen blacklist when the application in the frozen blacklist is monitored to switch to foreground.
15. The apparatus of claim 12, wherein the freezing means is further configured to reduce the threshold in the abnormal power consumption behavior when the determination is made that the application in the frozen blacklist satisfies the abnormal power consumption behavior, and/or wherein the thawing condition comprises at least two of the following when the determination is made that the application in the frozen blacklist satisfies the thawing condition: the application is switched to a foreground, the terminal where the application is located is in a charging state, the freezing time of the application exceeds a threshold value, the WIFI connection of the terminal where the application is located is successful, and the application is in a set downloading/upgrading time period.
16. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 9 when executed.
17. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 9.
CN201811076379.9A 2018-09-14 2018-09-14 Application freezing method and device, storage medium and electronic device Withdrawn CN110908727A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811076379.9A CN110908727A (en) 2018-09-14 2018-09-14 Application freezing method and device, storage medium and electronic device
PCT/CN2019/104550 WO2020052493A1 (en) 2018-09-14 2019-09-05 Application freezing method and apparatus, storage medium and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811076379.9A CN110908727A (en) 2018-09-14 2018-09-14 Application freezing method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN110908727A true CN110908727A (en) 2020-03-24

Family

ID=69776967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811076379.9A Withdrawn CN110908727A (en) 2018-09-14 2018-09-14 Application freezing method and device, storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN110908727A (en)
WO (1) WO2020052493A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020415A (en) * 2016-05-09 2016-10-12 深圳市万普拉斯科技有限公司 Application control method and apparatus for intelligent device in standby state
CN106020964A (en) * 2016-06-30 2016-10-12 宇龙计算机通信科技(深圳)有限公司 Method and device for freezing application, and terminal
CN106292998A (en) * 2016-07-28 2017-01-04 宇龙计算机通信科技(深圳)有限公司 The management method of a kind of running background program and terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103324519A (en) * 2013-06-17 2013-09-25 华为技术有限公司 Method and device for clearing malicious power consumption applications, and user terminal
KR102148948B1 (en) * 2013-12-06 2020-08-27 삼성전자주식회사 Multi tasking method of electronic apparatus and electronic apparatus thereof
CN107450704A (en) * 2016-05-31 2017-12-08 中兴通讯股份有限公司 A kind of control method, device and the terminal of terminal abnormal power consumption

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020415A (en) * 2016-05-09 2016-10-12 深圳市万普拉斯科技有限公司 Application control method and apparatus for intelligent device in standby state
CN106020964A (en) * 2016-06-30 2016-10-12 宇龙计算机通信科技(深圳)有限公司 Method and device for freezing application, and terminal
CN106292998A (en) * 2016-07-28 2017-01-04 宇龙计算机通信科技(深圳)有限公司 The management method of a kind of running background program and terminal

Also Published As

Publication number Publication date
WO2020052493A1 (en) 2020-03-19

Similar Documents

Publication Publication Date Title
CN106125882B (en) Application program management method and electronic equipment
EP3361348B1 (en) Terminal-based wakelock control method and apparatus
CN104699218B (en) A kind of task management method and equipment
CN106959874B (en) The electronic equipment of application management method and application this method based on operating system
CN105373207B (en) A kind of idle method of wireless communication terminal
EP2286315A1 (en) Aggregating recurrent schedules to optimize resource consumption
CN106131185B (en) Video data processing method, device and system
US11816200B2 (en) Terminal and method for managing launch of an application of a terminal
CN111857859A (en) Application control method, device, terminal, and computer-readable storage medium
CN107968881A (en) End-point device broadcast processing method and processing device, terminal device and storage medium
CN110908494A (en) Method, device, terminal and storage medium for detecting and controlling to-be-managed application
CN117369888A (en) Electronic equipment awakening method and device, electronic equipment and readable storage medium
CN109992323B (en) Process processing method and device, electronic equipment and computer readable storage medium
CN110837456B (en) Control method and device and electronic equipment
CN105005504A (en) Single-task mode implementation method and system of Android platform
CN106406495A (en) Application program management method, application program management device and terminal
CN106227569A (en) A kind of application upgrade method and terminal unit
CN110908727A (en) Application freezing method and device, storage medium and electronic device
CN107819702A (en) A kind of flow allocation method and device, terminal and readable storage medium storing program for executing
CN112540666B (en) Application thawing method, terminal device, computer device and computer readable medium
CN106201674A (en) Defreezing method, thawing apparatus and terminal
CN111913553B (en) Method and device for controlling terminal power consumption, terminal and computer readable storage medium
CN113010003A (en) Application program control method and device, terminal and storage medium
WO2020220868A1 (en) Broadcast control method, terminal and computer readable storage medium
WO2020094125A1 (en) Application control method, device, terminal, 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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200324