CN103914365A - Method and device for acquiring power consumption of mobile terminal application - Google Patents

Method and device for acquiring power consumption of mobile terminal application Download PDF

Info

Publication number
CN103914365A
CN103914365A CN201210594055.0A CN201210594055A CN103914365A CN 103914365 A CN103914365 A CN 103914365A CN 201210594055 A CN201210594055 A CN 201210594055A CN 103914365 A CN103914365 A CN 103914365A
Authority
CN
China
Prior art keywords
mobile terminal
application
time
power consumption
terminal application
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.)
Granted
Application number
CN201210594055.0A
Other languages
Chinese (zh)
Other versions
CN103914365B (en
Inventor
谢红亮
熊师
傅盛
卢云飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Internet Security Software Co Ltd
Conew Network Technology Beijing Co Ltd
Beijing Cheetah Mobile Technology Co Ltd
Beijing Cheetah Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Conew Network Technology Beijing Co Ltd
Shell Internet Beijing Security Technology Co Ltd
Beijing Kingsoft Internet Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd, Conew Network Technology Beijing Co Ltd, Shell Internet Beijing Security Technology Co Ltd, Beijing Kingsoft Internet Science and Technology Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201210594055.0A priority Critical patent/CN103914365B/en
Publication of CN103914365A publication Critical patent/CN103914365A/en
Application granted granted Critical
Publication of CN103914365B publication Critical patent/CN103914365B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Telephone Function (AREA)

Abstract

The invention provides a method and a device for acquiring power consumption of mobile terminal application, and belongs to the field of intelligent mobile terminals. The method for acquiring the power consumption of the application of the mobile terminal is applied to the mobile terminal of an Android system, and comprises the following steps: acquiring unit time power consumption of the mobile terminal application; acquiring the running time of the application of the mobile terminal; and calculating the power consumption of the mobile terminal application according to the power consumption of the mobile terminal application in unit time and the running time. The technical scheme of the invention can detect the specific power consumption of the mobile terminal application.

Description

Obtain method and the device of mobile terminal application power consumption
Technical field
The present invention relates to intelligent mobile terminal field, refer to especially a kind of method and device that obtains mobile terminal application power consumption.
Background technology
The application of smart mobile phone is at present very abundant, and along with application scale is increasing, the situation of application power consumption is more and more obvious, how to select the application of more power saving to become the problem that user faces.
In prior art, smart mobile phone can only detect the power consumption of integral device and the rough power consumption number percent of single paragraph application, applies and cannot specifically detect certain money the charge value consuming.And according to our experimental analysis, the power consumption seniority among brothers and sisters that system provides is very inaccurate, cannot provide valuable information for user.The concrete power consumption situation of smart mobile phone application can only detect by special power consumption checkout equipment at present, the concrete power consumption situation of application cannot be known in the domestic consumer of smart mobile phone, like this in the time that user need to reduce smart mobile phone power consumption, just cannot close pointedly the many application of some power consumption, can not reach the object of effective minimizing smart mobile phone power consumption.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of method and device that obtains mobile terminal application power consumption, can detect the concrete power consumption of mobile terminal application.
For solving the problems of the technologies described above, embodiments of the invention provide technical scheme as follows:
On the one hand, provide a kind of method of obtaining mobile terminal application power consumption, be applied in the mobile terminal of Android system, described method comprises:
Obtain the unit interval power consumption of mobile terminal application;
Obtain the working time of mobile terminal application;
According to described mobile terminal application units' time power consumption with calculate the power consumption of mobile terminal application working time.
Further, in such scheme, the unit interval power consumption that obtains mobile terminal application comprises:
Described mobile terminal application is only installed on mobile terminal, moves described mobile terminal application Preset Time, draw the electric quantity consumption curve of mobile terminal, obtain the unit interval power consumption of mobile terminal application by calculating mean value; Or
Calculate the mean value of applying other application units' time power consumption of the same type with described mobile terminal, as the unit interval power consumption of described mobile terminal application.
Further, in such scheme, described in obtain mobile terminal application working time comprise:
Obtain the front stage operation time t1 of mobile terminal application, obtain the running background time t2 of mobile terminal application;
Describedly comprise according to described mobile terminal application units' time power consumption and the power consumption that calculates mobile terminal application working time:
The power consumption that calculates mobile terminal application by formula m=n*t1+n*t2/k, wherein, k is reduction coefficient, and n is the unit interval power consumption of mobile terminal application, and m is the power consumption of mobile terminal application.
Further, in such scheme, described in obtain mobile terminal application front stage operation time t1 comprise:
Obtain the foreground application of mobile terminal every Preset Time, and the foreground application that current time is obtained is compared with the last foreground application of obtaining, if the foreground application that current time obtains is different from the last foreground application of obtaining, the end time using the time corresponding current time as last foreground application, the start time using the time corresponding current time as current foreground application;
Obtain start time and the end time of mobile terminal application as foreground application by above-mentioned steps, the end time is deducted to the front stage operation time t1 that the start time obtains mobile terminal application.
Further, in such scheme, described in obtain mobile terminal application running background time t2 comprise:
Obtain all background application of mobile terminal every Preset Time, and the background application that current time is obtained is compared with the last background application of obtaining, if the background application that current time obtains is different from the last background application of obtaining, using the start time of time corresponding current time as newly-increased background application, using the end time of time corresponding current time as disappearance background application;
Obtain start time and the end time of mobile terminal application as background application by above-mentioned steps, the end time is deducted to the running background time t2 that the start time obtains mobile terminal application.
The embodiment of the present invention also provides a kind of device that obtains mobile terminal application power consumption, is applied in the mobile terminal of Android system, and described device comprises:
The first acquisition module, for obtaining the unit interval power consumption of mobile terminal application;
The second acquisition module, for obtaining the working time of mobile terminal application;
Computing module, for according to described mobile terminal application units' time power consumption with calculate the power consumption of mobile terminal application working time.
Further, in such scheme, described the first acquisition module specifically for only installing described mobile terminal application on mobile terminal, move described mobile terminal application Preset Time, draw the electric quantity consumption curve of mobile terminal, obtain the unit interval power consumption of mobile terminal application by calculating mean value; Or
Calculate the mean value of applying other application units' time power consumption of the same type with described mobile terminal, as the unit interval power consumption of described mobile terminal application.
Further, in such scheme, described the second acquisition module, specifically for obtaining the front stage operation time t1 of mobile terminal application, obtains the running background time t2 of mobile terminal application;
Described computing module is specifically for calculating the power consumption of mobile terminal application by formula m=n*t1+n*t2/k, wherein, k is reduction coefficient, and n is the unit interval power consumption of mobile terminal application, and m is the power consumption of mobile terminal application.
Further, in such scheme, described the second acquisition module is specifically for obtaining the foreground application of mobile terminal every Preset Time, and the foreground application that current time is obtained is compared with the last foreground application of obtaining, if the foreground application that current time obtains is different from the last foreground application of obtaining, the end time using the time corresponding current time as last foreground application, the start time using the time corresponding current time as current foreground application; Obtain start time and the end time of mobile terminal application as foreground application by above-mentioned steps, the end time is deducted to the front stage operation time t1 that the start time obtains mobile terminal application.
Further, in such scheme, described the second acquisition module is specifically for obtaining all background application of mobile terminal every Preset Time, and the background application that current time is obtained is compared with the last background application of obtaining, if the background application that current time obtains is different from the last background application of obtaining, using the start time of time corresponding current time as newly-increased background application, using the end time of time corresponding current time as disappearance background application; Obtain start time and the end time of mobile terminal application as background application by above-mentioned steps, the end time is deducted to the running background time t2 that the start time obtains mobile terminal application.
Embodiments of the invention have following beneficial effect:
In such scheme, can calculate the concrete power consumption of mobile terminal according to the unit interval power consumption of the working time of the mobile terminal application of obtaining and mobile terminal application, like this in the time that user need to the amount of saving energy, just can close pointedly the many application of some power consumption, prevent that the battery power consumption of mobile terminal is too fast.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the method for obtaining mobile terminal application power consumption of the embodiment of the present invention;
Fig. 2 is the structured flowchart of the device that obtains mobile terminal application power consumption of the embodiment of the present invention;
Fig. 3 is the electric quantity consumption curve of certain mobile terminal application of embodiment of the present invention acquisition;
Fig. 4 is the variation schematic diagram of the foreground application obtained of the embodiment of the present invention.
Embodiment
For technical matters, technical scheme and advantage that embodiments of the invention will be solved are clearer, be described in detail below in conjunction with the accompanying drawings and the specific embodiments.
Embodiments of the invention can not detect the power consumption details of certain money application for smart mobile phone in prior art, the concrete power consumption situation of application can only detect by special power consumption checkout equipment, user there is no method knows the concrete power consumption situation of application, like this in the time that user need to the amount of saving energy, just cannot close pointedly the problem of the many application of some power consumption, a kind of method and device that obtains mobile terminal application power consumption is provided, can detects the concrete power consumption of mobile terminal application.
Fig. 1 is the schematic flow sheet of the method for obtaining mobile terminal application power consumption of the embodiment of the present invention, the method of obtaining mobile terminal application power consumption of the embodiment of the present invention is applied in the mobile terminal of Android system (wherein, Android is a kind of freedom based on Linux and the operating system of open source code, mainly be used in portable equipment, as smart mobile phone and panel computer), as shown in Figure 1, the present embodiment comprises:
Step 101: the unit interval power consumption that obtains mobile terminal application;
Step 102: the working time of obtaining mobile terminal application;
Step 103: according to mobile terminal application units time power consumption with calculate the power consumption of mobile terminal application working time.
Further, in another embodiment of the present invention, comprise that on the basis of above-mentioned steps 101 ~ 103, step 101 specifically comprises:
Mobile terminal application is only installed on mobile terminal, operation mobile terminal application Preset Time, the electric quantity consumption curve of drafting mobile terminal, obtains the unit interval power consumption of mobile terminal application by calculating mean value; Or
Calculate the mean value of applying other application units' time power consumption of the same type with mobile terminal, as the unit interval power consumption of mobile terminal application.
Further, in another embodiment of the present invention, comprise that on the basis of above-mentioned steps 101 ~ 103, step 102 specifically comprises:
Obtain the front stage operation time t1 of mobile terminal application, obtain the running background time t2 of mobile terminal application;
Step 103 comprises:
The power consumption that calculates mobile terminal application by formula m=n*t1+n*t2/k, wherein, k is reduction coefficient, and n is the unit interval power consumption of mobile terminal application, and m is the power consumption of mobile terminal application.
Further, the front stage operation time t1 that obtains mobile terminal application comprises:
Obtain the foreground application of mobile terminal every Preset Time, and the foreground application that current time is obtained is compared with the last foreground application of obtaining, if the foreground application that current time obtains is different from the last foreground application of obtaining, the end time using the time corresponding current time as last foreground application, the start time using the time corresponding current time as current foreground application;
Obtain start time and the end time of mobile terminal application as foreground application by above-mentioned steps, the end time is deducted to the front stage operation time t1 that the start time obtains mobile terminal application.
Further, the running background time t2 that obtains mobile terminal application comprises:
Obtain all background application of mobile terminal every Preset Time, and the background application that current time is obtained is compared with the last background application of obtaining, if the background application that current time obtains is different from the last background application of obtaining, using the start time of time corresponding current time as newly-increased background application, using the end time of time corresponding current time as disappearance background application;
Obtain start time and the end time of mobile terminal application as background application by above-mentioned steps, the end time is deducted to the running background time t2 that the start time obtains mobile terminal application.
The method of obtaining mobile terminal application power consumption of the present invention, can calculate the concrete power consumption of mobile terminal according to the unit interval power consumption of the working time of the mobile terminal application of obtaining and mobile terminal application, like this in the time that user need to the amount of saving energy, just can close pointedly the many application of some power consumption, prevent that the battery power consumption of mobile terminal is too fast.
Fig. 2 is the structured flowchart of the device that obtains mobile terminal application power consumption of the embodiment of the present invention, and the application of installation that obtains mobile terminal application power consumption of the embodiment of the present invention is in the mobile terminal of Android system, and as shown in Figure 2, the present embodiment comprises:
The first acquisition module 20, for obtaining the unit interval power consumption of mobile terminal application;
The second acquisition module 21, for obtaining the working time of mobile terminal application;
Computing module 22, for according to mobile terminal application units time power consumption with calculate the power consumption of mobile terminal application working time.
Further, in such scheme, the first acquisition module 20, specifically for mobile terminal application is only installed on mobile terminal, moves mobile terminal application Preset Time, draw the electric quantity consumption curve of mobile terminal, obtain the unit interval power consumption of mobile terminal application by calculating mean value; Or
Calculate the mean value of applying other application units' time power consumption of the same type with mobile terminal, as the unit interval power consumption of mobile terminal application.
Further, in such scheme, the second acquisition module 21, specifically for obtaining the front stage operation time t1 of mobile terminal application, obtains the running background time t2 of mobile terminal application;
Computing module 22 is specifically for calculating the power consumption of mobile terminal application by formula m=n*t1+n*t2/k, wherein, k is reduction coefficient, and n is the unit interval power consumption of mobile terminal application, and m is the power consumption of mobile terminal application.
Further, in such scheme, the second acquisition module 21 is specifically for obtaining the foreground application of mobile terminal every Preset Time, and the foreground application that current time is obtained is compared with the last foreground application of obtaining, if the foreground application that current time obtains is different from the last foreground application of obtaining, the end time using the time corresponding current time as last foreground application, the start time using the time corresponding current time as current foreground application; Obtain start time and the end time of mobile terminal application as foreground application by above-mentioned steps, the end time is deducted to the front stage operation time t1 that the start time obtains mobile terminal application.
Further, in such scheme, the second acquisition module 21 is specifically for obtaining all background application of mobile terminal every Preset Time, and the background application that current time is obtained is compared with the last background application of obtaining, if the background application that current time obtains is different from the last background application of obtaining, using the start time of time corresponding current time as newly-increased background application, using the end time of time corresponding current time as disappearance background application; Obtain start time and the end time of mobile terminal application as background application by above-mentioned steps, the end time is deducted to the running background time t2 that the start time obtains mobile terminal application.
The device that obtains mobile terminal application power consumption of the present invention, can calculate the concrete power consumption of mobile terminal according to the unit interval power consumption of the working time of the mobile terminal application of obtaining and mobile terminal application, like this in the time that user need to the amount of saving energy, just can close pointedly the many application of some power consumption, prevent that the battery power consumption of mobile terminal is too fast.
Below in conjunction with Fig. 3-Fig. 4 and specific embodiment, the method for obtaining mobile terminal application power consumption of the present invention is described in detail:
First can obtain by professional power consumption checkout equipment the power consumption data of mobile terminal application, method of testing is, application to be tested is only installed on mobile terminal, other application are not installed on mobile terminal, move this application Preset Time (such as being 400 seconds), the real-time power consumption (unit milliampere) of a mobile terminal of record per second, draws electric quantity consumption curve as shown in Figure 3, obtains the unit interval power consumption of this application by calculating mean value.After being completed, the power consumption data of mobile terminal application are stored in database.
For some unknown applications, can also infer by known power consumption data the unit interval power consumption of this application in addition.As this is applied as 3D game, analyze the unit interval power consumption of existing 3D game, calculate the mean value of existing 3D game unit interval power consumption as the unit interval power consumption of this application.Can expand application power consumption data by this kind of mode.If cannot detect this application type, obtain the unit interval power consumption of whole application, and average as the unit interval power consumption of this application.
Detect afterwards the working time of mobile terminal application, comprise front stage operation time and the running background time of mobile terminal application this working time.
In the time detecting the front stage operation time of mobile terminal, need to create separately a process, the every Preset Time (such as 1-15s) of crossing of this process can be by the API(Application Programming Interface of mobile terminal, application programming interface) obtain current Activity storehouse, and obtain the application (foreground application) of storehouse stack top.Can be with the foreground application contrast of obtaining before after obtaining, if it is different from the last foreground application of obtaining that current time obtains foreground application, the end time using the time corresponding current time as last foreground application, simultaneously as after start time of foreground application, obtain the front stage operation time t1 of mobile terminal with this.As shown in Figure 4, obtain foreground application one time every 1s, application A starts during from 0s as foreground application operation, becomes B to foreground application time 3s, thinks that the front stage operation time of A is 3s; When 4s, foreground application becomes C, and the front stage operation time of B is 1s.
In the time that mobile terminal is applied in running background, its power consumption is very low, can obtain by experiment the reduction coefficient k of mobile terminal application foreground power consumption and backstage power consumption, is about 10-30.Similar with foreground application, obtain the current all background application of mobile terminal one time every Preset Time (such as 10s-50s), calculate certain by the mode of traversal and be applied in and when start, when finish, obtain the running background time t2 of mobile terminal application.
The power consumption that calculates afterwards mobile terminal application by formula m=n*t1+n*t2/k, wherein, k is reduction coefficient, and n is the unit interval power consumption of mobile terminal application, and m is the power consumption of mobile terminal application.
In one embodiment, the computation process of the power consumption of mobile terminal application is as follows:
In certain mobile terminal, total A, B, C, tetra-sections of application of D move.The method of obtaining average power consumption by continuous operation application is learnt, in the working time of 400s, the average unit interval power consumption of A is that 369.4 milliamperes, the average unit interval power consumption of B are 438 milliamperes, the average unit interval power consumption of C is 286.5 milliamperes, and the average unit interval power consumption of D is 314 milliamperes.The reduction coefficient k of four sections of application is 20.
In a certain moment, pass through method:
List<RunningTaskInfo>runRasks=activityMgr
.getRunningTasks(1);
RunningTaskInfo?taskInfo=runRasks.get(0);
Obtain, what this moment foreground was being moved is applied as A.
Pass through method:
List<RunningAppProcessInfo>
android.app.ActivityManager.getRunningAppProcesses()
Obtain, the set of the background application of these all operations of moment is { A, B, C, D }.
Follow-up timing (as every 10s) repeated obtain foreground application and the background application of passing through, obtains N moment, and foreground application and background application that each moment is current are as shown in the table:
Time Foreground application Background application
10s A A、B、C、D
20s A A、B、C、D
30s A A、B、C
40s A A、B、C
50s A A、B、C
60s B A、B、C
70s C B、C
80s C B、C
90s C A、B、C
100s C A、C
In 60s, the foreground application of mobile terminal is B, and the foreground application contrast during with 50s, finds inconsistent.Think that the front stage operation time of A is 60s, B brings into operation in the time of 60s.Pass through formula: foreground power consumption=front stage operation time * unit interval power consumption, the foreground power consumption that calculates A is 60/3600*369.4=6.16 MAH.
When 60s, A is not closed, but proceeds to running background.The background application set of 60s and 70s is respectively { A, B, C } and { B, C }, by two set are traveled through respectively and contrasted, applies A and is thoroughly closed, so A has moved 10s altogether on backstage when finding 70s.Pass through formula: background application power consumption=running background time * unit interval power consumption/reduction coefficient, the backstage power consumption that calculates A is 10/3600*369.4/20=0.308 MAH.The power consumption that this operation of A consumes is altogether 6.16+0.308=6.468 MAH.
Can obtain the concrete power consumption of mobile terminal application by technical scheme of the present invention, and then the power consumption of mobile terminal application can be shown to user, allow user have at fingertips to the application power consumption in own mobile terminal.And technical scheme of the present invention can be distinguished foreground application and background application, and calculate respectively power consumption, not only can show the power consumption details of certain application, can also make user where know electric quantity consumption, whether there is the hiding application consumes power in backstage, thereby can, in the time that user need to the amount of saving energy, close pointedly the many application of some power consumption, reduce electric quantity consumption, extend the service time of mobile terminal.
Many functional parts described in this instructions are all called as module, to emphasize more especially the independence of its implementation.
In the embodiment of the present invention, module can realize with software, to carried out by various types of processors.For instance, the executable code module of a mark can comprise one or more physics or the logical block of computer instruction, and for instance, it can be built as object, process or function.However, the executable code of institute's identification module is without being physically located in together, but can comprise and be stored in different different instructions physically, in the time combining in these command logics, and its composition module and realize the regulation object of this module.
In fact, executable code module can be individual instructions or many instructions, and even can be distributed on multiple different code segments, is distributed in the middle of distinct program, and crosses over multiple memory devices distributions.Similarly, service data can be identified in module, and can realize and be organized in the data structure of any suitable type according to any suitable form.Described service data can be used as individual data collection and is collected, or can be distributed on diverse location and (be included in different storage device), and can only be present on system or network as electronic signal at least in part.
In the time that module can utilize software to realize, consider the level of existing hardware technique, so module that can realize with software, in the situation that not considering cost, those skilled in the art can build corresponding hardware circuit and realize corresponding function, and described hardware circuit comprises conventional ultra-large integrated (VLSI) circuit or gate array and the existing semiconductor such as logic chip, transistor or other discrete element.Module can also be used programmable hardware device, realizations such as field programmable gate array, programmable logic array, programmable logic device.
In the each embodiment of the method for the present invention; the sequence number of described each step can not be used for limiting the sequencing of each step; for those of ordinary skill in the art, do not paying under the prerequisite of creative work, the priority of each step is changed also within protection scope of the present invention.
The above is the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, do not departing under the prerequisite of principle of the present invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (10)

1. obtain a method for mobile terminal application power consumption, be applied in the mobile terminal of Android system, it is characterized in that, described method comprises:
Obtain the unit interval power consumption of mobile terminal application;
Obtain the working time of mobile terminal application;
According to described mobile terminal application units' time power consumption with calculate the power consumption of mobile terminal application working time.
2. the method for obtaining mobile terminal application power consumption according to claim 1, is characterized in that, the unit interval power consumption that obtains mobile terminal application comprises:
Described mobile terminal application is only installed on mobile terminal, moves described mobile terminal application Preset Time, draw the electric quantity consumption curve of mobile terminal, obtain the unit interval power consumption of mobile terminal application by calculating mean value; Or
Calculate the mean value of applying other application units' time power consumption of the same type with described mobile terminal, as the unit interval power consumption of described mobile terminal application.
3. the method for obtaining mobile terminal application power consumption according to claim 1, is characterized in that, described in obtain mobile terminal application working time comprise:
Obtain the front stage operation time t1 of mobile terminal application, obtain the running background time t2 of mobile terminal application;
Describedly comprise according to described mobile terminal application units' time power consumption and the power consumption that calculates mobile terminal application working time:
The power consumption that calculates mobile terminal application by formula m=n*t1+n*t2/k, wherein, k is reduction coefficient, and n is the unit interval power consumption of mobile terminal application, and m is the power consumption of mobile terminal application.
4. the method for obtaining mobile terminal application power consumption according to claim 3, is characterized in that, described in obtain mobile terminal application front stage operation time t1 comprise:
Obtain the foreground application of mobile terminal every Preset Time, and the foreground application that current time is obtained is compared with the last foreground application of obtaining, if the foreground application that current time obtains is different from the last foreground application of obtaining, the end time using the time corresponding current time as last foreground application, the start time using the time corresponding current time as current foreground application;
Obtain start time and the end time of mobile terminal application as foreground application by above-mentioned steps, the end time is deducted to the front stage operation time t1 that the start time obtains mobile terminal application.
5. the method for obtaining mobile terminal application power consumption according to claim 3, is characterized in that, described in obtain mobile terminal application running background time t2 comprise:
Obtain all background application of mobile terminal every Preset Time, and the background application that current time is obtained is compared with the last background application of obtaining, if the background application that current time obtains is different from the last background application of obtaining, using the start time of time corresponding current time as newly-increased background application, using the end time of time corresponding current time as disappearance background application;
Obtain start time and the end time of mobile terminal application as background application by above-mentioned steps, the end time is deducted to the running background time t2 that the start time obtains mobile terminal application.
6. obtain a device for mobile terminal application power consumption, be applied in the mobile terminal of Android system, it is characterized in that, described device comprises:
The first acquisition module, for obtaining the unit interval power consumption of mobile terminal application;
The second acquisition module, for obtaining the working time of mobile terminal application;
Computing module, for according to described mobile terminal application units' time power consumption with calculate the power consumption of mobile terminal application working time.
7. the device that obtains mobile terminal application power consumption according to claim 6, is characterized in that,
Described the first acquisition module specifically for only installing described mobile terminal application on mobile terminal, move described mobile terminal application Preset Time, draw the electric quantity consumption curve of mobile terminal, obtain the unit interval power consumption of mobile terminal application by calculating mean value; Or
Calculate the mean value of applying other application units' time power consumption of the same type with described mobile terminal, as the unit interval power consumption of described mobile terminal application.
8. the device that obtains mobile terminal application power consumption according to claim 6, is characterized in that,
Described the second acquisition module, specifically for obtaining the front stage operation time t1 of mobile terminal application, obtains the running background time t2 of mobile terminal application;
Described computing module is specifically for calculating the power consumption of mobile terminal application by formula m=n*t1+n*t2/k, wherein, k is reduction coefficient, and n is the unit interval power consumption of mobile terminal application, and m is the power consumption of mobile terminal application.
9. the device that obtains mobile terminal application power consumption according to claim 8, is characterized in that,
Described the second acquisition module is specifically for obtaining the foreground application of mobile terminal every Preset Time, and the foreground application that current time is obtained is compared with the last foreground application of obtaining, if the foreground application that current time obtains is different from the last foreground application of obtaining, the end time using the time corresponding current time as last foreground application, the start time using the time corresponding current time as current foreground application; Obtain start time and the end time of mobile terminal application as foreground application by above-mentioned steps, the end time is deducted to the front stage operation time t1 that the start time obtains mobile terminal application.
10. the device that obtains mobile terminal application power consumption according to claim 8, is characterized in that,
Described the second acquisition module is specifically for obtaining all background application of mobile terminal every Preset Time, and the background application that current time is obtained is compared with the last background application of obtaining, if the background application that current time obtains is different from the last background application of obtaining, using the start time of time corresponding current time as newly-increased background application, using the end time of time corresponding current time as disappearance background application; Obtain start time and the end time of mobile terminal application as background application by above-mentioned steps, the end time is deducted to the running background time t2 that the start time obtains mobile terminal application.
CN201210594055.0A 2012-12-31 2012-12-31 Method and device for acquiring power consumption of mobile terminal application Expired - Fee Related CN103914365B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210594055.0A CN103914365B (en) 2012-12-31 2012-12-31 Method and device for acquiring power consumption of mobile terminal application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210594055.0A CN103914365B (en) 2012-12-31 2012-12-31 Method and device for acquiring power consumption of mobile terminal application

Publications (2)

Publication Number Publication Date
CN103914365A true CN103914365A (en) 2014-07-09
CN103914365B CN103914365B (en) 2017-03-15

Family

ID=51040067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210594055.0A Expired - Fee Related CN103914365B (en) 2012-12-31 2012-12-31 Method and device for acquiring power consumption of mobile terminal application

Country Status (1)

Country Link
CN (1) CN103914365B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104820487A (en) * 2015-05-19 2015-08-05 深圳天珑无线科技有限公司 Processing method and device of running unit and terminal mobile
WO2016026268A1 (en) * 2014-08-22 2016-02-25 深圳市中兴微电子技术有限公司 Electric quantity detection method and apparatus, terminal and storage medium
CN105573465A (en) * 2014-10-31 2016-05-11 三星电子株式会社 Electronic device and method for controlling power of electronic device
CN105824740A (en) * 2015-11-26 2016-08-03 维沃移动通信有限公司 Method for determining power consumption of application and terminal
CN106326069A (en) * 2016-08-19 2017-01-11 北京小米移动软件有限公司 Method, device and system for detecting power consumption as well as equipment
CN106557147A (en) * 2015-09-28 2017-04-05 北京金山安全软件有限公司 Method and device for comparing power consumption of application program package and terminal
CN106714289A (en) * 2017-03-14 2017-05-24 西安电子科技大学 Smart phone dump energy management method based on application combination power consumption prediction
CN106951050A (en) * 2016-01-06 2017-07-14 北京小米移动软件有限公司 Terminal power consumption method for determination of amount and device
WO2017128067A1 (en) * 2016-01-26 2017-08-03 陈学良 Method and system for detecting power consumption of mobile phone application programs
CN107450704A (en) * 2016-05-31 2017-12-08 中兴通讯股份有限公司 A kind of control method, device and the terminal of terminal abnormal power consumption
CN107835311A (en) * 2017-10-31 2018-03-23 广东欧珀移动通信有限公司 application management method, device, storage medium and electronic equipment
CN107911525A (en) * 2017-11-02 2018-04-13 中国电子技术标准化研究院 Mobile phone application power consumption detection method and device
CN107943593A (en) * 2018-01-03 2018-04-20 上海传英信息技术有限公司 A kind of memory automatic cleaning method for intelligent terminal
CN110225167A (en) * 2019-01-18 2019-09-10 青岛海信移动通信技术股份有限公司 Terminal and processing method
CN112073572A (en) * 2020-06-16 2020-12-11 上海趣蕴网络科技有限公司 Online application power consumption estimation method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163073A (en) * 2010-02-23 2011-08-24 华为终端有限公司 Terminal power consumption optimization processing method and device
CN102369647A (en) * 2011-09-14 2012-03-07 华为技术有限公司 Power supply managment method and device of mobile terminal
CN102508761A (en) * 2011-11-17 2012-06-20 宇龙计算机通信科技(深圳)有限公司 Management method for terminal electric quantity and terminal
CN102591766A (en) * 2011-12-31 2012-07-18 惠州Tcl移动通信有限公司 Mobile equipment and method and system for carrying out prompt processing on power consumption of programs of mobile equipment
US20120233481A1 (en) * 2011-03-07 2012-09-13 Renesas Mobile Corporation Method, apparatus and computer program product for decreasing power consumption of an apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163073A (en) * 2010-02-23 2011-08-24 华为终端有限公司 Terminal power consumption optimization processing method and device
US20120233481A1 (en) * 2011-03-07 2012-09-13 Renesas Mobile Corporation Method, apparatus and computer program product for decreasing power consumption of an apparatus
CN102369647A (en) * 2011-09-14 2012-03-07 华为技术有限公司 Power supply managment method and device of mobile terminal
CN102508761A (en) * 2011-11-17 2012-06-20 宇龙计算机通信科技(深圳)有限公司 Management method for terminal electric quantity and terminal
CN102591766A (en) * 2011-12-31 2012-07-18 惠州Tcl移动通信有限公司 Mobile equipment and method and system for carrying out prompt processing on power consumption of programs of mobile equipment

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016026268A1 (en) * 2014-08-22 2016-02-25 深圳市中兴微电子技术有限公司 Electric quantity detection method and apparatus, terminal and storage medium
US10594132B2 (en) 2014-08-22 2020-03-17 Sanechips Technology Co., Ltd. Electricity amount detection method and device, terminal and storage medium
CN105573465A (en) * 2014-10-31 2016-05-11 三星电子株式会社 Electronic device and method for controlling power of electronic device
CN105573465B (en) * 2014-10-31 2020-12-01 三星电子株式会社 Electronic device and method of controlling power of electronic device
CN104820487A (en) * 2015-05-19 2015-08-05 深圳天珑无线科技有限公司 Processing method and device of running unit and terminal mobile
CN106557147A (en) * 2015-09-28 2017-04-05 北京金山安全软件有限公司 Method and device for comparing power consumption of application program package and terminal
CN105824740A (en) * 2015-11-26 2016-08-03 维沃移动通信有限公司 Method for determining power consumption of application and terminal
CN106951050A (en) * 2016-01-06 2017-07-14 北京小米移动软件有限公司 Terminal power consumption method for determination of amount and device
WO2017128067A1 (en) * 2016-01-26 2017-08-03 陈学良 Method and system for detecting power consumption of mobile phone application programs
CN107450704A (en) * 2016-05-31 2017-12-08 中兴通讯股份有限公司 A kind of control method, device and the terminal of terminal abnormal power consumption
CN106326069A (en) * 2016-08-19 2017-01-11 北京小米移动软件有限公司 Method, device and system for detecting power consumption as well as equipment
CN106714289B (en) * 2017-03-14 2019-11-15 西安电子科技大学 Smart phone remaining capacity management method based on application combination power consumption prediction
CN106714289A (en) * 2017-03-14 2017-05-24 西安电子科技大学 Smart phone dump energy management method based on application combination power consumption prediction
CN107835311A (en) * 2017-10-31 2018-03-23 广东欧珀移动通信有限公司 application management method, device, storage medium and electronic equipment
CN107911525A (en) * 2017-11-02 2018-04-13 中国电子技术标准化研究院 Mobile phone application power consumption detection method and device
CN107911525B (en) * 2017-11-02 2020-06-26 中国电子技术标准化研究院 Method and device for detecting power consumption of mobile phone application
CN107943593A (en) * 2018-01-03 2018-04-20 上海传英信息技术有限公司 A kind of memory automatic cleaning method for intelligent terminal
CN107943593B (en) * 2018-01-03 2022-04-05 上海传英信息技术有限公司 Automatic memory cleaning method for intelligent terminal
CN110225167A (en) * 2019-01-18 2019-09-10 青岛海信移动通信技术股份有限公司 Terminal and processing method
CN112073572A (en) * 2020-06-16 2020-12-11 上海趣蕴网络科技有限公司 Online application power consumption estimation method and system

Also Published As

Publication number Publication date
CN103914365B (en) 2017-03-15

Similar Documents

Publication Publication Date Title
CN103914365A (en) Method and device for acquiring power consumption of mobile terminal application
Yang et al. k-Shape clustering algorithm for building energy usage patterns analysis and forecasting model accuracy improvement
CN103853106B (en) A kind of energy consumption Prediction Parameters optimization method of building energy supplied equipment
KR102413479B1 (en) Memory device with power management function
CN102937830B (en) Electric quantity management method and device of mobile equipment and mobile equipment
CN105068009B (en) Battery cycle life Forecasting Methodology
CN110674982B (en) System, method and equipment for accounting, analyzing and predicting greenhouse gas emission
CN104502690B (en) A kind of CPU power consumption method of testing and system
CN104181385B (en) The electric energy detection method and electric energy detection device of air conditioner
CN104461846B (en) The method and apparatus for detecting application program power consumption
CN109242220A (en) Charging station transaction power predicating method, device, electronic equipment and storage medium
US20180225779A1 (en) System and method for determining power production in an electrical power grid
CN107589391A (en) A kind of methods, devices and systems for detecting electric power meter global error
CN203310908U (en) Electric energy detection device for air conditioner
CN104965779A (en) Detecting and locating method and device for memory leakage based on PoolMon
CN102799108A (en) Energy consumption depolymerization method based on low frequency energy consumption information and home energy management system
CN103246814A (en) Personal electric device state identification method based on K-means modeling
CN101271626A (en) Intelligent traffic investigation machine
CN106610873A (en) Method for predicting application energy consumption on Android equipment
CN107102210A (en) A kind of capacitance determining method and device based on capacitive touch chip
CN204989453U (en) Full-automatic detection device for detecting cost control function of dual-mode cost control electric energy meter
CN113010177B (en) Software-defined instrument, information acquisition method, computer, and storage medium
CN115879031A (en) Load classification method for adjustable load area and related equipment
CN104239199A (en) Virtual robot generation method, automatic test method and related device
CN103294602A (en) Method for reading data of logic analyzer and writing data in memory of logic analyzer

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 100085 Beijing City, Haidian District Road 33, Jinshan building Xiaoying

Co-patentee after: Beijing Cheetah Network Technology Co.,Ltd.

Patentee after: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.

Co-patentee after: Beijing Cheetah Mobile Technology Co.,Ltd.

Co-patentee after: CONEW NETWORK TECHNOLOGY (BEIJING) Co.,Ltd.

Address before: 100085 Beijing City, Haidian District Road 33, Jinshan building Xiaoying

Co-patentee before: BEIJING KINGSOFT NETWORK TECHNOLOGY Co.,Ltd.

Patentee before: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.

Co-patentee before: SHELL INTERNET (BEIJING) SECURITY TECHNOLOGY Co.,Ltd.

Co-patentee before: CONEW NETWORK TECHNOLOGY (BEIJING) Co.,Ltd.

CP01 Change in the name or title of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170315

CF01 Termination of patent right due to non-payment of annual fee