WO2020052472A1 - 异常应用检测及控制方法、装置、终端及存储介质 - Google Patents
异常应用检测及控制方法、装置、终端及存储介质 Download PDFInfo
- Publication number
- WO2020052472A1 WO2020052472A1 PCT/CN2019/104172 CN2019104172W WO2020052472A1 WO 2020052472 A1 WO2020052472 A1 WO 2020052472A1 CN 2019104172 W CN2019104172 W CN 2019104172W WO 2020052472 A1 WO2020052472 A1 WO 2020052472A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application
- resource
- abnormal
- resource occupation
- occupation
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3058—Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
- G06F11/3062—Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations where the monitored property is the power consumption
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3206—Monitoring of events, devices or parameters that trigger a change in power modality
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present application relates to the field of communication technologies, and in particular, to a method, a device, a terminal, and a storage medium for detecting and controlling abnormal applications.
- An abnormal application detection and control method, device, terminal, and storage medium provided in the embodiments of the present application mainly solve technical problems of how to comprehensively and accurately determine an abnormal power consumption application on a terminal.
- an embodiment of the present application provides an abnormal application detection method, which includes: obtaining resource occupation information of each application currently running on a terminal; and judging based on the resource occupation information of each application and a preset abnormal resource occupation Rule to determine the target application with abnormal power consumption among the applications.
- an embodiment of the present application further provides a method for controlling abnormal power consumption, which includes: using the abnormal application detection method as described above, to determine a target of abnormal power consumption among applications currently running on the terminal. Application; performing energy-saving control on the target application.
- an embodiment of the present application further provides an abnormal application detection device, including: a resource detection module, configured to obtain resource occupation information of each application currently running on a terminal; and an abnormality detection module, configured to The resource occupation information of the application and a preset resource abnormal occupation judgment rule determine a target application in which an abnormal power consumption exists among the applications.
- an embodiment of the present application further provides an abnormal power consumption application control device, which includes the abnormal application detection device as described above, and further includes a control module.
- the control module is configured to determine the abnormal application detection device.
- the target application is controlled for energy saving.
- an embodiment of the present application further provides a terminal, including a processor, a memory, and a communication bus; the communication bus is used to connect the processor and the memory; and the processor is used to execute the memory.
- a terminal including a processor, a memory, and a communication bus; the communication bus is used to connect the processor and the memory; and the processor is used to execute the memory.
- a stored first computer program to implement the steps of the abnormal application detection method as described above; or the processor is configured to execute a second computer program stored in the memory to implement the power consumption abnormal application control as described above Method steps.
- an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores one or more first computer programs, and the one or more computer programs may be Multiple processors execute to implement the steps of the abnormal application detection method as described above; or, the computer-readable storage medium stores one or more second computer programs, and the one or more second computer programs may Executed by one or more processors to implement the steps of the power abnormality application control method as described above.
- Application and background running applications resource occupancy information; and then based on the obtained resource occupancy information of each application and preset resource abnormal occupancy judgment rules, determine the target application with abnormal power consumption among the currently running applications on the terminal That is, in some application examples, the application with abnormal power consumption among all applications currently running on the terminal can be accurately determined according to the resource occupation information of each application and preset resource abnormality judgment rules, and at the same time It is possible to avoid omitting applications with abnormalities in the foreground running applications when only acknowledging power consumption abnormalities for background applications. Therefore, the applications with abnormal power consumption identified are more comprehensive and accurate.
- the terminal after determining target applications with abnormal power consumption among applications currently running on the terminal, it is also possible to perform energy saving processing on these target applications, such as, but not limited to, freezing processing, Therefore, while not affecting the normal use of the terminal by the user, the terminal's endurance and resource utilization rate are improved, thereby improving the satisfaction of the user experience.
- energy saving processing such as, but not limited to, freezing processing
- FIG. 1 is a schematic flowchart of an abnormal application detection method according to the first embodiment of the present application
- FIG. 2 is a schematic flowchart of a method for controlling an abnormal power consumption application according to Embodiment 2 of the present application;
- FIG. 3 is a first schematic flowchart of an abnormal application detection method according to the second embodiment of the present application.
- FIG. 4 is a schematic flowchart 2 of an abnormal application detection method according to Embodiment 2 of the present application.
- FIG. 5 is a third schematic flowchart of an abnormal application detection method according to the second embodiment of the present application.
- FIG. 6 is a schematic structural diagram of an abnormal application detection device according to a third embodiment of the present application.
- FIG. 7 is a schematic structural diagram of an abnormal application control device according to a third embodiment of the present application.
- FIG. 8 is a schematic flowchart of an abnormal application detection method according to Embodiment 3 of the present application.
- FIG. 9 is a schematic structural diagram of a terminal according to a fourth embodiment of the present application.
- This embodiment provides a method for detecting abnormal applications, which can comprehensively and accurately detect whether the power consumption of each application currently running on the terminal is abnormal, so as to provide an accurate basis for the terminal's energy-saving control, thereby achieving no impact on users. While using the terminal normally, improve the terminal's battery life and resource utilization, and increase the satisfaction of the user experience.
- An abnormal application detection method provided in this embodiment is shown in FIG. 1 and includes:
- the terminal in this embodiment may be various intelligent terminals that support application running, such as, but not limited to, smart phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), and tablet computers (PADs). , Mobile terminals for portable multimedia players (PMP), navigation devices, etc., and fixed terminals such as digital TVs, desktop computers, etc.
- the system running on the terminal in this embodiment may include, but is not limited to, Android, iOS, windows phone, Symbian, BlackBerry OS, windows mobile, and Microsoft's Windows series system applied to PC, Apple's MAC series system, and also Including linux system and so on.
- the applications currently running on the terminal include various applications that are launched on the terminal and run in the foreground and background. In this way, all applications currently running on the terminal can be comprehensively monitored, avoiding only applications that are running in the background.
- an abnormality in the application running in the foreground cannot be detected in a timely and accurate manner.
- some malicious applications maintain related processes running in the foreground of the terminal against this vulnerability, which can escape the scope of abnormal monitoring and cause abnormal applications on the terminal. Monitoring, but not the occurrence of abnormal application conditions.
- all applications currently running on the terminal can be monitored, and abnormal applications running in the foreground are prevented from being missed due to related technologies not being included in the monitoring scope, which can further improve users. User experience satisfaction.
- the resource occupation information of each application currently running on the terminal is obtained, and the target application with abnormal power consumption is identified in real time according to the resource occupation situation of each application currently running on the terminal. It does not simply rely on a preset application list to directly determine an application currently running that belongs to the application list as an abnormal power consumption application. Because the application may indeed be an abnormal power consumption application in some specific application scenarios, but in some application scenarios it is a normal power consumption application, that is, a normal running application.
- a method of directly determining an application belonging to the list as an abnormal power consumption application according to a preset application list has a large error, and it is easy to misjudge a normally running application as an abnormal power consumption application; and
- the judgment result also largely depends on the accurate settings of the applications in the list, and the user often cannot adjust the list accurately or in real time to keep the list accurate, which also leads to the judgment based on the preset application list As a result, there is a large error, which reduces the satisfaction of the user experience.
- the abnormal application detection method provided in this embodiment identifies the target application with abnormal power consumption in real time according to the resource occupation of each application currently running on the terminal, and does not require the user or the corresponding service provider to set or service the corresponding application.
- Checklists are more practical and intelligent, and more accurate, which is more conducive to improving user experience satisfaction.
- the basic resources required for each application operation can be obtained and it is helpful for preliminary screening to determine whether an application may be an abnormal power consumption.
- the application resource occupation information is referred to as first resource occupation information in this embodiment. According to the first resource occupation information, among applications currently running on the terminal, applications that belong to the normal power consumption are screened out and anomalies are excluded, and then From the set of excluded applications, determine whether there are applications with abnormal power consumption. This processing method is not only helpful to improve the detection efficiency, but also to improve the detection accuracy.
- the acquired resource occupation information of the application may include first resource occupation information of the application.
- the resource abnormal occupation judgment rule may include: when the first resource occupation information of an application within a preset detection period meets the first resource occupation condition, determining that the application is a normal power consumption application; if an application is in When the first resource occupancy information in the preset detection period does not satisfy the first resource occupancy condition, it indicates that the application may be an application with abnormal power consumption, and further judgment may be made to determine whether it is an application with abnormal power consumption.
- the preset detection period in this embodiment may be flexibly set according to a specific application scenario, and it should be understood that optionally, the preset detection period may support dynamic configuration and update. For example, it can be set to 10 minutes, 15 minutes, 20 minutes, 30 minutes, or 60 minutes.
- the first resource in this embodiment may be the basic resource required by each application to run and is helpful for preliminary screening to determine whether an application may be the basic resource of an abnormal power consumption application.
- the corresponding resource occupation information may be The occupation of the resource, which can be the absolute occupation of the resource, or the relative occupation of the resource (that is, the comparative ranking of the application occupation); in some application examples, the resource occupation information can also be the resource occupation Duration, or a combination of resource occupation duration and resource occupation.
- the same resource occupancy information can be the same or different; for example, for type A resources, you can get the resource occupancy duration, for type B resources, you can get the resource occupancy amount, and for type C Resources, you can get the length of resource occupation and the amount of resource occupation.
- the first resource occupation condition can be flexibly set according to specific first resource occupation information, as long as it can indicate whether an application belongs to a normally running application, that is, an application with normal power consumption.
- setting the first resource occupation information includes: a processor CPU occupation duration
- setting the first resource occupation condition includes: the processor occupation duration is less than or equal to a first duration threshold.
- an application that occupies the processor for less than or equal to the first duration threshold can be determined as an application with normal power consumption, and an application that is greater than the first duration threshold You need to further determine whether it is an application with abnormal power consumption.
- the first resource occupation information may also be set to include a processor CPU resource occupation percentage
- setting the first resource occupation condition includes: the processor occupation time to be less than or equal to a preset first resource percentage threshold.
- an application that occupies a processor with a resource percentage less than or equal to the first resource percentage threshold may be determined as an application with normal power consumption, which is greater than the first resource percentage.
- the application of the threshold needs to further determine whether it is an application with abnormal power consumption.
- the resource abnormal occupation judgment rule may further include: when the first resource occupation information of an application within a preset detection period does not satisfy the first resource occupation condition, the following judgment rule is further included.
- the resource abnormal occupation judgment rule in this embodiment may further include any one of the foregoing rules, may include a combination of two or more types of the foregoing rules, and include two or more types of the foregoing rules.
- the specific combination timing can be flexibly set according to requirements.
- the resource abnormal occupation determination rule may further include the above-mentioned rule 1, rule 2, and rule 3, and the combination order is to execute rule 1, rule 2, and rule 3 in order; in this embodiment, the above rules are executed in order.
- Rule 2 and Rule 3 refer to an application that cannot be determined to be an abnormal power consumption application by using Rule 1. Then use the above Rule 2 to determine whether it is an abnormal power consumption application.
- the rule cannot determine whether it is an abnormal power consumption application, then use the above rule 3 to determine whether it is an abnormal power consumption application.
- the above rule 1 and rule 2 or rule 1 and rule 3 may be used. Interleaved execution.
- the above combination sequence may also be executed first, then rule three, and finally rule one.
- the resource abnormal occupation determination rule may further include only the above rule one, or only the above rule one and rule two, and rule one and rule two are sequentially executed, or only include the above rule two and rule three, Rule two and rule three are executed in sequence, or only include the above rule one and rule three, rule one and rule three are executed in sequence, and so on.
- the second resource occupation information may include various resources that can further determine whether the application is an abnormal power consumption application, such as including but not limited to Multimedia resources (including but not limited to GPU (Graphics Processing Unit), positioning resources (including but not limited to various positioning modules, such as GPS (Global Positioning System) positioning modules), wake locks (such as Android Wakelock in the system); correspondingly, in this embodiment, the second resource occupation information may include but is not limited to at least one of the following information: multimedia resource occupation duration, positioning resource occupation duration, and wake lock occupation duration.
- Multimedia resources including but not limited to GPU (Graphics Processing Unit)
- positioning resources including but not limited to various positioning modules, such as GPS (Global Positioning System) positioning modules
- wake locks such as Android Wakelock in the system
- the second resource occupation information may include but is not limited to at least one of the following information: multimedia resource occupation duration, positioning resource occupation duration, and wake lock occupation duration.
- the second resource occupation condition may include, but is not limited to, at least one of the following conditions: When the second resource occupation information includes the multimedia resource occupation duration, the second resource occupation condition includes: the multimedia resource occupation duration is less than or equal to the second duration threshold When the second resource occupation information includes the positioning resource occupation duration, the second resource occupation condition includes: the positioning resource occupation duration is less than or equal to a third duration threshold; when the second resource occupation information includes the wake lock resource occupation duration, the second Resource occupation conditions include: the wake lock occupation duration is greater than the fourth duration threshold.
- the specific resource occupation information in this embodiment can be flexibly selected to be represented by other elements in addition to being represented by the occupation duration, and the corresponding resource occupation conditions can also be flexibly set.
- the second resource occupation information includes a multimedia resource occupation duration, a positioning resource occupation duration, and a wake lock occupation duration.
- the second resource occupation information of the application in the preset detection period does not satisfy the second resource occupation condition, that is, determine that the application is successful.
- Abnormally consuming applications The duration of the application's multimedia resource occupation is less than or equal to the second duration threshold; the application's positioning resource occupation duration is less than or equal to the third duration threshold; the application's wake lock occupation duration is greater than the fourth duration threshold.
- the abnormal application detection and control method provided in this embodiment can comprehensively, accurately, and efficiently determine the resource abnormal occupation determination rules that can be flexibly set and applied based on the resource occupation information of each application currently running on the terminal.
- the applications currently running on the terminal there are target applications with abnormal power consumption, which provides a more comprehensive and accurate basis for the terminal to save power consumption control, and the abnormal application detection and control method provided by this embodiment has better Versatility and intelligence can further improve user experience satisfaction.
- This embodiment provides a method for controlling abnormal power consumption applications, which can perform energy saving control on applications with abnormal power consumption on a terminal, so as to improve the standby performance and resource utilization of the terminal.
- the method for controlling abnormal power consumption application provided in this embodiment includes:
- S201 Determine a target application with abnormal power consumption among applications currently running on the terminal.
- the abnormal application detection method shown in the foregoing embodiment can be used to determine the target application with abnormal power consumption among the applications currently running on the terminal; of course, other methods can also be used to determine the current running on the terminal. In each application, there are target applications with abnormal power consumption.
- S202 Perform energy-saving control on the determined target application.
- the energy saving control is performed on the target application, and various methods for energy saving control of the application may be adopted. Examples include, but are not limited to, freezing the target application, or closing a process that consumes a large amount of power from the target application.
- this embodiment combines the following application examples to further determine whether there is a target application with abnormal power consumption among the applications currently running on the terminal.
- This example includes the first resource occupation information in the foregoing embodiment, and also includes rule one in the foregoing embodiment, that is, it also includes the second resource occupation information, and the second resource occupation information in this embodiment includes the multimedia resource occupation duration. , Positioning resource occupation time, wake lock occupation time.
- FIG. 3 A process of determining whether there is a target application with abnormal power consumption among applications currently running on the terminal in this example is shown in FIG. 3, including:
- This embodiment includes acquiring first resource occupation information, such as processor CPU occupation information, and acquiring second resource occupation information, that is, acquiring multimedia resource occupation time, positioning resource occupation time, and wake lock occupation time.
- first resource occupation information such as processor CPU occupation information
- second resource occupation information that is, acquiring multimedia resource occupation time, positioning resource occupation time, and wake lock occupation time.
- S302 For an application currently running on the terminal, determine whether the first resource occupation information satisfies the first resource occupation condition. If yes, go to S306; otherwise, go to S303.
- S303 Determine whether the duration of the multimedia resource occupation of the application is less than or equal to the second duration threshold. If not, go to S306; otherwise, go to S304.
- S304 Determine whether the occupation period of the positioning resource is less than or equal to the third duration threshold. If not, go to S306, otherwise, go to S305.
- step S305 it is determined whether the occupation period of the wake lock is greater than the fourth duration threshold. If not, go to step S306; otherwise, go to step S307.
- S306 Determine that the application is an application with normal power consumption, and when there is a next application to be determined, enter the determination of the next application.
- S307 Determine that the application is a target application with abnormal power consumption, and when there is a next application to be determined, enter the determination of the next application.
- the process of whether the target application with abnormal power consumption exists may also be the sequence shown in FIG. 4, including:
- This embodiment includes acquiring first resource occupation information, such as processor CPU occupation information, and acquiring second resource occupation information, that is, acquiring multimedia resource occupation time, positioning resource occupation time, and wake lock occupation time.
- first resource occupation information such as processor CPU occupation information
- second resource occupation information that is, acquiring multimedia resource occupation time, positioning resource occupation time, and wake lock occupation time.
- S402 For an application currently running on the terminal, determine whether the first resource occupation information satisfies the first resource occupation condition. If yes, go to S406; otherwise, go to S403.
- S403 Determine whether the occupation period of the positioning resource is less than or equal to the third duration threshold. If not, go to S406, otherwise, go to S404.
- S404 Determine whether the duration of the multimedia resource occupation of the application is less than or equal to the second duration threshold. If not, go to S406, otherwise, go to S405.
- S406 Determine that the application is an application with normal power consumption, and when there is a next application to be determined, proceed to the determination of the next application.
- S407 Determine that the application is a target application with abnormal power consumption, and when there is a next application to be determined, enter the determination of the next application.
- the timing of application multimedia resource occupation duration, positioning resource occupation duration, and wake lock occupation duration can be flexibly set, and is not limited to the above-mentioned example timing.
- This example includes the first resource occupancy information in the above embodiment, and also includes rule one, rule two, and rule three in the above embodiment.
- the second resource occupancy information in this embodiment includes multimedia resource occupancy duration, and positioning resource occupancy. The duration and the length of time occupied by the wake lock.
- rules one, two, and three can be executed in sequence, and rules one and two can also be interspersed with each other. The following example is based on rules one and two can also be interspersed and executed.
- FIG. 5 One of the processes for determining whether there is a target application with abnormal power consumption among the applications currently running on the terminal is shown in FIG. 5, including:
- This embodiment includes acquiring first resource occupation information, such as processor CPU occupation information, and acquiring second resource occupation information, that is, acquiring multimedia resource occupation time, positioning resource occupation time, and wake lock occupation time.
- first resource occupation information such as processor CPU occupation information
- second resource occupation information that is, acquiring multimedia resource occupation time, positioning resource occupation time, and wake lock occupation time.
- S502 For an application currently running on the terminal, determine whether the first resource occupation information satisfies the first resource occupation condition. If yes, go to S508; otherwise, go to S503.
- S503 Determine whether the multimedia resource occupation duration of the application is less than or equal to the second duration threshold. If not, go to S508, otherwise, go to S504.
- S504 Determine whether the occupation time of the positioning resource is less than or equal to the third duration threshold. If not, go to S508, otherwise, go to S505.
- S505. Determine whether the application receives an input instruction within the current or within the preset detection period. If yes, go to S508; otherwise, go to S506.
- S506 Determine whether the length of time occupied by the wake lock is greater than the fourth duration threshold. If not, go to S507; otherwise, go to S508.
- S507 Determine whether the terminal is currently off the screen, if yes, go to S508; otherwise, go to S509.
- S508 Determine that the application is an application with normal power consumption, and when there is a next application to be determined, enter the determination of the next application.
- S509 Determine that the application is a target application with abnormal power consumption, and when there is a next application to be determined, enter the determination of the next application.
- This embodiment provides an abnormal application detection device, which can be installed in various terminals, as shown in FIG. 6, including:
- the resource detection module 601 is configured to obtain resource occupation information of each application currently running on the terminal; for a specific acquisition process, refer to a resource occupation letter acquisition process shown in the foregoing embodiments, and details are not described herein again.
- the abnormality detection module 602 is configured to determine, based on the resource occupation information of each application obtained by the resource detection module 601 and a preset resource abnormal occupation judgment rule, a target application having abnormal power consumption among the applications. For the specific determination process, refer to the target application process of abnormal power consumption shown in the foregoing embodiments, and details are not described herein again.
- the resource occupation information includes the first resource occupation information; the abnormality detection module 602 may be configured to determine when the first resource occupation information of an application meets the first Under a resource occupation condition, the application is determined to be an application with normal power consumption.
- the abnormality detection module 602 is further configured to perform the following judgment when the first resource occupation information of an application within a preset detection period does not satisfy the first resource occupation condition.
- Rule 1 The resource occupation information further includes second resource occupation information, and it is determined that the second resource occupation information of the application within the preset detection period does not satisfy a second resource occupation condition When determining that the application is a target application with abnormal power consumption;
- Rule 2 When the application does not receive an input instruction at the current time or within the preset detection period, determine that the application is a target application with abnormal power consumption
- Rule three When the terminal is currently in the off state, determine that the application is a target application with abnormal power consumption.
- the functions of the resource detection module 601 and the abnormality detection module 602 in this embodiment may be implemented by a processor or a control in the terminal.
- This embodiment further provides a device for controlling abnormal power consumption, as shown in FIG. 7, including an abnormal application detection device 701 and a control module 702.
- the abnormal application detection device 701 may be the abnormal application detection device shown in FIG. 6, and of course, it may also be a detection device using other abnormal application detection methods.
- the control module 702 is configured to perform energy saving control on the target application determined by the abnormal application detection device 701.
- control module uses 702 to perform energy saving control on the target application, and various methods for energy saving control of the application may be adopted. Examples include, but are not limited to, freezing the target application, or closing a process that consumes a large amount of power from the target application.
- control module 702 in this embodiment may be implemented by a processor or a control in the terminal.
- the device shown in FIG. 6 and FIG. 7 is set in a terminal (for example, a mobile phone, an iPad, etc.) in this embodiment, and the first resource occupation information is used as the processor CPU occupation duration, and the second resource occupation information includes
- the GPU occupancy time that is, a multimedia resource occupancy time
- the Gps occupancy time that is, a positioning resource occupancy time
- the wakelock occupancy time are examples.
- S801 The terminal is turned on, the resource detection module is started, and the startup time of the abnormality detection module is set, that is, the abnormality detection period is set.
- the resource detection module collects class resource occupation information of each application running on the terminal.
- the abnormality detection module starts at a set time, reads the resource detection module to collect application records, and proceeds to S804.
- the abnormality detection module checks the CPU usage time recorded by the application. If it is less than or equal to the first duration threshold, the process proceeds to S810, otherwise the GPU usage time is read and the process proceeds to S805.
- S807 If the application currently (or within the detection period) has an input operation behavior and it is determined that the game is interactive, proceed to S810, otherwise read the wakelock time and proceed to S808.
- S810 video playback, positioning and navigation, game interaction, computing or data browsing behavior, the anomaly detection module determines that the application behavior is normal, and proceeds to S803 to continue to determine the next running application.
- the CPU takes a long time, and the wakelock takes a long time, and the screen is off.
- the abnormality detection module determines that the application behaves abnormally, that is, determines that the application is a target application with abnormal power consumption, reports the target application to the system, and proceeds to S803. Continue to determine the next running application.
- Embodiment 4 is a diagrammatic representation of Embodiment 4:
- This embodiment also provides a terminal, which includes but is not limited to a smart phone, a notebook computer, a digital broadcast receiver, a personal digital assistant (PDA), a tablet computer (PAD), a portable multimedia player (PMP), and a navigation device. And other mobile terminals and fixed terminals such as digital TVs, desktop computers, and the like. As shown in FIG. 9, it includes a processor 901, a memory 902, and a communication bus 903.
- the communication bus 903 is used to implement a communication connection between the processor 901 and the memory 902.
- the processor 901 may be configured to execute one or more first computer programs stored in the memory 902 to implement the steps of the abnormal application detection method in the foregoing embodiments.
- the processor 901 may be configured to execute one or more second computer programs stored in the memory 902 to implement the steps of the abnormal application control method in the foregoing embodiments.
- This embodiment also provides a computer-readable storage medium that is implemented in any method or technology for storing information, such as computer-readable instructions, data structures, computer program modules, or other data. Volatile or non-volatile, removable or non-removable media.
- Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory, Read-Only Memory), EEPROM (Electrically Erasable, Programmable, Read-Only Memory, and Erasable Programmable Read-Only Memory) ), Flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic box, magnetic tape, disk storage or other magnetic storage devices, Or any other medium that can be used to store desired information and can be accessed by a computer.
- the computer-readable storage medium in this embodiment may be used to store one or more first computer programs, and the one or more first computer programs may be executed by one or more processors to implement the above. Steps of the abnormal application detection method in the embodiments.
- the computer-readable storage medium in this embodiment may be used to store one or more second computer programs, and the one or more second computer programs may be executed by one or more processors to implement Steps of the abnormal application control method in the above embodiments.
- This embodiment also provides a first computer program (or computer software), which can be distributed on a computer-readable medium and executed by a computable device to implement the exceptions shown in the above embodiments. At least one step of the detection method is applied; and in some cases, at least one step shown or described may be performed in an order different from that described in the above embodiments.
- This embodiment also provides a second computer program (or computer software), which can be distributed on a computer-readable medium and executed by a computable device to implement the exceptions shown in the above embodiments. At least one step of the control method is applied; and in some cases, at least one step shown or described may be performed in an order different from that described in the above embodiments.
- This embodiment also provides a computer program product, including a computer-readable device, where the first computer program or the second computer program shown above is stored on the computer-readable device.
- the computer-readable device in this embodiment may include a computer-readable storage medium as shown above.
- a communication medium typically contains computer-readable instructions, data structures, computer program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium. Therefore, this application is not limited to any specific combination of hardware and software.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Computing Systems (AREA)
- Power Sources (AREA)
- Telephone Function (AREA)
Abstract
本申请实施例提供一种异常应用检测及控制方法、装置、终端及存储介质,在终端使用过程中,可获取终端上当前运行的各应用的资源占用信息(S101);进而基于获取的各应用的资源占用信息和预设的资源异常占用判断规则,确定出终端上当前运行的各应用中,存在功耗异常的目标应用(S102);也即在某些应用示例中,可根据各应用的资源占用信息和预设资源异常判断规则,将终端上当前所运行的所有应用中,存在功耗异常的应用准确的确定出来,且同时可避免仅针对后台应用进行功耗异常确认时而遗漏前台运行应用中存在异常的应用,因此确定出的存在功耗异常的应用更为全面和准确。
Description
交叉引用
本申请引用于2018年9月14日递交的名称为“异常应用检测及控制方法、装置、终端及存储介质”的第201811074122.X号中国专利申请,其通过引用被全部并入本申请。
本申请涉及通信技术领域,尤其涉及一种异常应用检测及控制方法、装置、终端及存储介质。
随着智能终端技术的发展以及在人们的生活和工作中充当着越来越重要的角色,在终端上所安装的应用越来越多,应用的功能也越来越丰富和强大,以满足用户在生活和工作中的各种应用需求。
但是,随着终端支持应用的多样化和功能的强大,在终端使用过程中,往往会发现存在以下情况:终端上安装的应用越多,即使某些应用没有使用,也能感觉到终端的电池消耗越来越快,内存越来越少。这是因为有些应用即使没有使用,这些应用也会在后台频繁的占用CPU等系统资源,导致终端的耗电量较大;终端电池能力、内存等硬件资源在丰富多彩的应用面前就显得捉襟见肘,从而影响用户体验。
因此,对于终端上所安装的众多应用中,如何全面、准确的确定出功耗异常的应用就显得尤为重要。
发明内容
本申请实施例提供的一种异常应用检测及控制方法、装置、终端及存储介质,主要解决的技术问题是:如何全面、准确的确定出终端上功耗异常的应用。
为解决上述技术问题,本申请实施例提供一种异常应用检测方法,包括:获取终端上当前运行的各应用的资源占用信息;基于所述各应用的资源占用信息和预设的资源异常占用判断规则,确定出所述各应用中,存在功耗异常的目标应用。
为解决上述技术问题,本申请实施例还提供一种功耗异常应用控制方法,包括:通过如上所述的异常应用检测方法,确定出终端上当前运行的各应用中,存在功耗异常的目标应用;对所述目标应用进行节省能耗的控制。
为解决上述技术问题,本申请实施例还提供一种异常应用检测装置,包括:资源检测模块,用于获取终端上当前运行的各应用的资源占用信息;异常检测模块,用于基于所述各应用的资源占用信息和预设的资源异常占用判断规则,确定出所述各应用中,存在功耗异常的目标应用。
为解决上述技术问题,本申请实施例还提供一种功耗异常应用控制装置,包括如上所述的异常应用检测装置,还包括控制模块;所述控制模块用于对所述异常应用检测装置确定出的目标应用进行节省能耗的控制。
为解决上述技术问题,本申请实施例还提供一种终端,包括处理器、存储器和通信总线;所述通信总线用于将所述处理器和存储器连接;所述处理器用于执行所述存储器中存储的第一计算机程序,以实现如上所述的异常应用检测方法的步骤;或,所述处理器用于执行所述存储器中存储的第二计算机程序,以实现如上所述的功耗异常应用控制方法的步骤。
为解决上述技术问题,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者多个第一计算机程序,所述一个或者多个计算机程序可被一个或者多个处理器执行,以实现如上所述的异常应用检 测方法的步骤;或,所述计算机可读存储介质存储有一个或者多个第二计算机程序,所述一个或者多个第二计算机程序可被一个或者多个处理器执行,以实现如上所述的功耗异常应用控制方法的步骤。
本申请的有益效果是:根据本申请实施例提供的异常应用检测及控制方法、装置、终端及存储介质,在终端使用过程中,可获取终端上当前运行的各应用(包括当前终端前台运行的应用和后台运行的应用)的资源占用信息;进而基于获取的各应用的资源占用信息和预设的资源异常占用判断规则,确定出终端上当前运行的各应用中,存在功耗异常的目标应用;也即在某些应用示例中,可根据各应用的资源占用信息和预设资源异常判断规则,将终端上当前所运行的所有应用中,存在功耗异常的应用准确的确定出来,且同时可避免仅针对后台应用进行功耗异常确认时而遗漏前台运行应用中存在异常的应用,因此确定出的存在功耗异常的应用更为全面和准确。
进一步地,在本申请实施例中,确定出终端上当前运行的各应用中存在功耗异常的目标应用后,还可对这些目标应用进行节省能耗的处理,例如包括但不限于冻结处理,从而在不影响用户正常使用终端的同时,提升终端续航能力和资源利用率,进而提升用户体验的满意度。
本申请其他特征和相应的有益效果在说明书的后面部分进行阐述说明,且应当理解,至少部分有益效果从本申请说明书中的记载变的显而易见。
图1为本申请实施例一的异常应用检测方法流程示意图;
图2为本申请实施例二的功耗异常应用控制方法流程示意图;
图3为本申请实施例二的异常应用检测方法流程示意图一;
图4为本申请实施例二的异常应用检测方法流程示意图二;
图5为本申请实施例二的异常应用检测方法流程示意图三;
图6为本申请实施例三的异常应用检测装置结构示意图;
图7为本申请实施例三的异常应用控制装置结构示意图;
图8为本申请实施例三的异常应用检测方法流程示意图;
图9为本申请实施例四的终端结构示意图。
为了使本申请的目的、技术方案及优点更加清楚明白,下面通过具体实施例结合附图对本申请实施例作进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
实施例一:
本实施例提供了一种异常应用检测方法,可以实现对终端上当前运行的各应用的功耗是否异常进行全面、准确的检测,以为终端的节能控制提供准确的依据,进而实现在不影响用户正常使用终端的同时,提升终端续航能力和资源利用率,提升用户体验的满意度。
本实施例提供的一种异常应用检测方法参见图1所示,包括:
S101:获取终端上当前运行的各应用的资源占用信息。
应当理解的是,本实施例中的终端可以是支持应用运行的各种智能终端,例如包括但不限于智能电话、笔记本电脑、数字广播接收器、个人数字助理(PDA)、平板电脑(PAD),便携式多媒体播放器(PMP)、导航装置等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。且本实施例中终端上运行的系统可包括但不限于Android、iOS、windows phone、Symbian、BlackBerry OS、windows mobile、以及微软的应用于PC机上的windows系列系统、苹果的MAC系列系统,还可包括linux系统等。
本实施例中,终端上当前运行的各应用包括在终端上启动,运行于前台以及后台的各种应用,这样可以对终端上当前运行的所有应用进行全面的监测,避免仅针对后台运行的应用进行监测,而导致前台运行的应用发生异常时不能及时、准确的发现。尤其是随着相关技术中一般都针对后台应用进行异常监测 的情况下,一些恶意应用针对该漏洞将相关进程维持在终端前台运行,从而可逃出异常监测范围,导致终端上明明进行了异常应用监测,却监测不到异常应用情况的发生。采用本实施例提供的异常应用检测方法,可以实现对终端当前运行的所有应用进行监测,避免前台运行的异常应用因相关技术未将其纳入监测范围而导致漏监测的情况发生,可进一步提升用户用户体验满意度。
S102:基于获取的上述各应用的资源占用信息和预设的资源异常占用判断规则,确定出终端上当前运行的各应用中,存在功耗异常的目标应用。
在本实施例中,获取的是终端上当前运行的各应用的资源占用信息,根据终端上当前运行的各应用的资源占用情况实时的确认出存在功耗异常的目标应用。并不是简单的依靠预先设置的应用清单,将当前运行的属于该应用清单的某一个应用直接确定为功耗异常的应用。因为应用在某些具体应用场景下可能确实是功耗异常的应用,但在某些应用场景下则是属于功耗正常的应用,也即属于正常运行的应用。相关技术中依据预先设置好的应用清单直接将属于该清单中的应用确定为功耗异常应用的方式,存在较大的误差,容易将正常运行的应用误判为功耗异常的应用;且其判断结果在很大程度上也依赖于清单中应用的准确设置,而用户往往并不能精准或实时的调整该清单以使得该清单保持精确,这也导致依据该预先设置的应用清单所得到的判断结果存在较大误差,进而降低了用户体验的满意度。
而本实施例提供的异常应用检测方法,根据终端上当前运行的各应用的资源占用情况实时的确认出存在功耗异常的目标应用,并不需要用户或相应的服务商设置或服务相应的应用清单,实用性和智能性更好,且准确性更高,更利于提升用户体验的满意度。
在本实施例中,针对终端上当前运行的各应用,在获取各应用的资源占用信息时,可以获取各应用运行所需占用的基础资源且利于初步筛选确定某一应用是否可能为功耗异常应用的资源占用信息,本实施例称之为第一资源占用信息;可根据该第一资源占用信息,对终端上当前运行的各应用中,属于功耗正常的应用筛选出来进行异常排除,然后从排除后的应用集合中,再确定是否 存在功耗异常的应用。这种处理方式既利于提升检测效率,同时也利于检测准确率的提升。
因此,在本实施例的一种示例中,获取的应用的资源占用信息可包括应用的第一资源占用信息。
相应的,资源异常占用判断规则可包括:当某一应用在预设检测周期内的第一资源占用信息满足第一资源占用条件时,确定该应用为功耗正常的应用;如果某一应用在预设检测周期内的第一资源占用信息不满足第一资源占用条件时,则表明该应用可能为功耗异常的应用,可通过对其做进一步判断以确定其是否为功耗异常的应用。
本实施例中的预设检测周期可以根据具体应用场景灵活设置,且应当理解的是,可选地,该预设检测周期可支持动态配置和更新。例如可以设置为10分钟,15分钟,20分钟,30分钟或60分钟等。
如上分析所示,本实施例中的第一资源可以是各应用运行所需占用的基础资源且利于初步筛选确定某一应用是否可能为功耗异常应用的基础资源,相应的资源占用信息可以是该资源的占用量,该占用量可以是资源绝对占用量,也可以时资源相对占用量(也即各应用占用量的比较排名);在一些应用示例中,该资源占用信息也可以是资源占用时长,或者资源占用时长和资源占用量结合。且应当理解的是,针对不同的资源,同获取的资源占用信息可以相同,也可不相同;例如针对A类资源,可以获取资源占用时长,针对B类资源,可以获取资源占用量,针对C类资源,可以获取资源占用时长和资源占用量等。对应的,第一资源占用条件可以根据具体的第一资源占用信息灵活设置,只要其能表明一个应用是否属于正常运行的应用,也即功耗正常的应用即可。
例如,在一种示例中,设置第一资源占用信息包括:处理器CPU占用时长,设置第一资源占用条件包括:处理器占用时长小于等于第一时长阈值。此时则针对终端上当前运行的各应用中,在预设检测周期内,占用处理器的时长小于等于第一时长阈值的应用可判定为功耗正常的应用,大于该第一时长阈值的应用则需要进一步确定其是否为功耗异常的应用。
当然,在一种示例中,也可设置第一资源占用信息包括:处理器CPU资源占用百分比,设置第一资源占用条件包括:处理器占用时长小于等于预设第一资源百分比阈值。此时则针对终端上当前运行的各应用中,在预设检测周期内,占用处理器的资源百分比小于等于第一资源百分比阈值的应用可判定为功耗正常的应用,大于该第一资源百分比阈值的应用则需要进一步确定其是否为功耗异常的应用。
如上分析所示,在本实施例中,资源异常占用判断规则还可包括:当某一应用在预设检测周期内的第一资源占用信息不满足第一资源占用条件时,还包括以下判断规则中的至少之一:规则一:在资源占用信息还包括第二资源占用信息,且确定应用在预设检测周期内的第二资源占用信息不满足第二资源占用条件时,确定该应用为存在功耗异常的目标应用;规则二:在当前或在上述预设检测周期内,应用未接收到输入指令时,确定该应用为存在功耗异常的目标应用;规则三:在终端当前处于熄屏状态时,确定该应用为存在功耗异常的目标应用。
应当理解的是,本实施例中的资源异常占用判断规则可进一步包括上述规则中的任意一种规则,可以包括上述规则中的两种以上的规则的组合,且包括上述规则中的两种以上的规则组合时,具体的组合时序可以根据需求灵活设置。例如,在一种示例中,资源异常占用判断规则可进一步包括上述规则一、规则二和规则三,且组合顺序为依次执行规则一、规则二和规则三;本实施例中的依次执行上述规则一、规则二和规则三,是指的针对某一应用,采用规则一确定不出其是否为功耗异常的应用时,则再采用上述规则二判断其是否属于功耗异常的应用,如果采用规则也不能确定其是否为功耗异常的应用时,再采用上述规则三判断其是否属于功耗异常的应用,当然,在一些应用示例中,上述规则一与规则二或规则一与规则三可相互穿插执行。又例如,在一些应用场景中,上述组合顺序也可为先执行规则二,再执行规则三,最后执行规则一。又例如,在一些示例中,资源异常占用判断规则可进一步仅包括上述规则一,或仅包括上述规则一和规则二,且规则一和规则二依次执行,或仅包括上述规 则二和规则三,规则二和规则三依次执行,或仅包括上述规则一和规则三,规则一和规则三依次执行等等。
在本实施例的一种示例中,当资源异常占用判断规则包括所述规则一时,第二资源占用信息可包括能进一步确定应用是否是功耗异常的应用的各种资源,例如包括但不限于多媒体资源(包括但不限于GPU(Graphics Processing Unit,图形处理器)、定位资源(包括但不限于各种定位模块,例如GPS(Global Positioning System,全球定位系统)定位模块),唤醒锁(例如安卓系统中的wakelock);相应的,在本实施例中,第二资源占用信息可包括但不限于以下信息中的至少一种:多媒体资源占用时长,定位资源占用时长、唤醒锁占用时长。
第二资源占用条件可包括但不限于以下条件中的至少一种:在第二资源占用信息包括所述多媒体资源占用时长时,第二资源占用条件包括:多媒体资源占用时长小于等于第二时长阈值;在第二资源占用信息包括所述定位资源占用时长时,第二资源占用条件包括:定位资源占用时长小于等于第三时长阈值;在第二资源占用信息包括唤醒锁资源占用时长时,第二资源占用条件包括:唤醒锁占用时长大于第四时长阈值。
如上分析所示,本实施例中具体的资源占用信息除了通过占用时长表征外,也可灵活的选择采用其他元素表征,且对应的资源占用条件也可灵活设置。例如,在一种示例中,第二资源占用信息包括多媒体资源占用时长、定位资源占用时长和唤醒锁占用时长。
且在本示例中,可设置在满足以下条件中的任意一种时,确定应用在所述预设检测周期内的第二资源占用信息不满足第二资源占用条件,也即确定该应用为功耗异常的应用:应用的多媒体资源占用时长小于等于第二时长阈值;应用的定位资源占用时长小于等于第三时长阈值;应用的唤醒锁占用时长大于第四时长阈值。
可见,通过本实施例提供的异常应用检测及控制方法,可根据终端上当前运行的各应用的资源占用信息,以及可灵活设置和应用的资源异常占用判断规则,可全面、准确且高效的确定出终端上当前运行的各应用中,存在功耗异 常的目标应用,为终端节省功耗的控制提供更为全面且准确的依据,且本实施例提供的异常应用检测及控制方法具有更好的通用性和智能性,能进一步提升用户体验满意度。
实施例二:
本实施例提供了一种功耗异常应用控制方法,可对终端上功耗异常的应用进行节省能耗的控制,以提升终端的待机性能和资源利用率。参见图2所示,本实施例提供的功耗异常应用控制方法包括:
S201:确定出终端上当前运行的各应用中,存在功耗异常的目标应用。
本实施例中,可通过上述实施例所示的异常应用检测方法,确定出终端上当前运行的各应用中,存在功耗异常的目标应用;当然也可采用其他方法确定出终端上当前运行的各应用中,存在功耗异常的目标应用。
S202:对确定出的目标应用进行节省能耗的控制。
应当理解的是,本实施例中对目标应用进行节省能耗的控制,可以采用各种对应用进行节能控制的方式。例如包括但不限于将目标应用冻结,或关闭目标应用功耗较大的进程等。
为了便于理解,本实施例下面结合几种应用示例,对确定出终端上当前运行的各应用中,是否存在功耗异常的目标应用做进一步说明。
示例一:
本示例包括上述实施例中的第一资源占用信息,同时包括上述实施例中的规则一,也即同时包括第二资源占用信息,且本实施例中的第二资源占用信息包括多媒体资源占用时长,定位资源占用时长、唤醒锁占用时长。本示例中的一种确定终端上当前运行的各应用中,是否存在功耗异常的目标应用的过程参见图3所示,包括:
S301:获取终端上当前运行的各应用的资源占用信息。
在本实施例中包括获取第一资源占用信息,例如处理器CPU的占用信息,以及获取第二资源占用信息,也即获取多媒体资源占用时长,定位资源占用时长、唤醒锁占用时长。
S302:对于终端上当前运行的某一应用,确定其第一资源占用信息是否满足第一资源占用条件,如是,转至S306;否则,转至S303。
S303:确定该应用的多媒体资源占用时长是否小于等于第二时长阈值,如否,转至S306,否则,转至S304。
S304:确定定位资源占用时长是否小于等于第三时长阈值,如否,转至S306,否则,转至S305。
S305,确定唤醒锁占用时长是否大于第四时长阈值,如否,转至S306,否则,转至S307。
S306:确定该应用为功耗正常的应用,存在待判断的下一应用时,进入下一应用的判断。
S307:确定该应用为功耗异常的目标应用,存在待判断的下一应用时,进入下一应用的判断。
在本示例的另一应用场景中,是否存在功耗异常的目标应用的过程还可为图4所示的时序,包括:
S401:获取终端上当前运行的各应用的资源占用信息。
在本实施例中包括获取第一资源占用信息,例如处理器CPU的占用信息,以及获取第二资源占用信息,也即获取多媒体资源占用时长,定位资源占用时长、唤醒锁占用时长。
S402:对于终端上当前运行的某一应用,确定其第一资源占用信息是否满足第一资源占用条件,如是,转至S406;否则,转至S403。
S403:确定定位资源占用时长是否小于等于第三时长阈值,如否,转至S406,否则,转至S404。
S404:确定该应用的多媒体资源占用时长是否小于等于第二时长阈值,如否,转至S406,否则,转至S405。
S405,确定唤醒锁占用时长是否大于第四时长阈值,如否,转至S406,否则,转至S407。
S406:确定该应用为功耗正常的应用,存在待判断的下一应用时,进入 下一应用的判断。
S407:确定该应用为功耗异常的目标应用,存在待判断的下一应用时,进入下一应用的判断。
也即本实施例中,应用的多媒体资源占用时长,定位资源占用时长、唤醒锁占用时长的判断时序可以灵活设置,并不限于上述示例的时序。
示例二:
本示例包括上述实施例中的第一资源占用信息,同时包括上述实施例中的规则一、规则二以及规则三,且本实施例中的第二资源占用信息包括多媒体资源占用时长,定位资源占用时长、唤醒锁占用时长,本示例中规则一、规则二、规则三可依次执行,规则一和规则二也可相互穿插执行,下面以规则一和规则二也可相互穿插执行为示例,对本示例中的一种确定终端上当前运行的各应用中,是否存在功耗异常的目标应用的过程进行说明,参见图5所示,包括:
S501:获取终端上当前运行的各应用的资源占用信息。
在本实施例中包括获取第一资源占用信息,例如处理器CPU的占用信息,以及获取第二资源占用信息,也即获取多媒体资源占用时长,定位资源占用时长、唤醒锁占用时长。
S502:对于终端上当前运行的某一应用,确定其第一资源占用信息是否满足第一资源占用条件,如是,转至S508;否则,转至S503。
S503:确定该应用的多媒体资源占用时长是否小于等于第二时长阈值,如否,转至S508,否则,转至S504。
S504:确定定位资源占用时长是否小于等于第三时长阈值,如否,转至S508,否则,转至S505。
S505,确定在当前或在上述预设检测周期内,应用是否接收到输入指令,如是,转至S508;否则,转至S506。
S506:确定唤醒锁占用时长是否大于第四时长阈值,如否,转至S507,否则,转至S508。
S507:确定终端当前是否处于熄屏状态,如是,转至S508;否则,转至 S509。
S508:确定该应用为功耗正常的应用,存在待判断的下一应用时,进入下一应用的判断。
S509:确定该应用为功耗异常的目标应用,存在待判断的下一应用时,进入下一应用的判断。
可见,通过本实施例提供的功耗异常应用控制方法,可以全面、灵活且准确的确定出终端上存在功耗异常的各应用,并通过冻结等节能处理方式对这些应用进行控制处理,进而实现提升终端续航性能和资源利用率。
实施例三:
本实施例提供了一种异常应用检测装置,其可设置于各种终端中,参见图6所示,包括:
资源检测模块601,用于获取终端上当前运行的各应用的资源占用信息;具体获取过程可参见上述各实施例所示的资源占用信获取过程,在此不再赘述。
异常检测模块602,用于基于资源检测模块601获取的各应用的资源占用信息和预设的资源异常占用判断规则,确定出所述各应用中,存在功耗异常的目标应用。具体确定过程,可参见上述各实施例所示的功耗异常的目标应用过程,在此不再赘述。
例如,如上各是实施例所示,一种示例中,资源占用信息包括第一资源占用信息;异常检测模块602可用于确定当某一应用在预设检测周期内的第一资源占用信息满足第一资源占用条件时,确定该应用为功耗正常的应用。
又例如,如上各是实施例所示,一种示例中异常检测模块602还用于当某一应用在预设检测周期内的第一资源占用信息不满足第一资源占用条件时,执行以下判断规则中的至少之一:规则一:在所述资源占用信息还包括第二资源占用信息,且确定所述应用在所述预设检测周期内的第二资源占用信息不满足第二资源占用条件时,确定该应用为存在功耗异常的目标应用;规则二:在当前或在所述预设检测周期内,所述应用未接收到输入指令时,确定该应用为存在功耗异常的目标应用;规则三:在所述终端当前处于熄屏状态时,确定该 应用为存在功耗异常的目标应用。
异常监测模块603选择执行上述规则的过程可参见上述各实施例所示,在此也不再赘述。且应当理解的是,本实施例中资源检测模块601和异常检测模块602的功能可通过终端内的处理器或控制实现。
本实施还提供了一种功耗异常应用控制装置,参见图7所示,包括异常应用检测装置701,还包括控制模块702。
其中,异常应用检测装置701可为图6所示的异常应用检测装置,当然也可为采用其他异常应用检测方法的检测装置。
控制模块用702于对异常应用检测装置701确定出的目标应用进行节省能耗的控制。
应当理解的是,本实施例中控制模块用702对目标应用进行节省能耗的控制,可以采用各种对应用进行节能控制的方式。例如包括但不限于将目标应用冻结,或关闭目标应用功耗较大的进程等。
且应当理解的是,本实施例中控制模块用702的功能可通过终端内的处理器或控制实现。
为了便于理解,本实施例下面以将图6和图7所示的装置设置于终端(例如手机、ipad等)内,以第一资源占用信息为处理器CPU占用时长,第二资源占用信息包括GPU占用时长(即一种多媒体资源占用时长)、Gps占用时长(即一种定位资源占用时长)和wakelock占用时长为示例,对一种具体的应用场景的功耗异常的应用检测过程进行说明,参见图8所示,包括:
S801:终端开机,资源检测模块启动,设定异常检测模块的启动时间,也即设置异常检测周期。
S802:资源检测模块收集终端上运行中各应用的类资源占用信息。
S803:异常检测模块在设定时间启动,读取资源检测模块收集应用记录,进入S804。
S804:异常检测模块检查应用记录的CPU占用时间,如果小于等于第一时长阈值,则进入S810,否则读取GPU占用时间,进入S805。
S805:如果GPU占用时间大于第二时长阈值,行为判定为视频播放,则进入S810,否则读取Gps占用时间,进入S806。
S806:如果Gps占用时间大于第三时长阈值,行为判定为定位导航,则进入S810,否则读取输入指令收集情况,进入S807。
S807:如果该应用当前(或在检测周期内)有输入操作行为,判定为游戏互动,则进入S810,否则读取wakelock占用时间,进入S808。
S808:如果wakelock占用时间小于第四时长阈值,也即wakelock占用时间很短,可确定该应用运行行为运算类,则进入S810,否则读取当前屏幕状态,进入S809。
S809:如果终端当前亮屏,行为判定为数据浏览,则进入S810,否则进入S811。
S810:视频播放、定位导航、游戏互动、运算类或数据浏览行为,则异常检测模块判定应用行为正常,进入S803继续判定下一个运行中的应用。
S811:CPU占用时间长,且wakelock占用长,且是在灭屏状态,则异常检测模块判定该应用行为异常,也即确定该应用为功耗异常的目标应用,向系统上报目标应用,进入S803继续判定下一个运行中的应用。
实施例四:
本实施例还提供了一种终端,该终端包括但不限于智能电话、笔记本电脑、数字广播接收器、个人数字助理(PDA)、平板电脑(PAD),便携式多媒体播放器(PMP)、导航装置等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。参见图9所示,其包括处理器901、存储器902以及通信总线903。
通信总线903用于实现处理器901与存储器902之间的通信连接。
一种示例中,处理器901可用于执行存储器902中存储的一个或者多个第一计算机程序,以实现如上各实施例中的异常应用检测方法的步骤。
在另一示例中,处理器901可用于执行存储器902中存储的一个或者多个第二计算机程序,以实现如上各实施例中的异常应用控制方法的步骤。
本实施例还提供了一种计算机可读存储介质,该计算机可读存储介质包 括在用于存储信息(诸如计算机可读指令、数据结构、计算机程序模块或其他数据)的任何方法或技术中实施的易失性或非易失性、可移除或不可移除的介质。计算机可读存储介质包括但不限于RAM(Random Access Memory,随机存取存储器),ROM(Read-Only Memory,只读存储器),EEPROM(Electrically Erasable Programmable read only memory,带电可擦可编程只读存储器)、闪存或其他存储器技术、CD-ROM(Compact Disc Read-Only Memory,光盘只读存储器),数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。
在一种示例中,本实施例中的计算机可读存储介质可用于存储一个或者多个第一计算机程序,该一个或者多个第一计算机程序可被一个或者多个处理器执行,以实现如上各实施例中的异常应用检测方法的步骤。
在另一种示例中,本实施例中的计算机可读存储介质可用于存储一个或者多个第二计算机程序,该一个或者多个第二计算机程序可被一个或者多个处理器执行,以实现如上各实施例中的异常应用控制方法的步骤。
本实施例还提供了一种第一计算机程序(或称计算机软件),该第一计算机程序可以分布在计算机可读介质上,由可计算装置来执行,以实现如上各实施例所示的异常应用检测方法的至少一个步骤;并且在某些情况下,可以采用不同于上述实施例所描述的顺序执行所示出或描述的至少一个步骤。
本实施例还提供了一种第二计算机程序(或称计算机软件),该第二计算机程序可以分布在计算机可读介质上,由可计算装置来执行,以实现如上各实施例所示的异常应用控制方法的至少一个步骤;并且在某些情况下,可以采用不同于上述实施例所描述的顺序执行所示出或描述的至少一个步骤。
本实施例还提供了一种计算机程序产品,包括计算机可读装置,该计算机可读装置上存储有如上所示的第一计算机程序或第二计算机程序。本实施例中该计算机可读装置可包括如上所示的计算机可读存储介质。
可见,本领域的技术人员应该明白,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件(可以用计算装置可执 行的计算机程序代码来实现)、固件、硬件及其适当的组合。在硬件实施例中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。
此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、计算机程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。所以,本申请不限制于任何特定的硬件和软件结合。
以上内容是结合具体的实施例对本申请实施例所作的进一步详细说明,不能认定本申请的具体实施只局限于这些说明。对于本申请所属技术领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本申请的保护范围。
Claims (14)
- 一种异常应用检测方法,包括:获取终端上当前运行的各应用的资源占用信息;基于所述各应用的资源占用信息和预设的资源异常占用判断规则,确定出所述各应用中,存在功耗异常的目标应用。
- 如权利要求1所述的异常应用检测方法,其中,所述资源占用信息包括第一资源占用信息;所述资源异常占用判断规则包括:当某一应用在预设检测周期内的第一资源占用信息满足第一资源占用条件时,确定该应用为功耗正常的应用。
- 如权利要求2所述的异常应用检测方法,其中,所述资源异常占用判断规则还包括:当某一应用在预设检测周期内的第一资源占用信息不满足所述第一资源占用条件时,还包括以下判断规则中的至少之一:规则一:在所述资源占用信息还包括第二资源占用信息,且确定所述应用在所述预设检测周期内的第二资源占用信息不满足第二资源占用条件时,确定该应用为存在功耗异常的目标应用;规则二:在当前或在所述预设检测周期内,所述应用未接收到输入指令时,确定该应用为存在功耗异常的目标应用;规则三:在所述终端当前处于熄屏状态时,确定该应用为存在功耗异常的目标应用。
- 如权利要求3所述的异常应用检测方法,其中,所述资源异常占用判断规则包括所述规则一时,所述第二资源占用信息包括以下信息中的至少一种:多媒体资源占用时长,定位资源占用时长、唤醒锁占用时长;所述第二资源占用条件包括:在所述第二资源占用信息包括所述多媒体资源占用时长时,所述第二资源 占用条件包括:多媒体资源占用时长小于等于第二时长阈值;在所述第二资源占用信息包括所述定位资源占用时长时,所述第二资源占用条件包括:定位资源占用时长小于等于第三时长阈值;在所述第二资源占用信息包括所述唤醒锁资源占用时长时,所述第二资源占用条件包括:唤醒锁占用时长大于第四时长阈值。
- 如权利要求4所述的异常应用检测方法,其中,所述第二资源占用信息包括所述多媒体资源占用时长、定位资源占用时长和唤醒锁占用时长;在满足以下条件中的任意一种时,确定所述应用在所述预设检测周期内的第二资源占用信息不满足第二资源占用条件:所述应用的多媒体资源占用时长小于等于第二时长阈值;所述应用的定位资源占用时长小于等于第三时长阈值;所述应用的唤醒锁占用时长大于第四时长阈值。
- 如权利要求2-5任一项所述的异常应用检测方法,其中,所述第一资源占用信息包括:处理器占用时长,所述第一资源占用条件包括:处理器占用时长小于等于第一时长阈值。
- 如权利要求3-5任一项所述的异常应用检测方法,其中,所述资源异常占用判断规则包括:依次执行所述规则一、规则二和规则三。
- 一种功耗异常应用控制方法,包括:通过如权利要求1-7任一项所述的异常应用检测方法,确定出终端上当前运行的各应用中,存在功耗异常的目标应用;对所述目标应用进行节省能耗的控制。
- 一种异常应用检测装置,包括:资源检测模块,用于获取终端上当前运行的各应用的资源占用信息;异常检测模块,用于基于所述各应用的资源占用信息和预设的资源异常占用判断规则,确定出所述各应用中,存在功耗异常的目标应用。
- 如权利要求9所述的异常应用检测装置,其中,所述资源占用信息包括第一资源占用信息;所述异常检测模块用于确定当某一应用在预设检测周期内的第一资源占用信息满足第一资源占用条件时,确定该应用为功耗正常的应用。
- 如权利要求10所述的异常应用检测装置,其中,所述异常检测模块还用于当某一应用在预设检测周期内的第一资源占用信息不满足所述第一资源占用条件时,执行以下判断规则中的至少之一:规则一:在所述资源占用信息还包括第二资源占用信息,且确定所述应用在所述预设检测周期内的第二资源占用信息不满足第二资源占用条件时,确定该应用为存在功耗异常的目标应用;规则二:在当前或在所述预设检测周期内,所述应用未接收到输入指令时,确定该应用为存在功耗异常的目标应用;规则三:在所述终端当前处于熄屏状态时,确定该应用为存在功耗异常的目标应用。
- 一种功耗异常应用控制装置,包括如权利要求9-10任一项所述的异常应用检测装置,还包括控制模块;所述控制模块用于对所述异常应用检测装置确定出的目标应用进行节省能耗的控制。
- 一种终端,其中,包括处理器、存储器和通信总线;所述通信总线用于将所述处理器和存储器连接;所述处理器用于执行所述存储器中存储的第一计算机程序,以实现如权利要求1-7任一项所述的异常应用检测方法的步骤;或,所述处理器用于执行所述存储器中存储的第二计算机程序,以实现如权利要求8所述的功耗异常应用控制方法的步骤。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者多 个第一计算机程序,所述一个或者多个计算机程序可被一个或者多个处理器执行,以实现如权利要求1-7任一项所述的异常应用检测方法的步骤;或,所述计算机可读存储介质存储有一个或者多个第二计算机程序,所述一个或者多个第二计算机程序可被一个或者多个处理器执行,以实现如权利要求8所述的功耗异常应用控制方法的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811074122.XA CN110908851A (zh) | 2018-09-14 | 2018-09-14 | 异常应用检测及控制方法、装置、终端及存储介质 |
CN201811074122.X | 2018-09-14 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020052472A1 true WO2020052472A1 (zh) | 2020-03-19 |
Family
ID=69777138
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/104172 WO2020052472A1 (zh) | 2018-09-14 | 2019-09-03 | 异常应用检测及控制方法、装置、终端及存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110908851A (zh) |
WO (1) | WO2020052472A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113535505B (zh) * | 2020-04-21 | 2024-07-26 | 深圳市万普拉斯科技有限公司 | 电子设备功耗检测方法、装置和计算机设备 |
CN114428546B (zh) * | 2022-01-25 | 2024-04-09 | 惠州Tcl移动通信有限公司 | 后台应用清理方法、装置、存储介质及终端设备 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103037108A (zh) * | 2012-12-10 | 2013-04-10 | 乐蛙科技(上海)有限公司 | 一种智能移动终端的省电方法 |
CN103324519A (zh) * | 2013-06-17 | 2013-09-25 | 华为技术有限公司 | 一种恶意耗电应用的清理方法、装置及用户终端 |
US20140218316A1 (en) * | 2013-02-06 | 2014-08-07 | Mediatek Singapore Pte. Ltd. | Control method and electronic device |
CN104156053A (zh) * | 2014-07-29 | 2014-11-19 | 深圳市中兴移动通信有限公司 | 一种异常耗电的控制方法、装置和移动终端 |
CN105718028A (zh) * | 2016-01-22 | 2016-06-29 | 青岛海信移动通信技术股份有限公司 | 一种基于识别耗电应用的省电方法及装置 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105204970B (zh) * | 2014-06-30 | 2018-06-01 | 北京金山安全软件有限公司 | 检测app的cpu占用率异常的方法、装置及移动终端 |
CN105764085A (zh) * | 2016-02-15 | 2016-07-13 | 努比亚技术有限公司 | 一种异常耗电的检测方法及终端 |
CN107506019A (zh) * | 2017-08-07 | 2017-12-22 | 北京小米移动软件有限公司 | 应用程序的管理方法及装置、终端、存储介质 |
-
2018
- 2018-09-14 CN CN201811074122.XA patent/CN110908851A/zh active Pending
-
2019
- 2019-09-03 WO PCT/CN2019/104172 patent/WO2020052472A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103037108A (zh) * | 2012-12-10 | 2013-04-10 | 乐蛙科技(上海)有限公司 | 一种智能移动终端的省电方法 |
US20140218316A1 (en) * | 2013-02-06 | 2014-08-07 | Mediatek Singapore Pte. Ltd. | Control method and electronic device |
CN103324519A (zh) * | 2013-06-17 | 2013-09-25 | 华为技术有限公司 | 一种恶意耗电应用的清理方法、装置及用户终端 |
CN104156053A (zh) * | 2014-07-29 | 2014-11-19 | 深圳市中兴移动通信有限公司 | 一种异常耗电的控制方法、装置和移动终端 |
CN105718028A (zh) * | 2016-01-22 | 2016-06-29 | 青岛海信移动通信技术股份有限公司 | 一种基于识别耗电应用的省电方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
CN110908851A (zh) | 2020-03-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10394655B2 (en) | Method for detecting abnormal application and mobile terminal | |
US9626295B2 (en) | Systems and methods for scheduling tasks in a heterogeneous processor cluster architecture using cache demand monitoring | |
US9361150B2 (en) | Resuming applications and/or exempting applications from suspension | |
US8745362B2 (en) | Operating system aware branch predictor using a dynamically reconfigurable branch history table | |
US8752060B2 (en) | Multi-CPU domain mobile electronic device and operation method thereof | |
WO2020052471A1 (zh) | 待管理应用检测及控制方法、装置、终端及存储介质 | |
US8402232B2 (en) | Memory utilization tracking | |
CN108702421B (zh) | 用于控制应用和组件的电子设备和方法 | |
US20180113764A1 (en) | Hypervisor Based Watchdog Timer | |
US10198059B2 (en) | Adaptive doze to hibernate | |
US20160378579A1 (en) | Atypical Reboot Data Collection And Analysis | |
US20170269984A1 (en) | Systems and methods for improved detection of processor hang and improved recovery from processor hang in a computing device | |
US9717055B2 (en) | Method for performing alarm grouping control of an electronic device with aid of at least one grouping control strategy, and associated apparatus | |
CN110727473B (zh) | 资源控制方法及装置、系统、存储介质和电子设备 | |
US11662803B2 (en) | Control method, apparatus, and electronic device | |
US20160357623A1 (en) | Abnormality detection method and information processing apparatus | |
WO2020052472A1 (zh) | 异常应用检测及控制方法、装置、终端及存储介质 | |
US9965626B2 (en) | Memory attack detection | |
US11943127B2 (en) | Network-based control method for power consumption of applications, terminal and storage medium | |
WO2020094125A1 (zh) | 应用控制方法、装置、终端及计算机可读存储介质 | |
WO2021037111A1 (zh) | 应用管理方法、装置、终端和可读存储介质 | |
US8832708B2 (en) | Process pool of empty application hosts to improve user perceived launch time of applications | |
CN111897586A (zh) | 应用状态控制方法、装置、终端及计算机可读存储介质 | |
US10642981B2 (en) | Checking method, checking device and checking system for processor | |
US20220357789A1 (en) | Application freezing control method and device, terminal, and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19859975 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19859975 Country of ref document: EP Kind code of ref document: A1 |