CN104516806B - The testing result methods of exhibiting and system of the power consumption information of mobile terminal - Google Patents

The testing result methods of exhibiting and system of the power consumption information of mobile terminal Download PDF

Info

Publication number
CN104516806B
CN104516806B CN201410832106.8A CN201410832106A CN104516806B CN 104516806 B CN104516806 B CN 104516806B CN 201410832106 A CN201410832106 A CN 201410832106A CN 104516806 B CN104516806 B CN 104516806B
Authority
CN
China
Prior art keywords
program
power consumption
mobile terminal
consumption information
data
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.)
Active
Application number
CN201410832106.8A
Other languages
Chinese (zh)
Other versions
CN104516806A (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 Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201410832106.8A priority Critical patent/CN104516806B/en
Publication of CN104516806A publication Critical patent/CN104516806A/en
Application granted granted Critical
Publication of CN104516806B publication Critical patent/CN104516806B/en
Active 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)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiments of the invention provide a kind of testing result methods of exhibiting of the power consumption information of mobile terminal and system, methods described to include:Obtain the System Privileges of the operating system of the mobile terminal;Under the System Privileges battery status service recorded data is obtained from the operating system;From the data of acquisition, the power consumption information of each program of the mobile terminal is extracted;After each program is ranked up according to respective power consumption information, ranking results are shown.In technical scheme, battery status service recorded data is obtained using System Privileges, therefrom extracts the power consumption information of each program of mobile terminal, and sort and show user.So that user still can effectively know the program for comparing power consumption, be subject to that province is electrically optimized, to extend the cruising time of mobile terminal, improve the experience of user when using the operating system of highest version.

Description

The testing result methods of exhibiting and system of the power consumption information of mobile terminal
Technical field
The present invention relates to field of mobile terminals, and specifically, the present invention relates to the detection knot of the power consumption information of mobile terminal Fruit methods of exhibiting and system.
Background technology
With the development of the communication technology and computer technology, in mobile terminal, the quantity of the program of installation and operation is increasingly It is more, and the increase of the capacity of the portable power source (such as battery) in mobile terminal is limited, does not catch up with the increasing of mobile terminal Program much The speed added;The electricity for easily causing portable power source using excessive program accelerates consumption, when shortening the continuation of the journey of mobile terminal Between, cause user's needs frequently to be charged for portable power source.Therefore, it is necessary to close the journey such as redundancy or that power consumption is larger Sequence, to reduce the power consumption speed of portable power source, charge frequency is reduced, extends the cruising time of mobile terminal.
At present, existing solution method is typically that third party application has running of mobile terminal from the storage of operating system In the system file of data, the power consumption information of each program, such as unit interval power consumption, run time, wake-up time are directly read Number etc.;After the power consumption information of each program of acquisition is arranged, each power consumption information after arrangement is corresponded into respective program structure Shown into power consumption ranking list;For user brush select the larger program of power consumption after, closed, forbid voluntarily starting or The operations such as person's unloading;So as to reduce the electric quantity consumption of mobile terminal, extend the cruising time of mobile terminal.
However, it was found by the inventors of the present invention that with the upgrading of the operating system in mobile terminal, third-party application journey Sequence, data can not be directly read from the system file of the operating system (such as the system of Android 4.4) of many highest versions, can only be right The processing time of the processor shared by program and the space size of internal memory that mobile terminal is currently run are counted;Will Power consumption of the statistical result as the program, and then carry out seniority among brothers and sisters displaying.Obviously, this method can not be obtained currently without operation Program power consumption, cause to show the more inclined face of power consumption of the program of user, it is easy to allow user to be misinterpreted as:Off-duty Program compare power saving, and active program compares power consumption;It is electrically optimized so as to can not effectively guide user to carry out province;So as to Cause the cruising time of mobile terminal to substantially reduce, reduce the experience of user.
Therefore, it is necessary to provide the testing result methods of exhibiting and system of a kind of power consumption information of mobile terminal so that use Family still can effectively know the program for comparing power consumption, be subject to power saving after upgrading to the operating system of mobile terminal Optimization, to extend the cruising time of mobile terminal, improves the experience of user.
The content of the invention
The shortcomings that present invention is directed to prior art, propose a kind of testing result displaying of the power consumption information of mobile terminal Method and system, to asking for the power consumption information that solves that mobile terminal can not be obtained after the operating system of mobile terminal is upgraded Topic.
The present invention is according on one side, there is provided a kind of testing result methods of exhibiting of the power consumption information of mobile terminal, bag Include:
Obtain the System Privileges of the operating system of the mobile terminal;
Under the System Privileges battery status service recorded data is obtained from the operating system;
From the data of acquisition, the power consumption information of each program of the mobile terminal is extracted;
After each program is ranked up according to respective power consumption information, ranking results are shown.
It is preferred that described obtain battery status service recorded data from the operating system, specifically include:
Create a process based on System Privileges;
After reading the battery status service recorded data by the process, store in electric quantity data storehouse;And
In the data from acquisition, the power consumption information of each program of the mobile terminal is extracted, is specifically included:
From the data in the electric quantity data storehouse, the power consumption information of each program of the mobile terminal is extracted.
It is preferred that the power consumption information of described program specifically includes:The unit interval power consumption of the program;And
It is described to be ranked up each program according to respective power consumption information, specifically include:
According to the power consumption information of each program, the unit interval power consumption accounting of each program is counted;
According to the size of the unit interval power consumption accounting of each program, each program is ranked up;And
It is described to be shown ranking results, specifically include:
In program power consumption ranking list display interface, the unit interval power consumption accounting of each program is shown.
Further, after the unit interval power consumption accounting for counting each program, in addition to:
For each program, according to the unit interval power consumption accounting of the program, it is determined that corresponding power saving strategy;
In program power consumption ranking list display interface, the link of the power saving strategy of each program is also shown.
It is preferred that the unit interval power consumption accounting according to the program, it is determined that corresponding power saving strategy, specific bag Include:
According to the size of the unit interval power consumption accounting of the program, the power consumption rank of the program is determined;
Will power saving strategy corresponding with the power consumption rank as corresponding power saving strategy.
It is preferred that the power consumption rank is specially power consumption superelevation rank, then corresponding power saving strategy is specially to unload; Or
The power consumption rank is specially power consumption higher level, then corresponding power saving strategy is specially to forbid opening certainly;Or Person,
The power consumption rank is specially the general rank of power consumption, then corresponding power saving strategy is specially to suggest closing;Or Person,
The power consumption rank is specially the relatively low rank of power consumption, then corresponding power saving strategy is specially to keep present situation;Or Person,
The power consumption rank is specially power pole low level, then corresponding power saving strategy is specially to be adapted to long-term fortune OK.
Further, the testing result methods of exhibiting of the power consumption information, in addition to:
If after receiving user for the click event of the unloading power saving strategy, show the unloading interface of the program;If Event is clicked in the unloading for receiving user's input by the unloading interface, then unloads the program;Or
Forbid if receiving user for described from after the click event for opening power saving strategy, forbid the program to open certainly, and In described program power consumption ranking list display interface to should program display forbidden.
Further, in the data from acquisition, during the power consumption information for each program for extracting the mobile terminal, also wrap Include:
From the data of acquisition, the power consumption information of each hardware of the mobile terminal is extracted;And
It is described when each program is ranked up according to respective power consumption information, in addition to:
Each hardware is ranked up according to respective power consumption information.
The present invention shows system according to a kind of testing result for the power consumption information on the other hand, additionally providing mobile terminal System, including:
System Privileges acquisition module, the System Privileges of the operating system for obtaining the mobile terminal;
Service data acquisition module, under the System Privileges that are obtained in the System Privileges acquisition module, from the behaviour Make system and obtain battery status service recorded data;
Power consumption information extraction modules, for from the data of the acquisition, extracting each program of the mobile terminal Power consumption information;
Sort display module, after each program is ranked up according to respective power consumption information, by ranking results It is shown.
It is preferred that the service data acquisition module is specifically used for creating a process based on System Privileges;By described After process reads the battery status service recorded data, store in electric quantity data storehouse, and send data extraction notice; And
The power consumption information extraction modules are specifically used for after receiving the data extraction notice, from the electric quantity data storehouse Data in, extract the power consumption information of each program of the mobile terminal.
In technical scheme, battery status service recorded data is obtained using System Privileges, is therefrom extracted Go out the power consumption information of each program of mobile terminal, and sort and show user.So that user is in the operation using highest version During system, the program for comparing power consumption still can be effectively known, be subject to that province is electrically optimized, during extending the continuation of the journey of mobile terminal Between, improve the experience of user.
Moreover, in the technical scheme, the power saving strategy for each program determined also is showed into user, is advantageous to user's root It is electrically optimized that province is carried out according to power saving strategy.
The additional aspect of the present invention and advantage will be set forth in part in the description, and these will become from the following description Obtain substantially, or recognized by the practice of the present invention.
Brief description of the drawings
Of the invention above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments Substantially and it is readily appreciated that, wherein:
Fig. 1 a are the schematic flow sheet of the testing result methods of exhibiting of the power consumption information of the mobile terminal of the embodiment of the present invention;
Fig. 1 b are the program power consumption ranking list display interface schematic diagram of the embodiment of the present invention;
Fig. 1 c, Fig. 1 d are the power saving policy-related (noun) schematic diagram of the embodiment of the present invention;
Fig. 2 is the block schematic illustration of the testing result display systems of the power consumption information of the mobile terminal of the embodiment of the present invention.
Embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from beginning to end Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached The embodiment of figure description is exemplary, is only used for explaining the present invention, and is not construed as limiting the claims.
The art cloud server is appreciated that unless expressly stated, singulative " one " used herein, " one It is individual ", " described " and "the" may also comprise plural form.It is to be further understood that what is used in the specification of the present invention arranges Diction " comprising " refer to the feature, integer, step, operation, element and/or component be present, but it is not excluded that in the presence of or addition One or more other features, integer, step, operation, element, component and/or their groups.It should be understood that when we claim member Part is " connected " or during " coupled " to another element, and it can be directly connected or coupled to other elements, or there may also be Intermediary element.In addition, " connection " used herein or " coupling " can include wireless connection or wireless coupling.It is used herein to arrange Taking leave "and/or" includes whole or any cell and all combinations of one or more associated list items.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art Language and scientific terminology), there is the general understanding identical meaning with the those of ordinary skill in art of the present invention.Should also Understand, those terms defined in such as general dictionary, it should be understood that have with the context of prior art The consistent meaning of meaning, and unless by specific definitions as here, idealization or the implication of overly formal otherwise will not be used To explain.
Those skilled in the art of the present technique are appreciated that " terminal " used herein above, " terminal device " both include wireless communication The equipment of number receiver, it only possesses the equipment of the wireless signal receiver of non-emissive ability, includes receiving again and transmitting hardware Equipment, its have on bidirectional communication link, can carry out two-way communication reception and launch hardware equipment.This equipment It can include:Honeycomb or other communication equipments, it has single line display or multi-line display or shown without multi-line The honeycomb of device or other communication equipments;PCS (Personal Communications Service, PCS Personal Communications System), it can With combine voice, data processing, fax and/or its communication ability;PDA (Personal Digital Assistant, it is personal Digital assistants), it can include radio frequency receiver, pager, the Internet/intranet access, web browser, notepad, day Go through and/or GPS (Global Positioning System, global positioning system) receiver;Conventional laptop and/or palm Type computer or other equipment, its have and/or the conventional laptop including radio frequency receiver and/or palmtop computer or its His equipment." terminal " used herein above, " terminal device " they can be portable, can transport, installed in the vehicles (aviation, Sea-freight and/or land) in, or be suitable for and/or be configured in local runtime, and/or with distribution form, operate in the earth And/or any other position operation in space." terminal " used herein above, " terminal device " can also be communication terminal, on Network termination, music/video playback terminal, such as can be PDA, MID (Mobile Internet Device, mobile Internet Equipment) and/or mobile phone or the equipment such as intelligent television, set top box with music/video playing function.
Herein it should be noted that the portable terminal described in the present embodiment can any can depart from alternating current Source can rely on itself or external battery electricity to run the terminal device of its operating system.Its include but is not limited to smart mobile phone, Tablet personal computer, notebook computer, PDA (personal digital assistant, Personal Digital Assistant).Operating system includes But it is not limited to Android (android) system, apple IOS, window system, window phone systems, blackberry, blueberry (BlackBerry) OS systems and web OS systems.Illustrated in the present embodiment by taking Android system as an example.
The present inventor passes through battery status service log sheet it is considered that after the operating system update of mobile terminal The power consumption data of each software and hardware in mobile terminal;Therefore, the number that battery status service is recorded can be obtained under System Privileges According to, so that third party software can go out the power consumption information of each program from the extracting data of acquisition, and user is showed, with It is electrically optimized that province is carried out for user, such as forbids from opening, being advantageous to the cruising time for extending mobile terminal, improves the experience of user.
Those skilled in the art should it is contemplated that, because disclosed technology is related to android system The calling of level resources, thus, needed before the present invention is implemented to be obtained with the operation of the application program of present example Root authority.
It is well known that Root authority refers to system manager's power of Unix type operating systems (including Linux, Android) Limit, similar to Administrator (keeper) authority in Windows (form) system;Root authority can be accessed and repaiied Use almost all of file (android system file and user file, not including ROM) in the mobile device at family instead.But by It is strict in management of the current mobile terminal system for Root authority, most applications or program be not under normal circumstances Possess Root authority, therefore can not just be performed for some operations for needing to have Root authority, such as installation or unloading application Deng operation;Meanwhile such operation calls process is required for system application Root authority when performing corresponding operating every time, but if Now other application process is used Root authority and carries out associative operation, then the Root authority application of this calling process just can not Success;What is more, if user is provided with the operation of disabling Root authority in systems, related calling process just can not be carried out Associative operation.
Based on this, the present invention proposes only to need to send a Root authority acquisition request to system, can specifically pass through calling SU (Super User, power user) orders built in system obtain Root authority, or by obtaining with Root authority Shell obtains Root authority and the launching process in shell, then after the Root authority mandate of the system is obtained, you can Without repeating application Root authority when making other follow-up calling process to perform associative operation;Specific Root authority acquisition process can With reference to the Root authority call function of prior art, the present invention will not be repeated here.
As can be seen that the acquisition modes of Root authority, from the point of view of the life cycle of authority effect, including permanent Root authority And temporary Root authority, as its name suggests, in the case of permanent Root authority, application program authorizes once Root, later can need not be again Carry out Root and propose power operation;And in the case of temporary Root authority, authority effect life cycle be operating system once from Starting shooting to the process of shutdown, start next time still needs to carry out Root.The realization of the present invention is not limited by this classification.
The technical scheme of the embodiment of the present invention is specifically introduced below in conjunction with the accompanying drawings.
The schematic flow sheet of the testing result methods of exhibiting of the power consumption information of mobile terminal provided in an embodiment of the present invention, such as Shown in Fig. 1 a, comprise the following steps:
S101:Obtain the System Privileges of the operating system of mobile terminal.
Specifically, prompting user needs to obtain System Privileges, i.e. root (power user) authority;Receive user's input After the instruction for obtaining System Privileges, the System Privileges of operating system are obtained.
S102:Under System Privileges battery status service recorded data is obtained from operating system.
Specifically, using the System Privileges obtained in above-mentioned steps, a process based on System Privileges is created;Entered by this After journey reads battery status service recorded data, store in electric quantity data storehouse.
For example, using root authority, the root processes of a system layer are created, Battery is read by root processes After State Service recorded data, store in the data file as the application layer in electric quantity data storehouse.
Wherein, battery status service is one of system service provided by operating system, mobile whole for collecting and recording The power consumption data of all programs and hardware in end.
It is preferred that the process based on System Privileges can be serviced in recorded data or system file from battery status, Read the power of each inductor and time, the run time of processor and power, screen in opening in mobile terminal Total power consumption, the power consumption electricity of various network traffics and specific discharge, and (i.e. occupancy is handled the run time of each program The time of device) and to spent by the accounting of processor, the time for calling inductor, caused network traffics and specific discharge The power consumption information such as electricity, and the various power consumption information of reading are stored into electric quantity data storehouse.
The foreground time (time that i.e. processor is taken by program) of processor can be included in the run time of processor With backoff period (processor free time).
In the present embodiment, system information may include much information, such as:
Clocking information, screen locking announcement information, the process operation information of timer record.
Wherein, process operation information includes the type of the running state of a process and process, and the type of process is according to it Priority can be divided into:Foreground process, background process, system process etc..
And background process therein, as priority are less than the process of preset value.
Wherein, in above-mentioned unessential background program namely the process being currently running in an operating system, priority is less than The program of default value.Exemplified by Android operation system, by the pid of these programs, corresponding proc/pid/ is found Oom_adj files, read the numerical value in file, you can pacify as the standard and threshold values for judging priority, or by obtaining The program being currently running in Zhuo Chengxu, by the RunningAppProcessInfo examples got, pass through its importance The numerical value of attribute, as the standard and threshold values for judging priority.
For convenience of description, the process definition that can be cleaned out these in the present embodiment is background process, below specifically Its bright acquisition modes:
Can (Application Programming Interface, application programming connect by the API of operating system Mouthful), realize that the priority of whole processes to being currently running in operating system travels through.API be operating system leave for should With a calling interface of program, application program makes operating system go to perform application program by the API of call operation system Order (action).Interrupt mechanism can be used to realize to monitor API.
Interacting between app layers and framework layers can be understood as in the embodiment of the present invention:Injected system services journey Sequence, the handle (variable) for being used to receive Inter-Process Communication data in replacement system service are the false handle (variable) of app layers, that False handle (variable) will receive the control data from third party's program, false handle (memory variable) prior to system service The logic of meeting executive process control when being called, and the rule that can be set according to user, perform corresponding operating.
Specifically, determine process priority mode can have it is a variety of.
(1) first way is:By the process identification (PID) of each application program, the process weight of each application program is found Sex index is wanted, according to process significance index, it is determined that the process priority of each application program.
Specifically, in Android system, by the PID of program, corresponding PROC/PID/oom_adj files are found, are read Numerical value in file, as the standard and threshold values for judging priority.Wherein, PID (Process Identifier) is respectively to enter The identity of journey, it is unique that the runtime of program one will be automatically assigned to process one.Application program can be passed through PID, find oom_adj corresponding to application program.
Program is divided into following a few classes by Android, for example, the order reduced successively according to importance:
FOREGROUD_APP, oom_adj=0, represent foreground program, it can be understood as the program being used;
VISIBLE_APP, oom_adj=1, represent the visible program of user;
SECONDARY_SERVER, oom_adj=2, background service is represented, such as QQ can be in running background service;
HOME_APP, oom_adj=4, HOME is represented, is exactly main interface;
HIDDEN_APP, oom_adj=7, represent the program being hidden;
CONTENT_PROVIDER, oom_adj=14, represent content provider;
EMPTY_APP, oom_adj=15, dummy routine is represented, service is neither provided, content is not also provided.
(2) second way is:The Procession information of application programme that acquisition system is currently running, pass through the application being currently running The numerical value of importance attribute in program process information, it is determined that the process priority of each application program.
Specifically, by obtaining the program being currently running in Android program, pass through what is got RunningAppProcessInfo objects, by the numerical value of its importance attribute, as the standard for judging priority and Threshold values.
In Android system, inside RunningAppProcessInfo (Procession information of application programme being currently running) Constant IMOPORTANCE (importance attribute) represents the importance of this app process, because when system reclaims, can basis IMOPORTANCE carrys out collection process.Such as:
Public static final int IMPORTANCE_BACKGROUND=400 represent background program;
Public static final int IMPORTANCE_EMPTY=500 represent null process;
Public static final int IMPORTANCE_FOREGROUND=100 represent screen front end, can Get the program of focus;
Public static final int IMPORTANCE_SERVICE=300 represent the program in service;
Public static final int IMPORTANCE_VISIBLE=200 are represented to hold before screen, obtained not To the program of focus.
Specifically, the example for obtaining the importance property values of RunningAppProcessInfo objects is as follows:
First have to obtain ActivityManager object instance, by calling getSystemService (ACTIVITY_SERVICE) ActivityManager example will, be returned;After the example is obtained, it is called GetRunningAppProcesses () method, can return to a List, and the data type deposited in the List is ActivityManager.RunningAppProcessInfo.So, the List is traveled through, from each in List The information for enjoying correlation can be obtained in RunningAppProcessInfo.
For example, being shown using a ListAdapter to be tied among a ListView, realize code such as Under:
It can be seen that by above-mentioned code, " public int importance " (severity level of process in systems) are just It is the priority that can obtain process, so as to learn whether it is background process.
For example, the process based on System Privileges obtains GPS (Global Positioning System, global positioning system System) run time of transceiver, the sweep time of WiFi (Wireless Fidelity, WLAN) transceiver and operation Time, the run time of processor, the total power consumption of screen;The reading process from power profile (energy description) file The power of device, the power of GPS transceiver, the scan power of WiFi transceiver and operation power, power can be specifically milliampere value. Process based on System Privileges obtains WiFi transceiver, 2G (2nd-Generation wireless telephone Technology, second generation mobile communication technology) transceiver, 3G (3rd-Generation wireless telephone Technology, third generation mobile communication technology) each caused flow, and such as transceiver and GPS transceiver in flow often Average electricity spent by individual byte.
More excellent, by parsing battery data file in portable terminal operating system, to be run answer can also be obtained The information such as the running frequency with program;Battery data file is obtained by the application programming interfaces of operating system.
Further, the application program currently installed by periodic scanning system, and parameter when obtaining its operation, And the statistics of battery resource is used application program in periodic analysis system, establish the battery data file of application program.
S103:From the data of acquisition, the power consumption information of each program of mobile terminal is extracted.
It is preferred that for each program being installed in mobile terminal, from the data in electric quantity data storehouse, the program is read Run time and to the accounting of processor, the power of processor, calculate processor power consumption corresponding to the program.
For each program being installed in mobile terminal, from the data in electric quantity data storehouse, call and connect corresponding to Android Mouth reads the time of each inductor of the routine call and the power of each inductor and the time in opening, calculates Inductor power consumption corresponding to the program.
For example, reading program is called the time of GPS transceiver, and the power and run time of GPS transceiver, calculate GPS transceiver power consumption corresponding to the program.
For each program being installed in mobile terminal, from the data in electric quantity data storehouse, produced by reading the program Network traffics, and the electricity spent by specific discharge calculates network traffics power consumption corresponding to the program.
For example, reading program by WiFi interact caused by flow, and the average electricity of each byte calculates this WiFi flows power consumption corresponding to program.
By taking Andriod systems as an example, can be sent to operating system broadcast registration interface (RegisterReceiver) please Ask, it is desirable to which the notice for the event that switched when the handover event of network connection occurs, Andriod systems pass through ConnectivityManager interfaces monitor network state change, and it is wide to receive a Broadcast during First Contact Connections network Notice is broadcast, follow-up to carry out also receiving corresponding notice during network switching, for example, from GPRS to WIFI, program can at least receive 3 Individual Broadcast, first Broadcast are attached to WIFI, and second Broadcast is to disconnect GPRS, the 3rd Broadcast is attached to WIFI, it can thus be appreciated that mobile terminal currently connects WIFI network.
, can be described mobile whole while the network formats that mobile terminal is connected are monitored in the embodiment of the present invention In the system journal at end, the data traffic that application program consumes altogether under different network formats is read, realizes and answers each The data traffic consumed with program is monitored respectively, so as to reading program by WiFi interact caused by flow.
In the embodiment of the present invention, the data traffic of each application program consumption of mobile terminal records, for a certain application Program, the data traffic recorded herein are the data traffic that the application program consumes altogether under various network formats.
Each application sequence possesses corresponding unique identifier, for application program corresponding to unique mark, by unique Identifier can make a distinction an application program and other application programs.By taking android system as an example, due to Android is single user system, it is not necessary to support multi-user to log in, therefore traditional terminal iidentification system just lose it is original Meaning, Android developer have modified the implication of terminal iidentification, use it for the mark of application program, using UID to application Program is managed, and the corresponding UID of each application program is as unique identifier.
The data traffic of application program is marked with the unique identifier of the application program, according to unique identifier, is passed through The flow status of the mobile terminal obtain interface (android.net.TrafficStats), and the interface provides a variety of static state Method, it can directly invoke and obtain data traffic corresponding to the application program.
Before data traffic is extracted, the unique identifier of application program is obtained first, and unique identifier is stored in movement Terminal, can be obtained by the call function that pre-sets, by taking Andriod systems as an example, by ActivityManager we The activities that can be currently running in acquisition system, including process (Process) etc., application program/bag, service (Service), task (Task) information, (obtain and transporting using ActivityManager getRunningAppProces Capable progress information) method acquisition RunningAppProcessInfo (progress information being currently running), Unique identifier UID is had inside RunningAppProcessInfo.
By the above-mentioned means, so as to reading program by WiFi interact caused by flow.
In the embodiment of the present invention, from the data in electric quantity data storehouse, the run time of reading processor and total consumption of screen Electricity;Foreground time and backoff period are isolated from the run time of processor;Due under normal circumstances, before processor is in Screen is in bright screen state during the platform time, and screen is in black state when processor is in backoff period, therefore according to screen The run time and foreground time of total power consumption and processor, can calculate power consumption during screen bright screen.Count After the foreground time takes the program quantity of processor and the processor accounting of each program, power consumption during screen bright screen is shared To each program, screen power consumption corresponding to each program is obtained.The power consumption during blank screen of screen can include:Screen control core Power consumption etc. caused by the standby power consumption amount of piece, electrical leakage quantity.For each program being installed in mobile terminal, according to calculating The program corresponding to processor power consumption, inductor power consumption, network traffics power consumption and screen power consumption, count the journey The power consumption of sequence;Using the run time of the program and power consumption in the lump as the power consumption information of the program.
For example, the data stored in electric quantity data storehouse, the data after typically serializing;By the data in electric quantity data storehouse After carrying out unserializing, all power consumption information that mobile terminal is recorded are restored, and therefrom extract each of mobile terminal The power consumption information of program.The conventional techniques of this area cloud server are serialized and are deserialized as, here is omitted.
It is more excellent, the power consumption information of each hardware of mobile terminal from the data in electric quantity data storehouse, can be extracted.Hardware Power consumption information comprise at least:Language converse and the standby related hardware of signal power consumption, processor free time when power consumption or Power consumption during person's screen blank screen.
S104:After each program in mobile terminal is ranked up according to respective power consumption information, ranking results are carried out Displaying.
Specifically, according to the power consumption information of each program in the mobile terminal for extracting to obtain in step S103, count all The unit interval power consumption of program and the unit interval power consumption of each program, and then count the unit interval consumption of each program Electricity accounting;According to the size of the unit interval power consumption accounting of each program counted, each program is ranked up, such as according to According to unit interval power consumption accounting from big to small smooth, each program is ranked up.Afterwards, shown in program power consumption ranking list In interface, the unit interval power consumption accounting of each program is shown.
It is preferred that for each program, according to the unit interval power consumption accounting of the program, it is determined that corresponding power saving plan Slightly;For example, for each program, according to the size of the unit interval power consumption accounting of the program, the power consumption level of the program is determined Not;And will be with power saving strategy corresponding to the power consumption rank as corresponding power saving strategy.
Afterwards, in program power consumption ranking list display interface, the link of the power saving strategy of each program is also shown.User clicks on After the link of the power saving strategy of a certain program, mobile terminal shows the power saving of the program in program power consumption ranking list display interface Strategy.For example, in program power consumption ranking list display interface as shown in Figure 1 b, the unit interval power consumption of program " wechat " is shown Measure the dropdown arrow of accounting " 3.2% " and the link as power saving strategy;After user clicks on dropdown arrow, mobile terminal exists Expansion shows the power saving strategy " unloading " of " wechat ", " forbidding opening certainly " in the display interface.It is preferred that the power consumption rank of each program All it is set in advance with power saving strategy.
For example, the unit interval power consumption accounting of program is not less than 5%, the power consumption rank of the program is specially power consumption superelevation level Not, then corresponding power saving strategy is specially to unload, forbid opening or suggest to close certainly.
Or the unit interval power consumption accounting of program, not less than 3% and less than 5%, the power consumption rank of the program is specially Power consumption higher level, then corresponding power saving strategy is specially to forbid opening or unloading certainly.
Or the unit interval power consumption accounting of program, not less than 2% and less than 3%, the power consumption rank of the program is specially The general rank of power consumption, then corresponding power saving strategy is specially to suggest closing.
Or the unit interval power consumption accounting of program, not less than 1% and less than 2%, the power consumption rank of the program is specially The relatively low rank of power consumption, then corresponding power saving strategy is specially to keep present situation.
Or the unit interval power consumption accounting of program is less than 1%, the power consumption rank of the program is specially that power pole is rudimentary Not, then corresponding power saving strategy is specially to be adapted to longtime running.
More excellent, if after mobile terminal receives user for the click event of the unloading power saving strategy of a certain program, show Show the unloading interface of the program;If event is clicked in the unloading that user's input is received by the unloading interface, the program is unloaded.
Wherein, the mode of interface prompt can include a variety of, such as display reminding, voice message etc..In the present embodiment, The mode of prompting can also use the form of suspended window to show on mobile terminals, specifically, can pass through call operation system The suspension procedure plate that middle window manager system service is constructed is shown in the form of suspended window.Specifically, user can lead to Cross from open management UI (user interface, User Interface) produce open administration behaviour certainly for each program.For example, in this hair In bright one kind application example, open management UI certainly region displaying can allow button and forbid button near each program, After user, which clicks on, forbids button, the controlled state that opens certainly of program becomes illegal state, after user, which clicks on, allows button, program The controlled state that opens certainly become permission state;Certain above-mentioned permission button and button is forbidden to be intended only as example, the present invention is implemented Example is not any limitation as to the specific management UI that opens certainly.
It should be noted that in the present embodiment, the closing for process can use a variety of trigger conditions, if reach process Closedown condition can be judged by system information.Therefore, said system information and need not all acquire, and by process Closedown condition determines.
For example, above-mentioned process closedown condition can be set as any one following mode:
A process is carried out every a hour to close;Or
A process is carried out during each screen locking to close.
Or further, the embodiment of the present invention is forbidden from opening, and in Android system, program opens needs necessarily certainly Condition, it is outer from opening when start, application program in Android system it is also possible to the startup of some sensitive events and oneself Open, these sensitive events can specifically include:Charge event, network state change events (such as Wifi networking events), timing Device event, GPS (global positioning system, Global Positioning System) event and associated program startup event etc., Here associated program starts event and refers to that application program can be with associated program when incidence relation between program be present Startup and start.If for example, incidence relation between wechat and QQ be present, then, even if user by opening administration interface certainly Wechat is prohibited, wechat can also open certainly when QQ starts.And for example, associated if existed between shopping client and Alipay wallet Relation, then, when Jingdone district starts, Alipay wallet can also associate startup to provide payment environment.For another example, if certain applies journey Incidence relation be present between sequence client and microblogging, then, when the application client starts, microblogging can also associate startup To log in the application client using microblog account.
The technology that this step performs broadcast disabling is realized, can be performed by a service processes, the service processes pass through calling SetComponentEnabledSetting functions, the component Name for the broadcast component for needing to disable to its transmission are as the aforementioned SystemRecerver and constant COMPONENT_ENABLED_STATE_ENABLED, corresponding broadcast component is set by it For down state, you can realize the disabling to the broadcast component.
The broadcast component of intended application is lifted a ban, similarly by calling setComponentEnabledSetting functions real It is existing, by the component Name SystemRecerver as the aforementioned and constant of the broadcast component for needing to disable to the function passes COMPONENT_ENABLED_STATE_DISABLED, corresponding broadcast component can be arranged to upstate by the function, So as to realize the disabling to the broadcast component.
In the specific implementation, can record user opens administration behaviour certainly for program, and produced according to user's last time It is raw for program open that administration behaviour determines program certainly open controlled state certainly.
Wherein, program is corresponded to for the illegal state, prevents it from receiving the broadcast message of registered sensitive event, from And it is lost the function of automatic start, and it is as follows to do specific explanations:
It can just lead to after the broadcast message of sensitive event is received from the principle opened, program according to above-mentioned sensitive event Cross and oneself the mode such as aroused to responded, so, the embodiment of the present invention receives registered sensitive event using preventing program Broadcast message mode, can realize and forbid program from the purpose that opens;Also, the embodiment of the present invention prevents program from receiving institute The targeted program limit that broadcasts the message of registration sensitive event corresponds to program including illegal state namely user is not intended to open certainly Program, therefore, it is possible to forbid program in the case where respecting user intention from opening, so as to the operation of lifting operating system Speed, save the power consumption of electronic equipment.
The embodiment of the present invention can provide corresponds to program for the illegal state as follows, prevents it from receiving registered quick The prevention reception scheme of the broadcast message of sense event:
Prevent reception scheme one:
Reception scheme one is prevented to stop the process that the illegal state corresponds to program;Due to stopped the illegal state pair The process of program is answered, therefore the illegal state corresponds to program and can not just receive the broadcast message of registered sensitive event, or, Even if receiving the broadcast message of registered sensitive event, can not also start.
For example, in Android system, android.os.killProcess interfaces can be used to stop entering for given ID Journey.
And for example, can also using the killBackgroundProcesses interfaces in ActivityManager come stop into Journey priority is less than SERVICE_ADJ process;It should be noted that need to state KILL_BACKGROUND_ using the interface PROCESSES authorities, in addition, the interface is the open interface in ActivityManager, it is not necessary to any authority, Ye Jiwu ROOT authorities need to be obtained.
Prevent reception scheme two:
Prevent reception scheme two from forcing to stop the process that the illegal state corresponds to program, make its bag-like state to stop shape State;Because the program for being marked as stopping (stopped) state can not receive broadcast, therefore it can be prevented to receive institute Register the broadcast message of sensitive event.
In Android system, forceStopPackage interfaces can be used to force the stopping illegal state corresponding to program Process, it is halted state to make its bag-like state;It should be noted that need to state when using forceStopPackage interfaces FORCE_STOP_PACKAGES authorities, also, forceStopPackage is a hiding interface, it is necessary to by the hand such as reflecting Duan Shixian is called, in addition, needing system signature using forceStopPackage interfaces, it is therefore desirable to ROOT power is obtained ahead of time Limit, also, timer may be emptied using forceStopPackage interfaces, therefore go for timer event.
Prevent reception scheme three:
Reception scheme three is prevented to disable the component that the illegal state corresponds to program;For program, broadcast message is Received by its radio receiver, and radio receiver possesses " android as the application component in program: Enable " attributes, if it is possible to pass through " android:Enable " attributes forbid the component of program, then program will be unable to receive To the broadcast message of the sensitive event.
In the specific implementation, can by call setComponentEnabledSetting and All component in program is set to disable states by setApplicationEnabledSetting interfaces;Wherein,
Public void setComponentEnabledSetting(ComponentName
componentName,int newState,int flags)
componentName:Component Name, namely the illegal state correspond to the radio receiver of program
newState:The new state of component, three values can be set, be as follows respectively:
Down state:COMPONENT_ENABLED_STATE_DISABLED
Upstate:COMPONENT_ENABLED_STATE_ENABLED
Default conditions:COMPONENT_ENABLED_STATE_DEFAULT
flags:Behavior label, value can be DONT_KILL_APP or 0.0 explanation kills the app for including the component Public int getComponentEnabledSetting (ComponentName componentName) securing component State
It must be system programs using setComponentEnabledSetting interfaces and be signed with system;Cause This, in the case where not obtaining system authorities but obtaining ROOT authorities, can use " pm disable " orders.
Prevent reception scheme four:
Prevent reception scheme four prior to the illegal state correspond to program receive its registration sensitive event broadcast message, And the broadcast message is intercepted, so that the illegal state corresponds to program and can not receive the broadcast message of registered sensitive event.
In one kind application example of the present invention, it is assumed that the broadcast message of the sensitive event is ordered broadcast, wide in order It is the priority level stated according to recipient to broadcast, and is received broadcast message successively by recipient.Such as:A's is superior to B, B rank Higher than C, then, broadcast message is first transmitted to A, then is transmitted to B, is finally transmitted to C.Priority level is stated in intent-filter elements Android:In priority attributes, number is bigger, and priority level is higher, span:- 1000 to 1000.Therefore, specific In realization, it can set and correspond to the higher priority of program than the illegal state, receiving it prior to it registers sensitive event Broadcast message, and by BroadcastReceiver.abortBroadcast () come terminate broadcast message, due to broadcast disappear Breath is terminated by recipient above, and recipient below just can not again get broadcast message, therefore can make described forbid State, which corresponds to program, can not receive the broadcast message of registered sensitive event.
In the embodiment of the present invention, then detect using belong to power consumption application after, to such application carry out broadcast component taboo With being essence for the broadcast receiving function of intended application, thus intended application will be unable to by obtaining system broadcasts The purpose of realizing start self-starting, backstage self-starting, so as to accelerate the starting up speed of mobile terminal, and makes internal memory surplus It is higher, make mobile terminal that there is more excellent Consumer's Experience.
For example, user clicks on the power saving strategy " unloading " of Fig. 1 b Programs " book flag novel ", mobile terminal confirms to receive Click event of the user for " book flag novel " unloading power saving strategy;Afterwards, unloading for " book flag novel " as illustrated in figure 1 c is shown Carry interface;If user clicks on " unloading " in the unloading interface, thing is clicked in the unloading that mobile terminal confirms to receive user's input Part, " book flag novel " is unloaded.
More excellent, if mobile terminal receives user and forbidden for a certain program from the click event for opening power saving strategy Afterwards, forbid the program to open certainly, and show that the program has been forbidden in program power consumption ranking list display interface.
For example, user clicks on the power saving strategy " forbidding opening certainly " of Fig. 1 b Programs " book flag novel ", mobile terminal confirms to connect User is received for " book flag novel " to forbid from the click event for opening power saving strategy;Afterwards, " book flag novel " is forbidden to open certainly, and In program power consumption ranking list display interface as shown in Figure 1 d, corresponding " book flag novel " display " having forbidden ", and in former power saving plan Slightly place's display " recovers to open " replacement " forbidding opening certainly " certainly.If user clicks on " recovering to open certainly ", recover " book flag novel " and open certainly.
More excellent, it can be counted according to the power consumption information of each hardware for the mobile terminal for extracting to obtain in step S103 The unit interval power consumption accounting of each hardware;It is right according to the size of the unit interval power consumption accounting of each hardware counted Each hardware is ranked up;Afterwards, in hardware power consumption ranking list display interface, show that the unit interval power consumption of each hardware accounts for Than.
Further, for each hardware, the corresponding power saving strategy of the hardware is determined;For example, the power saving strategy of processor To reduce running frequency or reducing operation core, the power saving strategy of screen for reduction brightness or reduces the backlight time;Afterwards, In hardware power consumption ranking list display interface, the link of the power saving strategy of each hardware is also shown.
More preferably, if determining whether, the current electric quantity of mobile terminal is less than setting power threshold, on display interface When showing mobile terminal residual usage time under current electric quantity, the prompting for closing power consumption application may also display.Wherein, the power consumption Using can include:Bluetooth applications, and/or GPS applications, and/or wifi applications, and/or network application.
More preferably, if determining whether, the current electric quantity of mobile terminal is less than setting power threshold, on display interface It when showing mobile terminal residual usage time under current electric quantity, may also display in the application currently opened, answered for n before power consumption ranking Title;Wherein, n is natural number set in advance.
For example, the application currently opened includes:Map application, positioning application, wifi applications, wechat application, qq applications etc.; After the descending sequence of power consumption of application to currently opening, wifi applications power consumption is maximum, is followed successively by afterwards:Map application, determine Position application;The application of e before power consumption ranking can be then shown on display interface:Wifi applications, map application, positioning application.
More preferably, it can also be shown on display interface and suggest what is closed in power saving button, and the application currently opened The title of application;And after the click event of the power saving button is received, the application for suggesting closing is out of service.
For example, the application currently opened includes:Map application, positioning application, wifi applications, wechat application, qq applications etc.; And wherein wifi applies the application that the suggestion set for system is closed, then the application of suggestion closing is shown in display interface: Wifi is applied;And after the click event of the power saving button is received, wifi applications are closed.
In the embodiment of the present invention, in fact, a program being installed in mobile terminal while to may relate to some hidden It is that involved privacy authority can include one or more in following authority without permission:Short message reading record, read contact People's information, message registration is read, is called, sends short message, acquisition positional information, is recorded using microphone/calling record, opening Camera, mobile network's switch is opened, reads and list of application has been installed, has opened WiFi (Wireless Local Area Networks, WLAN) switch, open Bluetooth switch, obtain facility information etc..
In the embodiment of the present invention, the recommended value of privacy authority can include:It is recommended that allow, suggest forbidding or suggest to carry Wake up.
In fact, the privacy authority of program of the embodiments of the invention described in the authority proposed database of server Recommended value can be acquired using a variety of methods.
Wherein, a kind of acquisition methods of the recommended value of the privacy authority of program, are specifically included:Server passes through number of ways (such as mobile phone assistant, application market etc.) obtains various programs;Sandbox is created in book server, to generate program Running environment;Install and run the program of acquisition, in program operation process, analog subscriber operation, utilize sandbox technology, record The privacy authority of each program down;Suitable recommended value is configured for the privacy authority of each program;According to the program of installation and operation Title, record program privacy authority and matched recommended value, generate authority proposed database.
Numerous mobile terminals obtains user to the hidden of the program when having monitored program and being installed in this mobile terminal The setting value of private rights limit, and guide user to take the setting value of the title of the program, the privacy authority of the program and privacy authority Band uploads onto the server in privacy authority report;Server is by the setting value of the privacy authority in the report of the privacy authority of upload Recommended value as privacy authority;According to the recommended value of privacy authority, and the title and privacy of privacy authority report Program Authority, generate privacy authority database.
It is preferred that the privacy authority that cloud server can be the program uploaded configures suitable recommended value.
More excellent, cloud server can classify to multiple programs.For example, system program or the program of prepackage are drawn It is divided into system program;It is trust program by the procedure division for being identified as trusting by user, system or security procedure;By user installation And be identified as trust procedure division be user program.Afterwards, cloud server can be by system program and trust program Privacy authority recommended value be both configured to suggestion permission.Cloud server can by the classification of program to should program title Increase in authority proposed database.
More excellent, cloud server can also be classified each privacy authority.For example, short message reading is recorded, read Associated person information and reading message registration are divided into Private Fears in Public Places authority;To call, send short message, obtain positional information, Recorded using microphone/calling record, open camera and open mobile network's switch and be divided into important privacy authority;It will read Installation list of application, opening WiFi switches, opening Bluetooth switch, acquisition facility information are divided into common privacy authority.High in the clouds takes Business device can by the classification of privacy authority to should privacy authority increase in authority proposed database.
Like this, it is above-mentioned forbid power consumption to apply during, when detecting that service end Query Result is power consumption application, Comprehensive descision is carried out with reference to the recommended value of privacy authority, if belonged to power consumption application simultaneously, and be present risk in recommended value, then prohibit Only this applies self-starting.
The testing result methods of exhibiting of power consumption information based on above-mentioned mobile terminal, the embodiments of the invention provide one kind to move The testing result display systems of the power consumption information of dynamic terminal, the block schematic illustration of the internal structure of the system is as shown in Fig. 2 bag Include:System Privileges acquisition module 201, service data acquisition module 202, power consumption information extraction modules 203, the and of order module 204 Display module 205.
Wherein, System Privileges acquisition module 201 is used for the System Privileges for obtaining the operating system of mobile terminal.
Service data acquisition module 202 is used under the System Privileges that System Privileges acquisition module 201 obtains, and is from operation System obtains battery status service recorded data;Specifically, service data acquisition module 202 utilizes System Privileges, creates one The individual process based on System Privileges;After reading battery status service recorded data by the process, electric quantity data storehouse is arrived in storage In, and send data extraction notice.
Power consumption information extraction modules 203 are used for from the data of acquisition, extract the power consumption letter of each program of mobile terminal Breath;Specifically, after power consumption information extraction modules 203 receive data extraction notice, from the data in electric quantity data storehouse, extract The power consumption information of each program of mobile terminal.
Order module 204 is used to each program being ranked up according to respective power consumption information;Specifically, sort display module The power consumption information of each program, counts each program in 204 mobile terminals extracted according to power consumption information extraction modules 203 Unit interval power consumption accounting;According to the size of the unit interval power consumption accounting of each program counted, each program is carried out Sequence, obtains ranking results.
Display module 205 is used to the obtained ranking results of order module 204 being shown;Specifically, display module 205 in program power consumption ranking list display interface, shows the unit interval power consumption accounting of each program.It is preferred that such as Fig. 2 institutes Show, the power consumption Information Acquisition System of mobile terminal, in addition to:Power saving strategy determining module 206.
Power saving strategy determining module 206 is used for for each program, the list of the program counted according to order module 204 Position time power consumption accounting, it is determined that corresponding power saving strategy.
Display module 205 is additionally operable in program power consumption ranking list display interface, shows the chain of the power saving strategy of each program Connect.
Said system authority acquiring module 201, service data acquisition module 202, power consumption information extraction modules 203, sequence The concrete methods of realizing of module 204, display module 205 and the function of power saving strategy determining module 206, it may be referred to above-mentioned such as Fig. 1 a The particular content of shown method flow step, here is omitted.
In the technical scheme of the embodiment of the present invention, battery status service recorded data is obtained using System Privileges, from In extract mobile terminal each program power consumption information, and sort show user.So that user is using highest version Operating system when, still can effectively know the program for comparing power consumption, be subject to that province is electrically optimized, to extend the continuous of mobile terminal ETS estimated time of sailing, improve the experience of user.
Moreover, in the technical scheme, the power saving strategy for each program determined also is showed into user, is advantageous to user's root It is electrically optimized that province is carried out according to power saving strategy.
The art cloud server is appreciated that the present invention includes being related to for performing in operation described herein One or more equipment.These equipment can specially be designed and manufactured for required purpose, or can also be included logical With the known device in computer.These equipment have the computer program being stored in it, these computer programs selectivity Ground activates or reconstruct.Such computer program can be stored in equipment (for example, computer) computer-readable recording medium or store E-command and be coupled to respectively in any kind of medium of bus suitable for storage, the computer-readable medium include but Be not limited to any kind of disk (including floppy disk, hard disk, CD, CD-ROM and magneto-optic disk), ROM (Read-Only Memory, Read-only storage), RAM (Random Access Memory, immediately memory), EPROM (Erasable Programmable Read-Only Memory, Erarable Programmable Read only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, EEPROM), flash memory, magnetic card or light card Piece.It is, computer-readable recording medium includes storing or transmitting any Jie of information in the form of it can read by equipment (for example, computer) Matter.
The art cloud server be appreciated that can with computer program instructions come realize these structure charts and/ Or the combination of each frame and these structure charts and/or the frame in block diagram and/or flow graph in block diagram and/or flow graph.This technology Field cloud server be appreciated that these computer program instructions can be supplied to all-purpose computer, special purpose computer or The processor of other programmable data processing methods realizes, so as to pass through computer or other programmable data processing methods Processor performs the scheme specified in the frame of structure chart and/or block diagram and/or flow graph disclosed by the invention or multiple frames.
The art cloud server is appreciated that in the various operations discussed in the present invention, method, flow The step of, measure, scheme can be replaced, changed, combined or deleted.Further, have what is discussed in the present invention Other steps, measure, scheme in various operations, method, flow can also be replaced, changed, reset, decomposed, combined or deleted Remove.Further, it is of the prior art have with the step in the various operations disclosed in the present invention, method, flow, measure, Scheme can also be replaced, changed, reset, decomposed, combined or be deleted.
Described above is only some embodiments of the present invention, it is noted that is taken for the common high in the clouds of the art It is engaged in for device, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications It should be regarded as protection scope of the present invention.

Claims (9)

  1. A kind of 1. testing result methods of exhibiting of the power consumption information of mobile terminal, it is characterised in that including:
    The System Privileges of the operating system of the mobile terminal are obtained, including:Prompting user needs to obtain System Privileges;Receive After the instruction of the acquisition System Privileges of user's input, the System Privileges of the operating system are obtained;
    Under the System Privileges battery status service recorded data is obtained from the operating system;
    From the data of acquisition, the power consumption information of each program of the mobile terminal is extracted;
    After each program is ranked up according to respective power consumption information, ranking results are shown;According to each program Unit interval power consumption accounting, it is determined that corresponding power saving strategy;In program power consumption ranking list display interface, each program is shown Power saving strategy link.
  2. 2. according to the method for claim 1, it is characterised in that described to obtain battery status service institute from the operating system The data of record, are specifically included:
    Create a process based on System Privileges;
    After reading the battery status service recorded data by the process, store in electric quantity data storehouse;And
    In the data from acquisition, the power consumption information of each program of the mobile terminal is extracted, is specifically included:
    From the data in the electric quantity data storehouse, the power consumption information of each program of the mobile terminal is extracted.
  3. 3. method according to claim 1 or 2, it is characterised in that the power consumption information of described program specifically includes:The program Unit interval power consumption;And
    It is described to be ranked up each program according to respective power consumption information, specifically include:
    According to the power consumption information of each program, the unit interval power consumption accounting of each program is counted;
    According to the size of the unit interval power consumption accounting of each program, each program is ranked up;And
    It is described to be shown ranking results, specifically include:
    In program power consumption ranking list display interface, the unit interval power consumption accounting of each program is shown.
  4. 4. according to the method for claim 1, it is characterised in that the unit interval power consumption accounting according to the program, It is determined that corresponding power saving strategy, is specifically included:
    According to the size of the unit interval power consumption accounting of the program, the power consumption rank of the program is determined;
    Will power saving strategy corresponding with the power consumption rank as corresponding power saving strategy.
  5. 5. according to the method for claim 4, it is characterised in that the power consumption rank is specially power consumption superelevation rank, then with Corresponding to power saving strategy be specially to unload;Or
    The power consumption rank is specially power consumption higher level, then corresponding power saving strategy is specially to forbid opening certainly;Or
    The power consumption rank is specially the general rank of power consumption, then corresponding power saving strategy is specially to suggest closing;Or
    The power consumption rank is specially the relatively low rank of power consumption, then corresponding power saving strategy is specially to keep present situation;Or
    The power consumption rank is specially power pole low level, then corresponding power saving strategy is specially to be adapted to longtime running.
  6. 6. according to the method for claim 5, it is characterised in that also include:
    If after receiving user for the click event of the unloading power saving strategy, show the unloading interface of the program;If pass through Event is clicked in the unloading that the unloading interface receives user's input, then unloads the program;Or
    Forbid if receiving user for described from after the click event for opening power saving strategy, forbid the program to open certainly, and described In program power consumption ranking list display interface to should program display forbidden.
  7. 7. method according to claim 1 or 2, it is characterised in that in the data from acquisition, extract the movement During the power consumption information of each program of terminal, in addition to:
    From the data of acquisition, the power consumption information of each hardware of the mobile terminal is extracted;And
    It is described when each program is ranked up according to respective power consumption information, in addition to:
    Each hardware is ranked up according to respective power consumption information.
  8. A kind of 8. testing result display systems of the power consumption information of mobile terminal, it is characterised in that including:
    System Privileges acquisition module, the System Privileges of the operating system for obtaining the mobile terminal, including:User is prompted to need Obtain System Privileges;After the instruction for receiving the acquisition System Privileges of user's input, obtain the operating system is System authority;
    Service data acquisition module, under the System Privileges that are obtained in the System Privileges acquisition module, from the operation system System obtains battery status service recorded data;
    Power consumption information extraction modules, the power consumption of each program for from the data of the acquisition, extracting the mobile terminal Information;
    Order module, for each program to be ranked up according to respective power consumption information, obtain ranking results;
    Power saving strategy determining module, the unit interval power consumption of each program for being counted according to the order module account for Than it is determined that corresponding power saving strategy;
    Display module, for the ranking results to be shown;In program power consumption ranking list display interface, each program is shown Power saving strategy link.
  9. 9. system according to claim 8, it is characterised in that
    The service data acquisition module is specifically used for creating a process based on System Privileges;As described in being read the process After battery status service recorded data, store in electric quantity data storehouse, and send data extraction notice;And
    The power consumption information extraction modules are specifically used for after receiving the data extraction notice, the number from the electric quantity data storehouse In, the power consumption information of each program of the mobile terminal is extracted.
CN201410832106.8A 2014-12-26 2014-12-26 The testing result methods of exhibiting and system of the power consumption information of mobile terminal Active CN104516806B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410832106.8A CN104516806B (en) 2014-12-26 2014-12-26 The testing result methods of exhibiting and system of the power consumption information of mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410832106.8A CN104516806B (en) 2014-12-26 2014-12-26 The testing result methods of exhibiting and system of the power consumption information of mobile terminal

Publications (2)

Publication Number Publication Date
CN104516806A CN104516806A (en) 2015-04-15
CN104516806B true CN104516806B (en) 2017-12-08

Family

ID=52792152

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410832106.8A Active CN104516806B (en) 2014-12-26 2014-12-26 The testing result methods of exhibiting and system of the power consumption information of mobile terminal

Country Status (1)

Country Link
CN (1) CN104516806B (en)

Families Citing this family (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104991851A (en) * 2015-06-26 2015-10-21 小米科技有限责任公司 Method and apparatus for monitoring electric quantity of terminal
CN105072290B (en) * 2015-07-23 2017-11-10 广东欧珀移动通信有限公司 The screen brightness regulation method and device of a kind of terminal
CN105138104A (en) * 2015-07-31 2015-12-09 北京金山安全软件有限公司 Power-saving processing method and device, mobile terminal and cloud server
CN106469089A (en) * 2015-08-21 2017-03-01 百度在线网络技术(北京)有限公司 For making the nonsystematic in terminal apply method and device, the terminal realizing system level interface interchange
CN105302684B (en) * 2015-11-13 2018-07-10 北京金山安全软件有限公司 Standby power consumption testing method and device for electronic equipment and electronic equipment
CN105553963B (en) * 2015-12-10 2019-11-29 小米科技有限责任公司 The control method and device of positioning service
CN105573891B (en) * 2015-12-15 2019-03-08 北京奇虎科技有限公司 A kind of Android application power consumption statistical 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
CN105677141A (en) * 2015-12-29 2016-06-15 深圳市金立通信设备有限公司 Application program management method and terminal
CN106951050B (en) * 2016-01-06 2020-11-06 北京小米移动软件有限公司 Method and device for determining power consumption of terminal
WO2017128066A1 (en) * 2016-01-26 2017-08-03 陈学良 Method for pushing information when power consumption of mobile phone program is measured and detection system
CN105828424B (en) * 2016-03-11 2019-12-13 北京奇虎科技有限公司 Intelligent terminal and energy consumption quantitative control method thereof
US10635510B2 (en) 2016-03-30 2020-04-28 Huawei Technologies Co., Ltd. Broadcast control method and apparatus, and terminal
CN105975305B (en) * 2016-04-29 2019-03-22 北京小米移动软件有限公司 OS Events processing method, device and terminal
CN106055406A (en) * 2016-05-20 2016-10-26 深圳天珑无线科技有限公司 Program operation method and terminal
CN106789443A (en) * 2017-01-13 2017-05-31 百度在线网络技术(北京)有限公司 The method and apparatus of network access request analysis result is presented
CN106936826B (en) 2017-03-10 2020-01-14 Oppo广东移动通信有限公司 Registration method and device of broadcast receiver and terminal equipment
CN107220160B (en) * 2017-05-27 2021-01-15 北京奇虎科技有限公司 Method and device for determining electric quantity consumption of application program
CN107291211A (en) * 2017-06-05 2017-10-24 北京奇虎科技有限公司 The electric quantity consumption of application program determines method and device
CN107291592A (en) * 2017-06-16 2017-10-24 北京奇虎科技有限公司 The electric quantity consumption of application program determines method and device
CN107357703B (en) * 2017-06-16 2020-09-29 奇安信科技集团股份有限公司 Terminal application power consumption detection method and server
CN107391241A (en) * 2017-06-22 2017-11-24 努比亚技术有限公司 Using quick start method, terminal and computer-readable recording medium
CN107197103B (en) * 2017-07-06 2020-07-31 三星电子(中国)研发中心 Power-saving operation control method and device for intelligent terminal
CN108419131B (en) * 2017-09-21 2020-05-19 荆书光 Device for preventing children myopia
CN108419127B (en) * 2017-09-21 2020-07-21 苗娟 Method for preventing myopia of children
CN109726088A (en) * 2018-05-17 2019-05-07 平安科技(深圳)有限公司 Management method, device, equipment and the readable storage medium storing program for executing of electricity data
CN108960817B (en) * 2018-07-11 2022-01-25 深圳市银联金融网络有限公司 Electronic payment platform based on electric quantity detection
CN110070468A (en) * 2019-03-30 2019-07-30 程慧玲 A kind of cell phone software behavioral data extraction system
CN110264184B (en) * 2019-06-28 2021-07-23 Oppo(重庆)智能科技有限公司 Payment control method and related product
CN113051128B (en) * 2019-12-27 2022-06-28 Oppo广东移动通信有限公司 Power consumption detection method and device, electronic equipment and storage medium
CN116760875B (en) * 2023-08-23 2023-10-20 龙岩煜联信息技术有限公司 Information system integrated service system and terminal based on Internet of things

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697562A (en) * 2009-10-29 2010-04-21 中兴通讯股份有限公司 Mobile terminal and method for displaying power consumption rate thereof
CN102129287A (en) * 2011-03-17 2011-07-20 宇龙计算机通信科技(深圳)有限公司 Mobile terminal and power supply management method for application program thereof
CN102325219A (en) * 2011-09-05 2012-01-18 北京百纳威尔科技有限公司 Method and device for processing electric quantity of mobile terminal
WO2013167022A2 (en) * 2013-02-22 2013-11-14 中兴通讯股份有限公司 Method and device for achieving mobile terminal power saving and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697562A (en) * 2009-10-29 2010-04-21 中兴通讯股份有限公司 Mobile terminal and method for displaying power consumption rate thereof
CN102129287A (en) * 2011-03-17 2011-07-20 宇龙计算机通信科技(深圳)有限公司 Mobile terminal and power supply management method for application program thereof
CN102325219A (en) * 2011-09-05 2012-01-18 北京百纳威尔科技有限公司 Method and device for processing electric quantity of mobile terminal
WO2013167022A2 (en) * 2013-02-22 2013-11-14 中兴通讯股份有限公司 Method and device for achieving mobile terminal power saving and mobile terminal

Also Published As

Publication number Publication date
CN104516806A (en) 2015-04-15

Similar Documents

Publication Publication Date Title
CN104516806B (en) The testing result methods of exhibiting and system of the power consumption information of mobile terminal
CN104221445B (en) A kind of method and terminal waking up terminal system
US20190380092A1 (en) Context discovery for mobile device
CN108040295B (en) Public cutting method, server, user side and public cutting system
CN102739868B (en) The loss processing method of mobile terminal and system
CN105554316B (en) A kind of realization method and system of reserved intelligent terminal battery capacity
CN102779255B (en) Method and device for judging malicious program
CN104376266B (en) The determination method and device of application software level of security
US20140120961A1 (en) System and method for secure message composition of security messages
CN104267799B (en) Network server and method and system for processing power consumption of electronic equipment
CN103368904A (en) Mobile terminal, and system and method for suspicious behavior detection and judgment
CN106844026B (en) Method and system for cleaning terminal equipment process
CN105205388A (en) Authority management method and system for application
WO2018196745A1 (en) Charging control method and charging device
US20240031374A1 (en) Rule based access to voluntarily provided data housed in a protected region of a data storage device
CN103064782A (en) Method and device for obtaining control
CN103596246A (en) Method and terminal for recovering data service
CN105335146A (en) Software data traffic management method and portable electronic apparatus
CN106933822A (en) A kind of content recommendation method and device
US11636679B2 (en) Apparatus and method for detecting suspicious content
CN108989548A (en) A kind of control method and control device detecting mobile terminal application power consumption
CN106550405B (en) Network data receiving control method and system based on mobile terminal
CN106507350B (en) A kind of internet-of-things terminal and system of the limited triggering of low power consuming
KR102558735B1 (en) Method and device for identifying malicious spam calls based on artificial intelligence
US20130189957A1 (en) Computerized system architecture for monitoring usage of telecommunication devices and method of use

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220728

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.