CN107133172A - The power consumption detection method and device of application program - Google Patents
The power consumption detection method and device of application program Download PDFInfo
- Publication number
- CN107133172A CN107133172A CN201710300876.1A CN201710300876A CN107133172A CN 107133172 A CN107133172 A CN 107133172A CN 201710300876 A CN201710300876 A CN 201710300876A CN 107133172 A CN107133172 A CN 107133172A
- Authority
- CN
- China
- Prior art keywords
- terminal device
- application program
- resource
- detection
- power consumption
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephone Function (AREA)
Abstract
The disclosure is directed to a kind of power consumption detection method and device of application program.This method includes:Detect terminal device application program whether the resource of using terminal equipment, count first time period in each time detection in terminal device application program using terminal equipment resource access times, and according to access times determine terminal device application program whether power consumption exception.The power consumption detection method and device of the application program of the disclosure can detect the application program in terminal device with the presence or absence of power consumption exception, help to find the usage amount of resource less but continuation or the intermittently application program of the resource of using terminal equipment, detection process is simple and strong applicability.
Description
Technical field
This disclosure relates to field of computer technology, more particularly to application program power consumption detection method and device.
Background technology
At present, the mobile terminal such as smart mobile phone can install various types of application programs, and each application program is in operation
During can use the resource of mobile terminal, such as CPU (Central Processing Unit, central processing unit) resources and/
Or Internet resources etc..When running background of the application program in mobile terminal, we it is generally desirable to application program and do not use shifting
The resource of dynamic terminal.However, some application programs of the running background in mobile terminal, understand continuation or intermittently using shifting
The resource of dynamic terminal, causes the electricity for consuming mobile terminal.
In correlation technique, mobile terminal running background some application programs to the usage amount of the resource of mobile terminal
Although the power consumption for less, being likely to result in mobile terminal is abnormal.For example, the application program of some running background is although right
The usage amount of cpu resource less, but can hinder CPU to be switched to lower frequency work or battery saving mode work.For another example after some
Although the application program of platform operation is little to the usage amount of Internet resources, baseband chip can be caused long-term under high power consumption mode
Work.
The content of the invention
To overcome problem present in correlation technique, the disclosure provides the power consumption detection method and dress of a kind of application program
Put.
According to the first aspect of the embodiment of the present disclosure there is provided a kind of power consumption detection method of application program, including:
Detect whether the application program of terminal device uses the resource of the terminal device;
The application program for counting terminal device described in each detection in first time period uses the terminal device
The access times of resource;
According to the access times, determining the application program of the terminal device, whether power consumption is abnormal.
In a kind of possible implementation, detect whether the application program of terminal device uses the money of the terminal device
Source, including:
The application program for obtaining the terminal device uses the use total amount of the resource of the terminal device;
In the case where the use total amount and the difference of the upper use total amount for once detecting acquisition that this detection is obtained are not zero,
Judge that the application program of terminal device described in this detection uses the resource of the terminal device.
In a kind of possible implementation, the application of terminal device described in each detection in statistics first time period
Program uses the access times of the resource of the terminal device, including:
For the detection each time in the first time period, if the application program for detecting the terminal device uses institute
The resource of terminal device is stated, then the application program to the terminal device is once marked;
Described will be defined as in the first time period to the number of times that the application program of the terminal device is marked
The application program of terminal device uses the access times of the resource of the terminal device described in each detection in one period.
In a kind of possible implementation, according to the access times, determining the application program of the terminal device is
No power consumption is abnormal, including:
According to the detection number of times and the ratio or difference of the access times in first time period, the terminal device is determined
Application program whether power consumption is abnormal.
According to the second aspect of the embodiment of the present disclosure there is provided a kind of power-comuption detecting device of application program, including:
Detection module, for detecting whether the application program of terminal device uses the resource of the terminal device;
Statistical module, the application program for counting terminal device described in each time in first time period detection uses institute
State the access times of the resource of terminal device;
Determining module, for according to the access times, determining the application program of the terminal device, whether power consumption is abnormal.
In a kind of possible implementation, the detection module includes:
Acquisition submodule, the application program for obtaining the terminal device uses the use of the resource of the terminal device
Total amount;
First decision sub-module, for the use total amount and the upper use total amount for once detecting acquisition obtained in this detection
Difference be not zero in the case of, judge this detection described in terminal device application program use the terminal device money
Source.
In a kind of possible implementation, the statistical module includes:
Submodule is marked, for for the detection each time in the first time period, if detecting the terminal device
Application program use the terminal device resource, then the application program to the terminal device once marked;
Statistic submodule, for time that the application program of the terminal device will be marked in the first time period
The application program of terminal device uses the terminal device described in each detection that number is defined as in the first time period
The access times of resource.
In a kind of possible implementation, the determining module is used for:
According to the detection number of times and the ratio or difference of the access times in first time period, the terminal device is determined
Application program whether power consumption is abnormal.
According to the third aspect of the embodiment of the present disclosure there is provided a kind of power-comuption detecting device of application program, including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
Detect whether the application program of terminal device uses the resource of the terminal device;
The application program for counting terminal device described in each detection in first time period uses the terminal device
The access times of resource;
According to the access times, determining the application program of the terminal device, whether power consumption is abnormal.
According to the fourth aspect of the embodiment of the present disclosure there is provided a kind of non-volatile computer readable storage medium storing program for executing, thereon
Be stored with computer program instructions, and the computer program instructions realize the above method when being executed by processor.
The technical scheme provided by this disclosed embodiment can include the following benefits:The consumption of the application program of the disclosure
Electro-detection method and device, detect terminal device application program whether the resource of using terminal equipment, count first time period
The access times of the resource of the application program using terminal equipment of terminal device in each time interior detection, and it is true according to access times
Determining the application program of terminal device, whether power consumption is abnormal.In the accounting mistake that access times are excessive or access times are in detection number of times
In the case of height, it is believed that the application program continuation of terminal device or the intermittently resource of using terminal equipment, cause
The electricity of terminal device is consumed, thus, it is possible to detect that the application program in terminal device, with the presence or absence of power consumption exception, contributes to hair
Less but continuation or the intermittently application program of the resource of using terminal equipment, detection process is simple for the usage amount of existing resource
And strong applicability.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary and explanatory, not
The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and constitutes the part of this specification, shows the implementation for meeting the disclosure
Example, and be used to together with specification to explain the principle of the disclosure.
Fig. 1 is a kind of flow chart of the power consumption detection method of application program according to an exemplary embodiment.
Fig. 2 be a kind of application program according to an exemplary embodiment power consumption detection method in step S101 one
Exemplary flow chart.
Fig. 3 be a kind of application program according to an exemplary embodiment power consumption detection method in step S102 one
Exemplary flow chart.
Fig. 4 is a kind of corresponding performing module of power consumption detection method of application program according to an exemplary embodiment
Block diagram.
Fig. 5 is a kind of block diagram of the power-comuption detecting device of application program according to an exemplary embodiment.
Fig. 6 is an a kind of exemplary frame of the power-comuption detecting device of application program according to an exemplary embodiment
Figure.
Fig. 7 is a kind of block diagram of the power-comuption detecting device 800 of application program according to an exemplary embodiment.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to
During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with it is such as appended
The example of the consistent apparatus and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is a kind of flow chart of the power consumption detection method of application program according to an exemplary embodiment.It should answer
It can be used for the terminal devices such as smart mobile phone or tablet personal computer with the power consumption detection method of program, do not limit herein.Such as Fig. 1 institutes
Show that the power consumption detection method of the application program comprises the following steps.
In step S101, detect terminal device application program whether the resource of using terminal equipment.
In a kind of possible implementation, the resource of terminal device includes the cpu resource of terminal device, or including terminal
The Internet resources of equipment, or cpu resource and Internet resources including terminal device.
Although it should be noted that describe the resource of terminal device using cpu resource or Internet resources as example as above,
But those skilled in the art are it should be understood that the disclosure answers not limited to this.Those skilled in the art can be according to practical application
Scene flexibly sets the resource of terminal device.
In a kind of possible implementation, the application program of the terminal device in step S101 can include terminal device
Each application program installed.In alternatively possible implementation, the application program of the terminal device in step S101 can
With each application program for the running background for being included in terminal device.In alternatively possible implementation, in step S101
Terminal device application program can include not terminal device front stage operation each application program.For example, can wrap
Include each application program in the running background of terminal device and each application program of off-duty.
Wherein, the desktop that can refer to not in terminal device in the application program of the running background of terminal device runs but located
In the application program of running status, thus user can not see in the desktop of terminal device this running background application program simultaneously
Interact therewith operation.
It should be noted that those skilled in the art are it should be understood that there is various methods to realize in correlation technique
Application program is set to the running background in terminal device.For example, Home is triggered after the main interface of application program can be started
Key, so that application program falls back on the running background of terminal device.Wherein, Home key can refer to various types of operating systems
In have return function key, do not limit herein.
Although it should be noted that after main interface to start application program triggering Home key described as example should
Be set to program terminal device running background as above, but those skilled in the art are not it should be understood that the disclosure should
It is limited to this.Application program can be flexibly set on the backstage of terminal device by those skilled in the art according to practical application scene
Operation.
In a kind of possible implementation, detect terminal device application program whether the resource of using terminal equipment
(step S101) includes:At interval of random duration detect terminal device application program whether the resource of using terminal equipment.Its
In, random duration can be randomly selected, and not limited herein.
In a kind of possible implementation, detect terminal device application program whether the resource of using terminal equipment
(step S101) includes:At interval of the first duration detect terminal device application program whether the resource of using terminal equipment.Its
In, the first duration can be the numerical value pre-set, such as 2 seconds or 5 seconds, not limit herein.
As an example of the implementation, whether the application program for detecting terminal device at interval of the first duration uses
The resource of terminal device, including:Detect whether the application program in the running background of terminal device uses at interval of the first duration
The resource of terminal device.
For example, APP1 is the application program in the running background of terminal device.Whether can make at interval of 2s detections APP1
With the resource of terminal device, { 0s-2s is obtained:Use;2s-4s:Use;4s-6s:Use;6s-8s:It is not used ... }.Its
In, in 2s, detection obtains the resource of APP1 using terminal equipment within 0s-2s period;In 4s, detection is obtained
The resource of APP1 using terminal equipment within 2s-4s period;In 6s, detection obtains periods of the APP1 in 4s-6s
The resource of interior using terminal equipment;In 8s, detection obtains the money that terminal device is not used in APP1 within 6s-8s period
Source, etc..
As an example of the implementation, whether the application program for detecting terminal device at interval of the first duration uses
The resource of terminal device, including:It is not in each application program of the front stage operation of terminal device at interval of the detection of the first duration
The resource of no using terminal equipment.
For example, can be determined at interval of 2s in terminal device not terminal device front stage operation each application program,
Detect respectively not terminal device front stage operation each application program whether the resource of using terminal equipment, obtain { 0s-
2s::APP1, APP2;2s-4s:APP1, APP3;4s-6s:APP1, APP2, APP3 ... }.Wherein, in 2s, detect
To the APP1 and APP2 not in each application program of the front stage operation of terminal device within 0s-2s period using terminal
The resource of equipment;In 4s, detection obtain APP1 not in each application program of the front stage operation of terminal device and
The resource of APP3 using terminal equipment within 2s-4s period;In 6s, detection obtains not transporting on the foreground of terminal device
APP1, APP2 and APP3 in each capable application program resource of using terminal equipment, etc. within 4s-6s period.
In step s 102, the application program using terminal of terminal device is set in each detection in statistics first time period
The access times of standby resource.
In a kind of possible implementation, the application program of terminal device in each detection in statistics first time period
The access times of the resource of using terminal equipment, including:Whether count the interior application program for detecting terminal device of first time period
The detection number of times of the resource of using terminal equipment, and count the application program of terminal device in each time in first time period detection
The access times of the resource of using terminal equipment, wherein, the time span of first time period is more than the first duration.
As an example of the implementation, the time span of first time period is more than the first duration and at least includes N
Individual first duration, N is positive integer.Wherein, N can be the numerical value pre-set.
For example, a length of 2s when first, the time span of first time period is 200s.Terminal device is being detected at interval of 2s
Whether application program in the case of the resource of using terminal equipment, if in statistics 200s detection terminal device application program whether
The detection number of times of the resource of using terminal equipment, then it is 100 times that can obtain the detection number of times in 200s.
In step s 103, according to access times, determining the application program of terminal device, whether power consumption is abnormal.
In a kind of possible implementation, according to access times, determining the application program of terminal device, whether power consumption is different
Often, including:In the case where access times are more than or equal to first threshold, determine that the application program power consumption of terminal device is abnormal.
Wherein, first threshold can be the numerical value pre-set.
In a kind of possible implementation, according to access times, determining the application program of terminal device, whether power consumption is different
Often, including:According to the detection number of times and the ratio or difference of access times in first time period, the application journey of terminal device is determined
Whether power consumption is abnormal for sequence
As an example of the implementation, the ratio of access times and detection number of times is calculated;It is more than or waits in ratio
In the case of Second Threshold, judge that the application program power consumption of terminal device is abnormal.Wherein, Second Threshold can be to pre-set
Numerical value.
For example, a length of 2s when first, the time span of first time period is 200s, and Second Threshold is 0.8.At interval of 2s inspections
Survey APP1 whether the resource of using terminal equipment, if statistics obtain detection number of times be 100 times, access times be 90 times, then use
The ratio of number of times and detection number of times is 0.9, more than Second Threshold 0.8, it may be determined that APP1 power consumptions are abnormal.
When running background of the application program in terminal device, generally terminal is not used in the application program of running background
The resource of equipment.However, in some application programs of running background, intermittently meeting continuation or the money of using terminal equipment
Source, causes the electricity for consuming terminal device.Count whether detection in first time period uses eventually in the application program of running background
The detection number of times of the resource of end equipment, and count and used in each time in first time period detection in the application program of running background
The access times of the resource of terminal device, if the ratio for the access times and detection number of times that statistics is obtained is larger, illustrate rear
The application program continuation of platform operation or the intermittently resource of using terminal equipment.In such a case, it is possible to determine rear
The application program power consumption of platform operation is abnormal, even in running background application program to the usage amount of the resource of terminal device not
Greatly.
For example, in the test process for smart mobile phone, the high 20mA of average current of smart mobile phone is found.Related skill
In art, according to the application program judged according to the usage amount of resource in running background, whether power consumption is abnormal, then making in resource
In the case that consumption is little, such as when the utilization rate of cpu resource is less than 1% (display 0%), answered it is difficult to find that power consumption is abnormal
Use program.And the power consumption detection method for the application program for passing through the present embodiment, making to the resource of smart mobile phone can be detected
Consumption less but continuation or intermittently use smart mobile phone resource application program.
As an example of the implementation, the ratio of detection number of times and access times is calculated;It is less than or waits in ratio
In the case of the 3rd threshold value, judge that the application program power consumption of terminal device is abnormal.Wherein, the 3rd threshold value can be to pre-set
Numerical value.
For example, a length of 2s when first, the time span of first time period is 200s, and the 3rd threshold value is 1.25.At interval of 2s
Detect APP1 whether the resource of using terminal equipment, if statistics obtain detection number of times be 100 times, access times be 90 times, then examine
The ratio for surveying number of times and access times is 10/9, less than the 3rd threshold value 1.25, it may be determined that APP1 power consumptions are abnormal.
As an example of the implementation, the difference of detection number of times and access times is calculated;It is less than or waits in difference
In the case of the 4th threshold value, judge that the application program power consumption of terminal device is abnormal.Wherein, the 4th threshold value can be to pre-set
Numerical value.
For example, a length of 2s when first, the time span of first time period is 200s, and the 4th threshold value is 20.At interval of 2s inspections
Survey APP1 whether the resource of using terminal equipment, if statistics obtain detection number of times be 100 times, access times be 90 times, then detect
The difference of number of times and access times is 10, less than the 4th threshold value 20, it may be determined that APP1 power consumptions are abnormal.
Although it should be noted that basis is described using the application program of the running background in terminal device as example to be made
The application program of terminal device is determined with number of times, and whether power consumption is abnormal as above, but those skilled in the art it should be understood that this
It is open to answer not limited to this.Those skilled in the art can flexibly set the application program of the present embodiment according to practical application scene
The application program of terminal device in power consumption detection method.
The power consumption detection method of the application program of the present embodiment can detect that the application program in terminal device whether there is
Power consumption is abnormal, contributes to the usage amount for finding resource little but continuation or the intermittently application of the resource of using terminal equipment
Program, detection process is simple and strong applicability.
Fig. 2 be a kind of application program according to an exemplary embodiment power consumption detection method in step S101 one
Exemplary flow chart.As shown in Fig. 2 detection terminal device application program whether the resource of using terminal equipment, including with
Lower step.
In step s 201, the use total amount of the resource of the application program using terminal equipment of terminal device is obtained.
Wherein, the use total amount of the resource of the application program using terminal equipment of terminal device can refer at a time eventually
Summation of the application program of end equipment to the usage amount of the resource of terminal device.The resource of terminal device can be terminal device
Cpu resource, or Internet resources, or cpu resource and Internet resources etc., do not limit herein.
In step S202, the use total amount and the difference of the upper use total amount for once detecting acquisition obtained in this detection is not
In the case of being zero, the resource of the application program using terminal equipment of terminal device in this detection is judged.
As an example of the present embodiment, if in use total amounts of the 2s moment APP1 to the Internet resources of terminal device
It is 30M to the use total amount of the Internet resources of terminal device in 4s moment APP1, because the 4s moment detects acquisition for 20M
APP1 to the use total amount of Internet resources and 2s moment detect obtain APP1 be to the difference of the use total amount of Internet resources
10M, then judge the resource of the APP1 using terminals equipment within 2s-4s period.
As another example of the present embodiment, if the use in 2s moment APP1 to the Internet resources of terminal device is total
Measure as 20M, the use total amount to the cpu resource of terminal device is 30.2M;The network of terminal device is provided in 4s moment APP1
The use total amount in source is 20M, and the use total amount to the cpu resource of terminal device is 35.2M, because the 4s moment detects what is obtained
APP1 detects that the APP1 obtained is 5M to the difference of the use total amount of cpu resource to the use total amount of cpu resource and 2s moment, then
Judge the resource of the APP1 using terminals equipment within 2s-4s period.
Use whether the difference of the use total amount that this detection is obtained and the use total amount of last detection acquisition is sentenced for zero
Break terminal device in this detection application program whether the resource of using terminal equipment, contribute to accurate judgement, detection process
It is easily achieved and strong applicability.
Fig. 3 be a kind of application program according to an exemplary embodiment power consumption detection method in step S102 one
Exemplary flow chart.As shown in figure 3, the application program for counting terminal device in each detection in first time period is used eventually
The access times of the resource of end equipment, comprise the following steps.
In step S301, for the detection each time in first time period, if detecting the application program of terminal device
The resource of using terminal equipment, then the application program to terminal device once marked.
For example, for the detection each time in first time period, if detecting the application program using terminal of terminal device
The cpu resource of equipment, then the application program to terminal device once marked.
For another example for the detection each time in first time period, if the application program for detecting terminal device is used eventually
The Internet resources of end equipment, then the application program to terminal device once marked.
For another example for the detection each time in first time period, if the application program for detecting terminal device is used eventually
The cpu resource and Internet resources of end equipment, then the application program to terminal device once marked.
In step s 302, will be defined as in first time period to the number of times that the application program of terminal device is marked
The access times of the resource of the application program using terminal equipment of terminal device in each detection in one period.
As an example of the present embodiment, for the detection each time in first time period, using terminal equipment is recorded
Resource each terminal device application program.For example, a length of 2s when first, the time span of first time period is 200s.
The application program of each terminal device of the resource of using terminal equipment is recorded, { 0s-2s is obtained::APP1, APP2;2s-4s:
APP1, APP3;4s-6s:APP1, APP2, APP3 ... }.For detecting each time, if detecting the application program of terminal device
The resource of using terminal equipment, then the application program to terminal device once marked, obtain each in first time period
Application program corresponding mark number of times { the mark number of times of terminal device:APP1,90 times;APP2,50 times;APP3,10 times ... }.
So as to obtain { the detection time of the detection number of times access times corresponding with the application program of each terminal device in first time period
Number:100 times;Access times:APP1,90 times;APP2,50 times;APP3,10 times ... }.
Fig. 4 is a kind of corresponding performing module of power consumption detection method of application program according to an exemplary embodiment
Block diagram.As shown in figure 4, test scene control module can apply journey with the application program in control terminal equipment as first
Sequence, even if the application program is in the running background of terminal device.For example, test scene control module can start application program
Home key is triggered after main interface.Logging modle can obtain the first application program to terminal device at interval of the detection of the first duration
The use total amount of resource, and in the case where detecting resource of first application program using the terminal device, applied to first
Program is once marked.Statistical module, according to the record of logging modle, can count first time period after test terminates
The first application program of interior detection whether the detection number of times of the resource of using terminal equipment, and count each time in first time period
The access times of the resource of first application program using terminal equipment in detection.
Fig. 5 is a kind of block diagram of the power-comuption detecting device of application program according to an exemplary embodiment.Reference picture
5, the device includes detection module 11, statistical module 13 and determining module 15.
Wherein, whether the detection module 11 is configured as detecting the application program of terminal device using the terminal device
Resource.The application program of terminal device makes described in each detection that the statistical module 13 is configured as in statistics first time period
With the access times of the resource of the terminal device.The determining module 15 is configured as according to the access times, it is determined that described
Whether power consumption is abnormal for the application program of terminal device.
Fig. 6 is an a kind of exemplary frame of the power-comuption detecting device of application program according to an exemplary embodiment
Figure.Reference picture 6:
In a kind of possible implementation, the detection module 11 includes acquisition submodule 111 and first and judges submodule
Block 113.
Wherein, the acquisition submodule 111 is configured as obtaining the application program of the terminal device and set using the terminal
The use total amount of standby resource.First decision sub-module 113 is configured as the use total amount and upper one obtained in this detection
In the case that the difference for the use total amount that secondary detection is obtained is not zero, judging the application program of terminal device described in this detection makes
With the resource of the terminal device.
In a kind of possible implementation, the statistical module 13 includes mark submodule 131 and statistic submodule
133。
Wherein, the mark submodule 131 is configured as the detection each time in the first time period, if detecting
The application program of the terminal device uses the resource of the terminal device, then the application program to the terminal device carries out one
Secondary mark.The statistic submodule 133 is configured as to carry out the application program of the terminal device in the first time period
The application program of terminal device uses the end described in each detection that the number of times of mark is defined as in the first time period
The access times of the resource of end equipment.
In a kind of possible implementation, the determining module 15 is used for:According to the detection number of times in first time period
With the ratio or difference of the access times, determining the application program of the terminal device, whether power consumption is abnormal.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant this method
Embodiment in be described in detail, explanation will be not set forth in detail herein.
The power-comuption detecting device of the application program of the present embodiment can detect that the application program in terminal device whether there is
Power consumption is abnormal, contributes to the usage amount for finding resource little but continuation or the intermittently application of the resource of using terminal equipment
Program, detection process is simple and strong applicability.
Fig. 7 is a kind of block diagram of the power-comuption detecting device 800 of application program according to an exemplary embodiment.Example
Such as, device 800 can be mobile phone, and computer, digital broadcast terminal, messaging devices, game console, flat board is set
It is standby, Medical Devices, body-building equipment, personal digital assistant etc..
Reference picture 7, device 800 can include following one or more assemblies:Processing assembly 802, memory 804, power supply
Component 806, multimedia groupware 808, audio-frequency assembly 810, the interface 812 of input/output (I/O), sensor cluster 814, and
Communication component 816.
The integrated operation of the usual control device 800 of processing assembly 802, such as with display, call, data communication, phase
Machine operates the operation associated with record operation.Processing assembly 802 can refer to including one or more processors 820 to perform
Order, to complete all or part of step of above-mentioned method.In addition, processing assembly 802 can include one or more modules, just
Interaction between processing assembly 802 and other assemblies.For example, processing assembly 802 can include multi-media module, it is many to facilitate
Interaction between media component 808 and processing assembly 802.
Memory 804 is configured as storing various types of data supporting the operation in device 800.These data are shown
Example includes the instruction of any application program or method for being operated on device 800, and contact data, telephone book data disappears
Breath, picture, video etc..Memory 804 can be by any kind of volatibility or non-volatile memory device or their group
Close and realize, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM) is erasable to compile
Journey read-only storage (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flash
Device, disk or CD.
Power supply module 806 provides electric power for the various assemblies of device 800.Power supply module 806 can include power management system
System, one or more power supplys, and other components associated with generating, managing and distributing electric power for device 800.
Multimedia groupware 808 is included in the screen of one output interface of offer between described device 800 and user.One
In a little embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen
Curtain may be implemented as touch-screen, to receive the input signal from user.Touch panel includes one or more touch sensings
Device is with the gesture on sensing touch, slip and touch panel.The touch sensor can not only sensing touch or sliding action
Border, but also detection touches or slide related duration and pressure with described.In certain embodiments, many matchmakers
Body component 808 includes a front camera and/or rear camera.When device 800 be in operator scheme, such as screening-mode or
During video mode, front camera and/or rear camera can receive the multi-medium data of outside.Each front camera and
Rear camera can be a fixed optical lens system or with focusing and optical zoom capabilities.
Audio-frequency assembly 810 is configured as output and/or input audio signal.For example, audio-frequency assembly 810 includes a Mike
Wind (MIC), when device 800 be in operator scheme, when such as call model, logging mode and speech recognition mode, microphone by with
It is set to reception external audio signal.The audio signal received can be further stored in memory 804 or via communication set
Part 816 is sent.In certain embodiments, audio-frequency assembly 810 also includes a loudspeaker, for exports audio signal.
I/O interfaces 812 is provide interface between processing assembly 802 and peripheral interface module, above-mentioned peripheral interface module can
To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock
Determine button.
Sensor cluster 814 includes one or more sensors, and the state for providing various aspects for device 800 is commented
Estimate.For example, sensor cluster 814 can detect opening/closed mode of device 800, the relative positioning of component is for example described
Component is the display and keypad of device 800, and sensor cluster 814 can be with 800 1 components of detection means 800 or device
Position change, the existence or non-existence that user contacts with device 800, the orientation of device 800 or acceleration/deceleration and device 800
Temperature change.Sensor cluster 814 can include proximity transducer, be configured to detect in not any physical contact
The presence of neighbouring object.Sensor cluster 814 can also include optical sensor, such as CMOS or ccd image sensor, for into
As being used in application.In certain embodiments, the sensor cluster 814 can also include acceleration transducer, gyro sensors
Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between device 800 and other equipment.Device
800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof.In an exemplary implementation
In example, communication component 816 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel.
In one exemplary embodiment, the communication component 816 also includes near-field communication (NFC) module, to promote junction service.Example
Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology,
Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 800 can be believed by one or more application specific integrated circuits (ASIC), numeral
Number processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for performing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instructing, example are additionally provided
Such as include the memory 804 of instruction, above-mentioned instruction can be performed to complete the above method by the processor 820 of device 800.For example,
The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk
With optical data storage devices etc..
Those skilled in the art will readily occur to its of the disclosure after considering specification and putting into practice invention disclosed herein
Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modifications, purposes or
Person's adaptations follow the general principle of the disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the disclosure and spirit are by following
Claim is pointed out.
It should be appreciated that the precision architecture that the disclosure is not limited to be described above and is shown in the drawings, and
And various modifications and changes can be being carried out without departing from the scope.The scope of the present disclosure is only limited by appended claim.
Claims (10)
1. a kind of power consumption detection method of application program, it is characterised in that including:
Detect whether the application program of terminal device uses the resource of the terminal device;
The application program for counting terminal device described in each detection in first time period uses the resource of the terminal device
Access times;
According to the access times, determining the application program of the terminal device, whether power consumption is abnormal.
2. the power consumption detection method of application program according to claim 1, it is characterised in that the application of detection terminal device
Whether program uses the resource of the terminal device, including:
The application program for obtaining the terminal device uses the use total amount of the resource of the terminal device;
In the case where the use total amount and the difference of the upper use total amount for once detecting acquisition that this detection is obtained are not zero, judge
The application program of terminal device uses the resource of the terminal device described in this detection.
3. the power consumption detection method of application program according to claim 1, it is characterised in that in statistics first time period
The application program of terminal device described in each detection uses the access times of the resource of the terminal device, including:
For the detection each time in the first time period, if the application program for detecting the terminal device uses the end
The resource of end equipment, then the application program to the terminal device once marked;
During by being defined as described first to the number of times that the application program of the terminal device is marked in the first time period
Between terminal device described in each detection in section application program using the resource of the terminal device access times.
4. the power consumption detection method of application program as claimed in any of claims 1 to 3, it is characterised in that according to
The access times, determining the application program of the terminal device, whether power consumption is abnormal, including:
According to the detection number of times and the ratio or difference of the access times in first time period, answering for the terminal device is determined
With program, whether power consumption is abnormal.
5. a kind of power-comuption detecting device of application program, it is characterised in that including:
Detection module, for detecting whether the application program of terminal device uses the resource of the terminal device;
Statistical module, the application program for counting terminal device described in each time in first time period detection uses the end
The access times of the resource of end equipment;
Determining module, for according to the access times, determining the application program of the terminal device, whether power consumption is abnormal.
6. the power-comuption detecting device of application program according to claim 5, it is characterised in that the detection module includes:
Acquisition submodule, the application program for obtaining the terminal device is total using the use of the resource of the terminal device
Amount;
First decision sub-module, for the use total amount and the difference of the upper use total amount for once detecting acquisition obtained in this detection
In the case of being not zero, judge that the application program of terminal device described in this detection uses the resource of the terminal device.
7. the power-comuption detecting device of application program according to claim 5, it is characterised in that the statistical module includes:
Submodule is marked, for for the detection each time in the first time period, if detecting answering for the terminal device
The resource of the terminal device is used with program, then the application program to the terminal device is once marked;
Statistic submodule, the number of times for the application program of the terminal device will be marked in the first time period is true
The application program for being set to terminal device described in each detection in the first time period uses the resource of the terminal device
Access times.
8. the power-comuption detecting device of the application program according to any one in claim 5 to 7, it is characterised in that described
Determining module is used for:
According to the detection number of times and the ratio or difference of the access times in first time period, answering for the terminal device is determined
With program, whether power consumption is abnormal.
9. a kind of power-comuption detecting device of application program, it is characterised in that including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
Detect whether the application program of terminal device uses the resource of the terminal device;
The application program for counting terminal device described in each detection in first time period uses the resource of the terminal device
Access times;
According to the access times, determining the application program of the terminal device, whether power consumption is abnormal.
10. a kind of non-volatile computer readable storage medium storing program for executing, is stored thereon with computer program instructions, it is characterised in that institute
State and method in Claims 1-4 described in any one is realized when computer program instructions are executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710300876.1A CN107133172A (en) | 2017-05-02 | 2017-05-02 | The power consumption detection method and device of application program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710300876.1A CN107133172A (en) | 2017-05-02 | 2017-05-02 | The power consumption detection method and device of application program |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107133172A true CN107133172A (en) | 2017-09-05 |
Family
ID=59716047
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710300876.1A Pending CN107133172A (en) | 2017-05-02 | 2017-05-02 | The power consumption detection method and device of application program |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107133172A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109445985A (en) * | 2018-09-03 | 2019-03-08 | 平安普惠企业管理有限公司 | The rollback method and system of application program |
CN109656349A (en) * | 2017-10-09 | 2019-04-19 | Tcl集团股份有限公司 | Electricity saving method, terminal and the computer readable storage medium of terminal |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104298584A (en) * | 2013-07-19 | 2015-01-21 | 贝壳网际(北京)安全技术有限公司 | Method and device for acquiring application program with abnormal power consumption and mobile terminal |
CN105718028A (en) * | 2016-01-22 | 2016-06-29 | 青岛海信移动通信技术股份有限公司 | Power-saving method and device based on power consumption application recognition |
CN106293445A (en) * | 2015-06-29 | 2017-01-04 | 腾讯科技(深圳)有限公司 | Application program uses the acquisition methods of data, device and terminal unit |
CN106326069A (en) * | 2016-08-19 | 2017-01-11 | 北京小米移动软件有限公司 | Method, device and system for detecting power consumption as well as equipment |
-
2017
- 2017-05-02 CN CN201710300876.1A patent/CN107133172A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104298584A (en) * | 2013-07-19 | 2015-01-21 | 贝壳网际(北京)安全技术有限公司 | Method and device for acquiring application program with abnormal power consumption and mobile terminal |
CN106293445A (en) * | 2015-06-29 | 2017-01-04 | 腾讯科技(深圳)有限公司 | Application program uses the acquisition methods of data, device and terminal unit |
CN105718028A (en) * | 2016-01-22 | 2016-06-29 | 青岛海信移动通信技术股份有限公司 | Power-saving method and device based on power consumption application recognition |
CN106326069A (en) * | 2016-08-19 | 2017-01-11 | 北京小米移动软件有限公司 | Method, device and system for detecting power consumption as well as equipment |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109656349A (en) * | 2017-10-09 | 2019-04-19 | Tcl集团股份有限公司 | Electricity saving method, terminal and the computer readable storage medium of terminal |
CN109445985A (en) * | 2018-09-03 | 2019-03-08 | 平安普惠企业管理有限公司 | The rollback method and system of application program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104239094B (en) | Control method, device and the terminal device of background application | |
CN105975301B (en) | Memory method for cleaning and device, electronic equipment | |
CN104298547B (en) | terminal setting method and device | |
CN104077208A (en) | Application program icon display method and apparatus | |
CN104486451B (en) | Application program recommends method and device | |
CN106376043A (en) | Automatic switching method and device for SIM (Subscriber Identification Module) card | |
CN107608561A (en) | Touch-screen control method and device | |
CN107132949B (en) | Anti-interference method, device, terminal and storage medium | |
CN107438811A (en) | One kind breath screen shows method and device | |
CN106790043A (en) | The method and device of message is sent in live application | |
CN104660806A (en) | Information reminding method and device | |
CN104581615B (en) | service providing method and device | |
CN104991855B (en) | Interface interim card processing method and processing device | |
CN107846730A (en) | Call transferring method and device | |
CN107135147A (en) | Method, device and the computer-readable recording medium of sharing position information | |
CN106953969A (en) | The screen control method and device of mobile terminal | |
CN106528385A (en) | System fluency monitoring method and apparatus, and terminal | |
CN105357388B (en) | A kind of method and electronic equipment of information recommendation | |
CN107133172A (en) | The power consumption detection method and device of application program | |
CN105607979A (en) | Network interconnection control method and device | |
CN105635414A (en) | Method and device for screening incoming calls | |
CN107371222A (en) | Virtual card prohibited method and device | |
CN106775240A (en) | The triggering method of application program, device and terminal | |
CN106789554A (en) | The method and device of short message treatment | |
CN106936986A (en) | Application processing method and device |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170905 |