CN109309953A - Consumption detection method, apparatus, terminal and readable storage medium storing program for executing - Google Patents
Consumption detection method, apparatus, terminal and readable storage medium storing program for executing Download PDFInfo
- Publication number
- CN109309953A CN109309953A CN201811455108.4A CN201811455108A CN109309953A CN 109309953 A CN109309953 A CN 109309953A CN 201811455108 A CN201811455108 A CN 201811455108A CN 109309953 A CN109309953 A CN 109309953A
- Authority
- CN
- China
- Prior art keywords
- terminal
- power consumption
- game
- innings
- games
- 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
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 53
- 238000000034 method Methods 0.000 claims abstract description 196
- 230000005611 electricity Effects 0.000 claims abstract description 102
- 230000009183 running Effects 0.000 claims description 21
- 230000007812 deficiency Effects 0.000 claims description 17
- 238000010586 diagram Methods 0.000 description 22
- 230000006870 function Effects 0.000 description 15
- 230000006854 communication Effects 0.000 description 12
- 238000004891 communication Methods 0.000 description 11
- 241001269238 Data Species 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 238000010295 mobile communication Methods 0.000 description 3
- 230000005764 inhibitory process Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000005314 correlation function Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000000149 penetrating effect Effects 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 230000005236 sound signal Effects 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. TPC [Transmission Power Control], power saving or power classes
- H04W52/02—Power saving arrangements
- H04W52/0209—Power saving arrangements in terminal devices
- H04W52/0261—Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3206—Monitoring of events, devices or parameters that trigger a change in power modality
- G06F1/3212—Monitoring battery levels, e.g. power saving mode being initiated when battery voltage goes below a certain level
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Power Sources (AREA)
- Telephone Function (AREA)
Abstract
The invention discloses a kind of consumption detection methods, this method comprises: the application program being currently up in detecting terminal has multiple operation processes;Then obtain history power consumption data and corresponding operation process number of the application program in the terminal in predetermined period;Obtain total power consumption weight of terminal current operating environment and the current residual electricity of the terminal;According to the history power consumption data of the application program, the operation process number, total power consumption weight of terminal current operating environment and the current residual electricity of the terminal, the whether enough application programs of remaining capacity for detecting the terminal run a process.The invention also discloses a kind of device, a kind of terminal and a kind of readable storage medium storing program for executing.The present invention is able to detect the whether enough application programs of assessment terminal residual electricity and runs a process.
Description
Technical field
The present invention relates to consumption detection method, apparatus, field of terminal technology more particularly to consumption detection method, apparatus, end
End and readable storage medium storing program for executing.
Background technique
As application program is continually developed in terminal, more and more users like playing application program in the terminal, answer
With program, power consumption is larger in the process of running, and the overwhelming majority power supply of terminal is provided by its battery, when electricity is lower than pre-
If but can not accurately inform that the application program with multiple operation processes can or can not continue to run a process when value,
Or the remaining time of application program can be used in remaining capacity, and such as: games, when remaining capacity is lower than preset value, user
Do not know whether enough its continues to have run a game process remaining capacity, if user selects to continue game, terminal
It may shut down because of not enough power supply and suddenly, game interruption is caused to lose match, on the other hand, user is as worry
Shutdown, uneasy continuation game and the level for influencing game.
Summary of the invention
It is a primary object of the present invention to propose a kind of consumption detection method, terminal and readable storage medium storing program for executing, it is intended to detect
It assesses the whether enough application programs of terminal residual electricity and runs a process.
To achieve the above object, the present invention provides a kind of consumption detection method, and described method includes following steps:
Whether the application program being currently up in detecting terminal has multiple operation processes;
If so, obtaining history power consumption data and corresponding fortune of the application program in the terminal in predetermined period
Traveling number of passes;
Obtain total power consumption weight of terminal current operating environment and the current residual electricity of the terminal;
According to total consumption of the history power consumption data of the application program, the operation process number, terminal current operating environment
The current residual electricity of electric weight and the terminal detects the whether enough application program operations one of remaining capacity of the terminal
A process.
Optionally, the history power consumption data and correspondence for obtaining the application program in the terminal in predetermined period
Operation process number step before, further includes:
Judge whether the remaining capacity of the terminal is lower than preset value, if so, thening follow the steps: obtaining the application program
History power consumption data and corresponding operation process number in the terminal in predetermined period.
Optionally, the application program is the games with more innings of game running processes;
Then history power consumption data and corresponding operation process number of the application program in the terminal in predetermined period
The step of are as follows: history power consumption data and corresponding game inning of the games in the terminal in predetermined period;
History power consumption data of the games in the terminal in predetermined period includes: the games in institute
State single innings of operation duration in terminal in predetermined period, the power consumption of corresponding most short single innings of game, corresponding longest game
Power consumption and corresponding total power consumption.
Optionally, according to the history power consumption data of the games, the game inning, terminal current operating environment
The current residual electricity of total power consumption weight and the terminal detects the whether enough games fortune of remaining capacity of the terminal
The step of one innings of game process of row, comprising:
When the current remaining capacity of terminal is greater than or equal to the power consumption of single innings of game of the longest, then detects and judge institute
The enough games of current residual electricity for stating terminal run one innings of game process;When the electricity of terminal current residual is less than or waits
When the power consumption of most short single innings of game, then detects and judge that the remaining capacity deficiency games of the terminal run one innings of game
Process;
When the current remaining capacity of terminal is less than the power consumption of single innings of game of the longest and is greater than the most short single innings of trip
When the power consumption of play, then according to the operation duration in the games in the terminal predetermined period, total power consumption and corresponding
Game inning calculates the duration average value and single innings of game process power consumption average value of single innings of game of the games;
According to formula: when the total power consumption weight of current residual electricity-current operating environment of the terminal × mono- innings of game
Long average value=residue game charge value calculates remaining game charge value, when remaining game charge value is greater than or equal to single innings of game
When power consumption average value, then detects and judges that the enough games of the current residual electricity of the terminal run one innings of game process,
When remaining game charge value is less than single innings of game power consumption average value, then detects and judge that the terminal current residual electricity is insufficient
Games run one innings of game process.
Optionally, according to the history power consumption data of the games, the game inning, terminal current operating environment
The current residual electricity of total power consumption weight and the terminal detects the whether enough games fortune of remaining capacity of the terminal
The step of one innings of game process of row, comprising:
When the current remaining capacity of terminal is greater than or equal to the power consumption of single innings of game of the longest, described in detection judgement
The enough games of the current residual electricity of terminal run one innings of game process;When the electricity of terminal current residual is less than or equal to
When the power consumption of most short single innings of game, detection judge the terminal remaining capacity deficiency games operation one innings of game into
Journey;
When the current remaining capacity of terminal is less than the power consumption of single innings of game of the longest and is greater than the most short single innings of trip
When the power consumption of play, then according to the history run duration in the games in the terminal predetermined period, the total power consumption
With the game inning, the duration average value of single innings of game of the games, the unit time consumption of the games are calculated
Electricity;
According to formula: (the total power consumption weight of terminal current operating environment+unit time power consumption) × mono- innings of game
Duration average value=terminal estimates game consumption charge value, and terminal estimates game consumption charge value and is greater than the terminal residual electricity
When value, then detects and judge that the terminal current residual electricity deficiency games run one innings of game process, when terminal estimates trip
When play consumption charge value is less than or equal to the terminal residual charge value, then detects and judge that the terminal current residual electricity is enough
Games run one innings of game process.
Optionally, described according to formula: (the total power consumption weight of terminal current operating environment+unit time power consumption) ×
Duration average value=terminal of single innings of game estimates game consumption charge value, and terminal estimates game consumption charge value and is greater than the end
When holding residual electric quantity, then detects and judge that the terminal current residual electricity deficiency games run one innings of game process, when
When terminal estimates game consumption charge value less than or equal to the terminal residual charge value, then detects and judge that the terminal currently remains
After the step of remaining enough games of electricity run one innings of game process, further includes:
If the remaining capacity of the terminal is that inadequate games run one innings of game process, when according to the unit
Between the current residual electricity of power consumption, total power consumption weight of terminal current operating environment and the terminal to calculate the terminal surplus
Remaining electricity uses the time.
Optionally, according to the history power consumption data of the application program, the operation process number, terminal current operating environment
Total power consumption weight and the terminal current residual electricity, judge the whether enough application programs of the remaining capacity of the terminal
After the step of running a process, further includes:
Show whether the remaining capacity of the terminal under the operating status of the application program answers enough by prompting window
The prompt information of a process is run with program.
In addition, to achieve the above object, the present invention also provides a kind of consumption detection devices, comprising:
Detecting module: for detecting whether the application program being currently up in terminal has operation process;
First acquisition module: history power consumption data of the application program in the terminal in predetermined period and right is obtained
The operation process number answered;
Second acquisition module: total power consumption weight and the current of the terminal for obtaining terminal current operating environment remain
Remaining electricity;
Judgment module: for according to the operation process number of the history power consumption data of the application program, current application program,
Total power consumption weight of terminal current operating environment and the current residual electricity of the terminal, judge the remaining capacity of the terminal
Whether enough application programs run a process.
In addition, to achieve the above object, the present invention also provides a kind of terminal, the terminal include: memory, processor and
It is stored in the consumption detection program that can be run on the memory and on the processor, the consumption detection program is described
It realizes when processor executes such as the step of above-mentioned consumption detection method.
In addition, to achieve the above object, the present invention also provides a kind of readable storage medium storing program for executing, being deposited on the readable storage medium storing program for executing
Consumption detection program is contained, the consumption detection program realizes the step of consumption detection method as described above when being executed by processor
It is rapid:
The present invention, which detects the application program being currently up in terminal, has multiple operation processes;Then obtain the application program
History power consumption data and corresponding operation process number in the terminal in predetermined period;Obtain terminal current operating environment
The current residual electricity of total power consumption weight and the terminal;According to the history power consumption data of the application program, the operation
Process number, total power consumption weight of terminal current operating environment and the current residual electricity of the terminal, detect the terminal
The whether enough application programs of remaining capacity run a process.By the above-mentioned means, the present invention is capable of the residue electricity of computing terminal
Whether enough application programs run a process to amount, so that user is will be seen that the remaining capacity situation of terminal, and can be at first
Interior adjustment uses application behavior, will not lose data because of the application program that shutdown interrupts.
Detailed description of the invention
A kind of hardware structural diagram of Fig. 1 terminal of each embodiment to realize the present invention;
Fig. 2 is a kind of communications network system architecture diagram provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of consumption detection method first embodiment of the present invention;
Fig. 4 is the flow diagram of consumption detection method second embodiment of the present invention;
Fig. 5 is the flow diagram of consumption detection method 3rd embodiment of the present invention;
Fig. 6 is the flow diagram of consumption detection method fourth embodiment of the present invention;
Fig. 7 is the flow diagram of the 5th embodiment of consumption detection method of the present invention;
Fig. 8 is the flow diagram of consumption detection method sixth embodiment of the present invention;
Fig. 9 is the flow diagram of the 7th embodiment of consumption detection method of the present invention;
The structural schematic diagram of Figure 10 consumption detection device of the present invention;
Figure 11 is the structural schematic diagram of the consumption detection device of another embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element
Be conducive to explanation of the invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix
Ground uses.
Terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as mobile phone, plate
Computer, laptop, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable
Media player (Portable Media Player, PMP), navigation device, wearable device, Intelligent bracelet, pedometer etc. are eventually
End, and the fixed terminals such as number TV, desktop computer.
It will be illustrated by taking terminal as an example in subsequent descriptions, it will be appreciated by those skilled in the art that in addition to being used in particular for
Except the element of mobile purpose, the construction of embodiment according to the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, a kind of hardware structural diagram of its terminal of each embodiment to realize the present invention, the terminal
100 may include: RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103, A/V
(audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, storage
The components such as device 109, processor 110 and power supply 111.It will be understood by those skilled in the art that terminal structure shown in Fig. 1
The not restriction of structure paired terminal, terminal may include than illustrating more or fewer components, perhaps combine certain components or
Different component layouts.
It is specifically introduced below with reference to all parts of the Fig. 1 to terminal:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal sends and receivees, specifically, by base station
Downlink information receive after, to processor 110 handle;In addition, the data of uplink are sent to base station.In general, radio frequency unit 101
Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrating
Frequency unit 101 can also be communicated with network and other equipment by wireless communication.Any communication can be used in above-mentioned wireless communication
Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications
System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code
DivisionMultiple Access 2000, CDMA 2000), WCDMA (Wi deband Code Division
Multiple Access, wideband code division multiple access), TD-SCDMA (Time Division-Synchronous Code
Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division
Duplexing-Long Term Evolution, frequency division duplex long term evolution) and TDD-LTE (Time Division
Duplexing-Long Term Evolution, time division duplex long term evolution) etc..
WiFi belongs to short range wireless transmission technology, and terminal can help user's transceiver electronics postal by WiFi module 102
Part, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 1 is shown
WiFi module 102, but it is understood that, and it is not belonging to must be configured into for terminal, it can according to need do not changing completely
Become in the range of the essence of invention and omits.
Audio output unit 103 can be in call signal reception pattern, call mode, logging mode, language in terminal 100
It is radio frequency unit 101 or WiFi module 102 is received or depositing when under the isotypes such as sound recognition mode, broadcast reception mode
The audio data stored in reservoir 109 is converted into audio signal and exports to be sound.Moreover, audio output unit 103 may be used also
To provide audio output relevant to the specific function that terminal 100 executes (for example, call signal receives sound, message sink sound
Sound etc.).Audio output unit 103 may include loudspeaker, buzzer etc..
A/V input unit 104 is for receiving audio or video signal.A/V input unit 104 may include graphics processor
(Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode
Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out
Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited
Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike
Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042
Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can
To be converted to the format output that can be sent to mobile communication base station via radio frequency unit 101 in the case where telephone calling model.
Microphone 1042 can be implemented various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition)
The noise generated during frequency signal or interference.
Terminal 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other sensors.
Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light
Light and shade adjusts the brightness of display panel 1061, and proximity sensor can close display panel when terminal 100 is moved in one's ear
1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (generally three axis) and add
The size of speed can detect that size and the direction of gravity when static, can be used to identify application (such as the horizontal/vertical screen of mobile phone posture
Switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Also as mobile phone
Configurable fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, hygrometer, temperature
The other sensors such as meter, infrared sensor, details are not described herein.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap
Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used
Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 1061.
User input unit 107 can be used for receiving the number or character information of input, and generates and set with the user of terminal
It sets and the related key signals of function control inputs.Specifically, user input unit 107 may include touch panel 1071 and its
His input equipment 1072.Touch panel 1071, also referred to as touch screen collect the touch operation (ratio of user on it or nearby
Such as user is using finger, stylus any suitable object or attachment on touch panel 1071 or near touch panel 1071
Operation), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touch detecting apparatus
With two parts of touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation bring
Signal transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and it is converted
At contact coordinate, then processor 110 is given, and order that processor 110 is sent can be received and executed.Furthermore, it is possible to adopt
Touch panel 1071 is realized with multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch panel
1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap
It includes but is not limited in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc.
It is one or more, specifically herein without limitation.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or
After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing
The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel
1061 be the function that outputs and inputs of realizing terminal as two independent components, but in some embodiments it is possible to will
Touch panel 1071 and display panel 1061 integrate and realize the function that outputs and inputs of terminal, specifically herein without limitation.
Interface unit 108 be used as at least one external device (ED) connect with terminal 100 can by interface.For example, external
Device may include wired or wireless headphone port, external power supply (or battery charger) port, wired or wireless number
According to port, memory card port, port, the port audio input/output (I/O), view for connecting the device with identification module
The port frequency I/O, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, data are believed
Breath, electric power etc.) and by one or more elements that the input received is transferred in terminal 100 or can be used at end
Data are transmitted between end 100 and external device (ED).
Memory 109 can be used for storing software program and various data.Memory 109 can mainly include storing program area
The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function
Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as
Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, it can also include non-easy
The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of terminal, using the various pieces of various interfaces and the entire terminal of connection, is led to
It crosses operation or executes the software program and/or module being stored in memory 109, and call and be stored in memory 109
Data execute the various functions and processing data of terminal, to carry out integral monitoring to terminal.Processor 110 may include one
Or multiple processing units;Preferably, processor 110 can integrate application processor and modem processor, wherein application processing
The main processing operation system of device, user interface and application program etc., modem processor mainly handles wireless communication.It can manage
Solution, above-mentioned modem processor can not also be integrated into processor 110.
Terminal 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111 can be with
It is logically contiguous by power-supply management system and processor 110, thus by power-supply management system realize management charging, electric discharge, with
And the functions such as power managed.
Although Fig. 1 is not shown, terminal 100 can also be including bluetooth module etc., and details are not described herein.
Based on above-mentioned terminal hardware structure, each embodiment of terminal of the present invention is proposed.
Fig. 1 is please referred to, in an embodiment of terminal of the present invention, which includes: memory 109, processor 110 and deposit
Store up the consumption detection program that can be run on the memory 109 and on the processor 110, the consumption detection program quilt
The processor 110 performs the steps of when executing
Whether the application program being currently up in detecting terminal has multiple operation processes;
If so, obtaining history power consumption data and corresponding fortune of the application program in the terminal in predetermined period
Traveling number of passes;
Obtain total power consumption weight of terminal current operating environment and the current residual electricity of the terminal;
According to total consumption of the history power consumption data of the application program, the operation process number, terminal current operating environment
The current residual electricity of electric weight and the terminal detects the whether enough application program operations one of remaining capacity of the terminal
A process.
Further, the history power consumption data for obtaining the application program in the terminal in predetermined period and right
Before the step for the operation process number answered, further includes:
Judge whether the remaining capacity of the terminal is lower than preset value, if so, thening follow the steps: obtaining the application program
History power consumption data and corresponding operation process number in the terminal in predetermined period.
Further, the application program is the games with more innings of game running processes;
Then history power consumption data and corresponding operation process number of the application program in the terminal in predetermined period
The step of are as follows: history power consumption data and corresponding game inning of the games in the terminal in predetermined period;
History power consumption data of the games in the terminal in predetermined period includes: the games in institute
State single innings of operation duration in terminal in predetermined period, the power consumption of corresponding most short single innings of game, corresponding longest game
Power consumption and corresponding total power consumption.
Further, according to the history power consumption data of the games, the game inning, terminal current operating environment
Total power consumption weight and the terminal current residual electricity, detect the whether enough games of remaining capacity of the terminal
The step of running one innings of game process, comprising:
When the current remaining capacity of terminal is greater than or equal to the power consumption of single innings of game of the longest, then detects and judge institute
The enough games of current residual electricity for stating terminal run one innings of game process;When the electricity of terminal current residual is less than or waits
When the power consumption of most short single innings of game, then detects and judge that the remaining capacity deficiency games of the terminal run one innings of game
Process;
When the current remaining capacity of terminal is less than the power consumption of single innings of game of the longest and is greater than the most short single innings of trip
When the power consumption of play, then according to the operation duration in the games in the terminal predetermined period, total power consumption and corresponding
Game inning calculates the duration average value and single innings of game process power consumption average value of single innings of game of the games;
According to formula: when the total power consumption weight of current residual electricity-current operating environment of the terminal × mono- innings of game
Long average value=residue game charge value calculates remaining game charge value, when remaining game charge value is greater than or equal to single innings of game
When power consumption average value, then detects and judges that the enough games of the current residual electricity of the terminal run one innings of game process,
When remaining game charge value is less than single innings of game power consumption average value, then detects and judge that the terminal current residual electricity is insufficient
Games run one innings of game process.
Further, according to the history power consumption data of the games, the game inning, terminal current operating environment
Total power consumption weight and the terminal current residual electricity, detect the whether enough games of remaining capacity of the terminal
The step of running one innings of game process, comprising:
When the current remaining capacity of terminal is greater than or equal to the power consumption of single innings of game of the longest, described in detection judgement
The enough games of the current residual electricity of terminal run one innings of game process;When the electricity of terminal current residual is less than or equal to
When the power consumption of most short single innings of game, detection judge the terminal remaining capacity deficiency games operation one innings of game into
Journey;
When the current remaining capacity of terminal is less than the power consumption of single innings of game of the longest and is greater than the most short single innings of trip
When the power consumption of play, then according to the history run duration in the games in the terminal predetermined period, the total power consumption
With the game inning, the duration average value of single innings of game of the games, the unit time consumption of the games are calculated
Electricity;
According to formula: (the total power consumption weight of terminal current operating environment+unit time power consumption) × mono- innings of game
Duration average value=terminal estimates game consumption charge value, and terminal estimates game consumption charge value and is greater than the terminal residual electricity
When value, then detects and judge that the terminal current residual electricity deficiency games run one innings of game process, when terminal estimates trip
When play consumption charge value is less than or equal to the terminal residual charge value, then detects and judge that the terminal current residual electricity is enough
Games run one innings of game process.
Further, described according to formula: (the total power consumption weight of terminal current operating environment+unit time power consumption)
Duration average value=terminal of × mono- innings of game estimates game consumption charge value, and terminal estimates game consumption charge value greater than described
When terminal residual charge value, then detects and judges that the terminal current residual electricity deficiency games run one innings of game process,
When terminal, which estimates game consumption charge value, is less than or equal to the terminal residual charge value, then detects and judge that the terminal is current
After the step of enough games of remaining capacity run one innings of game process, further includes:
If the remaining capacity of the terminal is that inadequate games run one innings of game process, when according to the unit
Between the current residual electricity of power consumption, total power consumption weight of terminal current operating environment and the terminal to calculate the terminal surplus
Remaining electricity uses the time.
Further, ring is currently run according to the history power consumption data of the application program, the operation process number, terminal
Whether total power consumption weight in border and the current residual electricity of the terminal judge the remaining capacity of the terminal enough using journey
After the step of one process of sort run, further includes:
Show whether the remaining capacity of the terminal under the operating status of the application program answers enough by prompting window
The prompt information of a process is run with program.
The specific embodiment of terminal of the present invention and each specific embodiment of following consumption detection methods are essentially identical, herein not
It repeats.
Embodiment to facilitate the understanding of the present invention, the communications network system being based below to terminal of the invention are retouched
It states.
Referring to Fig. 2, Fig. 2 is a kind of communications network system architecture diagram provided in an embodiment of the present invention, the communication network system
System is the LTE system of universal mobile communications technology, which includes UE (User Equipment, the use of successively communication connection
Family equipment) (the land Evolved UMTS Terrestrial Radio Access Network, evolved UMTS 201, E-UTRAN
Ground wireless access network) 202, EPC (Evolved Packet Core, evolved packet-based core networks) 203 and operator IP operation
204。
Specifically, UE201 can be above-mentioned terminal 100, and details are not described herein again.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning
Journey (backhaul) (such as X2 interface) is connect with other eNodeB2022, and eNodeB2021 is connected to EPC203,
ENodeB2021 can provide the access of UE201 to EPC203.
EPC203 may include MME (Mobility Management Entity, mobility management entity) 2031, HSS
(Home Subscriber Server, home subscriber server) 2032, other MME2033, SGW (Serving Gate Way,
Gateway) 2034, PGW (PDN Gate Way, grouped data network gateway) 2035 and PCRF (Policy and
Charging Rules Function, policy and rate functional entity) 2036 etc..Wherein, MME2031 be processing UE201 and
The control node of signaling, provides carrying and connection management between EPC203.HSS2032 is all to manage for providing some registers
Such as the function of home location register (not shown) etc, and preserves some related service features, data rates etc. and use
The dedicated information in family.All customer data can be sent by SGW2034, and PGW2035 can provide the IP of UE 201
Address distribution and other functions, PCRF2036 are strategy and the charging control strategic decision-making of business data flow and IP bearing resource
Point, it selects and provides available strategy and charging control decision with charge execution function unit (not shown) for strategy.
IP operation 204 may include internet, Intranet, IMS (IP Multimedia Subsystem, IP multimedia
System) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art should know the present invention is not only
Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with
And the following new network system etc., herein without limitation.
Based on above-mentioned terminal hardware structure and communications network system, each embodiment of the method for the present invention is proposed.
The present invention provides a kind of consumption detection method.It is consumption detection method first embodiment of the present invention referring to Fig. 3, Fig. 3
Flow diagram, be based on above-mentioned embodiment shown in Fig. 3, which comprises
Step S10, detects whether the application program being currently up in terminal has multiple operation processes;
Whether the application program being currently up in detecting terminal has multiple operation processes, so as to Accurate Prediction at this
Under application program running state, the whether enough users of the remaining capacity of terminal reuse an operation process of application program, and
It is supplied to user, whether is further continued for avoiding using application program because application program is being run so that user can reasonably select
The case where forcing to stop because of not enough power supply in the process, leading to existing loss of data, the user experience is improved.
Step S20 obtains history power consumption data of the application program in the terminal in predetermined period and corresponding
Operation process number;
In embodiment, it obtains the application program and runs process number and history power consumption data in the terminal, apply
Program history power consumption data is that operation duration and corresponding total power consumption and corresponding longest run process in predetermined period
The power consumption datas such as power consumption of power consumption, corresponding most short operation process;Wherein, the above-mentioned history power consumption data in predetermined period
Can by system in application program operational process record queries.
The single operation process of the application program is obtained divided by the operation process number with the total power consumption in terminal
Power consumption average value;The application program list is calculated divided by the operation process number by the operation duration of the application program
The duration average value of one operation process;The total power consumption obtains application program unit time power consumption divided by operation duration.
Step S30 obtains total power consumption weight of terminal current operating environment and the current residual electricity of the terminal;
Terminal current operating environment includes one of network environment, hardware environment and running background program of the terminal
Or it is a variety of.Such as: internetwork connection mode, screen intensity, CPU, other programs of running background etc..
System can provide accounting for for the power consumption of the total power consumption condition of system and various hardware devices (such as CPU, screen, network etc.)
Than;
The determination method of total power consumption weight of terminal current operating environment: according to identification informations such as the brand of terminal, models
And operating system, network environment, hardware environment and the corresponding power consumption weight of running background program of terminal are inquired respectively, by terminal
Network environment, hardware environment power consumption weight corresponding with running background program be added, obtain total power consumption of current operating environment
Weight.
Step S40 currently runs ring according to the history power consumption data of the application program, the operation process number, terminal
Whether total power consumption weight in border and the current residual electricity of the terminal detect the remaining capacity of the terminal enough using journey
One process of sort run.
According to the history power consumption data of the application program, corresponding operation process number, application history power consumption data
The power consumption of process, corresponding most short operation are run for history run duration and corresponding total power consumption and corresponding longest
The power consumption datas such as the power consumption of process;The application program is obtained divided by the operation process number with the total power consumption in terminal
Single operation process power consumption average value;It is calculated by the operation duration of the application program divided by the operation process number
To the duration average value of the single operation process of the application program;The total power consumption obtains this using journey divided by history run duration
Sequence unit time power consumption.
The power consumption, single of the power consumption of process, most short operation process can be run based on the application program longest as a result,
The power consumption average value of operation process, the duration average value of single operation process, unit time power consumption, terminal currently run ring
Whether total power consumption weight in border and the current residual electricity of the terminal calculate the remaining capacity of the terminal enough using journey
One process of sort run.
It further, is the flow diagram of consumption detection method second embodiment of the present invention referring to Fig. 4, Fig. 4.Based on upper
Embodiment shown in Fig. 4 is stated, before step S20, further includes:
Step S50, judges whether the remaining capacity of the terminal is lower than preset value, if so, S20 is thened follow the steps,
When the remaining capacity of terminal is lower than preset value, that is, when there is the low prompt value of electricity, then obtain application program
History power consumption data and operation process number.
It further, is the flow diagram of consumption detection method 3rd embodiment of the present invention referring to Fig. 5, Fig. 5.Based on upper
Embodiment shown in fig. 5 is stated, the application program is the games with more innings of game running processes;
Then the step of S20 are as follows: step S21, history power consumption number of the games in the terminal in predetermined period
According to corresponding game inning;
History power consumption data of the games in the terminal in predetermined period includes: the games in institute
State single innings of operation duration in terminal in predetermined period, the power consumption of corresponding most short single innings of game, corresponding longest game
Power consumption and corresponding total power consumption.
Then the step of S40 are as follows: step S41, according to the history power consumption data of the games, the game inning, end
It holds total power consumption weight of current operating environment and the current residual electricity of the terminal, the remaining capacity for detecting the terminal is
No enough games run one innings of game process.
The application program is the games with more innings of game running processes, and the operation process number of application program is trip
The game inning for program of playing, amusement history power consumption data be the history run in predetermined period long and corresponding total power consumption, with
And the power consumption datas such as power consumption of the power consumption of corresponding single innings of game of longest, corresponding most short single innings of game;Based on above-mentioned
History power consumption data and game inning calculate the history power consumption condition of the games, current further combined with terminal as a result,
Total power consumption weight of running environment and the current residual electricity of the terminal judge the whether enough games fortune of remaining capacity
One innings of game process of row.
It further, is the flow diagram of consumption detection method fourth embodiment of the present invention referring to Fig. 6, Fig. 6.Based on upper
The embodiment shown in fig. 6 stated, S41 step, comprising:
Step S411, when the current remaining capacity of terminal is greater than or equal to the power consumption of single innings of game of the longest, then
Detection judges that the enough games of the current residual electricity of the terminal run one innings of game process;When the electricity of terminal current residual
When amount is less than or equal to the power consumption of most short single innings of game, then the remaining capacity deficiency games fortune for judging the terminal is detected
One innings of game process of row;
When the current residual electricity of terminal is less than the power consumption of the most short single innings of game of history run period in predetermined period
When, then it detects and judges that the remaining capacity deficiency games run one innings of game process, when the current residual electricity of terminal is big
When the power consumption of single innings of game of the longest of history run period in predetermined period, then detects and judge that the remaining capacity is swum enough
Program of playing runs one innings of game process, when remaining capacity is greater than or equal to the most short single innings of trip of history run period in predetermined period
The power consumption of play, and be less than or equal to predetermined period in the history run period single innings of game of longest power consumption when, then execute
Step S412 and step S413 are judged.
Step S412, when the current remaining capacity of terminal be less than the power consumption of single innings of game of the longest and be greater than it is described most
When the power consumption of short single innings of game, then according to the operation duration in the games in the terminal predetermined period, total power consumption
It is average with the power consumption of corresponding game inning, the duration average value and single innings of game that calculate single innings of game of the games
Value;
In embodiment, it is assumed that the time of predetermined period is starting game program current 1 week or 1 month, step
S21 obtains the operation duration of the games of record and corresponding total power consumption and corresponding inning in predetermined period, specifically,
Single innings of game of the games can be obtained with the total power consumption of the games in predetermined period divided by corresponding game inning
Power consumption average value, the operation duration of the games in predetermined period obtains the game divided by corresponding game inning
The average value of single innings of game duration of program;
Step S413, according to formula: the total power consumption weight of current residual electricity-current operating environment of the terminal × mono- innings
The duration average value of game=residue game charge value calculates remaining game charge value, when remaining game charge value is greater than or waits
When single innings of game power consumption average value, then detects and judge that the enough games of the current residual electricity of the terminal are run one innings
Game process then detects when remaining game charge value is less than single innings of game power consumption average value and judges that the terminal currently remains
Remaining not enough power supply games run one innings of game process.
Total power consumption weight of terminal current operating environment obtains terminal current operating environment i.e. multiplied by game duration average value
By the electricity of consumption;The current residual electricity of the terminal, which subtracts the terminal current operating environment and will consume electricity, to be remained
Remaining game charge value then detects judgement when power consumption average value of the remaining game charge value more than or equal to the single innings of game
The enough games of remaining capacity run one innings of game process, when remaining game charge value is less than the power consumption of single innings of game
Average value then detects and judges that the remaining capacity deficiency games run one innings of game process.Thus terminal residual electricity is obtained
Amount whether enough games run one innings of game process result it is more accurate, so as to draw to the more accurate use of user
Lead, avoid terminal because user it is offhand in the case where carry out game cause shutdown lose game, the user experience is improved.
It further, is the flow diagram of the 5th embodiment of consumption detection method of the present invention referring to Fig. 7, Fig. 7.Based on upper
The embodiment shown in Fig. 7 stated, S41 step, comprising:
S411 step, when the current remaining capacity of terminal is greater than or equal to the power consumption of single innings of game of the longest, then
Detection judges that the enough games of the current residual electricity of the terminal run one innings of game process;When the electricity of terminal current residual
When amount is less than or equal to the power consumption of most short single innings of game, then the remaining capacity deficiency games fortune for judging the terminal is detected
One innings of game process of row;
When the current residual electricity of terminal is less than the power consumption of the most short single innings of game of history run period in predetermined period
When, then it detects and judges that the inadequate games of the remaining capacity run one innings of game process, when the current residual electricity of terminal is big
When the power consumption of single innings of game of the longest of history run period in predetermined period, then detects and judge that the remaining capacity is swum enough
Program of playing runs one innings of game process, when remaining capacity is greater than or equal to the most short single innings of trip of history run period in predetermined period
The power consumption of play, and be less than or equal to predetermined period in the history run period single innings of game of longest power consumption when, then execute
Step S414 and step S415 are judged.
S414 step, when the current remaining capacity of terminal be less than the power consumption of single innings of game of the longest and be greater than it is described most
When the power consumption of short single innings of game, then according to the history run duration, described in the games in the terminal predetermined period
Total power consumption and the game inning calculate the duration average value of single innings of game of the games, the list of the games
Position time power consumption;
In embodiment, it is assumed that the time of predetermined period is 1 week or 1 month, step S21 before starting game program
Obtaining the operation duration of the games of record and corresponding total power consumption and corresponding inning in predetermined period can specifically use
The total power consumption of games in predetermined period obtains the unit time power consumption of the games divided by corresponding game duration
It measures, the operation duration of the games in predetermined period obtains single innings of game of the games divided by corresponding game inning
The average value of duration;
S415 step, according to formula: (the total power consumption weight of terminal current operating environment+unit time power consumption) × it is mono-
Duration average value=terminal of office's game estimates game consumption charge value, and computing terminal estimates game consumption charge value, works as terminal
When estimating game consumption charge value greater than the terminal residual charge value, then detects and judge that the terminal current residual electricity is insufficient
Games run one innings of game process, estimate game consumption charge value when terminal and are less than or equal to the terminal residual charge value
When, then it detects and judges that the enough games of the terminal current residual electricity run one innings of game process.
Total power consumption weight of terminal current operating environment obtains terminal plus the unit time power consumption of the games
Unit time power consumption, the terminal unit time power consumption, which multiplied by single innings of game duration average value obtains terminal, to be estimated game and disappears
Power consumption magnitude estimates game consumption charge value when terminal residual charge value is greater than or equal to terminal, then detects and judge the residue
The enough games of electricity run one innings of game process, and game is consumed charge value when terminal residual charge value is less than terminal,
It then detects and judges that the inadequate games of the remaining capacity run one innings of game process.Thus obtain whether remaining capacity swims enough
The result that program of playing runs one innings of game process is more accurate, so as to the use guidance more accurate to user, avoids terminal
Progress game causes shutdown to lose game in the case where because user is offhand, and the user experience is improved.
It further, is the flow diagram of consumption detection method sixth embodiment of the present invention referring to Fig. 8, Fig. 8.Based on upper
Fig. 8 embodiment stated, after S415 step, further includes:
If the remaining capacity of the terminal is that inadequate games run one innings of game process, when according to the unit
Between the current residual electricity of power consumption, total power consumption weight of terminal current operating environment and the terminal to calculate the terminal surplus
Remaining electricity uses the time.
If judge that the remaining capacity of the terminal not enough completes one innings of game, the total of terminal current operating environment is carried out
Power consumption weight obtains terminal unit time power consumption plus the unit time power consumption of the games, by the current surplus of terminal
Remaining electricity obtains the use time of terminal residual electricity divided by terminal unit time power consumption.It is possible thereby to further allow user
Solve terminal residual use the time, avoid terminal because user it is offhand in the case where carry out game cause shutdown lose game, mention
User experience is risen.
It further, is the flow diagram of the 7th embodiment of consumption detection method of the present invention referring to Fig. 9, Fig. 9.Based on upper
The embodiment illustrated in fig. 9 stated, after S40 step, further includes:
S60 step shows that the remaining capacity of the terminal under the operating status of the application program is by prompting window
No enough application programs run the prompt information of a process.
When the remaining capacity of terminal is lower than preset value, by reminding window to show terminal residual under application program running state
Whether electricity runs a process enough, or continues to use the use time of application program, and thereby, it is possible in not enough power supply
When, user can be reminded in time, so that user takes reasonable operation, a process will not be completed in application program
The loss for leading to service data is exited before, is shut down before not completing one innings such as game and is lost game.
The invention also provides a kind of consumption detection device, Figure 10 is the structural schematic diagram of consumption detection device of the present invention.
Based on above-mentioned embodiment shown in Fig. 10, described device include: detecting module 1, first obtain module 2, second obtain module and
Judgment module 4.
Detecting module 1: for detecting whether the application program being currently up in terminal has multiple operation processes;Detect mould
Block 1 detects whether the application program being currently up in terminal has multiple operation processes, so as to Accurate Prediction in the application
Under running state of programs, the whether enough users of the remaining capacity of terminal reuse an operation process of application program, and provide
To user, whether it is further continued for avoiding using application program because application program is in operational process so that user can reasonably select
It is middle to force to stop because of not enough power supply, lead to the case where showing loss of data, the user experience is improved.
First acquisition module 2: obtain history power consumption data of the application program in the terminal in predetermined period and
Corresponding operation process number;
First acquisition module 2 obtains the application program and runs process number and history power consumption data in the terminal, answers
It is operation duration and corresponding total power consumption and corresponding longest operation process in predetermined period with program history power consumption data
Power consumption, corresponding most short operation process the power consumption datas such as power consumption;Wherein, the above-mentioned history power consumption number in predetermined period
According to can by system in application program operational process record queries;
The single operation process of the application program is obtained divided by the operation process number with the total power consumption in terminal
Power consumption average value;The application program list is calculated divided by the operation process number by the operation duration of the application program
The duration average value of one operation process;The total power consumption obtains application program unit time power consumption divided by operation duration.
Second acquisition module: total power consumption weight and the current of the terminal for obtaining terminal current operating environment remain
Remaining electricity;
Second, which obtains module, obtains total power consumption weight of terminal current operating environment and the current residual electricity of the terminal
Amount;Terminal current operating environment includes one of network environment, hardware environment and running background program of the terminal or more
Kind.Such as: internetwork connection mode, screen intensity, CPU, other programs of running background etc., system can provide the total power consumption feelings of system
The accounting of the power consumption of condition and various hardware devices (such as CPU, screen, network etc.).
The determination method of total power consumption weight of terminal current operating environment: according to identification informations such as the brand of terminal, models
And operating system, network environment, hardware environment and the corresponding power consumption weight of running background program of terminal are inquired respectively, by terminal
Network environment, hardware environment power consumption weight corresponding with running background program be added, obtain total power consumption of current operating environment
Weight.
Judgment module 4: for the operation process according to the history power consumption data of the application program, current application program
Number, total power consumption weight of terminal current operating environment and the current residual electricity of the terminal, judge the residue of the terminal
The whether enough application programs of electricity run a process.
History power consumption data, corresponding operation process number of the judgment module 4 according to the application program, application history
Power consumption data is history run duration and corresponding total power consumption and corresponding longest runs the power consumption, corresponding of process
The power consumption datas such as the power consumption of most short operation process;It is somebody's turn to do with the total power consumption in terminal divided by the operation process number
The power consumption average value of the single operation process of application program;By the operation duration of the application program divided by the operation process
The duration average value of the single operation process of the application program is calculated in number;The total power consumption is obtained divided by history run duration
The application program unit time power consumption.
The power consumption, single of the power consumption of process, most short operation process can be run based on the application program longest as a result,
The power consumption average value of operation process, the duration average value of single operation process, unit time power consumption, terminal currently run ring
Whether total power consumption weight in border and the current residual electricity of the terminal calculate the remaining capacity of the terminal enough using journey
One process of sort run.
Further, referring to Fig.1 1, Figure 11 be another embodiment of the present invention consumption detection device structural schematic diagram:
On the basis of shown in Figure 11 further include: reminding module 5.
Reminding module 5 can be by reminding window show the remaining capacity of the terminal under the operating status of the application program
Whether an operation process is completed enough.
Process is run so as to carry out the whether enough application programs of remaining capacity to user, or is continued to use using journey
Sequence is reminded using the time, thereby, it is possible to when the power is insufficient, remind in time user, so that user adopts
Take reasonable operation, will not before application program does not complete an operation process bolter's service data loss.
The present invention also provides a kind of readable storage medium storing program for executing.
Consumption detection program is stored on readable storage medium storing program for executing of the present invention, when the consumption detection program is executed by processor
The step of realizing consumption detection method as described above.
Wherein, the consumption detection program run on the processor, which is performed realized method, can refer to the present invention
Consumption detection embodiment of the method, details are not described herein again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service
Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific
Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art
Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much
Form, all of these belong to the protection of the present invention.
Claims (10)
1. a kind of consumption detection method, which is characterized in that described method includes following steps:
Whether the application program being currently up in detecting terminal has multiple operation processes;
If so, obtain history power consumption data of the application program in the terminal in predetermined period and it is corresponding run into
Number of passes;
Obtain total power consumption weight of terminal current operating environment and the current residual electricity of the terminal;
It is weighed according to total power consumption of the history power consumption data of the application program, the operation process number, terminal current operating environment
The current residual electricity of value and the terminal, detect the terminal the whether enough application program of remaining capacity run one into
Journey.
2. consumption detection method as described in claim 1, which is characterized in that described to obtain the application program in the terminal
History power consumption data in middle predetermined period and before the step of corresponding operation process number, further includes:
Judge whether the remaining capacity of the terminal is lower than preset value, if so, thening follow the steps: obtaining the application program in institute
State the history power consumption data and corresponding operation process number in terminal in predetermined period.
3. consumption detection method as described in claim 1, which is characterized in that the application program is with more innings of game runnings
The games of process;
The then step of history power consumption data and corresponding operation process number of the application program in the terminal in predetermined period
Suddenly are as follows: history power consumption data and corresponding game inning of the games in the terminal in predetermined period;
History power consumption data of the games in the terminal in predetermined period includes: the games at the end
The power consumption of operation duration, corresponding most short single innings of game in end in predetermined period, the single innings of game of corresponding longest power consumption
Amount and corresponding total power consumption;
Then it is described according to the history power consumption data of the application program, the operation process number, terminal current operating environment it is total
The current residual electricity of power consumption weight and the terminal detects the whether enough application program operations of remaining capacity of the terminal
One process are as follows: according to the history power consumption data of the games, the game inning, total consumption of terminal current operating environment
The current residual electricity of electric weight and the terminal detects the whether enough games operations one of remaining capacity of the terminal
Office's game process.
4. consumption detection method as claimed in claim 3, which is characterized in that according to the history power consumption number of the games
According to, total power consumption weight of the game inning, terminal current operating environment and the current residual electricity of the terminal, institute is detected
State the step of whether enough games of remaining capacity of terminal run one innings of game process, comprising:
When the current remaining capacity of terminal is greater than or equal to the power consumption of single innings of game of the longest, then detects and judge the end
The enough games of the current residual electricity at end run one innings of game process;When the electricity of terminal current residual is less than or equal to most
When the power consumption of short single innings of game, then detect judge the terminal remaining capacity deficiency games run one innings of game into
Journey;
When the current remaining capacity of terminal is less than the power consumption of single innings of game of the longest and is greater than the most short single innings of game
When power consumption, then according to operation duration, total power consumption and the corresponding game in the games in the terminal predetermined period
Inning calculates the duration average value and single innings of game power consumption average value of single innings of game of the games;
According to formula: the total power consumption weight of current residual electricity-current operating environment of the terminal × mono- innings of game duration is flat
Mean value=residue game charge value calculates remaining game charge value, when remaining game charge value is consumed more than or equal to single innings of game
When electricity average value, then detects and judge that the enough games of the current residual electricity of the terminal run one innings of game process, when
When remaining game charge value is less than single innings of game power consumption average value, then detects and judge the terminal current residual electricity deficiency trip
Program of playing runs one innings of game process.
5. consumption detection method as claimed in claim 3, which is characterized in that according to the history power consumption number of the games
According to, total power consumption weight of the game inning, terminal current operating environment and the current residual electricity of the terminal, institute is detected
State the step of whether enough games of remaining capacity of terminal run one innings of game process, comprising:
When the current remaining capacity of terminal is greater than or equal to the power consumption of single innings of game of the longest, detection judges the terminal
The enough games of current residual electricity run one innings of game process;When the electricity of terminal current residual is less than or equal to most short
When the power consumption of single innings of game, detection judges that the remaining capacity deficiency games of the terminal run one innings of game process;
When the current remaining capacity of terminal is less than the power consumption of single innings of game of the longest and is greater than the most short single innings of game
When power consumption, then according to history run duration, the total power consumption and the institute in the games in the terminal predetermined period
Game inning is stated, the duration average value of single innings of game of the games, the unit time power consumption of the games are calculated;
According to formula: the duration of (the total power consumption weight of terminal current operating environment+unit time power consumption) × mono- innings of game
Average value=terminal estimates game consumption charge value, and computing terminal estimates game consumption charge value, when terminal estimates game consumption
When charge value is greater than the terminal residual charge value, then detects and judge the terminal current residual electricity deficiency games operation
One innings of game process, when terminal, which estimates game consumption charge value, is less than or equal to the terminal residual charge value, then detection is sentenced
The enough games of the terminal current residual electricity of breaking run one innings of game process.
6. consumption detection method as claimed in claim 5, which is characterized in that described according to formula: (terminal current operating environment
Total power consumption weight+unit time power consumption) duration average value=terminal of × mono- innings of game estimates game consumption charge value,
Computing terminal estimates game consumption charge value, when terminal, which estimates game consumption charge value, is greater than the terminal residual charge value,
It then detects and judges that the terminal current residual electricity deficiency games run one innings of game process, when terminal estimates game consumption
When charge value is less than or equal to the terminal residual charge value, then detects and judge the enough game journeys of the terminal current residual electricity
After the step of one innings of game process of sort run, further includes:
If the remaining capacity of the terminal is that inadequate games run one innings of game process, consumed according to the unit time
The current residual electricity of electricity, total power consumption weight of terminal current operating environment and the terminal calculates the terminal residual electricity
Amount uses the time.
7. consumption detection method as described in claim 1, which is characterized in that according to the history power consumption number of the application program
According to, the operation process number, total power consumption weight of terminal current operating environment and the current residual electricity of the terminal, judgement
After the step of whether enough application programs of the remaining capacity of the terminal run a process, further includes:
Show the remaining capacity of the terminal under the operating status of the application program whether enough using journey by prompting window
The prompt information of one process of sort run.
8. a kind of consumption detection device characterized by comprising
Detecting module: for detecting whether the application program being currently up in terminal has multiple operation processes;
First acquisition module: history power consumption data of the application program in the terminal in predetermined period and corresponding is obtained
Operation process number;
Second acquisition module: for obtaining total power consumption weight of terminal current operating environment and the current residual electricity of the terminal
Amount;
Judgment module: for history power consumption data, the operation process number of current application program, terminal according to the application program
Total power consumption weight of current operating environment and the current residual electricity of the terminal, judge the terminal remaining capacity whether
Enough application programs run a process.
9. a kind of terminal, which is characterized in that the terminal includes: memory, processor and is stored on the memory and can
The consumption detection program run on the processor is realized such as when the power consumption reminds calculation procedure to be executed by the processor
Described in any one of claims 1 to 7 the step of consumption detection method.
10. a kind of readable storage medium storing program for executing, which is characterized in that consumption detection program is stored on the readable storage medium storing program for executing, it is described
The step of consumption detection method as described in any one of claims 1 to 7 is realized when consumption detection program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811455108.4A CN109309953B (en) | 2018-11-30 | 2018-11-30 | Power consumption detection method, device, terminal and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811455108.4A CN109309953B (en) | 2018-11-30 | 2018-11-30 | Power consumption detection method, device, terminal and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109309953A true CN109309953A (en) | 2019-02-05 |
CN109309953B CN109309953B (en) | 2023-12-12 |
Family
ID=65223623
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811455108.4A Active CN109309953B (en) | 2018-11-30 | 2018-11-30 | Power consumption detection method, device, terminal and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109309953B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112486313A (en) * | 2019-09-11 | 2021-03-12 | 华为技术有限公司 | Terminal power saving method and device |
CN113268131A (en) * | 2020-02-14 | 2021-08-17 | 北京小米移动软件有限公司 | Method, apparatus and medium for predicting endurance information |
WO2023044781A1 (en) * | 2021-09-24 | 2023-03-30 | Oppo广东移动通信有限公司 | Wireless communication method, and device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102005620A (en) * | 2010-10-29 | 2011-04-06 | 华为终端有限公司 | Terminal and method for managing electric quantity of terminal battery |
US20110151943A1 (en) * | 2009-12-23 | 2011-06-23 | Lee Gi Won | Mobile terminal and method for controlling charging thereof |
CN105094282A (en) * | 2015-07-22 | 2015-11-25 | 深圳市金立通信设备有限公司 | Management method for application programs and terminal |
CN105100429A (en) * | 2015-06-08 | 2015-11-25 | 北京金山安全软件有限公司 | Method and device for determining use time of residual electric quantity of mobile terminal |
CN107333000A (en) * | 2017-07-07 | 2017-11-07 | 奇酷互联网络科技(深圳)有限公司 | The method and apparatus and mobile terminal of a kind of navigation |
CN107517494A (en) * | 2017-08-31 | 2017-12-26 | 努比亚技术有限公司 | A kind of display methods of terminal battery electricity quantity, terminal and computer-readable recording medium |
CN107979697A (en) * | 2017-11-16 | 2018-05-01 | 维沃移动通信有限公司 | A kind of based reminding method and mobile terminal |
-
2018
- 2018-11-30 CN CN201811455108.4A patent/CN109309953B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110151943A1 (en) * | 2009-12-23 | 2011-06-23 | Lee Gi Won | Mobile terminal and method for controlling charging thereof |
CN102005620A (en) * | 2010-10-29 | 2011-04-06 | 华为终端有限公司 | Terminal and method for managing electric quantity of terminal battery |
CN105100429A (en) * | 2015-06-08 | 2015-11-25 | 北京金山安全软件有限公司 | Method and device for determining use time of residual electric quantity of mobile terminal |
CN105094282A (en) * | 2015-07-22 | 2015-11-25 | 深圳市金立通信设备有限公司 | Management method for application programs and terminal |
CN107333000A (en) * | 2017-07-07 | 2017-11-07 | 奇酷互联网络科技(深圳)有限公司 | The method and apparatus and mobile terminal of a kind of navigation |
CN107517494A (en) * | 2017-08-31 | 2017-12-26 | 努比亚技术有限公司 | A kind of display methods of terminal battery electricity quantity, terminal and computer-readable recording medium |
CN107979697A (en) * | 2017-11-16 | 2018-05-01 | 维沃移动通信有限公司 | A kind of based reminding method and mobile terminal |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112486313A (en) * | 2019-09-11 | 2021-03-12 | 华为技术有限公司 | Terminal power saving method and device |
CN112486313B (en) * | 2019-09-11 | 2024-03-26 | 华为技术有限公司 | Power saving method and device for terminal |
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 |
WO2023044781A1 (en) * | 2021-09-24 | 2023-03-30 | Oppo广东移动通信有限公司 | Wireless communication method, and device |
Also Published As
Publication number | Publication date |
---|---|
CN109309953B (en) | 2023-12-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109525720A (en) | Battery of mobile terminal control method, mobile terminal and readable storage medium storing program for executing | |
CN107517494A (en) | A kind of display methods of terminal battery electricity quantity, terminal and computer-readable recording medium | |
CN107145214A (en) | The method and mobile terminal of application program power consumption management | |
CN109614176A (en) | A kind of application interface layout method, terminal and computer readable storage medium | |
CN106993102A (en) | Intelligence alignment awakening method, mobile terminal and computer-readable recording medium | |
CN109771952A (en) | Based reminding method, terminal and computer readable storage medium based on game fatigue strength | |
CN109634542A (en) | A kind of switching display control method, terminal and computer readable storage medium | |
CN109884543A (en) | A kind of method and apparatus that remaining battery uses duration prediction | |
CN109165534A (en) | terminal control method, terminal and computer readable storage medium | |
CN108881635A (en) | Screen luminance adjustment method, mobile terminal and computer readable storage medium | |
CN107656774A (en) | Adaptive regulation method, device, terminal device and the storage medium of systematic parameter | |
CN109309953A (en) | Consumption detection method, apparatus, terminal and readable storage medium storing program for executing | |
CN107193779A (en) | Residue charging duration calculation method, terminal and computer-readable recording medium | |
CN108512991A (en) | A kind of based reminding method, mobile terminal and computer readable storage medium | |
CN109743867A (en) | Heat dissipating method, mobile terminal and the computer readable storage medium of mobile terminal | |
CN108965602A (en) | Application program display methods, mobile terminal and computer readable storage medium | |
CN109739630A (en) | Game switching method, mobile terminal and computer readable storage medium | |
CN108184011A (en) | A kind of reminder announced method, terminal and computer readable storage medium | |
CN109890072A (en) | Saving power for terminal control method, device, mobile terminal and readable storage medium storing program for executing | |
CN110098651A (en) | A kind of charging method, device, electronic equipment and readable storage medium storing program for executing | |
CN108696909A (en) | Based reminding method, terminal and the computer readable storage medium of network connection | |
CN110086939A (en) | Terminal message processing method, device, mobile terminal and readable storage medium storing program for executing | |
CN109862184A (en) | Terminal and its resource management-control method, computer readable storage medium | |
CN109379777A (en) | A kind of network search method, terminal and computer readable storage medium | |
CN109672843A (en) | Video communication method, terminal and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |