CN107515811A - A kind of method and apparatus for obtaining application program power consumption - Google Patents

A kind of method and apparatus for obtaining application program power consumption Download PDF

Info

Publication number
CN107515811A
CN107515811A CN201710774727.9A CN201710774727A CN107515811A CN 107515811 A CN107515811 A CN 107515811A CN 201710774727 A CN201710774727 A CN 201710774727A CN 107515811 A CN107515811 A CN 107515811A
Authority
CN
China
Prior art keywords
power consumption
application program
description information
service
self
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
CN201710774727.9A
Other languages
Chinese (zh)
Other versions
CN107515811B (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 Kylin Hesheng Network Technology Co Ltd
Original Assignee
Beijing Kylin Hesheng Network 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 Kylin Hesheng Network Technology Co Ltd filed Critical Beijing Kylin Hesheng Network Technology Co Ltd
Priority to CN201710774727.9A priority Critical patent/CN107515811B/en
Publication of CN107515811A publication Critical patent/CN107515811A/en
Application granted granted Critical
Publication of CN107515811B publication Critical patent/CN107515811B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • G06F11/3062Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations where the monitored property is the power consumption
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Stored Programmes (AREA)
  • Telephonic Communication Services (AREA)

Abstract

This application discloses a kind of method and apparatus for obtaining application program power consumption, this method includes:Receive the confirmation to assistant service that user sends;Power consumption is sent by assistant service and obtains request, assistant service is used to provide the service for obtaining electricity description information in real time, and electricity description information includes the description information of self-corresponding power consumption each to each application program;Receive the electricity description information that assistant service returns in real time;Electricity description information by calling system service and is determined to obtain by assistant service by system service;According to electricity description information, it is determined that each self-corresponding power consumption of each application program.Because the electricity description information that power consumption management program is got is determined to obtain by system service, each self-corresponding power consumption of each application program can be considered as each self-corresponding actual power consumption amount of each application program in the electricity description information that system service determines to obtain, therefore, the embodiment of the present application determine obtained application program power consumption the degree of accuracy it is higher.

Description

A kind of method and apparatus for obtaining application program power consumption
Technical field
The application is related to electronic technology field, more particularly to a kind of method and apparatus for obtaining application program power consumption.
Background technology
With the rapid development of science and technology, there are various intelligent terminals, for example, smart mobile phone, iPad etc.. These intelligent terminals bring great convenience to the daily life of user, have become essential one in people's daily life Part.As the user using intelligent terminal is more and more next more, the power consumption of intelligent terminal has become asking for people's growing interest One of topic.
Generally, the main reason for power consumption of application program is intelligent terminal power consumption in intelligent terminal.In order to save intelligent end The power consumption at end, in the prior art, the power consumption of application program in intelligent terminal can be obtained by power consumption management program, and by power consumption Management program is managed according to the power consumption of acquisition to application program, to reach the purpose for saving intelligent terminal power consumption.
Power consumption management program is when obtaining the power consumption of intelligent terminal application program, it is possible, firstly, to obtain in intelligent terminal The use information of battery;Secondly, the power consumption of application program, so, power consumption management are calculated according to the use information of battery Program can be managed according to the power consumption of acquisition to application program, for example, can close the higher application program of power consumption Close.
However, in actual applications, the power consumption for the application program that power consumption management program is got through the above way with The actual power consumption amount of application program has differences, and causes the degree of accuracy of application program power consumption that gets relatively low.
The content of the invention
The embodiment of the present application provides a kind of method and apparatus for obtaining application program power consumption, for solving power consumption management journey The problem of degree of accuracy for the application program power consumption that sequence is got is relatively low.
The embodiment of the present application provides a kind of method for obtaining application program power consumption, including:
The confirmation to assistant service that user sends is received, the confirmation represents that the user allows to pass through institute State the power consumption that assistant service obtains the application program;
Power consumption is sent by the assistant service and obtains request, it is each that the power consumption acquisition request is used for acquisition request Each self-corresponding real-time power consumption of application program, the assistant service are used to provide the service for obtaining electricity description information in real time, The electricity description information includes the description information of self-corresponding power consumption each to each application program;
Receive the electricity description information that the assistant service returns in real time;The electricity description information is by the auxiliary Service determines to obtain by calling system service and by the system service;
According to the electricity description information, it is determined that each each self-corresponding power consumption of application program.
The embodiment of the present application provides a kind of device for obtaining application program power consumption, including:
Receiving unit, receives the confirmation to assistant service that user sends, and the confirmation represents the user Allow the power consumption that the application program is obtained by the assistant service;
Transmitting element, power consumption is sent by the assistant service and obtains request, the power consumption acquisition request is used for please Ask and obtain each each self-corresponding real-time power consumption of application program, the assistant service is used to provide obtains electricity description letter in real time The service of breath, the electricity description information include the description information of self-corresponding power consumption each to each application program;
The receiving unit, receive the electricity description information that the assistant service returns in real time;The electricity description Information determines to obtain by the assistant service by calling system service and by the system service;
Determining unit, according to the electricity description information, it is determined that each each self-corresponding power consumption of application program.
The embodiment of the present application provides a kind of electronic equipment, including:
Processor;And
It is arranged to store the memory of computer executable instructions, the executable instruction makes the place when executed Manage device and perform following operate:
The confirmation to assistant service that user sends is received, the confirmation represents that the user allows to pass through institute State the power consumption that assistant service obtains the application program;
Power consumption is sent by the assistant service and obtains request, it is each that the power consumption acquisition request is used for acquisition request Each self-corresponding real-time power consumption of application program, the assistant service are used to provide the service for obtaining electricity description information in real time, The electricity description information includes the description information of self-corresponding power consumption each to each application program;
Receive the electricity description information that the assistant service returns in real time;The electricity description information is by the auxiliary Service determines to obtain by calling system service and by the system service;
According to the electricity description information, it is determined that each each self-corresponding power consumption of application program.
The embodiment of the present application provides a kind of computer-readable recording medium, the computer-readable recording medium storage one Or multiple programs, one or more of programs are when the electronic equipment for being included multiple application programs performs so that the electricity Sub- equipment performs following operate:
The confirmation to assistant service that user sends is received, the confirmation represents that the user allows to pass through institute State the power consumption that assistant service obtains the application program;
Power consumption is sent by the assistant service and obtains request, it is each that the power consumption acquisition request is used for acquisition request Each self-corresponding real-time power consumption of application program, the assistant service are used to provide the service for obtaining electricity description information in real time, The electricity description information includes the description information of self-corresponding power consumption each to each application program;
Receive the electricity description information that the assistant service returns in real time;The electricity description information is by the auxiliary Service determines to obtain by calling system service and by the system service;
According to the electricity description information, it is determined that each each self-corresponding power consumption of application program.
Above-mentioned at least one technical scheme that the embodiment of the present application uses can reach following beneficial effect:
The technical scheme that the embodiment of the present application provides, power consumption management program each apply journey in acquisition intelligent terminal is needed During each self-corresponding power consumption of sequence, electricity description information can be acquired by assistant service, and describe to believe according to the electricity Breath determination obtains each self-corresponding power consumption of each application program, wherein, included in the electricity description information and apply journey to each The description information of each self-corresponding power consumption of sequence, the electricity description information by the assistant service by calling system service and by System service determines to obtain.So, because the electricity description information that power consumption management program is got is determined to obtain by system service, Each self-corresponding power consumption of each application program can be considered as each application in the electricity description information that system service determines to obtain Each self-corresponding actual power consumption amount of program, therefore, the application that power consumption management program determines according to the electricity description information got The degree of accuracy of program power consumption is higher.
Brief description of the drawings
, below will be to embodiment or existing in order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments described in application, for those of ordinary skill in the art, do not paying the premise of creative labor Under, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of the method for acquisition application program power consumption that the embodiment of the present application provides;
Fig. 2 is the schematic flow sheet for another method for obtaining application program power consumption that the embodiment of the present application provides;
Fig. 3 is the structural representation for a kind of electronic equipment that the embodiment of the present application provides;
Fig. 4 is a kind of structural representation of the device for acquisition application program power consumption that the embodiment of the present application provides.
Embodiment
In the prior art, power consumption management program is applied the power consumption of program by obtaining the battery information of intelligent terminal During amount, generally can by calling the special purpose interface that the operating system of intelligent terminal provides to obtain the battery information of intelligent terminal, And after battery information is acquired, the power consumption of application program is calculated according to the battery information.
However, in actual applications, when power consumption management program obtains the power consumption of application program by the above method, at least Problems be present:
(1) because the version of the operating system of intelligent terminal is different, or the model of intelligent terminal is different, causes power consumption pipe Compatibility issue be present between reason program and the operating system of intelligent terminal, the compatibility issue is mainly reflected in power consumption management journey The special purpose interface that sequence can not call the operating system of intelligent terminal to provide obtains the battery information of intelligent terminal, or, power consumption pipe Program is managed after the special purpose interface is called, it is impossible to battery information exactly is obtained, so, because power consumption management program can not obtain Accurate battery information is obtained, causes the degree of accuracy of the power consumption of application program that is calculated according to the battery information relatively low;
(2) power consumption management program is when the power consumption information of application program is calculated according to the battery information of intelligent terminal, Calculating process is more complicated, so, past between the power consumption for the application program being calculated and the actual power consumption amount of application program Toward certain difference being present, that is to say, that although the consumption of the power consumption for the application program being calculated relatively application program Electricity, but be not the actual power consumption amount of application program, cause the degree of accuracy for the application program power consumption that power consumption management journey obtains It is relatively low.
As can be seen here, in the prior art, the degree of accuracy of the power consumption for the application program that power consumption management program is got is relatively low.
Generally, for intelligent terminal, system service corresponding to the operating system of intelligent terminal can be according to intelligent end The information such as the hardware at end determine to obtain the system power consumption of intelligent terminal, hardware power consumption and software (including in intelligent terminal Each application program of installation) power consumption, and can will determine obtained these power consumption in the form of power consumption management interface in intelligence It can be shown in terminal, in order to which user checks.Because the power consumption shown in power consumption management interface is the operation by intelligent terminal System service corresponding to system determines to obtain according to information such as the hardware of intelligent terminal, therefore, is shown in the power consumption management interface Power consumption can be considered as the true power consumption of the system of intelligent terminal, hardware and software, i.e., relative to leading in the prior art Cross for the mode calculated determines the power consumption of obtained application program, the application program power consumption that is shown in the power consumption management interface The degree of accuracy of amount is higher.
In view of this, the embodiment of the present application provides a kind of method and apparatus for obtaining application program power consumption, and this method can To acquire the power consumption of the application program included in intelligent terminal power consumption management interface, so, compared to prior art Speech, the degree of accuracy of the application program power consumption got are higher.
In order to realize the purpose of the application, a kind of method for obtaining application program power consumption is provided in the embodiment of the present application And device, this method include:The confirmation to assistant service that user sends is received, the confirmation represents the user Allow the power consumption that the application program is obtained by the assistant service;Sending power consumption acquisition by the assistant service please Ask, the power consumption obtains request and is used for each self-corresponding real-time power consumption of each application program of acquisition request, the auxiliary clothes It is engaged in including each right to each application program for the service for providing acquisition electricity description information in real time, the electricity description information The description information for the power consumption answered;Receive the electricity description information that the assistant service returns in real time;The electricity description Information determines to obtain by the assistant service by calling system service and by the system service;Describe to believe according to the electricity Breath, it is determined that each each self-corresponding power consumption of application program.
, compared to existing technologies, following beneficial effect at least be present in the technical scheme that the embodiment of the present application provides:
(1) power consumption management program can acquire the power consumption of application program by assistant service, therefore, can need not The special purpose interface for calling intelligent terminal operation system to provide, you can so that the special purpose interface of intelligent terminal operation system need not be relied on just The power consumption of application program can be acquired so that more stablize when obtaining application program power consumption, can not be by intelligent end The limitation of the operating system or intelligent terminal model at end;
(2) power consumption management program can be retouched directly by analyzing the electricity description information got from the electricity State extraction in information and obtain the description information to application program power consumption, and then directly determine the power consumption of application program, without Calculate, so, substantial amounts of computing resource can be saved;
(3) power consumption of the application program got due to power consumption management program is corresponding by the operating system of intelligent terminal System service determine to obtain according to information such as the hardware of intelligent terminal, the actual power consumption amount of the application program can be considered as, Therefore, the degree of accuracy of the power consumption of the application program got is higher.
Technical scheme is clearly and completely retouched with reference to the application specific embodiment and corresponding accompanying drawing State.Obviously, described embodiment is only some embodiments of the present application, rather than whole embodiments.Based in the application Embodiment, the every other embodiment that those of ordinary skill in the art are obtained under the premise of creative work is not made, Belong to the scope of the application protection.
The embodiment of the present application provide technical scheme, can be used for power consumption management program obtain intelligent terminal in install it is every Individual each self-corresponding power consumption of application program, wherein, the intelligent terminal includes but is not limited to:Smart mobile phone, iPad, etc. institute Stating power consumption management program can be mounted in the intelligent terminal, for according to each self-corresponding power consumption of each application program Amount is managed to each application program, and then realizes the purpose that the power consumption to the intelligent terminal is managed.
Below in conjunction with accompanying drawing, the technical scheme that each embodiment of the application provides is described in detail.
Fig. 1 is a kind of schematic flow sheet of the method for acquisition application program power consumption that the embodiment of the present application provides.It is described Method is as described below.
Step 102:Receive the confirmation to assistant service that user sends.
Wherein, the confirmation represents that the user allows the consumption that the application program is obtained by the assistant service Electricity.
In the embodiment of the present application, the assistant service may be used to provide the service for obtaining electricity description information in real time, its In, the electricity description information can include the description letter of each self-corresponding power consumption of each application program in the intelligent terminal Breath.
The assistant service can according to corresponding to the operating system of the intelligent terminal system service provide assisted class Usage (AccessibilityService) determines to obtain.Specifically, can be created by inheriting the assisted class usage To the assistant service.Wherein, the operating system of the intelligent terminal includes but is not limited to:Android operation system.
It should be noted that for the operating system of the intelligent terminal, as long as the behaviour tested by CTS Make system, can create to obtain the assistant service in theory by the above method.Wherein, the embodiment of the present application is to described The specific version number of operating system does not limit.
After the method based on above-mentioned record creates to obtain the assistant service, the assistant service can be further set Function, that is, the service for setting the assistant service to provide.In the embodiment of the present application, the assistant service can be set For monitoring power consumption management interface, in order to obtain the electricity description information included in the power consumption management interface in real time, that is, set The service for obtaining the electricity description information can be provided by putting the assistant service.
In the embodiment of the present application, the electricity description information can be included in the power consumption management interface, the electricity is retouched Stating information can include to the description information for each self-corresponding power consumption of each application program installed in the intelligent terminal, go back It can include to the description information of the system power consumption of the intelligent terminal and to hardware power consumption in the intelligent terminal Description information, wherein, each power consumption of application program, the power consumption of system and hardware corresponding to the electricity description information Power consumption can determine to obtain according to actual hardware information by the system service of the intelligent terminal, can be considered as each described The actual power consumption amount of application program, the system of the intelligent terminal and the hardware.
After being configured to the function of the assistant service, the assistant service can be added to the system service In corresponding operating system, so, the assistant service can acquire the electricity description letter by the system service Breath.
After the assistant service is obtained by the method for above-mentioned record, user can be installed in intelligent terminal for pair The power consumption management program that the power consumption of each application program is managed in intelligent terminal.
After power consumption management program described in installation, the power consumption management program can prompt the user whether to determine to open The service that the assistant service provides, now, the user can determine to open the assistant service, and can be considered as to described Power consumption management program sends the confirmation, wherein, the determination information can be used to indicate that the user allows the consumption Electric management program acquires each each self-corresponding power consumption of application program in the intelligent terminal by assistant service.
For the user after the confirmation is sent, the power consumption management program can receive the confirmation, this Sample, the power consumption management program, can in each self-corresponding power consumption of each application program in needing to obtain the intelligent terminal To acquire the electricity description information by the assistant service, and then it is each right to acquire each application program The power consumption answered.
The content recorded based on step 102, the power consumption management program can perform after the confirmation is received Step 104.
Step 104:Power consumption is sent by the assistant service and obtains request.
At step 104, the power consumption management program allows it to obtain application by the assistant service in the user , can when needing to obtain each self-corresponding power consumption of each application program in the intelligent terminal in the case of program power consumption Request is obtained to send power consumption to operating system by the assistant service, each the application program is each right for acquisition request The power consumption answered.
In the embodiment of the present application, the power consumption management program can it is following it is several in the case of determine to need to obtain it is each Each self-corresponding power consumption of application program, including:
The first situation:User is in the power consumption management interface of the intelligent terminal is clicked to enter using intelligent terminal When, can be considered as the power consumption management program needs to obtain each each self-corresponding power consumption of application program;
Second of situation:User is clicking to enter the power consumption management program of the intelligent terminal using intelligent terminal When, can be considered as the power consumption management program needs to obtain each each self-corresponding power consumption of application program;
The third situation:User is during using intelligent terminal (for example, user sees video using intelligent terminal, played Game etc.), can be considered as the power consumption management program needs to obtain each each self-corresponding power consumption of application program.
Certainly, in actual applications, the power consumption management program can supervise in real time in the case where intelligent terminal is in open state Each each self-corresponding power consumption of application program in intelligent terminal is listened, in such a case, it is possible to be considered as the power consumption Management program needs to obtain each each self-corresponding power consumption of application program in real time.
In the embodiment of the present application, the power consumption management program can pass through institute in the case of any one of above-mentioned record State assistant service and send the power consumption acquisition request.
At step 104, the power consumption management program is sending the power consumption acquisition request by the assistant service Afterwards, step 106 can be performed.
Step 106:Receive the electricity description information that the assistant service returns in real time.
Wherein, the electricity description information can be taken by the assistant service by calling system service and by the system Business determination obtains.
In step 106, power consumption acquisition request is being sent to the assistant service by the power consumption management program Afterwards, the assistant service can receive the power consumption and obtain request, and now, the assistant service can be according to the power consumption Amount obtains request and acquires the electricity description information in real time.
In the embodiment of the present application, the assistant service can acquire the electricity description information in the following manner, Including:
The assistant service is obtained according to the power consumption and asked, and calls the system service so that the system service It is determined that obtain the electricity description information;
The assistant service receives the electricity description information, and the electricity description information is returned.
, can be to be described in real-time calling that is, the assistant service is after receiving the power consumption and obtaining request System service.Now, the system service can determine to obtain the electricity description information.
Specifically, the system service can be believed when being called by the assistant service according to hardware of intelligent terminal etc. Breath determines to obtain the electricity description information that the power consumption management interface includes in real time, and is described it is determined that obtaining the electricity After information, the electricity description information can be returned to the assistant service so that the assistant service can obtain in real time Obtain the electricity description information.
The assistant service directly can return to the electricity description information after the electricity description information is got To the power consumption management program.
The power consumption management program is receiving the description of the assistant service return according to the method for above-mentioned record After information, step 108 can be performed.
Step 108:According to the electricity description information, it is determined that each each self-corresponding power consumption of application program.
In step 108, the power consumption management program describes letter in the electricity for receiving the assistant service return After breath, it is each self-corresponding can to determine to obtain each application program in the intelligent terminal according to the electricity description information Power consumption.
Specifically, the power consumption management program is according to the electricity description information, it is determined that each application program is each Corresponding power consumption, it can include:
The electricity description information is parsed, extracted respectively from the electricity description information to each application The description information of each self-corresponding power consumption of program;
According to the description information to each each self-corresponding power consumption of application program, it is determined that each application program Each self-corresponding power consumption.
In the embodiment of the present application, the content based on above-mentioned record is understood, can be included in the electricity description information to institute The description information of each application program power consumption in intelligent terminal is stated, the system power consumption to intelligent terminal can also be included Description information and to description information of hardware power consumption etc. in intelligent terminal, therefore, the power consumption management program is receiving To after the electricity description information, the electricity description information can be parsed, be extracted from the electricity description information The description information of each each self-corresponding power consumption of application program, so determine to obtain each application program it is each right The power consumption answered.
The power consumption management program is each corresponded to each application program being extracted from the electricity description information Power consumption description information when, can be extracted, can also be extracted according to the identification information of each application program After the description information of all application program power consumption included into the electricity description information, then each described answer is determined respectively With the description information of each self-corresponding power consumption of program, the embodiment of the present application is not specifically limited.
The power consumption management program obtains the description information of each self-corresponding power consumption of each application program in extraction Afterwards, may further determine that to obtain each self-corresponding power consumption of each application program, realization is obtained by the assistant service Obtain the purpose of the power consumption of each application program.
Here is that the electricity that the power consumption management program is got by the assistant service from smart mobile phone is retouched State the part in information:
Android operation system 49%
Android system 13%
Device standby 8%
Battery standby 7%
Screen %7
Dotey Jia-gardener 5%
12306 4%
Love investment 2%.
The power consumption management program is when analyzing the electricity description information, it is not necessary to carry out complexity calculating and Analysis, directly can be integrated above-mentioned data, it is possible to accurately obtain each self-corresponding power consumption of each application program Amount.For example, the power consumption that " 12306 " this application program can be directly acquired according to foregoing description information is 4%.
Compared with prior art, because the embodiment of the present application can be got by intelligent terminal by the assistant service The power consumption for the application program that system service corresponding to operating system determines according to information such as hardware, the power consumption can be considered as should With the actual power consumption amount of program, therefore, the degree of accuracy for the application program power consumption that the embodiment of the present application acquires is higher.This Outside, because the operating system tested by CTS can create to obtain the assistant service, therefore, the embodiment of the present application can be with Need not obtain root authority and independent of intelligent terminal operation system in the case of, acquire the higher application of the degree of accuracy The power consumption of program.
In another embodiment that the application provides, the power consumption management program is acquiring each application program After each self-corresponding power consumption, methods described also includes:
According to each each self-corresponding power consumption of application program, whether just the power consumption of each application program is judged Often;
Each application program is managed respectively according to judged result.
In the embodiment of the present application, the power consumption management program is getting each self-corresponding consumption of each application program After electricity, each application program can be managed according to the power consumption.Specifically, wherein power consumption can be selected Higher one or more application programs, and the power consumption of the application program according to selection, determine the application program Whether power consumption is normal, and then the application program of selection is managed.
The power consumption management program judges each application according to each each self-corresponding power consumption of application program Whether the power consumption of program is normal, including:
For each application program, following operate is performed:
Obtain the use information of the application program;
Judge whether the use information of the application program matches with the power consumption of the application program;
If, it is determined that the power consumption of the application program is normal;
If not, it is determined that the power consumption of the application program is abnormal.
For each application program, the power consumption management program when obtaining the use information of the application, The use information of the application program nearest a period of time (this time can specifically determine according to being actually needed) can be obtained, For example, it may be whether the application program started in nearest one hour, if in running background, etc..
In the embodiment of the present application, the purpose that the power consumption management program obtains the use information of the application program can be Determine the service condition of the application program.The power consumption management program after the use information of the application program is got, The use information can be matched with the power consumption of the application program obtained.
In the real-time example of the application, the power consumption of the application program of the use information with obtaining is matched, can Be by the use information of the application program compared with the power consumption of the application program, determine the application program Whether power consumption is normal, that is, determines whether the power consumption of the application program is reasonable.Wherein, if the use information of the application program with The power consumption of the application program is flux matched, then it is considered that the power consumption of the application program is normal, conversely, then it is considered that described The power consumption of application program is abnormal.
For example, determining that application program A has fallen back on running background according to application program A use information, but get Application program A power consumption it is very high, hence, it can be determined that application program A power consumption is unreasonable, i.e. application program A power consumption It is abnormal.
The power consumption management program is after whether the power consumption for judging the application program is normal, according to judged result to described Application program is managed, including:
It is determined that the application program power consumption exception when, it is automatic to perform the operation for closing the application program, or, by institute State the abnormal information of application program power consumption to be prompted, in order to which user determines whether to close the application program.
In the embodiment of the present application, the power consumption management program it is determined that the application program power consumption exception when, if described Power consumption management program has acquired the root authority of the application program, then can close the application program automatically, so, The power consumption of intelligent terminal can be saved.In addition it is also possible to prompted to user, determine whether to close by user and described apply journey Sequence.
, can be by the application if the power consumption management program does not acquire the root authority of the application program The abnormal information of program power consumption is prompted to user, so, can be determined whether to close the application program by the user, To save the power consumption of intelligent terminal.
In actual applications, it can determine the abnormal application journey of power consumption is closed using which kind of above-mentioned mode according to actual conditions Sequence, it is not specifically limited here.
In the embodiment of the present application, the power consumption management program is when it is determined that the power consumption of the application program is normal, it may be said that The power consumption of the bright application program is rational, now the application program can not be performed to close and made.
By taking the above-mentioned electricity description information got from smart mobile phone as an example, it may be determined that " dotey Jia-gardener " And the power consumption of " 12306 " is higher, now, the power consumption management program can be obtained in half an hour " dotey Jia-gardener " And the use information of " 12306 ".Now, however, it is determined that " dotey Jia-gardener " has been to fall back on backstage a period of time, and " 12306 " can then determine that the power consumption of " dotey Jia-gardener " is abnormal always situated in foreground, then, the power consumption management program " dotey Jia-gardener " can be closed, or the power consumption of prompting user " dotey Jia-gardener " is abnormal, is determined whether by user Close the application program.Further, since the power consumption of " 12306 " is normal, then, it can select not close " 12306 ".
It should be noted that the degree of accuracy of the power consumption of the application program acquired due to the embodiment of the present application is higher, Therefore, can be with more efficient when being managed according to the power consumption of the application program to the application program.
The technical scheme that the embodiment of the present application provides, power consumption management program each apply journey in acquisition intelligent terminal is needed During each self-corresponding power consumption of sequence, electricity description information can be acquired by assistant service, and describe to believe according to the electricity Breath determination obtains each self-corresponding power consumption of each application program, wherein, included in the electricity description information and apply journey to each The description information of each self-corresponding power consumption of sequence, the electricity description information by the assistant service by calling system service and by System service determines to obtain.So, because the electricity description information that power consumption management program is got is determined to obtain by system service, Each self-corresponding power consumption of each application program can be considered as each application in the electricity description information that system service determines to obtain Each self-corresponding actual power consumption amount of program, therefore, the application that power consumption management program determines according to the electricity description information got The degree of accuracy of program power consumption is higher.
Fig. 2 is the schematic flow sheet for another method for obtaining application program power consumption that the embodiment of the present application provides.Fig. 2 Shown embodiment the method described in embodiment can be realized as shown in Figure 1.
In the embodiment of the present application, can be using intelligent terminal as smart mobile phone, the operating system of the smart mobile phone is peace Tall and erect operating system, the application journey installed in the smart mobile phone is obtained using the power consumption management program installed in the smart mobile phone Illustrated exemplified by the power consumption of sequence.
Step 201:It is determined that obtain obtaining the assistant service of electricity description information service for providing.
Wherein, included in the electricity description information to each self-corresponding consumption of each application program in the smart mobile phone The hardware power consumption of the description information of electricity, the description information of the system power consumption of the smart mobile phone and the smart mobile phone Description information, the electricity description information as corresponding to Android operation system in the smart mobile phone system service according to The determinations such as the actual hardware information of smart mobile phone obtain, can be considered as each application program, the system of the smart mobile phone, The actual power consumption amount of the hardware of the smart mobile phone.
In step 201, it is possible, firstly, to the assisted class usage provided by inheriting Android system " AccessibilityService " creates a customized assistant service " WindowReaderService ";Secondly, will The assistant service is added among " AndroidManifest.xml " file, and states to need to obtain The authority of " android.permission.BIND_ACCESSIBILITY_SERVICE ";Again, Action filterings are added Device --- " android.accessibilityservice.AccessibilityService ", the filter can be used for table Levy the object monitored;Finally, a self-defined xml document, and definition needs the program for the application program monitored in this document Name.
Due to needing to obtain each each self-corresponding power consumption of application program in the smart mobile phone in the embodiment of the present application, Therefore, it is necessary to which the program name for the application program monitored can be " com.android.settings ".In addition to this it is possible to Addition creates the intention of the assistant service in above-mentioned customized xml document, is easy to user to check, and the xml document is added It is added in " AndroidManifest.xml " file where the assistant service on corresponding node.
So, can determine to obtain the assistant service by above-mentioned steps.
Step 202:Power consumption management program receives the confirmation to the assistant service that user sends.
Wherein, the confirmation represents that the user allows by being answered in the assistant service acquisition smart mobile phone With the power consumption of program.
In actual applications, after power consumption management program success is installed in the smart mobile phone, can eject pair Frame prompting user is talked about, open " assistant service " just can preferably work afterwards, so, described after user's click is agreed to Power consumption management program can jump to the switch interface of " assistant service ", and now, user, which can confirm that, opens the assistant service, It can be considered as to the power consumption management interface and send the confirmation, the power consumption management program can receive described true Recognize information.
Step 203:The power consumption management program sends power consumption by the assistant service and obtains request.
In step 203, the power consumption management service is being needed described in acquisition in the case where opening the assistant service During the power consumption of the application program in smart mobile phone, power consumption can be sent by the assistant service and obtain request, the consumption Electricity asks to be used for each self-corresponding power consumption of each application program in smart mobile phone described in acquisition request.
Step 204:The assistant service is obtained according to the power consumption and asked, and calls the Android of the smart mobile phone to operate System service corresponding to system.
Step 205:The electricity description information included in power consumption management interface is sent to the auxiliary by the system service Service.
Wherein, the electricity description information included in the power consumption management interface can be with the institute described in above-mentioned steps 201 It is identical to state electricity description information.
In step 203 to step 205, the consumption is sent by miscellaneous function service in the power consumption management program When electricity obtains request, " the onAccessibilityService of the definition in the assistant service (AccessibilityEvent) " method will be called back, and in the method, the system service can be by power consumption management circle Face is sent in the form of AccessibilityEvent examples in the assistant service.Wherein, AccessibilityEvent Example can be considered as the electricity description information.
Step 206:The electricity description information is sent to the power consumption management program by the assistant service.
Step 207:The power consumption management program is according to the power consumption description information, it is determined that each application program is each Corresponding power consumption.
In step 207, the power consumption management program can parse to the electricity description information, and then obtain To each each self-corresponding power consumption of application program.
Specifically, according to the AccessibilityEvent examples acquired, AccessibilityEvent realities are determined The AccessibilityNodeInfo examples included in example, AccessibilityNodeInfo examples are the data to be parsed Source, after being parsed to AccessibilityNodeInfo examples, the consumption included in the power consumption management interface can be obtained Electricity.
Generally, the power consumption management interface can by TextView, RecyclerView, FrameLayout, The elements such as LinearLayou, ListView are formed, and when being parsed to these elements, these elements can be divided into two classes, One kind is View, and another kind of is ViewGroup, may then pass through recursive mode and all traverses all elements, and leads to Cross nodeInfo.getText () method and get particular content (the i.e. described intelligent hand included in the power consumption management interface The power consumption of hardware, system and application program in machine).
It should be noted that it is determined that after the power consumption of the application program, can be by the power consumption of the application program Stored according to different application programs, in order to which the power consumption management program needs the power consumption according to the application program When power consumption to the application program or the smart mobile phone is managed, the power consumption of the application program can be acquired Amount.
Step 208:The power consumption management program is according to each each self-corresponding power consumption of application program, to each institute Application program is stated to be managed.
In a step 208, the power consumption management program can be answered described by the method described in embodiment illustrated in fig. 1 It is managed with program, description is not repeated herein.
In the embodiment of the present application, each application program each corresponds in the smart mobile phone got due to power consumption management program Power consumption be to determine what is obtained according to information such as the actual hardwares of the smart mobile phone by the smart mobile phone, therefore, can be with It is considered as each self-corresponding actual power consumption amount of each application program, so, compared to existing technologies, the embodiment of the present application The degree of accuracy of the power consumption of each application program got is higher.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims It is interior.In some cases, the action recorded in detail in the claims or step can be come according to different from the order in embodiment Perform and still can realize desired result.In addition, the process described in the accompanying drawings not necessarily require show it is specific suitable Sequence or consecutive order could realize desired result.In some embodiments, multitasking and parallel processing be also can With or be probably favourable.
Fig. 3 is the structural representation of one embodiment electronic equipment of the application.Fig. 3 is refer to, in hardware view, the electricity Sub- equipment includes processor, alternatively also includes internal bus, network interface, memory.Wherein, memory may include interior Deposit, such as high-speed random access memory (Random-Access Memory, RAM), it is also possible to also including non-volatile memories Device (non-volatile memory), for example, at least 1 magnetic disk storage etc..Certainly, the electronic equipment is also possible that other Hardware required for business.
Processor, network interface and memory can be connected with each other by internal bus, and the internal bus can be ISA (Industry Standard Architecture, industry standard architecture) bus, PCI (Peripheral Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard Architecture, EISA) bus etc..The bus can be divided into address bus, data/address bus, control always Line etc..For ease of representing, only represented in Fig. 3 with a four-headed arrow, it is not intended that an only bus or a type of Bus.
Memory, for depositing program.Specifically, program can include program code, and described program code includes calculating Machine operational order.Memory can include internal memory and nonvolatile memory, and provide instruction and data to processor.
Processor read from nonvolatile memory corresponding to computer program into internal memory then run, in logical layer The device for obtaining application program power consumption is formed on face.Processor, the program that memory is deposited is performed, and specifically for performing Operate below:
The confirmation to assistant service that user sends is received, the confirmation represents that the user allows to pass through institute State the power consumption that assistant service obtains the application program;
Power consumption is sent by the assistant service and obtains request, it is each that the power consumption acquisition request is used for acquisition request Each self-corresponding real-time power consumption of application program, the assistant service are used to provide the service for obtaining electricity description information in real time, The electricity description information includes the description information of self-corresponding power consumption each to each application program;
Receive the electricity description information that the assistant service returns in real time;The electricity description information is by the auxiliary Service determines to obtain by calling system service and by the system service;
According to the electricity description information, it is determined that each each self-corresponding power consumption of application program.
The method that the device of acquisition application program power consumption disclosed in the above-mentioned embodiment illustrated in fig. 3 such as the application performs can be with Realized applied in processor, or by processor.Processor is probably a kind of IC chip, has the processing energy of signal Power.In implementation process, each step of the above method can pass through the integrated logic circuit or software of the hardware in processor The instruction of form is completed.Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other FPGAs Device, discrete gate or transistor logic, discrete hardware components.It can realize or perform the public affairs in the embodiment of the present application Each method, step and the logic diagram opened.General processor can be microprocessor or the processor can also be it is any often Processor of rule etc..The step of method with reference to disclosed in the embodiment of the present application, can be embodied directly in hardware decoding processor and hold Row is completed, or performs completion with the hardware in decoding processor and software module combination.Software module can be located at deposits at random Reservoir, flash memory, read-only storage, this area such as programmable read only memory or electrically erasable programmable memory, register In ripe storage medium.The storage medium is located at memory, and processor reads the information in memory, is completed with reference to its hardware The step of above method.
The electronic equipment can also carry out Fig. 1 method, and realize the device for obtaining application program power consumption in Fig. 1, Fig. 2 institute Show the function of embodiment, the embodiment of the present application will not be repeated here.
Certainly, in addition to software realization mode, the electronic equipment of the application is not precluded from other implementations, for example patrols Collect mode of device or software and hardware combining etc., that is to say, that the executive agent of following handling process is not limited to each patrol Collect unit or hardware or logical device.
The embodiment of the present application also proposed a kind of computer-readable recording medium, the computer-readable recording medium storage one Individual or multiple programs, one or more programs include instruction, and the instruction is when the portable electronic for being included multiple application programs When equipment performs, the method for portable electric appts execution embodiment illustrated in fig. 1 can be made, and specifically for performing following grasp Make:
The confirmation to assistant service that user sends is received, the confirmation represents that the user allows to pass through institute State the power consumption that assistant service obtains the application program;
Power consumption is sent by the assistant service and obtains request, it is each that the power consumption acquisition request is used for acquisition request Each self-corresponding real-time power consumption of application program, the assistant service are used to provide the service for obtaining electricity description information in real time, The electricity description information includes the description information of self-corresponding power consumption each to each application program;
Receive the electricity description information that the assistant service returns in real time;The electricity description information is by the auxiliary Service determines to obtain by calling system service and by the system service;
According to the electricity description information, it is determined that each each self-corresponding power consumption of application program.
Fig. 4 is a kind of structural representation of the device for acquisition application program power consumption that the embodiment of the present application provides.It is described Device can include:Receiving unit 41, transmitting element 42 and determining unit 43, wherein:
Receiving unit 41, receives the confirmation to assistant service that user sends, and the confirmation represents the use Family allows the power consumption that the application program is obtained by the assistant service;
Transmitting element 42, power consumption is sent by the assistant service and obtains request, the power consumption obtains request and is used for Each self-corresponding real-time power consumption of each application program of acquisition request, the assistant service is used to provide obtains electricity description in real time The service of information, the electricity description information include the description information of self-corresponding power consumption each to each application program;
The receiving unit 41, receives the electricity description information that the assistant service returns in real time, and the electricity is retouched Information is stated to determine to obtain by the assistant service by calling system service and by the system service;
Determining unit 43, according to the electricity description information, it is determined that each each self-corresponding power consumption of application program.
In the embodiment of the present application, the assisted class usage that the assistant service provides according to the system service determines to obtain, And after establishment obtains the assistant service, the assistant service is provided for monitor power consumption management interface, to obtain in real time Take the electricity description information included in the power consumption management interface.
In the embodiment of the present application, the electricity description information determines to obtain in the following manner, including:
The assistant service is obtained according to the power consumption and asked, and calls the system service so that the system service It is determined that obtain the electricity description information;
The assistant service receives the electricity description information, and the electricity description information is returned.
Alternatively, the determining unit 43 is according to the electricity description information, it is determined that each application program is each right The power consumption answered, including:
The electricity description information is parsed, extracted respectively from the electricity description information to each application The description information of each self-corresponding power consumption of program;
According to the description information to each each self-corresponding power consumption of application program, it is determined that each application program Each self-corresponding power consumption.
In another embodiment that the application provides, described device also includes:Application program management unit 44, wherein:
The application program management unit 44 it is determined that after each each self-corresponding power consumption of application program, according to Each each self-corresponding power consumption of application program, judge whether the power consumption of each application program is normal;
Each application program is managed respectively according to judged result.
For the application program management unit 44 according to the power consumption of each application program, judgement is each described to apply journey Whether each self-corresponding power consumption of sequence is normal, including:
For each application program, following operate is performed:
Obtain the use information of the application program;
Judge whether the use information of the application program matches with the power consumption of the application program;
If, it is determined that the power consumption of the application program is normal;
If not, it is determined that the power consumption of the application program is abnormal.
The application program management unit 44 is managed according to judged result to the application program, including:
It is determined that the application program power consumption exception when, it is automatic to perform the operation for closing the application program, or, by institute State the abnormal information of application program power consumption to be prompted, in order to which user determines whether to close the application program.
In a word, the preferred embodiment of the application is the foregoing is only, is not intended to limit the protection domain of the application. All any modification, equivalent substitution and improvements within spirit herein and principle, made etc., should be included in the application's Within protection domain.
System, device, module or the unit that above-described embodiment illustrates, it can specifically be realized by computer chip or entity, Or realized by the product with certain function.One kind typically realizes that equipment is computer.Specifically, computer for example may be used Think personal computer, laptop computer, cell phone, camera phone, smart phone, personal digital assistant, media play It is any in device, navigation equipment, electronic mail equipment, game console, tablet PC, wearable device or these equipment The combination of equipment.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability Comprising so that process, method, commodity or equipment including a series of elements not only include those key elements, but also wrapping Include the other element being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described Other identical element also be present in the process of element, method, commodity or equipment.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment Divide mutually referring to what each embodiment stressed is the difference with other embodiment.It is real especially for system For applying example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method Part explanation.

Claims (10)

  1. A kind of 1. method for obtaining application program power consumption, it is characterised in that including:
    The confirmation to assistant service that user sends is received, the confirmation represents that the user allows by described auxiliary Help the power consumption of application program described in service acquisition;
    Power consumption is sent by the assistant service and obtains request, the power consumption obtains request and each applied for acquisition request Each self-corresponding real-time power consumption of program, the assistant service is used to provide the service for obtaining electricity description information in real time, described Electricity description information includes the description information of self-corresponding power consumption each to each application program;
    Receive the electricity description information that the assistant service returns in real time;The electricity description information is by the assistant service Determine to obtain by calling system service and by the system service;
    According to the electricity description information, it is determined that each each self-corresponding power consumption of application program.
  2. 2. the method as described in claim 1, it is characterised in that
    The assisted class usage that the assistant service provides according to the system service creates to obtain, and obtains the auxiliary in establishment After service, the assistant service is provided for monitor power consumption management interface, to obtain in real time in the power consumption management interface Comprising the electricity description information.
  3. 3. method as claimed in claim 2, it is characterised in that the electricity description information determines to obtain in the following manner, Including:
    The assistant service is obtained according to the power consumption and asked, and calls the system service so that the system service determines Obtain the electricity description information;
    The assistant service receives the electricity description information, and the electricity description information is returned.
  4. 4. the method as described in any one of claims 1 to 3, it is characterised in that according to the electricity description information, it is determined that each Each self-corresponding power consumption of application program, including:
    The electricity description information is parsed, extracted respectively from the electricity description information to each application program The description information of each self-corresponding power consumption;
    According to the description information to each each self-corresponding power consumption of application program, it is determined that each application program is each Corresponding power consumption.
  5. 5. method as claimed in claim 4, it is characterised in that it is determined that each each self-corresponding power consumption of application program Afterwards, methods described also includes:
    According to each each self-corresponding power consumption of application program, judge whether the power consumption of each application program is normal;
    Each application program is managed respectively according to judged result.
  6. 6. method as claimed in claim 5, it is characterised in that according to each each self-corresponding power consumption of application program, Judge whether the power consumption of each application program is normal, including:
    For each application program, following operate is performed:
    Obtain the use information of the application program;
    Judge whether the use information of the application program matches with the power consumption of the application program;
    If, it is determined that the power consumption of the application program is normal;
    If not, it is determined that the power consumption of the application program is abnormal.
  7. 7. method as claimed in claim 6, it is characterised in that be managed, wrapped to the application program according to judged result Include:
    It is determined that the application program power consumption exception when, it is automatic to perform the operation for closing the application program, or, will it is described should Prompted with the abnormal information of program power consumption, in order to which user determines whether to close the application program.
  8. 8. a kind of device for obtaining application program power consumption, including:
    Receiving unit, receives the confirmation to assistant service that user sends, and the confirmation represents that the user allows The power consumption of the application program is obtained by the assistant service;
    Transmitting element, power consumption is sent by the assistant service and obtains request, the power consumption obtains request and obtained for request Each self-corresponding real-time power consumption of each application program is taken, the assistant service is used to provide obtains electricity description information in real time Service, the electricity description information include the description information of self-corresponding power consumption each to each application program;
    The receiving unit, receive the electricity description information that the assistant service returns in real time, the electricity description information Determine to obtain by the assistant service by calling system service and by the system service;
    Determining unit, according to the electricity description information, it is determined that each each self-corresponding power consumption of application program.
  9. 9. a kind of electronic equipment, including:
    Processor;And
    It is arranged to store the memory of computer executable instructions, the executable instruction makes the processor when executed Perform following operate:
    The confirmation to assistant service that user sends is received, the confirmation represents that the user allows by described auxiliary Help the power consumption of application program described in service acquisition;
    Power consumption is sent by the assistant service and obtains request, the power consumption obtains request and each applied for acquisition request Each self-corresponding real-time power consumption of program, the assistant service is used to provide the service for obtaining electricity description information in real time, described Electricity description information includes the description information of self-corresponding power consumption each to each application program;
    Receive the electricity description information that the assistant service returns in real time;The electricity description information is by the assistant service Determine to obtain by calling system service and by the system service;
    According to the electricity description information, it is determined that each each self-corresponding power consumption of application program.
  10. 10. a kind of computer-readable recording medium, the computer-readable recording medium storage one or more program, described one Individual or multiple programs are when the electronic equipment for being included multiple application programs performs so that the electronic equipment performs following grasp Make:
    The confirmation to assistant service that user sends is received, the confirmation represents that the user allows by described auxiliary Help the power consumption of application program described in service acquisition;
    Power consumption is sent by the assistant service and obtains request, the power consumption obtains request and each applied for acquisition request Each self-corresponding real-time power consumption of program, the assistant service is used to provide the service for obtaining electricity description information in real time, described Electricity description information includes the description information of self-corresponding power consumption each to each application program;
    Receive the electricity description information that the assistant service returns in real time;The electricity description information is by the assistant service Determine to obtain by calling system service and by the system service;
    According to the electricity description information, it is determined that each each self-corresponding power consumption of application program.
CN201710774727.9A 2017-08-31 2017-08-31 Method and device for acquiring power consumption of application program Active CN107515811B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710774727.9A CN107515811B (en) 2017-08-31 2017-08-31 Method and device for acquiring power consumption of application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710774727.9A CN107515811B (en) 2017-08-31 2017-08-31 Method and device for acquiring power consumption of application program

Publications (2)

Publication Number Publication Date
CN107515811A true CN107515811A (en) 2017-12-26
CN107515811B CN107515811B (en) 2020-07-28

Family

ID=60725042

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710774727.9A Active CN107515811B (en) 2017-08-31 2017-08-31 Method and device for acquiring power consumption of application program

Country Status (1)

Country Link
CN (1) CN107515811B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109460337A (en) * 2018-09-20 2019-03-12 艾普有限公司 Power consumption quantity monitoring method, device, equipment and its storage medium
CN109801058A (en) * 2019-01-24 2019-05-24 四川长虹电器股份有限公司 A kind of automatic fee method based on android system
CN110134219A (en) * 2019-05-13 2019-08-16 深圳传音通讯有限公司 Application program backstage power consumption processing method and processing device
CN116265972A (en) * 2021-12-17 2023-06-20 荣耀终端有限公司 Power consumption display method of mobile device and mobile device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005267126A (en) * 2004-03-18 2005-09-29 Hanshin Electric Co Ltd Control apparatus, and control method for control apparatus
CN105100504A (en) * 2014-05-22 2015-11-25 北京奇虎科技有限公司 Equipment application electric-power consumption management method and equipment application electric-power consumption management device
CN105373482A (en) * 2015-12-23 2016-03-02 北京金山安全软件有限公司 Method and device for detecting abnormal power consumption of application program and electronic equipment
CN105573891A (en) * 2015-12-15 2016-05-11 北京奇虎科技有限公司 Android application electricity consumption statistics method and device
CN106776229A (en) * 2016-12-30 2017-05-31 河源市美晨联合智能硬件电子研究院 Power consumption of terminal method of testing and device
US20170357814A1 (en) * 2008-10-21 2017-12-14 Lookout, Inc. Methods and systems for blocking the installation of an application to improve the functioning of a mobile communications device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005267126A (en) * 2004-03-18 2005-09-29 Hanshin Electric Co Ltd Control apparatus, and control method for control apparatus
US20170357814A1 (en) * 2008-10-21 2017-12-14 Lookout, Inc. Methods and systems for blocking the installation of an application to improve the functioning of a mobile communications device
CN105100504A (en) * 2014-05-22 2015-11-25 北京奇虎科技有限公司 Equipment application electric-power consumption management method and equipment application electric-power consumption management device
CN105573891A (en) * 2015-12-15 2016-05-11 北京奇虎科技有限公司 Android application electricity consumption statistics method and device
CN105373482A (en) * 2015-12-23 2016-03-02 北京金山安全软件有限公司 Method and device for detecting abnormal power consumption of application program and electronic equipment
CN106776229A (en) * 2016-12-30 2017-05-31 河源市美晨联合智能硬件电子研究院 Power consumption of terminal method of testing and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GORDON0918: "Android AccessibilityService(辅助服务)使用示例", 《HTTPS://WWW.CNBLOGS.COM/GORDON0918/P/6641272.HTM1》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109460337A (en) * 2018-09-20 2019-03-12 艾普有限公司 Power consumption quantity monitoring method, device, equipment and its storage medium
CN109801058A (en) * 2019-01-24 2019-05-24 四川长虹电器股份有限公司 A kind of automatic fee method based on android system
CN109801058B (en) * 2019-01-24 2022-06-03 四川长虹电器股份有限公司 Android system-based automatic payment method
CN110134219A (en) * 2019-05-13 2019-08-16 深圳传音通讯有限公司 Application program backstage power consumption processing method and processing device
CN110134219B (en) * 2019-05-13 2024-03-19 深圳传音通讯有限公司 Application program background power consumption processing method and device
CN116265972A (en) * 2021-12-17 2023-06-20 荣耀终端有限公司 Power consumption display method of mobile device and mobile device
CN116265972B (en) * 2021-12-17 2024-04-09 荣耀终端有限公司 Power consumption display method of mobile device and mobile device

Also Published As

Publication number Publication date
CN107515811B (en) 2020-07-28

Similar Documents

Publication Publication Date Title
CN109284269B (en) Abnormal log analysis method and device, storage medium and server
CN107515811A (en) A kind of method and apparatus for obtaining application program power consumption
US20200151330A1 (en) Counter-fraud operation management
CN104765689B (en) A kind of interface capability data supervise method and apparatus in real time
CN104484223B (en) A kind of Android system application method for closing and device
CN108710537A (en) A kind of task processing method, storage medium and server
CN109086975A (en) A kind of recognition methods of transaction risk and device
WO2015164661A1 (en) Executing third-party application
CN107145429A (en) A kind of log analysis method and system
CN107329899A (en) A kind of application compatibility method of testing and device
CN107846321A (en) A kind of monitoring method of interface, device and electronic equipment
CN109491860A (en) Method for detecting abnormality, terminal device and the medium of application program
CN110515795A (en) A kind of monitoring method of big data component, device, electronic equipment
CN106021054A (en) Method and apparatus for testing upgrading and downgrading stability of BMC
WO2023035524A1 (en) Intention recognition-based process node jump method and apparatus, device, and medium
CN107239403A (en) A kind of positioning problems method and apparatus
WO2020082829A1 (en) User age prediction method, apparatus, and device
CN106296320A (en) Information broadcasting method based on terminal applies APP and device
CN108965613A (en) Method, storage medium and application server based on the monitoring of collection system quality
CN112241362A (en) Test method, test device, server and storage medium
CN109857450A (en) A kind of verification service orchestration method and device
CN117495544A (en) Sandbox-based wind control evaluation method, sandbox-based wind control evaluation system, sandbox-based wind control evaluation terminal and storage medium
CN117234916A (en) Workflow application testing method and device, electronic equipment and storage medium
CN117349434A (en) Voice classification method, device and storage medium
CN110162982B (en) Method and device for detecting illegal rights, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 207A, 2nd floor, No. 2 Information Road, Haidian District, Beijing 100085 (1-8th floor, Building D, 2-2, Beijing Shichuang High-Tech Development Corporation)

Applicant after: QILIN HESHENG NETWORK TECHNOLOGY Inc.

Address before: Room 207A, 2nd floor, No. 2 Information Road, Haidian District, Beijing 100085 (1-8th floor, Building D, 2-2, Beijing Shichuang High-Tech Development Corporation)

Applicant before: QILIN HESHENG NETWORK TECHNOLOGY Inc.

GR01 Patent grant
GR01 Patent grant