CN106055076B - A kind of sensor method for closing and device - Google Patents
A kind of sensor method for closing and device Download PDFInfo
- Publication number
- CN106055076B CN106055076B CN201610379815.4A CN201610379815A CN106055076B CN 106055076 B CN106055076 B CN 106055076B CN 201610379815 A CN201610379815 A CN 201610379815A CN 106055076 B CN106055076 B CN 106055076B
- Authority
- CN
- China
- Prior art keywords
- function
- sensor
- rank
- remaining capacity
- 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.)
- Expired - Fee Related
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
Abstract
The embodiment of the invention discloses a kind of sensor method for closing and devices;This method comprises: obtaining the current remaining capacity of terminal;Obtain the corresponding first object function rank of remaining capacity;It closes the corresponding sensor of first object function rank and calls function;The program closes corresponding sensor according to the remaining capacity of terminal and calls function, and it is indirect close all sensors and call function, not only reduce terminal power consumption, also improve the speed of sensor restarting.
Description
Technical field
The present invention relates to field of terminal technology, and in particular to a kind of sensor method for closing and device.
Background technique
With the development of communication technology, the function of smart phone is stronger and stronger.It is powerful why smart phone has
Function, wherein many places will be attributed to the fact that diversified sensor.Electronic compass, acceleration sensor, three-axis gyroscope, light
Sensor, these are all the relatively common sensor devices of interior of mobile phone.
A kind of device for the information that sensor is perceived as reception and transmitting, can help smart phone accurately to obtain respectively
Kind external information.Specifically, each sensor in smart phone corresponds to multiple calling functions, these call function to use respectively
In the different function for calling sensor, or control sensor with the operation of certain state.Such as when application will use some sensor
When, it can call using function and open the sensor.After commonly used closing, the sensor used does not discharge completely,
I.e. still in wake-up states, it will lead to mobile phone electricity at this time and largely consumed, reduce the cruising ability of mobile phone.
Currently, in order to lower the consumption of intelligent terminal electricity, and then promote the cruising ability of intelligent terminal, intelligent terminal meeting
Closure sensor calls function, i.e., all functions using sensor.
However, although this sensor shutdown strategy can reduce terminal power consumption, since the program is to close
The calling function of all sensors, if intelligent terminal needs to restart the sensor after closure sensor, then this
When, intelligent terminal needs to re-call all calling functions of the sensor, and the speed that will lead to sensor restarting compares
Slowly.
Summary of the invention
The embodiment of the present invention provides a kind of sensor method for closing and device, and it is big to can solve existing power consumption of terminal, sensing
Device starts slow-footed technical problem.
The embodiment of the present invention provides a kind of sensor method for closing, comprising:
Function setup function rank is called to sensor;
Obtain the current remaining capacity of terminal;
Obtain the corresponding first object function rank of the remaining capacity;
It closes the corresponding sensor of the first object function rank and calls function.
Further, after described the step of obtaining terminal current remaining capacity further include:
Judge whether the remaining capacity is less than default power threshold;
Such as less than default power threshold, then obtain the corresponding first object function rank of the remaining capacity.
Further, described the step of obtaining the remaining capacity corresponding first object function rank, specifically includes:
Judge the remaining capacity whether in default remaining capacity section;
If so, then obtaining the corresponding first preset function rank in the default remaining capacity section;
First object function rank is set by the first preset function rank.
Further, the first object function rank is lower than highest function rank;It is described to close the first object letter
The step of not corresponding sensor of several levels calls function specifically includes:
Judge whether the first object function rank is minimum function rank;
If so, closing the corresponding sensor of the first object function rank calls function;
Function and function rank is called to be lower than if it is not, then closing the corresponding sensor of the first object function rank
The sensor of the first object function rank calls function.
Further, described to call function setup function rank to specifically include sensor:
Obtain the attribute that the sensor calls function;
Function setup function rank is called to the sensor according to the attribute.
Further, it is described judge the step of whether remaining capacity is less than default power threshold after further include:
Such as larger than or equal to default power threshold, then power consumption needed for obtaining the terminal;
Judge whether the power consumption is less than the remaining capacity;
The such as less than described remaining capacity, then not closure sensor;
Such as larger than or it is equal to the remaining capacity, then the power consumption the second mesh corresponding with the difference of the remaining capacity
Scalar functions rank, and close the corresponding sensor of the second objective function rank and call function.
The embodiment of the invention also provides a kind of sensors to close device, comprising:
Function rank setup module, for calling function setup function rank to sensor;
Remaining capacity obtains module, for obtaining the current remaining capacity of terminal;
Function rank obtains module, for obtaining the corresponding first object function rank of the remaining capacity;
Closedown module calls function for closing the corresponding sensor of the first object function rank.
Further, the sensor closes device further include:
Judgment module, for judging whether the remaining capacity is less than default power threshold;
The function rank obtains module and is specifically used for, and when being less than default power threshold, obtains the remaining capacity pair
The first object function rank answered.
Further, the function rank acquisition module includes:
First judging submodule, for judging the remaining capacity whether in default remaining capacity section;
Function rank acquisition submodule is preset for when being, obtaining the default remaining capacity section corresponding first
Function rank;
Submodule is arranged in function rank, for setting first object function rank for the first preset function rank.
Further, the first object function rank is lower than highest function rank;The closedown module includes:
Second judgment submodule, for judging whether the first object function rank is minimum function rank;
First closes submodule, calls letter for when being, closing the corresponding sensor of the first object function rank
Number;
Second closes submodule, calls letter for when no, closing the corresponding sensor of the first object function rank
Several and function rank calls function lower than the sensor of the first object function rank.
The embodiment of the present invention, which is used, calls function setup function rank to sensor;Obtain the current remaining capacity of terminal;
Obtain the corresponding first object function rank of remaining capacity;It closes the corresponding sensor of first object function rank and calls function;
The program closes corresponding sensor according to the remaining capacity of terminal and calls function, and indirect closes all sensor tune
With function, compared with the prior art for, can not only reduce terminal power consumption, moreover it is possible to promote the speed of sensor restarting
Degree.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached
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 for the preferred embodiment that sensor of the invention closes device;
Fig. 4 is the flow chart of the specific embodiment of sensor of the invention method for closing and device.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those skilled in the art's every other implementation obtained without creative efforts
Example, shall fall within the protection scope of the present invention.
The embodiment of the present invention provides a kind of sensor method for closing and device.It will be described in detail respectively below.
Embodiment one,
Fig. 1 is please referred to, Fig. 1 is the flow chart of the first preferred embodiment of sensor of the invention method for closing.This method
For carrying out closing processing to the sensor in terminal, it includes sensing that wherein the terminal, which can be smart phone, tablet computer etc.,
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 current remaining capacity of terminal;
Step S103 obtains the corresponding first object function rank of remaining capacity;
Step S104 closes the corresponding sensor of first object function rank and calls function.
The following detailed description of the detailed process of each step of the sensor method for closing of this preferred embodiment.
In step s101, terminal calls function setup function rank to sensor.Sensing system is as smart phone
A part, the function of mobile phone can be allowed more rich and varied.Such as pressure sensor, height above sea level is calculated by measurement atmospheric pressure
Degree.In sensor systems, each sensor corresponds to multiple calling functions, these sensors call function to be used for using sensing
Some function of device or the operating status for controlling sensor are passed if sensor calls function A that sensor can be made to acquire data
Sensor calls function B that sensor can be made to handle data;For another example sensor calls function C that sensor can be made to be in and enlivens shape
State, sensor call function D that can open the sensor.
In general, will use corresponding sensor when we open some application and operate.As opened application of taking pictures
When, terminal will use light sensor and secretly determine whether time for exposure and LED flash open according to environment is bright, to improve
The shooting quality of photo.However, light sensor does not discharge completely, still in wake-up states when photo application is closed.This
When the light sensor in wake-up states will consume terminal power, it is therefore necessary to discharge the light sensor.
However, when reusing the sensor next time, needing to restart sensing if the function of sensor all closed
The function of device various pieces, so that the starting of sensor be made to slow.Therefore call the attribute of function to letter according to sensor
Number carries out partition of the level, to realize the closing step by step for calling function to sensor.
Specifically, can be called according to sensor the sensor function that specifically calls of function come to sensor call function into
Line function partition of the level, the sensor that will such as make sensor carry out data processing call function setup first function rank, will
The sensor for making sensor carry out data acquisition calls function setup second function rank.
Preferably, the method for calling function to carry out function partition of the level sensor can also be to be called according to the sensor
Function divides sensor state in which, and the sensor that will such as make sensor be in wake-up states calls function setup the
One function rank will make the sensor of sensor in a dormant state call function setup second function rank.
Preferably, the method for calling function to carry out function partition of the level sensor, which can also be, calls sensing according to them
The frequency of device divides.To such as call the lower sensor of sensor frequency to call function setup is first function rank, will be adjusted
Calling function setup with the higher sensor of sensor frequency is second function rank.
It should be noted that the first function rank is highest function rank, second function rank is that rank is lower than highest
The rank of function rank.When selecting closure sensor to call function, there is preferential close the sensor of higher level to call letter
Number.Then continue at step S102.
In step s 102, the current remaining capacity of terminal is obtained.Specifically, can be according to the more of current remaining capacity
It is few, to determine whether that closure sensor calls function.Such as remaining capacity abundance, then preferentially ensure that sensor can be with quick start;
If remaining capacity is less, should be avoided at this time because sensor is not turned off the situation for causing power consumption of terminal larger.Then continue at step
S103。
In step s 103, terminal obtains the corresponding first object function rank of remaining capacity.It should be noted that default
There are mapping relations with the first preset function rank in remaining capacity section.This mapping relations either system is arranged automatically,
It can also be preset by user.System in this way is arranged automatically, and terminal obtains default remaining capacity section first, such as by total electricity
10%-15% be set as a default remaining capacity section;Then terminal is default remaining capacity section setting corresponding the
One preset function rank, such as this default corresponding first preset function grade in remaining capacity section by the 10%-15% of total electricity
It is not set as third function rank;This is preset the association in remaining capacity section, the first preset function rank and the two by last terminal
Relationship stores.User in this way presets, and terminal can provide an editable selection interface for user, on the interface
It can choose the interval value and the first preset function rank of default remaining capacity.User can directly select residue on the surface
The interval value of electricity and its corresponding first preset function rank are bound, to realize the incidence relation of the two.
In practical applications, when remaining capacity is lower, terminal first obtains default remaining capacity locating for the remaining capacity
Section, if terminal residual electricity be total electricity 12%, then its 10%-15% for be in total electricity this preset remaining capacity area
Between in;Then the default associated first preset function rank in remaining capacity section is obtained;Last terminal is by the first default letter
Several levels are not set as first object function rank.Then continue at step S104.
In step S104, terminal closes the corresponding sensor of first object function rank and calls function.Specifically, can be with
First judge whether the first object function rank is minimum function rank, for example minimum function rank, then directly close this first
The corresponding sensor of objective function rank calls function;If not being minimum function rank, then first object function rank pair is closed
The sensor answered calls function and function rank to call function lower than the sensor of first object function rank.
The sensor method for closing of this preferred embodiment, which is used, calls function setup function rank to sensor;Obtain terminal
Current remaining capacity;Obtain the corresponding first object function rank of remaining capacity;It is corresponding to close first object function rank
Sensor calls function;The program closes corresponding sensor according to the remaining capacity of terminal and calls function, and indirect pass
It closes all sensors and calls function, can not only reduce terminal power consumption, moreover it is possible to promote the speed of sensor restarting
Degree.
Embodiment two,
Referring to figure 2., Fig. 2 is the flow chart of the second preferred embodiment of sensor of the invention method for closing.This method
For carrying out closing processing to the sensor in terminal, it includes sensing that wherein the terminal, which can be smart phone, tablet computer etc.,
The mobile device of device.The sensor method for closing of this preferred embodiment includes:
Step S201 obtains the attribute that sensor calls function, calls function setup function grade to sensor according to attribute
Not;
Step S202 obtains the current remaining capacity of terminal;
Step S203, judges whether remaining capacity is less than default power threshold;
Step S204 such as larger than or is equal to default power threshold, then power consumption needed for obtaining terminal judges that power consumption is
It is no to be less than remaining capacity, such as less than remaining capacity, then not closure sensor;Such as larger than or it is equal to remaining capacity, then described in acquisition
Power consumption the second objective function rank corresponding with the difference of the remaining capacity, and close the second objective function rank pair
The sensor answered calls function;
Step S205, such as less than default power threshold, then judge remaining capacity whether in default remaining capacity section, such as
It is then to obtain the default corresponding first preset function rank in remaining capacity section, set first for the first preset function rank
Objective function rank;
Step S206 judges whether first object function rank is minimum function rank;
Step S207, if so, closing the corresponding sensor of first object function rank calls function;
Step S208, if it is not, then closing the corresponding sensor of first object function rank calls function and function rank
Sensor lower than first object function rank calls function.
The following detailed description of the detailed process of each step of the sensor method for closing of this preferred embodiment.
In step S201, the attribute that sensor calls function is obtained, function setup function is called to sensor according to attribute
Rank.
The a part of sensing system as smart phone, can allow the function of mobile phone more rich and varied.As pressure passes
Sensor calculates height above sea level by measurement atmospheric pressure.In sensor systems, each sensor corresponds to multiple calling functions,
These sensors call function to be used for some function using sensor or control the operating status of sensor, such as sensor tune
Sensor can be made to acquire data with function A, sensor calls function B that sensor can be made to handle data;For another example sensor tune
Sensor can be made to be in active state with function C, sensor calls function D that can open the sensor.
In general, will use corresponding sensor when we open some application and operate.As opened application of taking pictures
When, terminal will use light sensor and secretly determine whether time for exposure and LED flash open according to environment is bright, to improve
The shooting quality of photo.However, light sensor does not discharge completely, still in wake-up states when photo application is closed.This
When the light sensor in wake-up states will consume terminal power, it is therefore necessary to discharge the light sensor.
However, when reusing the sensor next time, needing to restart sensing if the function of sensor all closed
The function of device various pieces, so that the starting of sensor be made to slow.Therefore call the attribute of function to letter according to sensor
Number carries out partition of the level, to realize the closing step by step for calling function to sensor.
Specifically, can be called according to sensor the sensor function that specifically calls of function come to sensor call function into
Line function partition of the level, the sensor that will such as make sensor carry out data processing call function setup first function rank, will
The sensor for making sensor carry out data acquisition calls function setup second function rank.
Preferably, the method for calling function to carry out function partition of the level sensor can also be to be called according to the sensor
Function divides sensor state in which, and the sensor that will such as make sensor be in wake-up states calls function setup the
One function rank will make the sensor of sensor in a dormant state call function setup second function rank.
Preferably, the method for calling function to carry out function partition of the level sensor, which can also be, calls sensing according to them
The frequency of device divides.To such as call the lower sensor of sensor frequency to call function setup is first function rank, will be adjusted
Calling function setup with the higher sensor of sensor frequency is second function rank.
It should be noted that the first function rank is highest function rank, second function rank is that rank is lower than highest
The rank of function rank.When selecting closure sensor to call function, there is preferential close the sensor of higher level to call letter
Number.Then continue at step S202.
In step S202, the current remaining capacity of terminal is obtained.Specifically, can be according to the more of current remaining capacity
It is few, to determine whether that closure sensor calls function.Such as remaining capacity abundance, then preferentially ensure that sensor can be with quick start;
If remaining capacity is less, should be avoided at this time because sensor is not turned off the situation for causing power consumption of terminal larger.Then continue at step
S203。
In step S203, whether terminal judges left power is less than default power threshold, such as larger than or is equal to default electric
Threshold value is measured, then is transferred to step S204;Such as less than default power threshold, then be transferred to step S205.
In step S204, such as larger than or it is equal to default power threshold, illustrates that remaining capacity is higher, it at this time can be further
Power consumption needed for prediction terminal decides whether closure sensor, to improve the correctness that sensor closes processing.
Specifically, terminal judges whether power consumption is less than remaining capacity, such as less than remaining capacity, then not closure sensor;
Such as larger than or it is equal to remaining capacity, then obtains power consumption the second preset function rank corresponding with the difference of remaining capacity, then will
The second preset function rank is set as the second objective function rank, finally closes the corresponding sensor of the second objective function rank
Call function.
It should be noted that the difference is with the second preset function rank, there are mapping relations.This mapping relations both can be with
It is that system is arranged automatically, can also be preset by user.System in this way is arranged automatically, and terminal obtains preset difference value area first
Between;Then terminal is that corresponding second preset function rank is arranged in the difference section;Last terminal is by the difference section, second pre-
If the incidence relation of function rank and the two stores.User in this way presets, and terminal can provide one for user can
The selection interface of editor can choose difference interval value and the second preset function rank on the interface.User can be directly at this
Difference interval value and its corresponding second preset function rank is selected to be bound on interface, to realize that the association of the two is closed
System.
In step S205, as terminal show that remaining capacity is less than the conclusion of default power threshold, explanation in step S203
Terminal power is lower, should reduce the situation that terminal causes power consumption larger because not discharging sensor at this time.Therefore terminal is sentenced
Whether disconnected remaining capacity is preset in default remaining capacity section if so, then obtaining default remaining capacity section corresponding first
The first preset function rank is set first object function rank by function rank.
It should be noted that there are mapping relations with the first preset function rank in default remaining capacity section.This mapping
Relationship can also be preset by user either system is arranged automatically.System in this way is arranged automatically, and terminal obtains in advance first
If remaining capacity section, the 10%-15% of total electricity is such as set as a default remaining capacity section;Then terminal is default for this
Corresponding first preset function rank is arranged in remaining capacity section, such as this default remaining capacity by the 10%-15% of total electricity
The corresponding first preset function rank in section is set as third function rank;This is preset remaining capacity section, first by last terminal
The incidence relation of preset function rank and the two stores.User in this way presets, and terminal can provide one for user
Editable selection interface can choose the interval value and the first preset function rank of default remaining capacity on the interface.User
The interval value and its corresponding first preset function rank that remaining capacity can directly be selected on the surface are bound, thus
Realize the incidence relation of the two.
In practical applications, when remaining capacity is lower, terminal first obtains default remaining capacity locating for the remaining capacity
Section, if terminal residual electricity be total electricity 12%, then its 10%-15% for be in total electricity this preset remaining capacity area
Between in;Then the default associated first preset function rank in remaining capacity section is obtained;Last terminal is by the first default letter
Several levels are not set as first object function rank.Then continue at step S206.
In step S206, terminal judges whether first object function rank is minimum function rank, if the first object
Function rank is minimum function rank, then is transferred to step S207;If the not least function rank of first object function rank, is transferred to
Step S208.
In step S207, if judging in step S206, first object function rank is minimum function rank, closes
The corresponding sensor of one objective function rank calls function.Specifically, judge whether the first object function rank is minimum letter
Several levels method for distinguishing can there are many, for example, inquiring in all functions that the application program is run in systems, if exist by
The subfunction of the corresponding function call of first object function rank.For example, the first object function rank is second function grade
Not, then it judges whether there is by the function of the third function rank of the function call of second function rank.If it does not exist, then saying
The bright first object function rank is minimum function rank, directly closes its corresponding sensor and calls function;If
In the presence of then illustrating that the first object function rank is not minimum function rank, specific sensor method for closing is by step S208
It provides.
In step S208, if judging the not least function rank of first object function rank in step S206, is closed
The corresponding sensor of one objective function rank calls function and function rank to be lower than the sensor tune of first object function rank
Use function.For example, then closing function rank less than or equal to third letter when first object function rank is third function rank
Function in the other function of several levels, specially third function rank, the 4th function rank and the 5th function rank is (when function rank
When for 1-5 rank).
The sensor method for closing for completing this preferred embodiment in this way close to sensor the process of processing.
The sensor method for closing of this preferred embodiment calls the attribute of function using sensor is obtained, according to attribute to biography
Sensor calls function setup function rank;Obtain the current remaining capacity of terminal;Judge whether remaining capacity is less than default electricity
Threshold value;Such as larger than or it is equal to default power threshold, then power consumption needed for obtaining terminal judges whether power consumption is less than remaining electricity
Amount, such as less than remaining capacity, then not closure sensor;Such as larger than or it is equal to remaining capacity, then obtains power consumption and remaining capacity
The corresponding second objective function rank of difference, and according to the second objective function rank closure sensor call function;Such as less than
Default power threshold then judges remaining capacity whether in default remaining capacity section, if so, then obtaining default remaining capacity area
Between corresponding first preset function rank, set first object function rank for the first preset function rank;Judge the first mesh
Whether scalar functions rank is minimum function rank;If so, closing the corresponding sensor of first object function rank calls function;
Call function and function rank lower than first object function if it is not, then closing the corresponding sensor of first object function rank
The sensor of rank calls function.The program closes corresponding sensor according to the remaining capacity of terminal and calls function, rather than
It directly closes all sensors and calls function, can not only reduce terminal power consumption, moreover it is possible to promote sensor and open again
Dynamic speed.
Embodiment three,
In order to better implement above method, the embodiment of the present invention also provides a kind of sensor and closes device, the sensor
Closing device can integrate in the terminal, which specifically can be the equipment such as smart phone, tablet computer.As shown in figure 3, should
It may include function rank setup module 301, remaining capacity acquisition module 302, the acquisition of function rank that sensor, which closes device 30,
Module 303 and 304.It is described in detail below:
The function rank setup module, for calling function setup function rank to sensor;
The remaining capacity obtains module, for obtaining the current remaining capacity of terminal;
The function rank obtains module, for obtaining the corresponding first object function rank of remaining capacity;
The closedown module calls function for closing the corresponding sensor of first object function rank.
Preferably, it further includes judgment module which, which closes device 30,.It is described in detail below:
The judgment module, for judging whether remaining capacity is less than default power threshold;
The function rank obtains module and is specifically used for, and when being less than default power threshold, obtains remaining capacity corresponding the
One objective function rank.
Preferably, it includes the first judging submodule, function rank acquisition submodule and function that function rank, which obtains module 303,
Submodule is arranged in rank.It is described in detail below:
First judging submodule, for judging remaining capacity whether in default remaining capacity section;
The function rank acquisition submodule, for when being, obtaining the default corresponding first default letter in remaining capacity section
Several levels are other;
Submodule is arranged in the one function rank, for setting first object function rank for the first preset function rank.
Preferably, closedown module 304 includes second judgment submodule, second judgment submodule and the second closing submodule.
It is described in detail below:
Second judgment submodule, for judging whether first object function rank is minimum function rank;
First closes submodule, calls function for when being, closing the corresponding sensor of first object function rank;
Second closes submodule, calls function for when no, closing the corresponding sensor of first object function rank, with
And function rank calls function lower than the sensor of first object function rank.
The sensor of this preferred embodiment is closed device and is used to sensor calling function setup function rank;Obtain terminal
Current remaining capacity;Obtain the corresponding first object function rank of remaining capacity;It is corresponding to close first object function rank
Sensor calls function;The program closes corresponding sensor according to the remaining capacity of terminal and calls function, and indirect pass
It closes all sensors and calls function, can not only reduce terminal power consumption, moreover it is possible to promote the speed of sensor restarting
Degree.
Example IV,
Referring to figure 4., Fig. 4 is the flow chart of the specific embodiment of sensor of the invention method for closing and device.
In step S401, user opens function rank set interface, carries out to the remaining capacity lower than total electricity 40%
Interval division, is specifically divided into 10% lower than total electricity, the 10%-20% of total electricity, the 20%-30% of total electricity, total electricity
This four remaining capacity sections 30%-40%, and be set lower than 10% corresponding first function rank of total electricity, total electricity
10%-20% corresponds to second function rank, and the 20%-30% of total electricity corresponds to third function rank, the 30%-40% of total electricity
Corresponding 4th function rank.Specifically, the 4th function rank includes to call the calling function of sensor data acquisition function;Third
Function rank includes to call the calling function of sensor data analysis function;Second function rank includes that sensing data is called to deposit
Store up the calling function of function;First function rank includes to call the calling function of sensing data output function.
In step S402, when mobile phone closing wechat in application, mobile phone detects that remaining capacity is the 22% of total electricity, obtain
This remaining capacity section the 20%-30% of total electricity is in the remaining capacity.
In step S403, mobile phone gets the corresponding function grade in this remaining capacity section the 20%-30% of total electricity
It Wei not third function rank.
In step s 404, third function rank is set first object function rank by mobile phone, and closes first mesh
The calling function for the calling sensing data output function for including in scalar functions rank.
The sensor method for closing and device of this preferred embodiment, which are used, calls function setup function rank to sensor;It obtains
Take the remaining capacity that terminal is current;Obtain the corresponding first object function rank of remaining capacity;Close first object function rank
Corresponding sensor calls function;The program closes corresponding sensor according to the remaining capacity of terminal and calls function, rather than
It directly closes all sensors and calls function, can not only reduce terminal power consumption, moreover it is possible to promote sensor and open again
Dynamic speed.
When it is implemented, the above modules can be used as independent entity to realize, any combination can also be carried out, is made
It is realized for same or several entities, the specific implementation of the above modules can be found in the embodiment of the method for front, herein not
It repeats again.
It should be noted that those of ordinary skill in the art will appreciate that whole in the various methods of above-described embodiment or
Part steps are relevant hardware can be instructed to complete by program, which can store in computer-readable storage medium
It in matter, is such as stored in the memory of terminal, and is executed by least one processor in the terminal, can be wrapped in the process of implementation
Include the process of the embodiment such as information issuing method.Wherein, storage medium may include: 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 provided in an embodiment of the present invention and device are described in detail above, each function
Energy module can integrate in a processing chip, is also possible to modules and physically exists alone, can also be two or two
It is integrated in a module with upper module.Above-mentioned integrated module both can take the form of hardware realization, can also use soft
The form of part functional module is realized.It is used herein that a specific example illustrates the principle and implementation of the invention,
The above description of the embodiment is only used to help understand the method for the present invention and its core ideas;Meanwhile for the skill of this field
Art personnel, according to the thought of the present invention, there will be changes in the specific implementation manner and application range, in conclusion this
Description should not be construed as limiting the invention.
Claims (11)
1. a kind of sensor method for closing characterized by comprising
Function setup function rank is called to sensor;Wherein, the sensor corresponds to multiple calling functions, the sensor tune
Some function using sensor is used for function or controls the operating status of sensor;
When closing application program, the current remaining capacity of terminal is obtained;
Obtain the corresponding first object function rank of the remaining capacity;
It closes the corresponding sensor of the first object function rank and calls function, comprising: close what the application program used
The corresponding calling function of sensor, to promote the speed of sensor restarting.
2. sensor method for closing according to claim 1, which is characterized in that described to obtain the current remaining capacity of terminal
The step of after further include:
Judge whether the remaining capacity is less than default power threshold;
Such as less than default power threshold, then obtain the corresponding first object function rank of the remaining capacity.
3. sensor method for closing according to claim 1, which is characterized in that the acquisition remaining capacity is corresponding
The step of first object function rank, specifically includes:
Judge the remaining capacity whether in default remaining capacity section;
If so, then obtaining the corresponding first preset function rank in the default remaining capacity section;
First object function rank is set by the first preset function rank.
4. sensor method for closing according to claim 1, which is characterized in that the first object function rank is lower than most
High function rank;It is described to close the step of corresponding sensor of the first object function rank calls function and specifically include:
Judge whether the first object function rank is minimum function rank;
If so, closing the corresponding sensor of the first object function rank calls function;
Call function and function rank lower than described if it is not, then closing the corresponding sensor of the first object function rank
The sensor of first object function rank calls function.
5. sensor method for closing according to claim 1, which is characterized in that described to call function setup letter to sensor
Several levels do not specifically include:
Obtain the attribute that the sensor calls function;
Function setup function rank is called to the sensor according to the attribute.
6. sensor method for closing according to claim 2, which is characterized in that described to judge whether the remaining capacity is small
After the step of presetting power threshold further include:
Such as larger than or equal to default power threshold, then power consumption needed for obtaining the terminal;
Judge whether the power consumption is less than the remaining capacity;
The such as less than described remaining capacity, then not closure sensor;
Such as larger than or it is equal to the remaining capacity, then obtains the power consumption the second mesh corresponding with the difference of the remaining capacity
Scalar functions rank, and close the corresponding sensor of the second objective function rank and call function.
7. a kind of sensor closes device characterized by comprising
Function rank setup module, for calling function setup function rank to sensor;Wherein, the sensor corresponds to multiple
Function is called, the sensor calls function to be used for some function using sensor or controls the operating status of sensor;
Remaining capacity obtains module, for when closing application program, obtaining the current remaining capacity of terminal;
Function rank obtains module, for obtaining the corresponding first object function rank of the remaining capacity;
Closedown module calls function for closing the corresponding sensor of the first object function rank, comprising: answer described in closing
The corresponding calling function of sensor used with program, to promote the speed of sensor restarting.
8. sensor according to claim 7 closes device, which is characterized in that the sensor closes device further include:
Judgment module, for judging whether the remaining capacity is less than default power threshold;
The function rank obtains module and is specifically used for, and when being less than default power threshold, it is corresponding to obtain the remaining capacity
First object function rank.
9. sensor according to claim 7 closes device, which is characterized in that the function rank obtains module and includes:
First judging submodule, for judging the remaining capacity whether in default remaining capacity section;
Function rank acquisition submodule, for when being, obtaining corresponding first preset function in the default remaining capacity section
Rank;
Submodule is arranged in function rank, for setting first object function rank for the first preset function rank.
10. sensor according to claim 7 closes device, which is characterized in that the first object function rank is lower than
Highest function rank;The closedown module includes:
Second judgment submodule, for judging whether the first object function rank is minimum function rank;
First closes submodule, calls function for when being, closing the corresponding sensor of the first object function rank;
Second closes submodule, calls function for when no, closing the corresponding sensor of the first object function rank, with
And function rank calls function lower than the sensor of the first object function rank.
11. a kind of computer readable storage medium, is stored with computer program, which is characterized in that the computer program makes
It obtains computer and executes such as method as claimed in any one of claims 1 to 6.
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 CN106055076A (en) | 2016-10-26 |
CN106055076B true 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) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106055076B (en) * | 2016-05-31 | 2019-07-16 | Oppo广东移动通信有限公司 | A kind of sensor method for closing and device |
CN106896896B (en) * | 2017-02-03 | 2019-10-25 | Oppo广东移动通信有限公司 | Electricity saving method, device and electronic equipment |
CN109511139B (en) * | 2018-12-19 | 2023-01-03 | Oppo广东移动通信有限公司 | WIFI control method and device, mobile device and computer-readable storage medium |
CN111796883A (en) * | 2019-04-09 | 2020-10-20 | Oppo广东移动通信有限公司 | Device control method, device, storage medium and electronic device |
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 (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 (4)
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 |
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 |
-
2016
- 2016-05-31 CN CN201610379815.4A patent/CN106055076B/en not_active Expired - Fee Related
-
2017
- 2017-05-29 WO PCT/CN2017/086467 patent/WO2017206870A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Also Published As
Publication number | Publication date |
---|---|
WO2017206870A1 (en) | 2017-12-07 |
CN106055076A (en) | 2016-10-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106055076B (en) | A kind of sensor method for closing and device | |
CN103199311B (en) | The battery power saving method of portable type electronic product, equipment and mobile terminal | |
CN102369647B (en) | Power supply managment method and device of mobile terminal | |
CN105007429B (en) | A kind of method, system and mobile terminal for eliminating flicker | |
CN103513748A (en) | Method for processing information, information processor and electronic device | |
CN106020907B (en) | A kind of method for closing and device of application program | |
CN103631359A (en) | Information processing method and electronic equipment | |
CN105955073A (en) | Automatic starting method, system and mobile intelligent devices for satellite positioning device | |
CN103501390B (en) | Mobile terminal with reminding function and reminding realization method thereof | |
CN103986839A (en) | Method for automatically setting contextual model and mobile terminal | |
CN108764056A (en) | Brightness adjusting method and related product | |
CN104023145A (en) | Method and device for automatically starting automatic backlight adjustment of mobile terminal | |
CN105847535A (en) | Display screen brightness adjusting method and mobile terminal | |
CN106055075B (en) | A kind of method for closing and device of sensor | |
CN107479953A (en) | process management method, device, storage medium and electronic equipment | |
CN108196482A (en) | Power consumption control method, device, storage medium and electronic equipment | |
CN107450709A (en) | application processing method, device, storage medium and electronic equipment | |
CN106095055B (en) | A kind of method for closing and device of application program | |
CN109150675A (en) | A kind of exchange method and device of household electrical appliance | |
CN106654739A (en) | Socket with intelligent power outage function and domestic equipment intelligent power outage realization method | |
CN105847527A (en) | Method for preventing automatic shutdown of mobile terminal, and mobile terminal | |
CN106095487B (en) | A kind of method for closing and device of application program | |
CN106055365B (en) | A kind of closing application program method and apparatus | |
CN113451669A (en) | Charging method and device, electronic device and storage medium | |
CN103747131A (en) | Mobile terminal power state monitoring method and mobile terminal |
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 |