CN106055076A - Method and device for closing sensors - Google Patents

Method and device for closing sensors Download PDF

Info

Publication number
CN106055076A
CN106055076A CN201610379815.4A CN201610379815A CN106055076A CN 106055076 A CN106055076 A CN 106055076A CN 201610379815 A CN201610379815 A CN 201610379815A CN 106055076 A CN106055076 A CN 106055076A
Authority
CN
China
Prior art keywords
sensor
function
rank
dump energy
function rank
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610379815.4A
Other languages
Chinese (zh)
Other versions
CN106055076B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610379815.4A priority Critical patent/CN106055076B/en
Publication of CN106055076A publication Critical patent/CN106055076A/en
Priority to PCT/CN2017/086467 priority patent/WO2017206870A1/en
Application granted granted Critical
Publication of CN106055076B publication Critical patent/CN106055076B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • G06F1/3212Monitoring battery levels, e.g. power saving mode being initiated when battery voltage goes below a certain level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3287Power saving characterised by the action undertaken by switching off individual functional units in the computer system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Power Sources (AREA)

Abstract

The embodiment of the invention discloses a method and device for closing sensors. The method comprises the steps of obtaining current residual electricity of a terminal; obtaining a first objective function level corresponding to the residual electricity; and closing a sensor call function corresponding to the first objective function level. By the method and the device, the corresponding sensor call function is closed according to the residual electricity of the terminal while all sensor call functions are not directly closed, so that the electricity consumption of the terminal is reduced; and the restart speed of each sensor is also improved.

Description

A kind of sensor method for closing and device
Technical field
The present invention relates to field of terminal technology, be specifically related to a kind of sensor method for closing and device.
Background technology
Along with the development of communication technology, the function of smart mobile phone is from strength to strength.It is powerful why smart mobile phone has Function, wherein diversified sensor is given the credit in a lot of places.Electronic compass, acceleration sensor, three-axis gyroscope, light Sensor, these are all the sensor devices that interior of mobile phone is relatively common.
Sensor, as a kind of device received and transmit the information perceived, can help smart mobile phone accurately to obtain respectively Plant external information.Concrete, each sensor in smart mobile phone is corresponding multiple calls function, and these call function and use respectively In calling the difference in functionality of sensor, or control sensor and run with certain state.As used certain sensor when application Time, use function can be called to open this sensor.After commonly used closedown, its sensor used discharges the most completely, I.e. still in wake-up states, mobile phone electricity now will be caused to be consumed in a large number, reduce the flying power of mobile phone.
At present, in order to lower the consumption of intelligent terminal's electricity, and then the flying power of lifting intelligent terminal, intelligent terminal's meeting Closure sensor calls function, the function of the most all use sensors.
But, although this sensor shutdown strategy can reduce terminal power consumption, but owing to the program is to close All of sensor call function, if after closure sensor, intelligent terminal needs to restart this sensor, then this Time, intelligent terminal needs all of this sensor of re invocation to call function, and the speed that sensor can be caused to restart compares Slowly.
Summary of the invention
The embodiment of the present invention provides a kind of sensor method for closing and device, can solve existing power consumption of terminal big, sensing The technical problem that device toggle speed is slow.
The embodiment of the present invention provides a kind of sensor method for closing, including:
Sensor is called function setup function rank;
Obtain the dump energy that terminal is current;
Obtain the first object function rank that described dump energy is corresponding;
The sensor cutting out described first object function rank corresponding calls function.
Further, also include after the step of the dump energy that described acquisition terminal is current:
Judge that whether described dump energy is less than presetting power threshold;
Such as less than preset power threshold, then obtain the first object function rank that described dump energy is corresponding.
Further, the step of the first object function rank that the described dump energy of described acquisition is corresponding specifically includes:
Judge that described dump energy is whether in default dump energy interval;
In this way, then the first preset function rank that described default dump energy interval is corresponding is obtained;
Described first preset function rank is set to first object function rank.
Further, described first object function rank is less than the highest function rank;Described closedown described first object letter The sensor of several levels not correspondence calls the step of function and specifically includes:
Judge whether described first object function rank is minimum function rank;
The sensor the most then cutting out described first object function rank corresponding calls function;
If it is not, the sensor then cutting out described first object function rank corresponding calls function, and function rank is less than The sensor of described first object function rank calls function.
Further, described function setup function rank of calling sensor specifically includes:
Obtain described sensor and call the attribute of function;
According to described attribute, described sensor called function setup function rank.
Further, described judge that whether described dump energy also includes less than after the step presetting power threshold:
Such as larger than or equal to preset power threshold, then obtain the power consumption needed for described terminal;
Judge that whether described power consumption is less than described dump energy;
The most described dump energy, the most not closure sensor;
Such as larger than or equal to described dump energy, the second mesh that the most described power consumption is corresponding with the difference of described dump energy Scalar functions rank, and the sensor cutting out described second object function rank corresponding calls function.
The embodiment of the present invention additionally provides a kind of sensor shutoff device, including:
Function rank arranges module, for sensor calls function setup function rank;
Dump energy acquisition module, for obtaining the dump energy that terminal is current;
Function rank acquisition module, for obtaining the first object function rank that described dump energy is corresponding;
Close module, call function for the sensor closing described first object function rank corresponding.
Further, described sensor shutoff device also includes:
Judge module, is used for judging that whether described dump energy is less than presetting power threshold;
Described function rank acquisition module specifically for, less than preset power threshold time, obtain described dump energy pair The first object function rank answered.
Further, described function rank acquisition module includes:
First judges submodule, is used for judging that described dump energy is whether in default dump energy interval;
Function rank obtains submodule, for when being, obtains corresponding first the presetting in described default dump energy interval Function rank;
Function rank arranges submodule, for described first preset function rank is set to first object function rank.
Further, described first object function rank is less than the highest function rank;Described closedown module includes:
Second judges submodule, is used for judging whether described first object function rank is minimum function rank;
First closes closed submodule, and for when being, the sensor cutting out described first object function rank corresponding calls letter Number;
Second closes closed submodule, and for when no, the sensor cutting out described first object function rank corresponding calls letter Count, and function rank calls function less than the sensor of described first object function rank.
The embodiment of the present invention uses calls function setup function rank to sensor;Obtain the dump energy that terminal is current; Obtain the first object function rank that dump energy is corresponding;The sensor cutting out first object function rank corresponding calls function; The program is closed corresponding sensor according to the dump energy of terminal and is called function, and all of sensor of non-immediate cut out adjusts With function, for hinge structure, it is possible not only to reduce what terminal power consumed, moreover it is possible to promote the speed that sensor restarts Degree.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, in embodiment being described below required for make Accompanying drawing be briefly described, it should be apparent that, below describe in accompanying drawing be only some embodiments of the present invention, for From the point of view of those skilled in the art, on the premise of not paying creative work, it is also possible to obtain the attached of other according to these accompanying drawings Figure.
Fig. 1 is the flow chart of the first preferred embodiment of sensor of the invention method for closing;
Fig. 2 is the flow chart of the second preferred embodiment of sensor of the invention method for closing
Fig. 3 is the structure chart of the preferred embodiment of sensor of the invention shutoff device;
Fig. 4 is the flow chart of the specific embodiment of sensor of the invention method for closing and device.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Describe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments wholely.Based on Embodiment in the present invention, the every other enforcement that those skilled in the art are obtained under not making creative work premise Example, broadly falls into the scope of protection of the invention.
The embodiment of the present invention provides a kind of sensor method for closing and device.To be described in detail respectively below.
Embodiment one,
Refer to the flow chart of the first preferred embodiment that Fig. 1, Fig. 1 are sensor of the invention method for closing.The method For the sensor in terminal carries out cut out process, wherein this terminal can be that smart mobile phone, panel computer etc. comprise sensing The mobile device of device.The sensor method for closing of this preferred embodiment includes:
Step S101, calls function setup function rank to sensor;
Step S102, obtains the dump energy that terminal is current;
Step S103, obtains the first object function rank that dump energy is corresponding;
Step S104, the sensor cutting out first object function rank corresponding calls function.
The idiographic flow of each step the following detailed description of the sensor method for closing of this preferred embodiment.
In step S101, sensor is called function setup function rank by terminal.Sensing system is as smart mobile phone A part, the function of mobile phone can be allowed more rich and varied.Such as pressure transducer, calculate height above sea level by measuring atmospheric pressure Degree.In sensor systems, each sensor is corresponding multiple calls function, and these sensors call function for using sensing Certain function of device or the running status of control sensor, can make sensor acquisition data as sensor calls function A, pass Sensor calls function B can make sensor process data;And for example sensor calls function C and sensor can be made to be in enliven shape State, sensor calls function D can open this sensor.
Generally, when we open certain application operate time, corresponding sensor can be used.As opened application of taking pictures Time, terminal can use light sensor secretly to determine whether time of exposure and LED flash are opened according to environment is bright, thus improve The shooting quality of photo.But, when photo application is closed, light sensor discharges the most completely, still in wake-up states.This Time be in the light sensor of wake-up states and will consume terminal power, it is therefore necessary to discharge this light sensor.
But, if the function of sensor all closed, then when re-using this sensor next time, need to restart sensing The function of device various piece, so that the toggle speed of sensor is slack-off.Therefore the attribute of function is called to letter according to sensor Number carries out partition of the level, to realize calling sensor the closedown step by step of function.
Concrete, can call, according to sensor, the sensor function that function specifically calls and sensor is called function enter Line function partition of the level, is the first function rank as the sensor making sensor carry out data process calls function setup, will It is the second function rank that the sensor making sensor carry out data acquisition calls function setup.
Preferably, sensor calls function carry out the method for function partition of the level and can also is that and call according to this sensor Function makes sensor state in which divide, and is as the sensor making sensor be in wake-up states calls function setup One function rank, is the second function rank by making sensor sensor in a dormant state call function setup.
Preferably, sensor calls function carry out the method for function partition of the level and can also is that and call sensing according to them The frequency of device divides.As being the first function rank by call the relatively low sensor of sensor frequency calling function setup, will adjust Calling function setup with the sensor that sensor frequency is higher is the second function rank.
It should be noted that this first function rank is the highest function rank, it is the highest that the second function rank is that rank is less than The rank of function rank.When selecting closure sensor to call function, the sensor that preferential closedown has higher level calls letter Number.Then continue at step S102.
In step s 102, the dump energy that terminal is current is obtained.Concrete, can be many according to current dump energy Few, determine whether that closure sensor calls function.As dump energy is sufficient, the most preferentially guarantee that sensor can quickly start; As dump energy is less, now should avoid because sensor is not turned off the situation that causes power consumption of terminal bigger.Then continue at step S103。
In step s 103, terminal obtains the first object function rank that dump energy is corresponding.It should be noted that preset Dump energy is interval exists mapping relations with the first preset function rank.This mapping relations both can be that system is arranged automatically, Can also be pre-set by user.System is arranged automatically in this way, and it is interval that first terminal obtains default dump energy, as by total electricity 10%-15% to be set to default dump energy interval;Then terminal is that this default dump energy interval arranges the of correspondence One preset function rank, as by the first corresponding for this default dump energy interval of the 10%-15% of total electricity preset function level It is not set to the 3rd function rank;Last terminal is by this default dump energy interval, the first preset function rank and the association of the two Relation stores.User pre-sets in this way, and terminal can provide the user an editable selection interface, on this interface Can select to preset interval value and the first preset function rank of dump energy.User can select residue the most on the surface Interval value and the corresponding first preset function rank thereof of electricity are bound, thus realize the incidence relation of the two.
In actual applications, when dump energy is relatively low, terminal first obtains the default dump energy residing for this dump energy Interval, as terminal residual electricity is total electricity 12%, then it is in this default dump energy district of 10%-15% of total electricity In between;Then the first preset function rank of this default dump energy interval association is obtained;This first is preset letter by last terminal Several levels is not set to first object function rank.Then continue at step S104.
In step S104, the sensor that terminal closes first object function rank corresponding calls function.Concrete, permissible First judge whether this first object function rank is minimum function rank, as minimum function rank, the most directly close this first Sensor corresponding to object function rank calls function;If not being minimum function rank, then close first object function rank pair The sensor answered calls function, and function rank calls function less than the sensor of first object function rank.
The sensor method for closing of this preferred embodiment uses and sensor calls function setup function rank;Obtain terminal Current dump energy;Obtain the first object function rank that dump energy is corresponding;Close first object function rank corresponding Sensor calls function;The program is closed corresponding sensor according to the dump energy of terminal and is called function, and non-immediate pass Close all of sensor and call function, be possible not only to reduce what terminal power consumed, moreover it is possible to promote the speed that sensor restarts Degree.
Embodiment two,
Refer to the flow chart of the second preferred embodiment that Fig. 2, Fig. 2 are sensor of the invention method for closing.The method For the sensor in terminal carries out cut out process, wherein this terminal can be that smart mobile phone, panel computer etc. comprise sensing The mobile device of device.The sensor method for closing of this preferred embodiment includes:
Step S201, obtains sensor and calls the attribute of function, according to attribute, sensor calls function setup function level Not;
Step S202, obtains the dump energy that terminal is current;
Step S203, it is judged that whether dump energy is less than presetting power threshold;
Step S204, such as larger than or equal to presetting power threshold, then obtains the power consumption needed for terminal, it is judged that power consumption is No less than dump energy, such as less than dump energy, the most not closure sensor;Such as larger than or equal to dump energy, then obtain described The second object function rank that power consumption is corresponding with the difference of described dump energy, and close described second object function rank pair The sensor answered calls function;
Step S205, such as less than presets power threshold, then judge dump energy whether in default dump energy interval, as It is then to obtain and preset the first preset function rank that dump energy interval is corresponding, the first preset function rank is set to first Object function rank;
Step S206, it is judged that whether first object function rank is minimum function rank;
Step S207, the most then the sensor cutting out first object function rank corresponding calls function;
Step S208, if it is not, the sensor then cutting out first object function rank corresponding calls function, and function rank Function is called less than the sensor of first object function rank.
The idiographic flow of each step the following detailed description of the sensor method for closing of this preferred embodiment.
In step S201, obtain sensor and call the attribute of function, according to attribute, sensor called function setup function Rank.
Sensing system as a part for smart mobile phone, can allow the function of mobile phone more rich and varied.As pressure passes Sensor, calculates height above sea level by measuring atmospheric pressure.In sensor systems, each sensor is corresponding multiple calls function, These sensors call function for using certain function of sensor or controlling the running status of sensor, as sensor is adjusted Can make sensor acquisition data with function A, sensor calls function B can make sensor process data;And for example sensor is adjusted Sensor can be made to be in active state with function C, sensor calls function D can open this sensor.
Generally, when we open certain application operate time, corresponding sensor can be used.As opened application of taking pictures Time, terminal can use light sensor secretly to determine whether time of exposure and LED flash are opened according to environment is bright, thus improve The shooting quality of photo.But, when photo application is closed, light sensor discharges the most completely, still in wake-up states.This Time be in the light sensor of wake-up states and will consume terminal power, it is therefore necessary to discharge this light sensor.
But, if the function of sensor all closed, then when re-using this sensor next time, need to restart sensing The function of device various piece, so that the toggle speed of sensor is slack-off.Therefore the attribute of function is called to letter according to sensor Number carries out partition of the level, to realize calling sensor the closedown step by step of function.
Concrete, can call, according to sensor, the sensor function that function specifically calls and sensor is called function enter Line function partition of the level, is the first function rank as the sensor making sensor carry out data process calls function setup, will It is the second function rank that the sensor making sensor carry out data acquisition calls function setup.
Preferably, sensor calls function carry out the method for function partition of the level and can also is that and call according to this sensor Function makes sensor state in which divide, and is as the sensor making sensor be in wake-up states calls function setup One function rank, is the second function rank by making sensor sensor in a dormant state call function setup.
Preferably, sensor calls function carry out the method for function partition of the level and can also is that and call sensing according to them The frequency of device divides.As being the first function rank by call the relatively low sensor of sensor frequency calling function setup, will adjust Calling function setup with the sensor that sensor frequency is higher is the second function rank.
It should be noted that this first function rank is the highest function rank, it is the highest that the second function rank is that rank is less than The rank of function rank.When selecting closure sensor to call function, the sensor that preferential closedown has higher level calls letter Number.Then continue at step S202.
In step S202, obtain the dump energy that terminal is current.Concrete, can be many according to current dump energy Few, determine whether that closure sensor calls function.As dump energy is sufficient, the most preferentially guarantee that sensor can quickly start; As dump energy is less, now should avoid because sensor is not turned off the situation that causes power consumption of terminal bigger.Then continue at step S203。
In step S203, whether terminal judges left power is less than presetting power threshold, such as larger than or equal to presetting electricity Amount threshold value, then proceed to step S204;Such as less than preset power threshold, then proceed to step S205.
In step S204, such as larger than or equal to preset power threshold, illustrate that dump energy is higher, now can be further Power consumption needed for prediction terminal decides whether closure sensor, to improve the correctness that sensor closedown processes.
Concrete, whether terminal judges power consumption is less than dump energy, such as less than dump energy, the most not closure sensor; Such as larger than or equal to dump energy, then obtain the second preset function rank that power consumption is corresponding with the difference of dump energy, then general This second preset function rank is set to the second object function rank, finally closes the sensor that the second object function rank is corresponding Call function.
It should be noted that there are mapping relations in this difference and the second preset function rank.This mapping relations are the most permissible It is that system is arranged automatically, it is also possible to pre-set by user.System is arranged automatically in this way, and first terminal obtains preset difference value district Between;Then terminal is the second preset function rank that this difference interval arranges correspondence;Last terminal is interval by this difference, second pre- If function rank and the incidence relation of the two store.User pre-sets in this way, and terminal can provide the user one can The selection interface of editor, this interface can select difference interval value and the second preset function rank.User can be directly at this Select difference interval value and corresponding second preset function rank thereof to bind on interface, thus the association realizing the two is closed System.
In step S205, as in step S203, terminal show that dump energy is less than the conclusion of default power threshold, explanation Terminal power is the most relatively low, now should reduce terminal and cause the situation that power consumption is bigger because not discharging sensor.Therefore terminal is sentenced Whether disconnected dump energy in default dump energy interval, in this way, then obtain preset dump energy interval corresponding first preset Function rank, is set to first object function rank by the first preset function rank.
It should be noted that preset, dump energy is interval exists mapping relations with the first preset function rank.This mapping Relation both can be that system is arranged automatically, it is also possible to is pre-set by user.System is arranged automatically in this way, and first terminal obtains pre- If dump energy is interval, as interval in the 10%-15% of total electricity being set to a default dump energy;Then terminal is that this is preset Dump energy interval arranges the first preset function rank of correspondence, as by this default dump energy of the 10%-15% of total electricity Interval the first corresponding preset function rank is set to the 3rd function rank;Last terminal is interval by this default dump energy, first Preset function rank and the incidence relation of the two store.User pre-sets in this way, and terminal can provide the user one Editable selection interface, this interface can select preset interval value and the first preset function rank of dump energy.User Interval value and the corresponding first preset function rank thereof that can select dump energy the most on the surface are bound, thus Realize the incidence relation of the two.
In actual applications, when dump energy is relatively low, terminal first obtains the default dump energy residing for this dump energy Interval, as terminal residual electricity is total electricity 12%, then it is in this default dump energy district of 10%-15% of total electricity In between;Then the first preset function rank of this default dump energy interval association is obtained;This first is preset letter by last terminal Several levels is not set to first object function rank.Then continue at step S206.
In step S206, whether terminal judges first object function rank is minimum function rank, if this first object Function rank is minimum function rank, then proceed to step S207;If first object function rank not least function rank, then proceed to Step S208.
In step S207, if judging in step S206, first object function rank is minimum function rank, then close Sensor corresponding to one object function rank calls function.Specifically, it is judged that whether this first object function rank is minimum letter Several levels method for distinguishing can have multiple, such as, inquires about in all functions that this application program runs in systems, if exist by The subfunction of the function call that this first object function rank is corresponding.Such as, this first object function rank is the second function level , then the function of the 3rd function rank of function call by the second function rank is not judged whether.If it does not exist, then say This this first object function rank bright is minimum function rank, and the sensor directly cutting out its correspondence calls function;If Existing, then illustrate that this first object function rank is not minimum function rank, concrete sensor method for closing is by step S208 There is provided.
In step S208, if step S206 judges first object function rank not least function rank, then close Sensor corresponding to one object function rank calls function, and function rank is adjusted less than the sensor of first object function rank Use function.Such as, when first object function rank is the 3rd function rank, then close function rank less than or equal to the 3rd letter The other function of several levels, the function in the specially the 3rd function rank, the 4th function rank and the 5th function rank is (when function rank During for 1-5 rank).
The sensor method for closing the most i.e. completing this preferred embodiment carries out the process of closedown process to sensor.
The sensor method for closing of this preferred embodiment uses acquisition sensor to call the attribute of function, according to attribute to biography Sensor calls function setup function rank;Obtain the dump energy that terminal is current;Judge that whether dump energy is less than presetting electricity Threshold value;Such as larger than or equal to presetting power threshold, then obtain the power consumption needed for terminal, it is judged that whether power consumption is less than residue electricity Amount, such as less than dump energy, the most not closure sensor;Such as larger than or equal to dump energy, then obtain power consumption and dump energy The second object function rank corresponding to difference, and call function according to the second object function rank closure sensor;Such as less than Preset power threshold, then judge that dump energy, whether in default dump energy interval, in this way, then obtains and presets dump energy district Between corresponding the first preset function rank, the first preset function rank is set to first object function rank;Judge the first mesh Whether scalar functions rank is minimum function rank;The sensor the most then cutting out first object function rank corresponding calls function; If it is not, then close sensor corresponding to first object function rank to call function, and function rank is less than first object function The sensor of rank calls function.The program is closed corresponding sensor according to the dump energy of terminal and is called function, rather than Directly close all of sensor and call function, be possible not only to reduce what terminal power consumed, moreover it is possible to promote sensor and again open Dynamic speed.
Embodiment three,
In order to preferably implement above method, the embodiment of the present invention also provides for a kind of sensor shutoff device, this sensor Shutoff device can integrated in the terminal, this terminal can be specifically the equipment such as smart mobile phone, panel computer.As it is shown on figure 3, should Sensor shutoff device 30 can include that function rank arranges module 301, dump energy acquisition module 302, the acquisition of function rank Module 303 and 304.It is described in detail below:
This function rank arranges module, for sensor calls function setup function rank;
This dump energy acquisition module, for obtaining the dump energy that terminal is current;
This function rank acquisition module, for obtaining the first object function rank that dump energy is corresponding;
This closedown module, calls function for the sensor closing first object function rank corresponding.
Preferably, this sensor shutoff device 30 also includes judge module.It is described in detail below:
This judge module, is used for judging that whether dump energy is less than presetting power threshold;
This function rank acquisition module specifically for, less than when presetting power threshold, obtain that dump energy is corresponding the One object function rank.
Preferably, function rank acquisition module 303 includes that the first judgement submodule, function rank obtain submodule and function Rank arranges submodule.It is described in detail below:
This first judges submodule, is used for judging that dump energy is whether in default dump energy interval;
This function rank obtains submodule, for when being, obtain preset dump energy interval corresponding first preset letter Several levels is other;
This function rank arranges submodule, for the first preset function rank is set to first object function rank.
Preferably, close module 304 include the second judgement submodule, second judge submodule and second pass closed submodule. It is described in detail below:
Second judges submodule, is used for judging whether first object function rank is minimum function rank;
First closes closed submodule, and for when being, the sensor cutting out first object function rank corresponding calls function;
Second closes closed submodule, and for when no, the sensor cutting out first object function rank corresponding calls function, with And function rank calls function less than the sensor of first object function rank.
The sensor shutoff device of this preferred embodiment uses and sensor calls function setup function rank;Obtain terminal Current dump energy;Obtain the first object function rank that dump energy is corresponding;Close first object function rank corresponding Sensor calls function;The program is closed corresponding sensor according to the dump energy of terminal and is called function, and non-immediate pass Close all of sensor and call function, be possible not only to reduce what terminal power consumed, moreover it is possible to promote the speed that sensor restarts Degree.
Embodiment four,
Refer to the flow chart of the specific embodiment that Fig. 4, Fig. 4 are sensor of the invention method for closing and device.
In step S401, user opens function rank and arranges interface, carries out less than the dump energy of total electricity 40% Interval division, is specifically divided into 10% less than total electricity, the 10%-20% of total electricity, the 20%-30% of total electricity, total electricity These four dump energy intervals of 30%-40%, and be set lower than 10% corresponding first function rank of total electricity, total electricity The corresponding second function rank of 10%-20%, the corresponding 3rd function rank of the 20%-30% of total electricity, the 30%-40% of total electricity Corresponding 4th function rank.Concrete, the 4th function rank comprise call sensor data acquisition function call function;3rd Function rank comprise call sensor data analysis function call function;Second function rank comprises to be called sensing data and deposits That stores up function calls function;First function rank comprise call sensing data output function call function.
In step S402, when mobile phone cuts out wechat application, mobile phone detects 22% that dump energy is total electricity, This dump energy of 20%-30% being in total electricity to this dump energy is interval.
In step S403, mobile phone gets the function level that this dump energy interval of 20%-30% of total electricity is corresponding It it is not the 3rd function rank.
In step s 404, the 3rd function rank is set to first object function rank by mobile phone, and closes this first mesh Scalar functions rank comprises call sensing data output function call function.
The sensor method for closing of this preferred embodiment and device use and sensor call function setup function rank;Obtain Take the dump energy that terminal is current;Obtain the first object function rank that dump energy is corresponding;Close first object function rank Corresponding sensor calls function;The program is closed corresponding sensor according to the dump energy of terminal and is called function, rather than Directly close all of sensor and call function, be possible not only to reduce what terminal power consumed, moreover it is possible to promote sensor and again open Dynamic speed.
When being embodied as, above modules can realize as independent entity, it is also possible to carries out combination in any, makees Realize for same or several entities, the embodiment of the method being embodied as can be found in above of above modules, at this not Repeat again.
It should be noted that one of ordinary skill in the art will appreciate that whole in the various methods of above-described embodiment or Part steps can be by program and completes to instruct relevant hardware, and this program can be stored in computer-readable storage medium In matter, as being stored in the memorizer of terminal, and performed by least one processor in this terminal, can wrap in the process of implementation Include the flow process of the embodiment such as information issuing method.Wherein, storage medium may include that read only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc..
A kind of sensor method for closing and the device that there is provided the embodiment of the present invention above are described in detail, its each merit Can module can be integrated in a process chip, it is also possible to be that modules is individually physically present, it is also possible to two or two It is integrated in a module with upper module.Above-mentioned integrated module both can realize to use the form of hardware, it would however also be possible to employ soft The form of part functional module realizes.Principle and the embodiment of the present invention are set forth by specific case used herein, The explanation of above example is only intended to help to understand method and the core concept thereof of the present invention;Skill simultaneously for this area Art personnel, according to the thought of the present invention, the most all will change, in sum, and this Description should not be construed as limitation of the present invention.

Claims (10)

1. a sensor method for closing, it is characterised in that including:
Sensor is called function setup function rank;
Obtain the dump energy that terminal is current;
Obtain the first object function rank that described dump energy is corresponding;
The sensor cutting out described first object function rank corresponding calls function.
Sensor method for closing the most according to claim 1, it is characterised in that the dump energy that described acquisition terminal is current Step after also include:
Judge that whether described dump energy is less than presetting power threshold;
Such as less than preset power threshold, then obtain the first object function rank that described dump energy is corresponding.
Sensor method for closing the most according to claim 1, it is characterised in that the described dump energy of described acquisition is corresponding The step of first object function rank specifically includes:
Judge that described dump energy is whether in default dump energy interval;
In this way, then the first preset function rank that described default dump energy interval is corresponding is obtained;
Described first preset function rank is set to first object function rank.
Sensor method for closing the most according to claim 1, it is characterised in that described first object function rank is less than High function rank;Sensor corresponding to described cut out described first object function rank calls the step of function and specifically includes:
Judge whether described first object function rank is minimum function rank;
The sensor the most then cutting out described first object function rank corresponding calls function;
If it is not, then close sensor corresponding to described first object function rank to call function, and function rank is less than described The sensor of first object function rank calls function.
Sensor method for closing the most according to claim 1, it is characterised in that described sensor is called function setup letter Several levels does not specifically include:
Obtain described sensor and call the attribute of function;
According to described attribute, described sensor called function setup function rank.
Sensor method for closing the most according to claim 2, it is characterised in that described judge that described dump energy is the least Also include after the step of default power threshold:
Such as larger than or equal to preset power threshold, then obtain the power consumption needed for described terminal;
Judge that whether described power consumption is less than described dump energy;
The most described dump energy, the most not closure sensor;
Such as larger than or equal to described dump energy, then obtain the second mesh that described power consumption is corresponding with the difference of described dump energy Scalar functions rank, and the sensor cutting out described second object function rank corresponding calls function.
7. a sensor shutoff device, it is characterised in that including:
Function rank arranges module, for sensor calls function setup function rank;
Dump energy acquisition module, for obtaining the dump energy that terminal is current;
Function rank acquisition module, for obtaining the first object function rank that described dump energy is corresponding;
Close module, call function for the sensor closing described first object function rank corresponding.
Sensor shutoff device the most according to claim 7, it is characterised in that described sensor shutoff device also includes:
Judge module, is used for judging that whether described dump energy is less than presetting power threshold;
Described function rank acquisition module specifically for, less than preset power threshold time, obtain described dump energy corresponding First object function rank.
Sensor shutoff device the most according to claim 7, it is characterised in that described function rank acquisition module includes:
First judges submodule, is used for judging that described dump energy is whether in default dump energy interval;
Function rank obtains submodule, for when being, obtains the first preset function that described default dump energy interval is corresponding Rank;
Function rank arranges submodule, for described first preset function rank is set to first object function rank.
Sensor shutoff device the most according to claim 7, it is characterised in that described first object function rank is less than The highest function rank;Described closedown module includes:
Second judges submodule, is used for judging whether described first object function rank is minimum function rank;
First closes closed submodule, and for when being, the sensor cutting out described first object function rank corresponding calls function;
Second closes closed submodule, and for when no, the sensor cutting out described first object function rank corresponding calls function, with And function rank calls function less than the sensor of described first object function rank.
CN201610379815.4A 2016-05-31 2016-05-31 A kind of sensor method for closing and device Expired - Fee Related CN106055076B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610379815.4A CN106055076B (en) 2016-05-31 2016-05-31 A kind of sensor method for closing and device
PCT/CN2017/086467 WO2017206870A1 (en) 2016-05-31 2017-05-29 Sensor shutdown method and apparatus, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610379815.4A CN106055076B (en) 2016-05-31 2016-05-31 A kind of sensor method for closing and device

Publications (2)

Publication Number Publication Date
CN106055076A true CN106055076A (en) 2016-10-26
CN106055076B CN106055076B (en) 2019-07-16

Family

ID=57172550

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610379815.4A Expired - Fee Related CN106055076B (en) 2016-05-31 2016-05-31 A kind of sensor method for closing and device

Country Status (2)

Country Link
CN (1) CN106055076B (en)
WO (1) WO2017206870A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106896896A (en) * 2017-02-03 2017-06-27 广东欧珀移动通信有限公司 Electricity saving method, device and electronic equipment
WO2017206870A1 (en) * 2016-05-31 2017-12-07 广东欧珀移动通信有限公司 Sensor shutdown method and apparatus, storage medium, and electronic device
CN111796883A (en) * 2019-04-09 2020-10-20 Oppo广东移动通信有限公司 Device control method, device, storage medium and electronic device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109511139B (en) * 2018-12-19 2023-01-03 Oppo广东移动通信有限公司 WIFI control method and device, mobile device and computer-readable storage medium
CN112947216B (en) * 2021-03-02 2022-11-18 山东鲁软数字科技有限公司智慧能源分公司 Overhead line visual monitoring, shooting and power supply meteorological control system and method
CN113514327B (en) * 2021-04-22 2023-05-09 中煤科工集团重庆研究院有限公司 Thick buried layer concrete penetrating type wireless stress strain sensor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090098914A1 (en) * 2007-10-15 2009-04-16 Research In Motion Limited Method and system for enabling or disabling features based on a battery level threshold
CN103365389A (en) * 2012-03-26 2013-10-23 联发科技股份有限公司 Method for performing power consumption control, and associated apparatus
CN103677214A (en) * 2013-12-31 2014-03-26 北京金山网络科技有限公司 Electricity consumption control method and device used for mobile terminal and mobile terminal
CN104166453A (en) * 2014-08-15 2014-11-26 百度在线网络技术(北京)有限公司 Method and device for reducing power consumption of mobile terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929382A (en) * 2012-10-24 2013-02-13 惠州Tcl移动通信有限公司 Method for reducing power consumption of electronic equipment and electronic equipment
CN104199538A (en) * 2014-08-26 2014-12-10 深圳市中兴移动通信有限公司 Mobile terminal power saving method and system and mobile terminal
CN106055076B (en) * 2016-05-31 2019-07-16 Oppo广东移动通信有限公司 A kind of sensor method for closing and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090098914A1 (en) * 2007-10-15 2009-04-16 Research In Motion Limited Method and system for enabling or disabling features based on a battery level threshold
CN103365389A (en) * 2012-03-26 2013-10-23 联发科技股份有限公司 Method for performing power consumption control, and associated apparatus
CN103677214A (en) * 2013-12-31 2014-03-26 北京金山网络科技有限公司 Electricity consumption control method and device used for mobile terminal and mobile terminal
CN104166453A (en) * 2014-08-15 2014-11-26 百度在线网络技术(北京)有限公司 Method and device for reducing power consumption of mobile terminal

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017206870A1 (en) * 2016-05-31 2017-12-07 广东欧珀移动通信有限公司 Sensor shutdown method and apparatus, storage medium, and electronic device
CN106896896A (en) * 2017-02-03 2017-06-27 广东欧珀移动通信有限公司 Electricity saving method, device and electronic equipment
CN106896896B (en) * 2017-02-03 2019-10-25 Oppo广东移动通信有限公司 Electricity saving method, device and electronic equipment
CN111796883A (en) * 2019-04-09 2020-10-20 Oppo广东移动通信有限公司 Device control method, device, storage medium and electronic device
CN111796883B (en) * 2019-04-09 2024-05-14 Oppo广东移动通信有限公司 Equipment control method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
WO2017206870A1 (en) 2017-12-07
CN106055076B (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN106055076A (en) Method and device for closing sensors
CN103199311B (en) The battery power saving method of portable type electronic product, equipment and mobile terminal
CN105389111B (en) A kind of operating method and electronic equipment of split screen display available
CN103513748A (en) Method for processing information, information processor and electronic device
CN107402809A (en) Management-control method, device, storage medium and the electronic equipment of application program
CN105955073A (en) Automatic starting method, system and mobile intelligent devices for satellite positioning device
CN103858070A (en) Power-off threshold voltage adjustment method, starting up method and electronic equipment using same
CN105892613A (en) Method and apparatus for clearing background applications
CN106055077A (en) Wake-up lock-based processing method and device
CN104023145A (en) Method and device for automatically starting automatic backlight adjustment of mobile terminal
CN107589928A (en) Double screen displaying method of terminal, device, terminal and computer-readable recording medium
CN106020907A (en) Application shut-down method and device
CN105704785A (en) Network searching method, device and mobile terminal
CN107463437A (en) Using management-control method, device, storage medium and electronic equipment
CN108649658A (en) The switching method of more batteries, for electric installation, electronic equipment
CN103248763A (en) Communication method and mobile terminal
CN106528290A (en) Resource scheduling method for mobile terminal and mobile terminal
CN106095492A (en) The method for closing of a kind of application program and device
CN107479953A (en) process management method, device, storage medium and electronic equipment
CN106055075B (en) A kind of method for closing and device of sensor
CN106201175B (en) Location regulation method, device and the terminal of application icon
CN106250092A (en) A kind of terminal screen changing method and device
CN106095055A (en) The method for closing of a kind of application program and device
CN106020908A (en) Function closing method and device
CN106095487A (en) The method for closing of a kind of application program and device

Legal Events

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

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190716