CN107040955B - Power consumption state identification method, device and the electronic equipment of terminal - Google Patents

Power consumption state identification method, device and the electronic equipment of terminal Download PDF

Info

Publication number
CN107040955B
CN107040955B CN201710170248.6A CN201710170248A CN107040955B CN 107040955 B CN107040955 B CN 107040955B CN 201710170248 A CN201710170248 A CN 201710170248A CN 107040955 B CN107040955 B CN 107040955B
Authority
CN
China
Prior art keywords
state
duration
network
terminal
power consumption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710170248.6A
Other languages
Chinese (zh)
Other versions
CN107040955A (en
Inventor
王冠翔
任诗钊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Cheetah Mobile Technology Co Ltd
Original Assignee
Beijing Cheetah Mobile Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Cheetah Mobile Technology Co Ltd filed Critical Beijing Cheetah Mobile Technology Co Ltd
Priority to CN201710170248.6A priority Critical patent/CN107040955B/en
Publication of CN107040955A publication Critical patent/CN107040955A/en
Application granted granted Critical
Publication of CN107040955B publication Critical patent/CN107040955B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • H04W52/0235Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal where the received signal is a power saving command
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/30Reselection being triggered by specific parameters by measured or perceived connection quality data
    • 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
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention proposes power consumption state identification method, device and the electronic equipment of a kind of terminal, wherein, method includes: to obtain the signal strength of network signal, if signal strength is less than preset strength, then determine that network state is weak net state, monitoring is in the first duration of the weak net state, if the first duration is more than or equal to default first duration, identification terminal is in power consumption state.In the present invention, after determining that current network is in weak net state, it can continue to monitor whether terminal is constantly in weak net state in preset duration, if being constantly in weak net state, illustrate the network stabilization of terminal in weak net state, the power consumption rate of terminal is very fast at this time, can determine that terminal is in power consumption state.Since the present invention continues to monitor network signal, so as to improve the accuracy of power consumption state recognition.

Description

Power consumption state identification method, device and the electronic equipment of terminal
Technical field
The present invention relates to power consumption state identification method, device and the electronics of field of terminal technology more particularly to a kind of terminal Equipment.
Background technique
Currently, during terminal use, when network signal fluctuates, the detection skill of network signal can be passed through Art obtains current instantaneous network signal, is then based on the instantaneous network signal to identify network state, under normal circumstances, network State includes weak net state and strong net state.
In practical application, terminal is during using network, as the mobile network of terminal is it is possible that of short duration Fluctuation.Therefore, pass through the instantaneous network signal when fluctuation detected, in the prior art to identify the accuracy of network state not Height when providing services to the user, can not get the trust of user so as to cause based on the recognition result of inaccuracy.For example, When going out current network based on instantaneous network signal identification and being in weak net state, the network state that user can be prompted current is poor, Terminal power consumption fast speed etc. services pop-up.And since the not accurate enough user of recognition result may directly ignore or close the clothes Business pop-up, does not carry out power-save operation to terminal.
Summary of the invention
The present invention is directed to solve at least some of the technical problems in related technologies.
For this purpose, the first purpose of this invention is to propose a kind of power consumption state identification method of terminal, it is existing for solving Have it is not high come the accuracy for identifying network state based on the instantaneous network signal, so as to cause based on inaccuracy recognition result come When providing services to the user, the problem of trust of user can not be got.
Second object of the present invention is to propose a kind of power consumption status identification means of terminal.
Third object of the present invention is to propose the power consumption status identification means of another terminal.
Fourth object of the present invention is to propose a kind of non-transitorycomputer readable storage medium.
5th purpose of the invention is to propose a kind of computer program product.
In order to achieve the above object, first aspect present invention embodiment proposes a kind of power consumption state identification method of terminal, packet It includes:
Obtain the signal strength of network signal;
If the signal strength is less than preset strength, it is determined that going out network state is weak net state;
Monitoring is in the first duration of the weak net state;
If first duration is more than or equal to preset duration, identify that the terminal is in power consumption state.
The optional implementation of another kind as first aspect present invention embodiment, further includes:
If the signal strength is greater than or equal to the preset strength, it is determined that it is strong netted for going out the network state State;
If first duration of the weak net state is less than default first duration, it is determined that the network state The strong net state is switched to from the weak net state;
Second duration of the strong net state after monitoring switching;
If second duration is less than the preset duration, the network state is obtained in predetermined period in institute State the switching times between weak net state and the strong net state;
If the switching times exceed preset times, identify that the terminal is in power consumption state.
The optional implementation of another kind as first aspect present invention embodiment, further includes:
If the third duration of the strong net state is less than default third duration, it is determined that the network state is from institute It states strong net state and is switched to the weak net state;
4th duration of the weak net state after monitoring switching;
If the 4th duration is less than default 4th duration, the network state is obtained in predetermined period in institute State the switching times between weak net state and the strong net state;
If the switching times exceed preset times, identify that the terminal is in power consumption state.
As the optional implementation of another kind of first aspect present invention embodiment, the identification terminal is in consumption Electricity condition, comprising:
Obtain the power consumption rate of the terminal in predetermined period;
If the power consumption rate exceeds default power consumption rate, it is determined that the terminal is in power consumption state.
As the optional implementation of another kind of first aspect present invention embodiment, the determination terminal is in consumption After electricity condition, comprising:
Residual time length workable for calculating the terminal according to the power consumption rate;
If the residual time length is lower than default residual time length, power saving reminder message is issued.
As the optional implementation of another kind of first aspect present invention embodiment, the network according to locating for terminal Network signal, before the network state for determining the locating network, comprising:
Determine the network type of the locating network.
The power consumption state identification method of the terminal of the embodiment of the present invention, by determining that current network is in weak net state Afterwards, it can continue to monitor whether terminal is constantly in weak net state in preset duration, if being constantly in weak net state, illustrate end The network stabilization at end is in weak net state, and the power consumption rate of terminal is very fast at this time, can determine that terminal is in power consumption state.Due to It is that network signal continues to monitor in certain time length, so as to improving the accuracy of power consumption state recognition.
In order to achieve the above object, second aspect of the present invention embodiment proposes a kind of power consumption status identification means of terminal, packet It includes:
Signal acquisition module, for obtaining the signal strength of network signal;
State determining module, if being less than preset strength for the signal strength, it is determined that going out network state is weak net State;
Duration monitoring modular, for monitoring the first duration for being in the weak net state;
Identification module presets the first duration if be more than or equal to for first duration, described in identification Terminal is in power consumption state.
As the optional implementation of another kind of second aspect of the present invention embodiment, the state determining module also has If body is greater than or equal to the preset strength for the signal strength, it is determined that going out the network state is strong net state, And if first duration of the weak net state is less than default first duration, it is determined that the network state is from institute It states weak net state and is switched to the strong net state;
The duration monitoring modular, the second duration of the strong net state after being also used to monitor switching;
The identification module obtains if being specifically used for second duration is less than default second duration Switching times of the network state between the weak net state and the strong net state in predetermined period, if the switching Number exceeds preset times, then identifies that the terminal is in power consumption state.
As the optional implementation of another kind of second aspect of the present invention embodiment, the state determining module is also used If the third duration in the strong net state is less than default third duration, it is determined that the network state is from the strong net State is switched to the weak net state;
The duration monitoring modular, the 4th duration of the weak net state after being also used to monitor switching;
The identification module obtains predetermined period if specific 4th duration is less than default 4th duration Switching times of the interior network state between the weak net state and the strong net state, if the switching times exceed Preset times then identify that the terminal is in power consumption state.
As the optional implementation of another kind of second aspect of the present invention embodiment, the identification module is specifically used for The power consumption rate of the terminal in predetermined period is obtained, if the power consumption rate exceeds default power consumption rate, it is determined that described Terminal is in power consumption state.
The optional implementation of another kind as second aspect of the present invention embodiment, further includes:
Computing module, for residual time length workable for calculating the terminal according to the power consumption rate;
Reminding module issues power saving reminder message if being lower than default residual time length for the residual time length.
As the optional implementation of another kind of second aspect of the present invention embodiment, the state determining module is also used In the network type for determining the locating network.
The power consumption status identification means of the terminal of the embodiment of the present invention, by determining that current network is in weak net state Afterwards, it can continue to monitor whether terminal is constantly in weak net state in preset duration, if being constantly in weak net state, illustrate end The network stabilization at end is in weak net state, and the power consumption rate of terminal is very fast at this time, can determine that terminal is in power consumption state.Due to It is that network signal continues to monitor in certain time length, so as to improving the accuracy of power consumption state recognition.
In order to achieve the above object, third aspect present invention embodiment proposes the power consumption status identification means of another terminal, It include: processor;For storing the memory of the processor-executable instruction;Wherein, the processor is configured to:
Obtain the signal strength of network signal;
If the signal strength is less than preset strength, it is determined that going out network state is weak net state;
Monitoring is in the first duration of the weak net state;
If first duration is more than or equal to default first duration, identify that the terminal is in power consumption shape State.
To achieve the goals above, fourth aspect present invention embodiment proposes a kind of computer-readable storage of non-transitory Medium, when the instruction in the storage medium is performed by the processor of server end, so that server end is able to carry out one The power consumption state identification method of kind terminal, which comprises
Obtain the signal strength of network signal;
If the signal strength is less than preset strength, it is determined that going out network state is weak net state;
Monitoring is in the first duration of the weak net state;
If first duration is more than or equal to default first duration, identify that the terminal is in power consumption shape State.
To achieve the goals above, fifth aspect present invention embodiment proposes a kind of computer program product, when described When instruction processing unit in computer program product executes, a kind of power consumption state identification method of terminal, the method packet are executed It includes:
Obtain the signal strength of network signal;
If the signal strength is less than preset strength, it is determined that going out network state is weak net state;
Monitoring is in the first duration of the weak net state;
If first duration is more than or equal to default first duration, identify that the terminal is in power consumption shape State.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partially become from the following description Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, in which:
Fig. 1 is a kind of flow diagram of the power consumption state identification method of terminal provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of the power consumption state identification method of another terminal provided in an embodiment of the present invention;
Fig. 3 is a kind of application schematic diagram of the power consumption state identification method of terminal provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of the power consumption status identification means of terminal provided by the embodiment of the present invention.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
Below with reference to the accompanying drawings power consumption state identification method, device and the electronic equipment of the terminal of the embodiment of the present invention are described.
Fig. 1 is a kind of flow diagram of the power consumption state identification method of terminal provided in an embodiment of the present invention.Such as Fig. 1 institute Show, the power consumption state identification method of the terminal the following steps are included:
S101, the signal strength for obtaining network signal.
Specifically, application programming interface (the Application Programming in terminal can be passed through Interface, abbreviation API) obtain terminal network signal, can be with the network of network locating for identification terminal according to the network signal State.Preferably, it is stored with network signal in the connection manager in terminal (ConnectivityManager), it should ConnectivityManagerkey can be used as the API, Ke Yicong for obtaining terminal network signal The network signal of terminal is collected in ConnectivityManagerkey.
If S102, signal strength are less than preset strength, it is determined that going out network state is weak net state.
After getting the network signal of terminal, the signal strength of the network signal can be determined, it is strong based on the signal Spend the network state of network locating for identification terminal.Specifically, the signal strength of network signal is compared with preset strength, when When signal strength is less than preset strength, illustrates that the network signal is poor, can identify that network locating for terminal is currently at weak net State.When signal strength is more than or equal to preset strength, illustrates that the network signal is preferable, can identify net locating for terminal Network is currently at strong net state.
For example, the intensity of network signal can be divided into 5 grades at present, it is 0,1,2,3,4 respectively.Wherein, it 0 and 1 represents Network signal is poor, and 3 and 4 to represent network signal preferable.2 are set by preset strength, when the signal strength of network signal is less than 2 When, illustrate that network is currently at weak net state.When the signal strength of network signal is more than or equal to 2, illustrate that network is current In strong net state.
S103, monitoring are in the first duration of weak net state.
In practical application, of short duration fluctuation may occur for the network signal of network locating for terminal, and brief fluctuations may Network signal is caused the situation appearance that temporarily dies down occur, in order to avoid accidentally determining network state when temporarily dying down Weak net state in the present embodiment, after being in weak net state determining network state, continues monitoring terminal in real time and is in First duration of weak net state, to determine that it is whether stable in weak net state that terminal is presently in network.
If S104, the first duration are more than or equal to default first duration, identification terminal is in power consumption state.
In the present embodiment, the first duration of the weak net state monitored and default first duration can be compared Compared with illustrating that terminal steady in weak net state, is said when the first duration of weak net state is more than or equal to default first duration The locating network environment of bright terminal is poor.In practical application, when terminal is in poor network environment, if user continues Network is being used, the power consumption rate that may result in terminal is very fast, may thereby determine that out that terminal is currently at power consumption state.
The power consumption state identification method of terminal provided in this embodiment, by the network signal of the network according to locating for terminal, Determine the network state of locating network, if it is determined that going out network state is weak net state, monitoring in the weak net state the One duration, if the first duration is more than or equal to preset duration, identification terminal is in power consumption state.This implementation Example in, after determining that current network is in weak net state, can continue to monitor terminal whether be constantly in preset duration it is weak Net state, if being constantly in weak net state, illustrate the network stabilization of terminal in weak net state, at this time the power consumption rate of terminal compared with Fastly, it can determine that terminal is in power consumption state.Due to being that network signal continues to monitor in certain time length, so as to improving The accuracy of power consumption state recognition.
Fig. 2 provides the flow diagram of the power consumption state identification method of another terminal for the embodiment of the present invention.Such as Fig. 2 institute Show, the power consumption state identification method of the terminal the following steps are included:
S201, the signal strength for obtaining terminal network signal.
S202, judge whether signal strength is less than preset strength.
By the signal strength of network signal compared with preset strength, preset by force if the signal strength of network signal is less than Degree, then execute S203;If the signal strength of network signal is more than or equal to preset strength, S214 is executed.
S203, determine that network state is weak net state.
S204, monitoring are in the first duration of weak net state.
S205, judge whether the first duration is less than default first duration.
If the first duration is more than or equal to default first duration, S206 is executed.If the first duration Less than default first duration, then S209 is executed.
S206, the power consumption rate for obtaining terminal in predetermined period.
Specifically, in available predetermined period terminal power consumption, the power consumption and predetermined period are then made into ratio, The ratio is the power consumption rate of terminal in predetermined period.
If S207, power consumption rate exceed default power consumption rate, identification terminal is in power consumption state.
The power consumption rate of terminal is compared with default power consumption rate, if power consumption rate exceeds default power consumption rate, Illustrate that the current power consumption of terminal is very fast, then can identify that terminal is in power consumption state.
S208, power saving reminder message is issued.
Further, in order to avoid in the faster situation of power consumption, terminal power, which exhausts, causes user that can not continue to use end End, then can issue the user with power consumption reminder message.Preferably, a power saving can be issued the user with by pop-up mode to remind Message.
For example, when terminal is in wireless network, illustrate that user may be in public arenas such as home or offices, it can be with It charges at any time for terminal, it may not be necessary to calculate residual time length workable for terminal, directly issue the user with a province Electric reminder message.
Optionally, the current remaining capacity of terminal can also be obtained after getting power consumption rate, by current residue electricity Amount makees ratio with power consumption rate, obtains residual time length workable for terminal, if calculated residual time length is lower than default residue Duration can then issue the user with power saving reminder message.
For example, illustrate that user may wait places outdoors when terminal is in mobile network, be not easy to for terminal it is real-time Charging influences the use of the functions such as the normal talking of user after exhausting at this time in order to avoid terminal power, can be by counting in real time Residual time length workable for terminal is calculated, residual time length is preset when the residual time length is less than, then issues the user with power saving reminder message.
S209, determine that network state is switched to strong net state from weak net state.
The first duration is preset when the first duration that network state is weak net state is less than, illustrates that network signal becomes strong, So that network state is switched to strong net state from weak net state.
Second duration of the strong net state after S210, monitoring switching.
In practical application, there may be a brief fluctuations of network signal and showing occurs one and temporarily become strong in network signal As, it is mistakenly identified as strong net state in order to avoid will temporarily become strong phenomenon, the of the strong net state after monitoring switching can be continued Two durations.
S211, judge whether the second duration is less than default second duration.
If the second duration for being switched to strong net state is less than default second duration, illustrate that terminal current network is There is the situation that of short duration network signal becomes strong, the network signal of network locating for terminal is not still practical to become strong, then executes S211.If being switched to the second duration of strong net state or being equal to default second duration, illustrate terminal current network Network signal becomes strong, then executes S220.
S212, switching times of the network state between weak net state and strong net state in predetermined period are obtained.
It is possible to further be recorded in real time to the switch instances of network, when judging that it is pre- that the second duration is less than If when the second duration, then the predetermined period can be got according to the duration length of predetermined period since current time forward Switching times of the interior network state between weak net state and strong net state, when network signal dies down by force from weak change Qiang Zaicong as one The handoff procedure of secondary network state, or become strong into the handoff procedure of primary network state from weak again from dying down by force.Preferably, may be used A monitor to be arranged at the terminal, the switching times of network state are monitored by the monitor.
S213, judge whether switching times exceed preset times.
If it is judged that switching times exceed preset times, illustrate that terminal continually carries out network state in preset duration Switching, the network state of current network is highly unstable at this time, may result in terminal power consumption fast speed, then returns to execution S206.If switching times execute S220 without departing from preset times.
S214, determine that network state is strong net state.
S215, monitoring are in the third duration of strong net state.
S216, judge whether third duration is less than default third duration.
If third duration is less than default third duration, S217 is executed;If third duration be greater than or Equal to default third duration, then S220 is executed.
S217, determine that network state is switched to weak net state from strong net state.
Third duration is preset when the third duration that network state is strong net state is less than, illustrates that network signal dies down, So that network state is switched to weak net state from strong net state.
4th duration of the weak net state after S218, monitoring switching.
In practical application, may have a brief fluctuations of network signal and network signal occur one temporarily die down show As, in order to avoid being mistakenly identified as weak net state the phenomenon that temporarily dying down, the of the weak net state after monitoring switching can be continued Four durations.
S219, judge whether the 4th duration is less than default 4th duration.
If the 4th duration for being switched to weak net state is less than default 4th duration, illustrate that terminal current network is There is the case where of short duration network signal dies down, the network signal of network locating for terminal does not die down actually.
If the 4th duration is less than default 4th duration, returns and execute S212;If the 4th duration is greater than Or it is equal to default 4th duration, illustrate that the network signal of network locating for terminal actually dies down, and stablize weak netted Under state, then returns and execute S206.
In the present embodiment, presetting the first duration, default second duration, default third duration and default 4th duration value can With identical, can also be different.
In the present embodiment, after determining that current network is in weak net state, terminal can be continued to monitor whether when default Weak net state is constantly in length, if being constantly in weak net state, illustrate the network stabilization of terminal in weak net state, at this time eventually The power consumption rate at end is very fast, can determine that terminal is in power consumption state.And if network state is frequently cut in preset duration It changes, illustrates that network signal is unstable, can identify that terminal is in power consumption state.By increasing a certain network in this present embodiment The statistics of power switching times when the statistics and unstable network state of state lower duration, when identifying power consumption state All data are merged, so that recognition result is more accurate, overcomes and relies on instantaneous network signal in the prior art Identification network state has that accuracy is poor.
Further, power saving reminder message can be issued the user with, after identifying power consumption state to avoid terminal power User is influenced after exhausting to the normal use of terminal, and user experience can be improved.
Fig. 3 is a kind of application schematic diagram of the power consumption state identification method of terminal provided in an embodiment of the present invention.This implementation In example, by taking the terminal of Android operation system as an example, the power consumption state identification method of terminal provided by the above embodiment is solved Release explanation.
S301, the network that terminal is obtained from the Connectivity Manager in the Android operation system of terminal are related Data.
Wherein, the related data of network may include the network signal of network type parameters and current network, the network class Shape parameter can indicate that the parameter of the network type of current the accessed network of terminal.
Connectivity Manager in Android operation system is dedicated for recording terminal present access network phase Close the manager of data.By the API of Connectivity Manager in terminal, obtained from Connectivity Manager Take the network-related data of terminal.
Monitor on S302, wake-up terminal.
In the present embodiment, the switch instances of network state are monitored by a monitor.
S303, the network type currently accessed to terminal identify.
Under normal circumstances, terminal can access in wireless network, can also be linked into mobile network.In the present embodiment, The net that terminal is currently accessed can be identified according to the network type parameters got from Connectivity Manager Network type.
S304, identification terminal network type be wireless network.
When the network type for identifying terminal is wireless network, then S306 is continued to execute.
S305, identification terminal network type be mobile network.
If the network type for identifying terminal is mobile network, S306 is continued to execute.
S306, judge the signal strength of network signal whether less than 2.
The signal strength being connected to the network at present is divided into 5 grades, is 0,1,2,3,4 respectively.Wherein, 0 and 1 representation signal compared with Difference, 3 and 4 representation signals are preferable.In the present embodiment, preset strength is used as by 2.
If signal strength executes S307 less than 2, if signal strength is more than or equal to 2, S318 is executed.
S307, determine that network state is weak net state.
Whether S308, the first duration for monitoring weak net state are lower than 2min.
It is in the present embodiment, default first duration, default second duration, default third duration and default 4th duration is equal It is set as 2 minutes (min).When determining in weak net state, the first duration of weak net state is monitored, if The first duration under weak net state is more than or equal to 2min, illustrate terminal steady under weak net state, terminal at this time Power consumption rate is very fast, then executes S309.
If the first duration under weak net state is less than in 2min, illustrate that the network signal of terminal becomes strong, it is network-like State is switched to strong net state from weak net state, then executes S314.
S309, power consumption rate of the terminal in 2min is obtained.
In the present embodiment, 2min is set by predetermined period, it is available to arrive power consumption rate of the terminal in 2min.
S310, judge whether power consumption rate exceeds 4%/2min.
In the present embodiment, presetting power consumption rate is 4%/2min, indicates that power consumption is 4% in 2min.If the consumption of terminal Electric speed is more than 4%/2min, then executes 311.If the power consumption rate of terminal executes S322 without departing from 4%/2min.
Residual time length workable for S311, computing terminal.
Specifically, current residual electricity and power consumption rate are made ratio by the current residual electricity for obtaining terminal, which is Residual time length workable for terminal.
S312, judge whether residual time length is lower than 10min.
In the present embodiment, set default residual time length in 10min.The residual time length workable for calculated terminal When lower than 10min, then S313 can be executed.
S313, pop-up pop-up prompt user " power consumption is too fast, please charges as early as possible ".
Optionally, due to that may represent terminal and be in open air, user may not be able to be with when terminal uses mobile network When be terminal charge, at this time in order to avoid electricity exhausts, cause user not to be available the functions such as make a phone call, pop-up can be popped up and mentioned Show user " current network dtr signal, power consumption are serious, it is contemplated that use T minutes, idle closing mobile network ".Wherein T is to calculate Residual time length out.After user sees the pop-up, terminal telephone can be timely used or short message contacts other people.
S314, determine that network state is switched to strong net state from weak net state.
When the first duration for monitoring weak net state in S308 is less than 2min, illustrate that network signal becomes strong, network State is switched to strong net state from weak net state.
Whether the second duration of the strong net state that S315, monitoring are switched to is less than 2min.
In the case where causing network signal temporarily to become strong due to network brief fluctuations, mistake identifies network state At strong network state, then whether the second duration for monitoring the strong net state being switched to is less than 2min.If second continue when It is long to be less than 2min, then execute S316.If the second duration is more than or equal to 2min, S322 is executed.
S316, the switching times for obtaining network state in 2min.
Specifically, from the switching times to network state in 2min available in monitor.
S317, judge whether switching times exceed 40 times/2min.
In the present embodiment, 40 times/2min is set by preset times, i.e. the switching times of network state are 40 in 2min It is secondary.If the switching times of network state exceed 40 times in 2min, illustrate that network state is unstable, power consumption rate can compare Fastly, then S309 is executed.If the switching times of network state execute S322 without departing from 40 times in 2min.
S318, determine that network state is strong net state.
Whether S319, the third duration for monitoring strong net state are less than 2min.
If third duration is less than 2min, S320 is executed.If third duration is more than or equal to 2min, Then execute S322.
S320, determine that network state is switched to weak net state from strong net state.
Whether the 4th duration of the weak net state after S321, monitoring switching is less than 2min.
If the 4th duration is less than 2min, S316 is executed, if the 4th duration is more than or equal to 2min, Then execute S309.
S322, pop-up is not popped up.
In the present embodiment, after determining that current network is in weak net state, terminal can be continued to monitor whether when default Weak net state is constantly in length, if being constantly in weak net state, illustrate the network stabilization of terminal in weak net state, at this time eventually The power consumption rate at end is very fast, can determine that terminal is in power consumption state.And if network state is frequently cut in preset duration It changes, illustrates that network signal is unstable, can identify that terminal is in power consumption state.By increasing a certain network in this present embodiment The statistics of power switching times when the statistics and unstable network state of state lower duration, when identifying power consumption state All data are merged, so that recognition result is more accurate, overcomes and relies on instantaneous network signal in the prior art Identification network state has that accuracy is poor.
Further, power saving reminder message can be issued the user with, after identifying power consumption state to avoid terminal power User is influenced after exhausting to the normal use of terminal, and user experience can be improved.
Fig. 4 is a kind of structural schematic diagram of the power consumption status identification means of terminal provided in an embodiment of the present invention.The terminal Power consumption status identification means include: signal acquisition module 11, state determining module 12, duration monitoring modular 13 and identification module 13。
Wherein, signal acquisition module 11, for obtaining the signal strength of network signal.
State determining module 12, if being less than preset strength for the signal strength, it is determined that it is weak for going out network state Net state.
Duration monitoring modular 13, for monitoring the first duration for being in the weak net state.
Identification module 14 identifies institute if being more than or equal to default first duration for first duration It states terminal and is in power consumption state.
Further, state determining module 12, if be greater than or equal to also particularly useful for the signal strength described default Intensity, it is determined that going out the network state is strong net state, and if first duration of the weak net state is small In default first duration, it is determined that the network state is switched to the strong net state from the weak net state.
Duration monitoring modular 13, the second duration of the strong net state after being also used to monitor switching;
Identification module 14 obtains pre- if being specifically used for second duration is less than default second duration If switching times of the network state between the weak net state and the strong net state in the period, if the switching time Number exceeds preset times, then identifies that the terminal is in power consumption state.
Further, state determining module 12 are preset if the third duration for being also used to the strong net state is less than Third duration, it is determined that the network state is switched to the weak net state from the strong net state.
Duration monitoring modular 13, the 4th duration of the weak net state after being also used to monitor switching;
Identification module 14 obtains in predetermined period if specific 4th duration is less than default 4th duration Switching times of the network state between the weak net state and the strong net state, if the switching times are beyond pre- If number, then identify that the terminal is in power consumption state.
Further, identification module 14, specifically for obtaining the power consumption rate of the terminal in predetermined period, if described Power consumption rate exceeds default power consumption rate, it is determined that the terminal is in power consumption state.
Further, the power consumption status identification means of the terminal, further includes: computing module 15 and reminding module 16.
Computing module 15, for residual time length workable for calculating the terminal according to the power consumption rate.
Reminding module 16 issues power saving reminder message if being lower than default residual time length for the residual time length.
Further, state determining module 12 are also used to determine the network type of the locating network.
In the present embodiment, after determining that current network is in weak net state, terminal can be continued to monitor whether when default Weak net state is constantly in length, if being constantly in weak net state, illustrate the network stabilization of terminal in weak net state, at this time eventually The power consumption rate at end is very fast, can determine that terminal is in power consumption state.And if network state is frequently cut in preset duration It changes, illustrates that network signal is unstable, can identify that terminal is in power consumption state.By increasing a certain network in this present embodiment The statistics of power switching times when the statistics and unstable network state of state lower duration, when identifying power consumption state All data are merged, so that recognition result is more accurate, overcomes and relies on instantaneous network signal in the prior art Identification network state has that accuracy is poor.
Further, power saving reminder message can be issued the user with, after identifying power consumption state to avoid terminal power User is influenced after exhausting to the normal use of terminal, and user experience can be improved.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples It closes and combines.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or Implicitly include at least one this feature.In the description of the present invention, the meaning of " plurality " is at least two, such as two, three It is a etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing custom logic function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, Lai Zhihang function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or pass Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment It sets.The more specific example (non-exhaustive list) of computer-readable medium include the following: there is the electricity of one or more wirings Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable Medium, because can then be edited, be interpreted or when necessary with it for example by carrying out optical scanner to paper or other media His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.Such as, if realized with hardware in another embodiment, following skill well known in the art can be used Any one of art or their combination are realized: have for data-signal is realized the logic gates of logic function from Logic circuit is dissipated, the specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene can compile Journey gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing module It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above The embodiment of the present invention is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as to limit of the invention System, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of the invention Type.

Claims (11)

1. a kind of power consumption state identification method of terminal characterized by comprising
Obtain the signal strength of network signal;
If the signal strength is less than preset strength, it is determined that going out network state is weak net state;
Monitoring is in the first duration of the weak net state;
If first duration is more than or equal to default first duration, identify that the terminal is in power consumption state;
The method also includes:
If the signal strength is greater than or equal to the preset strength, it is determined that going out the network state is strong net state;
If first duration of the weak net state is less than default first duration, it is determined that the network state is from institute It states weak net state and is switched to the strong net state;
Second duration of the strong net state after monitoring switching;
If second duration is less than default second duration, the network state is obtained in predetermined period described weak Switching times between net state and the strong net state;
If the switching times exceed preset times, identify that the terminal is in power consumption state.
2. the method according to claim 1, wherein further include:
If it is determined that the third duration of the strong net state be less than default third duration, it is determined that the network state The weak net state is switched to from the strong net state;
4th duration of the weak net state after monitoring switching;
If the 4th duration is less than default 4th duration, the network state is obtained in predetermined period described weak Switching times between net state and the strong net state;
If the switching times exceed preset times, identify that the terminal is in power consumption state.
3. -2 described in any item methods according to claim 1, which is characterized in that the identification terminal is in power consumption shape State, comprising:
Obtain the power consumption rate of the terminal in predetermined period;
If the power consumption rate exceeds default power consumption rate, it is determined that the terminal is in power consumption state.
4. -2 described in any item methods according to claim 1, which is characterized in that the determination terminal is in power consumption state Later, comprising:
Residual time length workable for calculating the terminal according to the power consumption rate;
If the residual time length is lower than default residual time length, power saving reminder message is issued.
5. -2 described in any item methods according to claim 1, which is characterized in that the network of the network according to locating for terminal is believed Number, before the network state for determining the locating network, comprising:
Determine the network type of the locating network.
6. a kind of power consumption status identification means of terminal characterized by comprising
Signal acquisition module, for obtaining the signal strength of network signal;
State determining module, if being less than preset strength for the signal strength, it is determined that going out network state is weak net state;
Duration monitoring modular, for monitoring the first duration for being in the weak net state;
Identification module identifies the terminal if being more than or equal to default first duration for first duration In power consumption state;
The state determining module, if being greater than or equal to the preset strength also particularly useful for the signal strength, it is determined that The network state is strong net state out, and if when first duration of the weak net state is less than default first It is long, it is determined that the network state is switched to the strong net state from the weak net state;
The duration monitoring modular, the second duration of the strong net state after being also used to monitor switching;
The identification module obtains predetermined period if being specifically used for second duration is less than default second duration Switching times of the interior network state between the weak net state and the strong net state, if the switching times exceed Preset times then identify that the terminal is in power consumption state.
7. device according to claim 6, which is characterized in that the state determining module, if being also used to the strong net The third duration of state is less than default third duration, it is determined that the network state is switched to described from the strong net state Weak net state;
The duration monitoring modular, the 4th duration of the weak net state after being also used to monitor switching;
The identification module obtains institute in predetermined period if specific 4th duration is less than default 4th duration Switching times of the network state between the weak net state and the strong net state are stated, if the switching times are beyond default Number then identifies that the terminal is in power consumption state.
8. according to the described in any item devices of claim 6-7, which is characterized in that the identification module is specifically used for obtaining pre- If the power consumption rate of the terminal in the period, if the power consumption rate exceeds default power consumption rate, it is determined that at the terminal In power consumption state.
9. according to the described in any item devices of claim 6-7, which is characterized in that further include:
Computing module, for residual time length workable for calculating the terminal according to the power consumption rate;
Reminding module issues power saving reminder message if being lower than default residual time length for the residual time length.
10. according to the described in any item devices of claim 6-7, which is characterized in that the state determining module is also used to determine The network type of locating network.
11. a kind of electronic equipment characterized by comprising shell, processor, memory, circuit board and power circuit, wherein Circuit board is placed in the space interior that shell surrounds, and processor and memory setting are on circuit boards;Power circuit, for being State each circuit or the device power supply of electronic equipment;Memory is for storing executable program code;Processor is deposited by reading The executable program code stored in reservoir runs program corresponding with executable program code, requires 1- for perform claim The power consumption state identification method of 5 described in any item terminals.
CN201710170248.6A 2017-03-21 2017-03-21 Power consumption state identification method, device and the electronic equipment of terminal Active CN107040955B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710170248.6A CN107040955B (en) 2017-03-21 2017-03-21 Power consumption state identification method, device and the electronic equipment of terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710170248.6A CN107040955B (en) 2017-03-21 2017-03-21 Power consumption state identification method, device and the electronic equipment of terminal

Publications (2)

Publication Number Publication Date
CN107040955A CN107040955A (en) 2017-08-11
CN107040955B true CN107040955B (en) 2019-09-27

Family

ID=59533709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710170248.6A Active CN107040955B (en) 2017-03-21 2017-03-21 Power consumption state identification method, device and the electronic equipment of terminal

Country Status (1)

Country Link
CN (1) CN107040955B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108387776A (en) * 2018-01-02 2018-08-10 山东浪潮通软信息科技有限公司 A kind of method for early warning and device of intelligent electric meter
CN110636595B (en) * 2019-09-27 2022-07-08 Tcl移动通信科技(宁波)有限公司 Method and device for reducing power consumption, storage medium and electronic equipment
CN111221736A (en) * 2020-01-08 2020-06-02 北京金山安全软件有限公司 Equipment power consumption method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546257A (en) * 2012-01-17 2012-07-04 杭州康庭科技有限公司 Automatic alarming method and system for electric quantity of wireless router on basis of mobile data network
US8433934B1 (en) * 2012-06-28 2013-04-30 Google Inc. Saving battery on wireless connections on mobile devices using internal motion detection
CN104394564A (en) * 2014-11-12 2015-03-04 广东欧珀移动通信有限公司 A method and device for reducing ping-pong switching of a terminal
CN104486822A (en) * 2014-12-08 2015-04-01 上海斐讯数据通信技术有限公司 Electronic equipment and electricity saving method of electronic equipment
CN104731301A (en) * 2013-12-20 2015-06-24 贝壳网际(北京)安全技术有限公司 Mobile terminal, power-saving operation method of mobile terminal, power-saving operation system of mobile terminal
CN105100429A (en) * 2015-06-08 2015-11-25 北京金山安全软件有限公司 Method and device for determining use time of residual electric quantity of mobile terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546257A (en) * 2012-01-17 2012-07-04 杭州康庭科技有限公司 Automatic alarming method and system for electric quantity of wireless router on basis of mobile data network
US8433934B1 (en) * 2012-06-28 2013-04-30 Google Inc. Saving battery on wireless connections on mobile devices using internal motion detection
CN104731301A (en) * 2013-12-20 2015-06-24 贝壳网际(北京)安全技术有限公司 Mobile terminal, power-saving operation method of mobile terminal, power-saving operation system of mobile terminal
CN104394564A (en) * 2014-11-12 2015-03-04 广东欧珀移动通信有限公司 A method and device for reducing ping-pong switching of a terminal
CN104486822A (en) * 2014-12-08 2015-04-01 上海斐讯数据通信技术有限公司 Electronic equipment and electricity saving method of electronic equipment
CN105100429A (en) * 2015-06-08 2015-11-25 北京金山安全软件有限公司 Method and device for determining use time of residual electric quantity of mobile terminal

Also Published As

Publication number Publication date
CN107040955A (en) 2017-08-11

Similar Documents

Publication Publication Date Title
CN105404863B (en) Character features recognition methods and system
CN107843802A (en) Internal short-circuit detection method and device
CN103885588B (en) Automatic switching method and device
CN107832132B (en) Application control method and device, storage medium and electronic equipment
CN107040955B (en) Power consumption state identification method, device and the electronic equipment of terminal
CN109947495A (en) Application program preloads method, apparatus, storage medium and mobile terminal
CN106303007A (en) Video broadcasting method, playing device and playback terminal
CN104182330B (en) Application recommendation method and device and terminal
CN106155557B (en) A kind of virtual key display methods and mobile terminal
CN107402808B (en) Process management method, device, storage medium and electronic equipment
CN107302633A (en) application control method, device, storage medium and electronic equipment
CN105895126A (en) Method and apparatus for indicating and controlling playing audio/audio and video data
CN108762466A (en) Display methods, device, mobile terminal and storage medium
CN108536504A (en) page display method, device, mobile terminal and storage medium
CN110096249A (en) Methods, devices and systems for prompting fast to wake up word
CN108647050A (en) Application program launching method, device and mobile terminal
CN110134237A (en) Interface control method and relevant device
CN108777330A (en) charging management method, device and terminal
CN109376062A (en) Network state reminding method and relevant apparatus
WO2019062462A1 (en) Application control method and apparatus, storage medium and electronic device
CN107734121A (en) Method for controlling volume, device, storage medium and electronic equipment
CN109065017B (en) Voice data generation method and related device
CN104123512B (en) Realize the method and apparatus switched between intelligent cipher key equipment pattern
CN108965606A (en) Determine the method and device of environment temperature
CN108989548A (en) A kind of control method and control device detecting mobile terminal application power consumption

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
CB02 Change of applicant information

Address after: 100041 A-0071 2, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Beijing cheetah Mobile Technology Co., Ltd.

Address before: 100041 A-0071 2, 3 building, 30 industrial Street, Shijingshan District, Beijing.

Applicant before: Beijing cheetah Mobile Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant