CN104881346A - Mobile terminal and detection method and device of power consumption of applications - Google Patents

Mobile terminal and detection method and device of power consumption of applications Download PDF

Info

Publication number
CN104881346A
CN104881346A CN201510218747.9A CN201510218747A CN104881346A CN 104881346 A CN104881346 A CN 104881346A CN 201510218747 A CN201510218747 A CN 201510218747A CN 104881346 A CN104881346 A CN 104881346A
Authority
CN
China
Prior art keywords
application program
power consumption
represent
time
electricity
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
CN201510218747.9A
Other languages
Chinese (zh)
Other versions
CN104881346B (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201510218747.9A priority Critical patent/CN104881346B/en
Publication of CN104881346A publication Critical patent/CN104881346A/en
Application granted granted Critical
Publication of CN104881346B publication Critical patent/CN104881346B/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

Abstract

The invention discloses a mobile terminal and a detection method and device of power consumption of applications and belongs to the technical field of mobile terminals. The detection method of power consumption of applications is applied to the mobile terminal and includes steps of acquiring operation time of the applications in different operation states within the preset time and power consumption in each operation time; calculating the percentage of the power consumption of the applications accounting for the total power consumption within the preset time; displaying the percentage of the power consumption of the corresponding applications when receiving query commands of the power consumption of the applications. The power consumption of the applications can be more accurately calculated, users can know the newest power consumption information of the applications and can be helped judge whether to delete or download the corresponding applications, and battery life of the mobile terminal is prolonged.

Description

The detection method of a kind of mobile terminal and application program power consumption thereof and device
Technical field
The present invention relates to technical field of mobile terminals, be specifically related to detection method and the device of a kind of mobile terminal and application program power consumption thereof.
Background technology
Along with the development of mobile terminal, current APP number of applications has arrived many surprising situations, and the quality of various application software is also very different.Some APP not very large use value and owing to applying, power consumption is also larger itself, but user does not but but know to cause the electric quantity consumption of terminal quickly to this.
The detection method of the power consumption of existing application programs or be inaccurate due to its very few power consumption causing it to detect of factor considered.And the power consumption of a certain application program within certain time period is not displayed, user is difficult to know its concrete electric quantity consumption situation.
Summary of the invention
The invention provides detection method and the device of a kind of mobile terminal and application program power consumption thereof, to reach the object of the power consumption detecting and present application program more accurately, overcome the test section defect accurately of the power consumption of above-mentioned prior art application programs.
The technical scheme that the present invention solves the problems of the technologies described above is as follows.
According to an aspect of the present invention, the detection method of the application program power consumption provided, described method is applied to mobile terminal, and the method comprises:
Obtain the working time of application program within the time period of presetting under different operating state and the electricity consumed under each duty;
According to the working time of acquisition and the electricity of consumption, the power consumption calculating this application program within the time period of presetting accounts for the number percent of total power consumption;
When receiving the query statement of the power consumption of application program, the number percent of the power consumption of the corresponding application program that display calculates.
Preferably, the formula calculating the power consumption of this application program is:
Q=T 1*Q 1+Q 2+Q 3+Q 4
Wherein, Q represents the power consumption of application program, T 1represent that application program run duration takies the T.T. of CPU, Q 1represent the unit power consumption amount that application program is run under the current frequency range of CPU, Q 2represent the electricity that application program consumes under wakelock state, Q 3represent the electricity that application program is consumed by data transmission, Q 4represent the electricity that application program use all the sensors consumes.
Preferably, this application program run duration takies the T.T. T1 of CPU is that application program is in the time that linux kernel state is run and in the time sum that Linux User space runs.
Preferably, the formula calculating the electricity Q3 that this application program is consumed by data transmission is:
Q 3=((B 1+B 2)*I 1+(B 3+B 4-B 1-B 2)*I 2)/(B 1+B 2+B 3+B 4);
Wherein, B 1represent the data volume uploaded by data traffic, B 2represent the data volume downloaded by data traffic, B 3represent the data volume uploaded by wifi network, B 4represent the data volume downloaded by wifi network, I 1represent electric current during usage data flow, I 2represent electric current when using wifi network.
Preferably, the above-mentioned electricity Q consumed under wakelock state 2the time run under wakelock state for application program is multiplied by the unit power consumption amount run under wakelock state.
Preferably, the formula calculating the electricity Q4 that this application program uses all the sensors to consume is:
Q 4=T a*Q a+T b*Q b+T c*Q c+…+T n*Q n
Wherein, T arepresent that application program takies the time of sensor a, Q arepresent the unit power consumption amount of sensor a, T brepresent that application program takies the time of sensor b, Q brepresent the unit power consumption amount of sensor b, T crepresent that application program takies the time of sensor c, Q crepresent the unit power consumption amount of sensor c, T nrepresent that application program takies the time of sensor n, Q nrepresent the unit power consumption amount of sensor n.
Preferably, the detection method of this application program power consumption also comprises:
Judge whether current time exceedes default time threshold apart from the time of the power consumption number percent of last computing application program, if so, then the working time of application program within the time period of presetting under different operating state and the electricity consumed under each duty is again obtained;
According to the working time of up-to-date acquisition and the electricity of consumption, the power consumption calculating application program within the time period of presetting accounts for the number percent of total power consumption.
According to another aspect of the present invention, the pick-up unit of the application program power consumption provided, this device comprises:
First data acquisition module, for obtaining the working time of application program within the time period of presetting under different operating state and the electricity consumed under each duty;
First computing module, for the electricity according to the working time obtained and consumption, the power consumption calculating application program within the time period of presetting accounts for the number percent of total power consumption;
Display module, during for receiving the query statement of the power consumption of application program, the number percent of the power consumption of the corresponding application program that display calculates.
Preferably, this device also comprises:
Second data acquisition module, for judging whether current time exceedes default time threshold apart from the time of the power consumption number percent of last computing application program, if so, then the working time of application program within the time period of presetting under different operating state and the electricity consumed under each duty is again obtained;
Second computing module, for according to the working time of up-to-date acquisition and the electricity of consumption, calculates the power consumption of application program within the default time period and accounts for the number percent of total power consumption.
According to a further aspect of the invention, a kind of mobile terminal provided, this mobile terminal comprises the pick-up unit of above-mentioned application program power consumption.
The invention provides detection method and the device of a kind of mobile terminal and application program power consumption thereof, the various state run when calculating the power consumption of certain application program and service condition are all taken into account, make the calculating of the power consumption of application programs more accurate, make user when checking the power consumption of this application program, make it very clear by display power consumption number percent, help user to judge whether to delete or to unload corresponding application program, thus increase the cruising time of mobile terminal.
Accompanying drawing explanation
Fig. 1 is the hardware configuration schematic diagram of the mobile terminal realizing each embodiment of the present invention;
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the process flow diagram of the detection method of application program power consumption according to an embodiment of the invention;
Fig. 4 is the process flow diagram of the detection method of application program power consumption according to another embodiment of the present invention;
Fig. 5 is the exemplary block diagram of the pick-up unit of application program power consumption according to an embodiment of the invention;
Fig. 6 is the exemplary block diagram of the pick-up unit of application program power consumption according to an embodiment of the invention;
Fig. 7 is the exemplary block diagram of mobile terminal according to an embodiment of the invention.
Embodiment
Be described principle of the present invention and feature below in conjunction with accompanying drawing, example, only for explaining the present invention, is not intended to limit scope of the present invention.
The mobile terminal realizing each embodiment of the present invention is described referring now to accompanying drawing.In follow-up description, use the suffix of such as " module ", " parts " or " unit " for representing element only in order to be conducive to explanation of the present invention, itself is specific meaning not.Therefore, " module " and " parts " can mixedly use.
Fig. 1 is the hardware configuration signal of the mobile terminal realizing each embodiment of the present invention.
Mobile terminal 100 can comprise wireless communication unit 110, A/V (audio/video) input block 120, user input unit 130, sensing cell 140, output unit 150, storer 160, interface unit 170, controller 180 and power supply unit 190 etc.Fig. 1 shows the mobile terminal with various assembly, it should be understood that, does not require to implement all assemblies illustrated.Can alternatively implement more or less assembly.Will be discussed in more detail below the element of mobile terminal.
Wireless communication unit 110 generally includes one or more assembly, and it allows the wireless communication between mobile terminal 100 and wireless communication system or network.Such as, wireless communication unit can comprise at least one in broadcast reception module 111, mobile communication module 112, wireless Internet module 113, short range communication module 114 and positional information module 115.
Broadcast reception module 111 via broadcast channel from external broadcasting management server receiving broadcast signal and/or broadcast related information.Broadcast channel can comprise satellite channel and/or terrestrial channel.Broadcast management server can be generate and send the server of broadcast singal and/or broadcast related information or the broadcast singal generated before receiving and/or broadcast related information and send it to the server of terminal.Broadcast singal can comprise TV broadcast singal, radio signals, data broadcasting signal etc.And broadcast singal may further include the broadcast singal combined with TV or radio signals.Broadcast related information also can provide via mobile communications network, and in this case, broadcast related information can be received by mobile communication module 112.Broadcast singal can exist in a variety of manners, such as, it can exist with the form of the electronic service guidebooks (ESG) of the electronic program guides of DMB (DMB) (EPG), digital video broadcast-handheld (DVB-H) etc.Broadcast reception module 111 can by using the broadcast of various types of broadcast system Received signal strength.Especially, broadcast reception module 111 can by using such as multimedia broadcasting-ground (DMB-T), DMB-satellite (DMB-S), digital video broadcasting-hand-held (DVB-H), and the digit broadcasting system of the Radio Data System, received terrestrial digital broadcasting integrated service (ISDB-T) etc. of forward link media (MediaFLO) receives digital broadcasting.Broadcast reception module 111 can be constructed to be applicable to providing the various broadcast system of broadcast singal and above-mentioned digit broadcasting system.The broadcast singal received via broadcast reception module 111 and/or broadcast related information can be stored in storer 160 (or storage medium of other type).
Radio signal is sent at least one in base station (such as, access point, Node B etc.), exterior terminal and server and/or receives radio signals from it by mobile communication module 112.Various types of data that such radio signal can comprise voice call signal, video calling signal or send according to text and/or Multimedia Message and/or receive.
Wireless Internet module 113 supports the Wi-Fi (Wireless Internet Access) of mobile terminal.This module can be inner or be externally couple to terminal.Wi-Fi (Wireless Internet Access) technology involved by this module can comprise WLAN (WLAN) (Wi-Fi), Wibro (WiMAX), Wimax (worldwide interoperability for microwave access), HSDPA (high-speed downlink packet access) etc.
Short range communication module 114 is the modules for supporting junction service.Some examples of short-range communication technology comprise bluetooth TM, radio-frequency (RF) identification (RFID), Infrared Data Association (IrDA), ultra broadband (UWB), purple honeybee TM etc.
Positional information module 115 is the modules of positional information for checking or obtain mobile terminal.The typical case of positional information module is GPS (GPS).According to current technology, GPS module 115 calculates from the range information of three or more satellite and correct time information and for the Information application triangulation calculated, thus calculates three-dimensional current location information according to longitude, latitude and pin-point accuracy.Current, the method for calculating position and temporal information uses three satellites and by using the error of the position that goes out of an other satellite correction calculation and temporal information.In addition, GPS module 115 can carry out computing velocity information by Continuous plus current location information in real time.
A/V input block 120 is for audio reception or vision signal.A/V input block 120 can comprise camera 121 and microphone 1220, and the view data of camera 121 to the static images obtained by image capture apparatus in Video Capture pattern or image capture mode or video processes.Picture frame after process may be displayed on display unit 151.Picture frame after camera 121 processes can be stored in storer 160 (or other storage medium) or via wireless communication unit 110 and send, and can provide two or more cameras 1210 according to the structure of mobile terminal.Such acoustic processing can via microphones sound (voice data) in telephone calling model, logging mode, speech recognition mode etc. operational mode, and can be voice data by microphone 122.Audio frequency (voice) data after process can be converted to the formatted output that can be sent to mobile communication base station via mobile communication module 112 when telephone calling model.Microphone 122 can be implemented various types of noise and eliminate (or suppress) algorithm and receiving and sending to eliminate (or suppression) noise or interference that produce in the process of sound signal.
User input unit 130 can generate key input data to control the various operations of mobile terminal according to the order of user's input.User input unit 130 allows user to input various types of information, and keyboard, the young sheet of pot, touch pad (such as, detecting the touch-sensitive assembly of the change of the resistance, pressure, electric capacity etc. that cause owing to being touched), roller, rocking bar etc. can be comprised.Especially, when touch pad is superimposed upon on display unit 151 as a layer, touch-screen can be formed.
Sensing cell 140 detects the current state of mobile terminal 100, (such as, mobile terminal 100 open or close state), the position of mobile terminal 100, user for mobile terminal 100 contact (namely, touch input) presence or absence, the orientation of mobile terminal 100, the acceleration or deceleration of mobile terminal 100 move and direction etc., and generate order or the signal of the operation for controlling mobile terminal 100.Such as, when mobile terminal 100 is embodied as sliding-type mobile phone, sensing cell 140 can sense this sliding-type phone and open or close.In addition, whether whether sensing cell 140 can detect power supply unit 190 provides electric power or interface unit 170 to couple with external device (ED).Sensing cell 140 can comprise proximity transducer 1410 and will be described this in conjunction with touch-screen below.
Interface unit 170 is used as at least one external device (ED) and is connected the interface that can pass through with mobile terminal 100.Such as, external device (ED) can comprise wired or wireless head-band earphone port, external power source (or battery charger) port, wired or wireless FPDP, memory card port, for connecting the port, audio frequency I/O (I/O) port, video i/o port, ear port etc. of the device with identification module.Identification module can be that storage uses the various information of mobile terminal 100 for authentication of users and can comprise subscriber identification module (UIM), client identification module (SIM), Universal Subscriber identification module (USIM) etc.In addition, the device (hereinafter referred to " recognition device ") with identification module can take the form of smart card, and therefore, recognition device can be connected with mobile terminal 100 via port or other coupling arrangement.Interface unit 170 may be used for receive from external device (ED) input (such as, data message, electric power etc.) and the input received be transferred to the one or more element in mobile terminal 100 or may be used for transmitting data between mobile terminal and external device (ED).
In addition, when mobile terminal 100 is connected with external base, interface unit 170 can be used as to allow by it electric power to be provided to the path of mobile terminal 100 from base or can be used as the path that allows to be transferred to mobile terminal by it from the various command signals of base input.The various command signal inputted from base or electric power can be used as and identify whether mobile terminal is arranged on the signal base exactly.Output unit 150 is constructed to provide output signal (such as, sound signal, vision signal, alarm signal, vibration signal etc.) with vision, audio frequency and/or tactile manner.Output unit 150 can comprise display unit 151, dio Output Modules 152, alarm unit 153 etc.
Display unit 151 may be displayed on the information of process in mobile terminal 100.Such as, when mobile terminal 100 is in telephone calling model, display unit 151 can show with call or other communicate (such as, text messaging, multimedia file are downloaded etc.) be correlated with user interface (UI) or graphic user interface (GUI).When mobile terminal 100 is in video calling pattern or image capture mode, display unit 151 can the image of display capture and/or the image of reception, UI or GUI that video or image and correlation function are shown etc.
Meanwhile, when display unit 151 and touch pad as a layer superposed on one another to form touch-screen time, display unit 151 can be used as input media and output unit.Display unit 151 can comprise at least one in liquid crystal display (LCD), thin film transistor (TFT) LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexible display, three-dimensional (3D) display etc.Some in these displays can be constructed to transparence and watch from outside to allow user, and this can be called transparent display, and typical transparent display can be such as TOLED (transparent organic light emitting diode) display etc.According to the specific embodiment wanted, mobile terminal 100 can comprise two or more display units (or other display device), such as, mobile terminal can comprise outernal display unit (not shown) and inner display unit (not shown).Touch-screen can be used for detecting touch input pressure and touch input position and touch and inputs area.
When dio Output Modules 152 can be under the isotypes such as call signal receiving mode, call mode, logging mode, speech recognition mode, broadcast reception mode at mobile terminal, voice data convert audio signals that is that wireless communication unit 110 is received or that store in storer 160 and exporting as sound.And dio Output Modules 152 can provide the audio frequency relevant to the specific function that mobile terminal 100 performs to export (such as, call signal receives sound, message sink sound etc.).Dio Output Modules 152 can comprise loudspeaker, hummer etc.
Alarm unit 153 can provide and export that event informed to mobile terminal 100.Typical event can comprise calling reception, message sink, key signals input, touch input etc.Except audio or video exports, alarm unit 153 can provide in a different manner and export with the generation of notification event.Such as, alarm unit 153 can provide output with the form of vibration, when receive calling, message or some other enter communication (incomingcommunication) time, alarm unit 153 can provide sense of touch to export (that is, vibrating) to notify to user.By providing such sense of touch to export, even if when the mobile phone of user is in the pocket of user, user also can identify the generation of various event.Alarm unit 153 also can provide the output of the generation of notification event via display unit 151 or dio Output Modules 152.
Storer 160 software program that can store process and the control operation performed by controller 180 etc., or temporarily can store oneself through exporting the data (such as, telephone directory, message, still image, video etc.) that maybe will export.And, storer 160 can store about when touch be applied to touch-screen time the vibration of various modes that exports and the data of sound signal.
Storer 160 can comprise the storage medium of at least one type, described storage medium comprises flash memory, hard disk, multimedia card, card-type storer (such as, SD or DX storer etc.), random access storage device (RAM), static random-access memory (SRAM), ROM (read-only memory) (ROM), Electrically Erasable Read Only Memory (EEPROM), programmable read only memory (PROM), magnetic storage, disk, CD etc.And mobile terminal 100 can be connected the memory function of execute store 160 network storage device with by network cooperates.
Controller 180 controls the overall operation of mobile terminal usually.Such as, controller 180 performs the control relevant to voice call, data communication, video calling etc. and process.In addition, controller 180 can comprise the multi-media module 1810 for reproducing (or playback) multi-medium data, and multi-media module 1810 can be configured in controller 180, or can be configured to be separated with controller 180.Controller 180 can pattern recognition process, is identified as character or image so that input is drawn in the handwriting input performed on the touchscreen or picture.
Power supply unit 190 receives external power or internal power and provides each element of operation and the suitable electric power needed for assembly under the control of controller 180.
Various embodiment described herein can to use such as computer software, the computer-readable medium of hardware or its any combination implements.For hardware implementation, embodiment described herein can by using application-specific IC (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), processor, controller, microcontroller, microprocessor, being designed at least one performed in the electronic unit of function described herein and implementing, in some cases, such embodiment can be implemented in controller 180.For implement software, the embodiment of such as process or function can be implemented with allowing the independent software module performing at least one function or operation.Software code can be implemented by the software application (or program) write with any suitable programming language, and software code can be stored in storer 160 and to be performed by controller 180.
So far, oneself is through the mobile terminal according to its functional description.Below, for the sake of brevity, by the slide type mobile terminal that describes in various types of mobile terminals of such as folded form, board-type, oscillating-type, slide type mobile terminal etc. exemplarily.Therefore, the present invention can be applied to the mobile terminal of any type, and is not limited to slide type mobile terminal.
Mobile terminal 100 as shown in Figure 1 can be constructed to utilize and send the such as wired and wireless communication system of data via frame or grouping and satellite-based communication system operates.
Describe wherein according to the communication system that mobile terminal of the present invention can operate referring now to Fig. 2.
Such communication system can use different air interfaces and/or Physical layer.Such as, the air interface used by communication system comprises such as frequency division multiple access (FDMA), time division multiple access (TDMA) (TDMA), CDMA (CDMA) and universal mobile telecommunications system (UMTS) (especially, Long Term Evolution (LTE)), global system for mobile communications (GSM) etc.As non-limiting example, description below relates to cdma communication system, but such instruction is equally applicable to the system of other type.
With reference to figure 2, cdma wireless communication system can comprise multiple mobile terminal 100, multiple base station (BS) 270, base station controller (BSC) 275 and mobile switching centre (MSC) 280.MSC280 is constructed to form interface with Public Switched Telephony Network (PSTN) 290.MSC280 is also constructed to form interface with the BSC275 that can be couple to base station 270 via back haul link.Back haul link can construct according to any one in some interfaces that oneself knows, described interface comprises such as E1/T1, ATM, IP, PPP, frame relay, HDSL, ADSL or xDSL.Will be appreciated that system as shown in Figure 2 can comprise multiple BSC2750.
Each BS270 can serve one or more subregion (or region), by multidirectional antenna or point to specific direction each subregion of antenna cover radially away from BS270.Or each subregion can by two or more antenna covers for diversity reception.Each BS270 can be constructed to support multiple parallel compensate, and each parallel compensate has specific frequency spectrum (such as, 1.25MHz, 5MHz etc.).
Subregion can be called as CDMA Channel with intersecting of parallel compensate.BS270 also can be called as base station transceiver subsystem (BTS) or other equivalent terms.Under these circumstances, term " base station " may be used for broadly representing single BSC275 and at least one BS270.Base station also can be called as " cellular station ".Or each subregion of particular B S270 can be called as multiple cellular station.
As shown in Figure 2, broadcast singal is sent to the mobile terminal 100 at operate within systems by broadcsting transmitter (BT) 295.Broadcast reception module 111 as shown in Figure 1 is arranged on mobile terminal 100 and sentences the broadcast singal receiving and sent by BT295.In fig. 2, several GPS (GPS) satellite 300 is shown.Satellite 300 helps at least one in the multiple mobile terminal 100 in location.
In fig. 2, depict multiple satellite 300, but understand, the satellite of any number can be utilized to obtain useful locating information.GPS module 115 as shown in Figure 1 is constructed to coordinate to obtain the locating information wanted with satellite 300 usually.Substitute GPS tracking technique or outside GPS tracking technique, can use can other technology of position of tracking mobile terminal.In addition, at least one gps satellite 300 optionally or extraly can process satellite dmb transmission.
As a typical operation of wireless communication system, BS270 receives the reverse link signal from various mobile terminal 100.Mobile terminal 100 participates in call usually, information receiving and transmitting communicates with other type.Each reverse link signal that certain base station 270 receives is processed by particular B S270.The data obtained are forwarded to relevant BSC275.BSC provides call Resourse Distribute and comprises the mobile management function of coordination of the soft switching process between BS270.The data received also are routed to MSC280 by BSC275, and it is provided for the extra route service forming interface with PSTN290.Similarly, PSTN290 and MSC280 forms interface, and MSC and BSC275 forms interface, and BSC275 correspondingly control BS270 so that forward link signals is sent to mobile terminal 100.
Based on above-mentioned mobile terminal hardware configuration and communication system, each embodiment of the inventive method is proposed.
Embodiment one
Fig. 3 is the process flow diagram of the detection method of application program power consumption according to an embodiment of the invention, the detection method of application program power consumption according to an embodiment of the invention is described below in conjunction with Fig. 3, as shown in Figure 3, the method is applied to mobile terminal, and the method comprises the following steps:
S100, the working time of acquisition application program within the time period of presetting under different operating state and the electricity consumed under each duty;
S200, according to the working time obtained and the electricity of consumption, the power consumption calculating application program within the time period of presetting accounts for the number percent of total power consumption;
S300, when receiving the query statement of power consumption of application program, the number percent of the power consumption of the corresponding application program that display calculates.
Wherein, the step calculating the power consumption of application program within the time period of presetting is:
Calculate total electricity that single application program consumes by the end of the initial time of this preset time period;
Calculate total electricity that single application program consumed by the end of the closing time of this preset time period;
The power consumption that difference operation can obtain this application program application program within the time period that this is preset is done to two the total electricity calculated.
According to the use scenes of the present embodiment such as: calculating micro-letter consumes power when 9:00 is 100mah, calculating that to consume when 9:30 be 120mah, is exactly so 20mah in 9:00-9:30 consumes power during this period of time.
Wherein, the formula calculating the power consumption of this application program is:
Q=T1*Q1+Q2+Q3+Q4;
Wherein, Q represents the total power consumption of application program, T 1represent that application program run duration takies the T.T. of CPU, Q 1represent the unit power consumption amount that application program is run under the current frequency range of CPU, Q 2represent the electricity that application program consumes under wakelock state, Q 3represent the electricity that application program is consumed by data transmission, Q 4represent the electricity that application program use all the sensors consumes.
Further, this application program run duration takies the T.T. T1 of CPU is that application program is in the time that linux kernel state is run and in the time sum that Linux User space runs.
Calculate the electricity Q that this application program is consumed by data transmission 3formula be:
Q 3=((B 1+B 2)*I 1+(B 3+B 4-B 1-B 2)*I 2)/(B 1+B 2+B 3+B 4);
Wherein, B 1represent the data volume uploaded by data traffic, B 2represent the data volume downloaded by data traffic, B 3represent the data volume uploaded by wifi network, B 4represent the data volume downloaded by wifi network, I 1represent electric current during usage data flow, I 2represent electric current when using wifi network.
Further, the above-mentioned electricity Q consumed under wakelock state 2the time run under wakelock state for application program is multiplied by the unit power consumption amount run under wakelock state.
Further, the formula calculating the electricity Q4 that this application program uses all the sensors to consume is:
Q 4=T a*Q a+T b*Q b+T c*Q c+…+T n*Q n
Wherein, T arepresent that application program takies the time of sensor a, Q arepresent the unit power consumption amount of sensor a, T brepresent that application program takies the time of sensor b, Q brepresent the unit power consumption amount of sensor b, T crepresent that application program takies the time of sensor c, Q crepresent the unit power consumption amount of sensor c, T nrepresent that application program takies the time of sensor n, Q nrepresent the unit power consumption amount of sensor n.Wherein, the unit power consumption amount of each sensor is provided by the manufacturer of respective sensor.
The various state that the present embodiment is run when calculating the power consumption of certain application program and service condition are all taken into account, make the calculating of the power consumption of application programs more accurate, make user when checking the power consumption of this application program, make it very clear by display power consumption number percent, help user to judge whether to delete or to unload corresponding application program, thus increase the cruising time of mobile terminal.
Embodiment two
Fig. 4 is the process flow diagram of the detection method of application program power consumption according to another embodiment of the present invention, and as shown in Figure 4, the detection method of the application program power consumption that the present embodiment provides, on the basis comprising above-mentioned steps S100, S200 and S300, also comprises:
S400, judge whether current time exceedes default time threshold apart from the time of the power consumption number percent of last computing application program, if so, then the working time of application program within the time period of presetting under different operating state and the electricity consumed under each duty is again obtained.
S500, according to the working time of up-to-date acquisition and the electricity of consumption, calculate the power consumption of application program within the time period of presetting and account for the number percent of total power consumption.
Wherein, above-mentioned default time threshold such as a week or one month, this time can be set by user oneself.
The present embodiment carries out collection again and calculating by the power consumption of application programs at set intervals, making when user always can obtain up-to-date data when checking the power consumption of this application program, improving the experience of user.
Embodiment three
Fig. 5 is the exemplary block diagram of the pick-up unit of application program power consumption according to an embodiment of the invention, the pick-up unit of application program power consumption according to an embodiment of the invention is described below in conjunction with Fig. 5, as shown in Figure 5, the pick-up unit 11 of this application program power consumption comprises:
First data acquisition module 10, for obtaining the working time of application program within the time period of presetting under different operating state and the electricity consumed under each duty;
First computing module 20, for the electricity according to the working time obtained and consumption, the power consumption calculating application program within the time period of presetting accounts for the number percent of total power consumption;
Display module 30, during for receiving the query statement of the power consumption of application program, the number percent of the power consumption of the corresponding application program that display calculates.
Wherein, the first computing module 20 calculates the power consumption of single application program by following formula:
Q=T1*Q1+Q2+Q3+Q4;
Wherein, Q represents the total power consumption of application program, T 1represent that application program run duration takies the T.T. of CPU, Q 1represent the unit power consumption amount that application program is run under the current frequency range of CPU, Q 2represent the electricity that application program consumes under wakelock state, Q 3represent the electricity that application program is consumed by data transmission, Q 4represent the electricity that application program use all the sensors consumes.
Wherein, this application program run duration takies the T.T. T1 of CPU is that application program is in the time that linux kernel state is run and in the time sum that Linux User space runs.
This first computing module 20 calculates the electricity Q of this application program by data transmission consumption by following formula 3:
Q 3=((B 1+B 2)*I 1+(B 3+B 4-B 1-B 2)*I 2)/(B 1+B 2+B 3+B 4);
Wherein, B 1represent the data volume uploaded by data traffic, B 2represent the data volume downloaded by data traffic, B 3represent the data volume uploaded by wifi network, B 4represent the data volume downloaded by wifi network, I 1represent electric current during usage data flow, I 2represent electric current when using wifi network.
Further, the time that application program is run under wakelock state is multiplied by the electricity Q that the unit power consumption amount run under wakelock state consumes under wakelock state as this application program by this first computing module 20 2.
Further, this first computing module 20 calculates this application program by following formula and uses the electricity Q4 that consumes of all the sensors:
Q 4=T a*Q a+T b*Q b+T c*Q c+…+T n*Q n
Wherein, T arepresent that application program takies the time of sensor a, Q arepresent the unit power consumption amount of sensor a, T brepresent that application program takies the time of sensor b, Q brepresent the unit power consumption amount of sensor b, T crepresent that application program takies the time of sensor c, Q crepresent the unit power consumption amount of sensor c, T nrepresent that application program takies the time of sensor n, Q nrepresent the unit power consumption amount of sensor n.
Fig. 6 is the exemplary block diagram of the pick-up unit of application program power consumption according to an embodiment of the invention, and as shown in Figure 6, optionally, the pick-up unit 11 of this application program power consumption also comprises:
Second data acquisition module 40, for judging whether current time exceedes default time threshold apart from the time of the power consumption number percent of last computing application program, if so, then the working time of application program within the time period of presetting under different operating state and the electricity consumed under each duty is again obtained;
Second computing module 50, for according to the working time of up-to-date acquisition and the electricity of consumption, calculates the power consumption of application program within the default time period and accounts for the number percent of total power consumption.
The pick-up unit of the power consumption of the application program that the present embodiment provides, by running and use the detection method of above-mentioned application program power consumption, makes the calculating of the power consumption of application programs more accurate, allows user understand the up-to-date power consumption information of each application program.
Embodiment four
Fig. 7 is the exemplary block diagram of mobile terminal according to an embodiment of the invention, mobile terminal 100 as shown in Figure 7, and this mobile terminal comprises the pick-up unit 11 of above-mentioned application program power consumption.
Wherein, this mobile terminal can be implemented in a variety of manners.Such as, the terminal described in the present invention can comprise the such as mobile terminal of mobile phone, smart phone, notebook computer, digit broadcasting receiver, PDA (personal digital assistant), PAD (panel computer), PMP (portable media player), guider etc. and the fixed terminal of such as digital TV, desk-top computer etc.Below, suppose that terminal is mobile terminal.But it will be appreciated by those skilled in the art that except the element except being used in particular for mobile object, structure according to the embodiment of the present invention also can be applied to the terminal of fixed type.
The various state that the present invention is run when calculating the power consumption of certain application program and service condition are all taken into account, make the calculating of the power consumption of application programs more accurate, make user when checking the power consumption of this application program, make it very clear by display power consumption number percent, help user to judge whether to delete or to unload corresponding application program, thus increase the cruising time of mobile terminal.
It should be noted that, in this article, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or device and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or device.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the device comprising this key element and also there is other identical element.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that above-described embodiment method can add required general hardware platform by software and realize, hardware can certainly be passed through, but in a lot of situation, the former is better embodiment.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium (as ROM/RAM, magnetic disc, CD), comprising some instructions in order to make a station terminal equipment (can be mobile phone, computing machine, server, air conditioner, or the network equipment etc.) perform method described in each embodiment of the present invention.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. the detection method of application program power consumption, described method is applied to mobile terminal, it is characterized in that, described method comprises:
Obtain the working time of application program within the time period of presetting under different operating state and the electricity consumed under each duty;
According to the described working time of acquisition and the electricity of consumption, the power consumption calculating described application program within the described default time period accounts for the number percent of total power consumption;
When receiving the query statement of the power consumption of application program, the number percent of the power consumption of the corresponding application program that display calculates.
2. the detection method of application program power consumption according to claim 1, is characterized in that, the formula calculating the power consumption of described application program is:
Q=T 1*Q 1+Q 2+Q 3+Q 4
Wherein, Q represents the power consumption of application program, T 1represent that application program run duration takies the T.T. of CPU, Q 1represent the unit power consumption amount that described application program is run under the current frequency range of CPU, Q 2represent the electricity that described application program consumes under wakelock state, Q 3represent the electricity that described application program is consumed by data transmission, Q 4represent the electricity that described application program use all the sensors consumes.
3. the detection method of application program power consumption according to claim 2, is characterized in that, described application program run duration takies the T.T. T of CPU 1for described application program is in the time that linux kernel state is run and in the time sum that Linux User space runs.
4. the detection method of application program power consumption according to claim 2, is characterized in that, calculates the electricity Q that described application program is consumed by data transmission 3formula be:
Q 3=((B 1+B 2)*I 1+(B 3+B 4-B 1-B 2)*I 2)/(B 1+B 2+B 3+B 4);
Wherein, B 1represent the data volume uploaded by data traffic, B 2represent the data volume downloaded by data traffic, B 3represent the data volume uploaded by wifi network, B 4represent the data volume downloaded by wifi network, I 1represent electric current during usage data flow, I 2represent electric current when using wifi network.
5. the detection method of application program power consumption according to claim 2, is characterized in that, the electricity Q consumed under wakelock state 2the time run under wakelock state for described application program is multiplied by the unit power consumption amount run under wakelock state.
6. the detection method of application program power consumption according to claim 2, is characterized in that, calculates the electricity Q that described application program uses all the sensors to consume 4formula be:
Q 4=T a*Q a+T b*Q b+T c*Q c+…+T n*Q n
Wherein, T arepresent that described application program takies the time of sensor a, Q arepresent the unit power consumption amount of described sensor a, T brepresent that described application program takies the time of sensor b, Q brepresent the unit power consumption amount of described sensor b, T crepresent that described application program takies the time of sensor c, Q crepresent the unit power consumption amount of described sensor c, T nrepresent that described application program takies the time of sensor n, Q nrepresent the unit power consumption amount of described sensor n.
7. the detection method of the application program power consumption according to any one of claim 1 to 6, is characterized in that, described method also comprises:
Judge whether the current time distance last time calculating the power consumption number percent of described application program exceedes default time threshold, if so, then the working time of application program within the time period of presetting under different operating state and the electricity consumed under each duty is again obtained;
According to the described working time of up-to-date acquisition and the electricity of consumption, the power consumption calculating described application program within the described default time period accounts for the number percent of total power consumption.
8. the pick-up unit of application program power consumption, is characterized in that, described device comprises:
First data acquisition module, for obtaining the working time of application program within the time period of presetting under different operating state and the electricity consumed under each duty;
First computing module, for the electricity according to the described working time obtained and consumption, the power consumption calculating described application program within the described default time period accounts for the number percent of total power consumption;
Display module, during for receiving the query statement of the power consumption of application program, the number percent of the power consumption of the corresponding application program that display calculates.
9. the pick-up unit of application program power consumption according to claim 8, is characterized in that, described device also comprises:
Second data acquisition module, for judging whether the current time distance last time calculating the power consumption number percent of described application program exceedes default time threshold, if so, then the working time of application program within the time period of presetting under different operating state and the electricity consumed under each duty is again obtained;
Second computing module, for according to the described working time of up-to-date acquisition and the electricity of consumption, the power consumption calculating described application program within the described default time period accounts for the number percent of total power consumption.
10. a mobile terminal, is characterized in that, described mobile terminal comprises the pick-up unit of the application program power consumption described in the claims 8 or 9.
CN201510218747.9A 2015-04-30 2015-04-30 The detection method and device of a kind of mobile terminal and its application program power consumption Active CN104881346B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510218747.9A CN104881346B (en) 2015-04-30 2015-04-30 The detection method and device of a kind of mobile terminal and its application program power consumption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510218747.9A CN104881346B (en) 2015-04-30 2015-04-30 The detection method and device of a kind of mobile terminal and its application program power consumption

Publications (2)

Publication Number Publication Date
CN104881346A true CN104881346A (en) 2015-09-02
CN104881346B CN104881346B (en) 2019-02-15

Family

ID=53948850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510218747.9A Active CN104881346B (en) 2015-04-30 2015-04-30 The detection method and device of a kind of mobile terminal and its application program power consumption

Country Status (1)

Country Link
CN (1) CN104881346B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105467329A (en) * 2016-01-25 2016-04-06 上海斐讯数据通信技术有限公司 Terminal endurance testing system and terminal endurance testing method
CN105764085A (en) * 2016-02-15 2016-07-13 努比亚技术有限公司 Abnormal electricity consumption detection method and terminal
CN105891719A (en) * 2016-03-28 2016-08-24 联想(北京)有限公司 Electronic equipment and method for predicting duration time of battery
CN106708696A (en) * 2016-07-01 2017-05-24 腾讯科技(深圳)有限公司 Method and device for detecting power consumption of function in mobile terminal application program
CN107729236A (en) * 2017-09-30 2018-02-23 努比亚技术有限公司 Management method, device, mobile terminal and the storage medium of application program
CN108647127A (en) * 2018-05-04 2018-10-12 腾讯科技(深圳)有限公司 Using power consumption monitoring method and device
CN110134219A (en) * 2019-05-13 2019-08-16 深圳传音通讯有限公司 Application program backstage power consumption processing method and processing device
CN113268131A (en) * 2020-02-14 2021-08-17 北京小米移动软件有限公司 Method, apparatus and medium for predicting endurance information

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090177791A1 (en) * 2008-01-09 2009-07-09 Microsoft Corporation Remote device communication platform user interface
CN103425577A (en) * 2012-05-25 2013-12-04 腾讯科技(深圳)有限公司 Test method and device
CN104298335A (en) * 2013-07-19 2015-01-21 贝壳网际(北京)安全技术有限公司 Application program process cleaning method and device of mobile terminal and mobile terminal
CN104320751A (en) * 2014-10-14 2015-01-28 浙江大学 Article searching method based on Bluetooth signal strength

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090177791A1 (en) * 2008-01-09 2009-07-09 Microsoft Corporation Remote device communication platform user interface
CN103425577A (en) * 2012-05-25 2013-12-04 腾讯科技(深圳)有限公司 Test method and device
CN104298335A (en) * 2013-07-19 2015-01-21 贝壳网际(北京)安全技术有限公司 Application program process cleaning method and device of mobile terminal and mobile terminal
CN104320751A (en) * 2014-10-14 2015-01-28 浙江大学 Article searching method based on Bluetooth signal strength

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
初级码农: "Android应用的电量消耗和优化的策略", 《安卓巴士》 *
现代快报: "谁是电池杀手30款Android主流app耗电量大揭", 《和讯科技》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105467329A (en) * 2016-01-25 2016-04-06 上海斐讯数据通信技术有限公司 Terminal endurance testing system and terminal endurance testing method
CN105764085A (en) * 2016-02-15 2016-07-13 努比亚技术有限公司 Abnormal electricity consumption detection method and terminal
CN105891719A (en) * 2016-03-28 2016-08-24 联想(北京)有限公司 Electronic equipment and method for predicting duration time of battery
CN105891719B (en) * 2016-03-28 2019-07-26 联想(北京)有限公司 The method of electronic equipment and expected battery cruise duration
CN106708696A (en) * 2016-07-01 2017-05-24 腾讯科技(深圳)有限公司 Method and device for detecting power consumption of function in mobile terminal application program
CN107729236A (en) * 2017-09-30 2018-02-23 努比亚技术有限公司 Management method, device, mobile terminal and the storage medium of application program
CN108647127A (en) * 2018-05-04 2018-10-12 腾讯科技(深圳)有限公司 Using power consumption monitoring method and device
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
CN113268131A (en) * 2020-02-14 2021-08-17 北京小米移动软件有限公司 Method, apparatus and medium for predicting endurance information
CN113268131B (en) * 2020-02-14 2024-01-09 北京小米移动软件有限公司 Method, device and medium for predicting endurance information

Also Published As

Publication number Publication date
CN104881346B (en) 2019-02-15

Similar Documents

Publication Publication Date Title
CN104881346A (en) Mobile terminal and detection method and device of power consumption of applications
CN105094643A (en) Page display control method and device
CN104898961A (en) Application rapid starting method and apparatus
CN105101366A (en) Mobile terminal control method and mobile terminal
CN104898970A (en) Volume control method and apparatus
CN104980588A (en) Method and apparatus for detecting state of mobile terminal
CN104850443A (en) Method for shutting down false start-up application program and mobile terminal
CN105159700A (en) Application self-start control apparatus and method
CN105045502A (en) Image processing method and image processing device
CN104915111A (en) Method and device for operating and controlling terminal
CN104916270A (en) Method for adjusting screen brightness and device thereof
CN104820555A (en) Transverse and vertical screen modes switching method and device, and terminal
CN104968033A (en) Terminal network processing method and apparatus
CN105100416A (en) Event reminding method and wearable device
CN104993180A (en) Terminal charging method and device
CN105353947A (en) Mobile terminal and application display content controlling method
CN105095051A (en) Method and device for reminding working state of background application program
CN105101264A (en) Method and device for monitoring state of terminal network
CN104951236A (en) Wallpaper configuration method for terminal device, and terminal device
CN104881218A (en) Mobile terminal screen scrolling method and mobile terminal screen scrolling device
CN104850325A (en) Mobile terminal application processing method and device
CN105094893A (en) Method, equipment and system for installing payment application program
CN104898940A (en) Picture processing method and device
CN104917891A (en) Mobile terminal and page-turning control method thereof
CN104951229A (en) Screen capturing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant