CN114828180B - Control method and device of sensor - Google Patents
Control method and device of sensor Download PDFInfo
- Publication number
- CN114828180B CN114828180B CN202210707986.0A CN202210707986A CN114828180B CN 114828180 B CN114828180 B CN 114828180B CN 202210707986 A CN202210707986 A CN 202210707986A CN 114828180 B CN114828180 B CN 114828180B
- Authority
- CN
- China
- Prior art keywords
- sensor
- mobile terminal
- time
- endurance
- power consumption
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. TPC [Transmission Power Control], power saving or power classes
- H04W52/02—Power saving arrangements
- H04W52/0209—Power saving arrangements in terminal devices
- H04W52/0261—Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. TPC [Transmission Power Control], power saving or power classes
- H04W52/02—Power saving arrangements
- H04W52/0209—Power saving arrangements in terminal devices
- H04W52/0251—Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M2250/00—Details of telephonic subscriber devices
- H04M2250/12—Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Environmental & Geological Engineering (AREA)
- Charge And Discharge Circuits For Batteries Or The Like (AREA)
Abstract
The invention provides a control method and a control device of a sensor, wherein the method comprises the following steps: acquiring the current endurance time of the mobile terminal, and acquiring the predicted time point of the mobile terminal at the next charging moment; judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the current endurance time or not; if not, calculating to obtain a difference value of the endurance time according to the predicted time point of the next charging moment of the mobile terminal and the terminal value of the current endurance time, and searching and determining to obtain a corresponding endurance requirement grade according to the difference value of the endurance time; acquiring sensor information corresponding to all sensors in an activated state in a mobile terminal; and calculating the energy-saving association degree between each sensor and the cruising demand grade according to the unit power consumption of the sensor, and judging whether the energy-saving association degree is greater than the preset association degree so as to control the corresponding sensor to be closed. The invention can effectively reduce the power consumption of the sensor in an unnecessary state, prolong the service time and ensure the use requirement of an outdoor mode.
Description
Technical Field
The invention relates to the technical field of mobile terminal control, in particular to a control method and a control device of a sensor.
Background
For today's electronic devices (e.g. mobile terminals such as mobile phones), various types of sensors are generally provided to realize various inductive interaction functions.
Specifically, in the mobile terminal, commonly provided sensors include a fingerprint sensor, an ambient light sensor, a proximity sensor, a gyroscope sensor, an infrared sensor, a magnetic field sensor, a hall sensor, a gravity sensor, and the like. It will be appreciated that various types of sensors may consume power stored on the mobile terminal in practical applications due to different amounts of power consumption.
In practical application, when a user is in an outgoing mode, especially under uncontrollable conditions such as the field, the mobile terminal cannot be charged within a certain time, and the mobile terminal is inconvenient to directly shut down to influence external contact. However, the sensor of the mobile terminal is always in the working state, which will undoubtedly generate a great loss of electric energy, and shorten the standby time of the mobile terminal.
Disclosure of Invention
In view of the above circumstances, the present invention is directed to a method and an apparatus for controlling a sensor to solve the above problems.
The embodiment of the invention provides a control method of a sensor, which is applied to a mobile terminal and comprises the following steps:
acquiring current endurance time corresponding to the mobile terminal in a current state, and acquiring a predicted time point of the mobile terminal at the next charging moment;
judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the current endurance time;
if not, calculating to obtain a difference value of the time to be continued according to the estimated time point of the next charging moment of the mobile terminal and the end point value of the current time to be continued, and searching and determining in a preset mapping table according to the difference value of the time to be continued to obtain a corresponding grade of the time to be continued;
acquiring sensor information corresponding to all sensors in an activated state in the mobile terminal, wherein the sensor information at least comprises sensor types, sensor unit power consumption and the number corresponding to each type of sensor;
calculating the energy-saving association degree between each sensor and the cruising demand grade according to the unit power consumption of the sensors, and judging whether the energy-saving association degree is greater than a preset association degree or not;
and step six, if yes, controlling the corresponding sensor to be closed.
The invention provides a control method of a sensor, which comprises the steps of firstly, acquiring the corresponding current endurance time of a mobile terminal in the current state, and acquiring the predicted time point of the mobile terminal at the next charging moment; then judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the current endurance time; if not, calculating to obtain a difference value of the endurance time according to the predicted time point of the next charging moment of the mobile terminal and the terminal value of the current endurance time, and searching and determining to obtain a corresponding endurance requirement grade in a preset mapping table according to the difference value of the endurance time; acquiring sensor information corresponding to all sensors in an activated state in a mobile terminal;
calculating the energy-saving association degree between each sensor and the cruising demand grade according to the unit power consumption of the sensors, and judging whether the energy-saving association degree is greater than the preset association degree; and if so, controlling the corresponding sensor to be closed. The invention can effectively reduce the power consumption of the sensor in an unnecessary state, prolong the service time and ensure the use requirement of an outdoor mode.
The control method of the sensor comprises the following steps that at least a fingerprint sensor, an ambient light sensor, a proximity sensor, a gyroscope sensor, an infrared sensor, a magnetic field sensor, a Hall sensor and a gravity sensor are arranged in the mobile terminal;
before the first step, the method comprises the following steps:
judging whether the mobile terminal is in a charging state or not;
if not, judging whether the current mode of the mobile terminal is an outdoor mode, wherein the outdoor mode is judged through parameters obtained by an ambient light sensor, a gyroscope sensor or an infrared sensor;
if so, acquiring the corresponding current endurance time of the mobile terminal in the current state, and generating a request information input box, wherein the request information input box is used for receiving the predicted time point of the next charging time of the mobile terminal, which is input by a user.
The control method of the sensor, wherein in the step five, the calculation formula of the energy-saving correlation degree is represented as:
wherein the content of the first and second substances,is shown asOf the first typeIndividual sensor and endurance requirement levelThe degree of energy-saving association between the two,a degree of association of the reference is indicated,indicates a cruising demand level of the firstkThe number of stages is such that,,ka serial number representing the level of endurance requirement,mrepresents the maximum level of the endurance requirement level,denotes the firstOf the first typeThe sensor unit power consumption of each sensor,indicates a cruising demand level of the firstkThe level corresponds to the standard power consumption of a single sensor.
The control method of the sensor, wherein after the sixth step, the method further comprises the steps of:
after controlling the corresponding sensors to be closed, recording the types and the number of all the sensors switched from the working state to the closed state in the mobile terminal;
calculating to obtain delay time according to the unit power consumption of each sensor corresponding to each sensor switched from the working state to the closing state, the number of each type of sensor and the residual total electric energy of the mobile terminal;
updating the current endurance time according to the delay time length to obtain the updated current endurance time;
judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the updated current endurance time;
if not, the preset association degree is adjusted downwards according to a set step length.
The control method of the sensor, wherein the calculation formula of the delay time duration is represented as:
wherein the content of the first and second substances,the duration of the delay time is represented,which is indicative of a correction factor that is,represents the remaining total power of the mobile terminal,is shown asThe number of types of sensors that can be used,,,a maximum value of the number of types of sensors is indicated,a maximum value of the number corresponding to a single type of sensor;
the updated current endurance is represented as:
wherein the content of the first and second substances,indicating the updated current time of flight,representing the current endurance time.
The control method of the sensor, wherein the method further comprises the following steps:
when the preset association degree is reduced to the minimum value of the association degree, judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the updated current endurance time;
if not, acquiring information of all components, except the sensor, in the working state of the mobile terminal in the current state, wherein the information of the components at least comprises component types and unit power consumption of the components;
determining the unit power consumption of the components corresponding to each type of component from each component type, and sequencing the component according to the descending order of the unit power consumption of the components to obtain a component power consumption sequence table;
judging whether each component in the component power consumption sequence table can be closed in the current state of the mobile terminal;
if yes, closing the components of the corresponding types according to the power consumption sequence in the component power consumption sequence table.
The control method of the sensor, wherein in the fifth step, after the step of calculating the energy saving association degree between each sensor and the cruising demand level according to the unit power consumption of the sensor, the method further comprises the steps of:
when the energy-saving association degrees between the two sensors of different types and the cruising demand grade are calculated to be equal, respectively obtaining the mode association degrees between the two sensors and the current mode of the mobile terminal, wherein the mode association degrees are the correlation between the sensor types and the current mode of the mobile terminal;
comparing the mode association degrees corresponding to the two sensors, and preferentially closing the sensor with the larger mode association degree;
calculating to obtain delay time according to the unit power consumption of each sensor corresponding to each sensor switched from the working state to the closing state, the number of each type of sensor and the residual total electric energy of the mobile terminal;
updating the current endurance time according to the delay time length to obtain the updated current endurance time;
judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the updated current endurance time;
if not, continuing to close the sensor with the smaller mode relevance.
The control method of the sensor, wherein each sensor corresponds to a sensor number, the method further comprises the following steps:
when any sensor in the mobile terminal is switched from a working state to a closing state, immediately recording the closing time of the corresponding sensor and the number of the corresponding sensor;
when the estimated time point of the next charging moment of the mobile terminal is judged to be within the interval range corresponding to the updated current endurance time, counting the sensor closing time and the sensor number corresponding to all closed sensors, and generating sensor control information tables according to the sensor closing time and the sensor number, wherein each sensor control information table corresponds to one endurance requirement level;
and after confirming that a cruising demand grade is obtained, linking to a corresponding sensor control information table according to the cruising demand grade, and calling the corresponding sensors to carry out closing control in sequence according to the sensor control information table.
The control method of the sensor, wherein the method further comprises the following steps:
when the preset association degree is decreased to the minimum value of the association degree, judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the updated current endurance time or not;
if not, acquiring a sensor number corresponding to a sensor in a working state in the mobile terminal;
the sensors corresponding to the sensor numbers are marked as a white list.
The invention provides a control device of a sensor, wherein the control device is applied to a mobile terminal, and the device comprises:
a first obtaining module to:
acquiring the corresponding current endurance time of the mobile terminal in the current state, and acquiring the predicted time point of the next charging moment of the mobile terminal;
a first determining module, configured to:
judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the current endurance time or not;
a first lookup module to:
if the predicted time point of the next charging moment of the mobile terminal is not in the interval range corresponding to the current endurance time, calculating to obtain a difference value of the endurance time according to the predicted time point of the next charging moment of the mobile terminal and the end value of the current endurance time, and searching and determining in a preset mapping table to obtain a corresponding endurance requirement level according to the difference value of the endurance time;
a second obtaining module to:
acquiring sensor information corresponding to all sensors in an activated state in the mobile terminal, wherein the sensor information at least comprises sensor types, sensor unit power consumption and the number corresponding to each type of sensor;
a second determining module configured to:
calculating the energy-saving association degree between each sensor and the cruising demand grade according to the unit power consumption of the sensors, and judging whether the energy-saving association degree is greater than a preset association degree;
a shutdown control module to:
and if the energy-saving correlation degree is greater than the preset correlation degree, controlling the corresponding sensor to be closed.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a flowchart of a control method of a sensor according to a first embodiment of the present invention;
fig. 2 is a flowchart of a control method of a sensor according to a second embodiment of the present invention;
fig. 3 is a flowchart of a control method of a sensor according to a third embodiment of the present invention;
fig. 4 is a flowchart of a control method of a sensor according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a control device of a sensor according to a fifth embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
These and other aspects of embodiments of the invention will be apparent with reference to the following description and attached drawings. In the description and drawings, particular embodiments of the invention have been disclosed in detail as being indicative of some of the ways in which the principles of the embodiments of the invention may be practiced, but it is understood that the scope of the embodiments of the invention is not limited correspondingly. On the contrary, the embodiments of the invention include all changes, modifications and equivalents coming within the spirit and terms of the claims appended hereto.
The first embodiment is as follows:
referring to fig. 1, a method for controlling a sensor according to a first embodiment of the present invention is applied to a mobile terminal, and the method includes the following steps:
s101, acquiring the current endurance time corresponding to the mobile terminal in the current state, and acquiring the predicted time point of the mobile terminal at the next charging time.
In this embodiment, the mobile terminal is at least provided with a fingerprint sensor, an ambient light sensor, a proximity sensor, a gyroscope sensor, an infrared sensor, a magnetic field sensor, a hall sensor, and a gravity sensor. It should be noted that the sensors provided in the mobile terminal are not limited to the above-mentioned sensors, and the actual application requirements are subject to specific criteria.
Additionally, before the step one, the method comprises the following steps:
and S001, judging whether the mobile terminal is in a charging state.
And S002, if not, judging whether the current mode of the mobile terminal is the outdoor mode.
The outdoor mode is judged according to parameters acquired by an ambient light sensor, a gyroscope sensor or an infrared sensor.
And S003, if so, acquiring the current endurance time corresponding to the mobile terminal in the current state, and generating a request information input box, wherein the request information input box is used for receiving the predicted time point of the next charging time of the mobile terminal, which is input by a user.
It can be understood that when the mobile terminal detects that the user is in the outdoor mode, the mobile terminal cannot be effectively charged in time in the outdoor mode, and therefore early warning needs to be performed on the endurance time in advance and corresponding measures need to be taken.
Specifically, in this embodiment, the mobile terminal obtains the current endurance time corresponding to the current state, and then the user is required to input the predicted time point of the next charging time, that is, the predicted charging time point of the user. For example, the current endurance of the mobile terminal in the current state is 6h, and the expected time point of the next charging time of the mobile terminal, which receives all the user inputs, is 8h later.
And S102, judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the current endurance time.
As described above, for example, the current endurance of the mobile terminal in the current state is 6h, and the expected time point of the next charging time of the mobile terminal, which receives all the user inputs, is 8h later. Therefore, the predicted time point of the next charging time of the mobile terminal is not within the interval range corresponding to the current endurance time.
And S103, if not, calculating to obtain a difference value of the time to be continued according to the predicted time point of the next charging moment of the mobile terminal and the end point value of the current time to be continued, and searching and determining to obtain a corresponding level of the time to be continued in a preset mapping table according to the difference value of the time to be continued.
It can be understood that, if the predicted time point of the next charging time of the mobile terminal is not within the range of the interval corresponding to the current endurance time, it indicates that if the mobile terminal does not perform the power optimization in time, the predicted time point of the next charging time cannot be maintained continuously.
Further, a difference value of the to-be-continued flight time is calculated according to the predicted time point of the next charging time of the mobile terminal and the terminal value of the current continuation of the flight time. For example, as can be seen from the above example, the difference between the waiting times is 2 h. Further, after the waiting time is obtained, the corresponding cruising demand grade can be obtained by searching and determining in the preset mapping table according to the determined waiting time. In the present embodiment, the cruising demand level described above is set to ten levels.
And S104, acquiring sensor information corresponding to all sensors in the activated state in the mobile terminal.
The sensor information at least comprises sensor types, sensor unit power consumption and the number corresponding to each type of sensor.
As described in step S103, since the predicted time point of the next charging time of the mobile terminal is not within the interval range corresponding to the current endurance time, it is described that if the power optimization is not performed in time, the predicted time point of the next charging time cannot be maintained, and therefore, the operation mode of the sensor in the mobile terminal needs to be optimized to prolong the standby time of the mobile terminal.
Specifically, in this step, sensor information corresponding to all sensors in the active state in the mobile terminal needs to be acquired. It is understood that the sensor information at least includes the type of the sensor, the unit power consumption of the sensor, and the corresponding number of each type of sensor.
And S105, calculating the energy-saving association degree between each sensor and the cruising demand grade according to the unit power consumption of the sensor, and judging whether the energy-saving association degree is greater than the preset association degree.
In step S105, the formula for calculating the energy saving association degree is:
wherein the content of the first and second substances,is shown asOf the first typeIndividual sensor and endurance requirement levelThe degree of the energy-saving association between the two,the degree of association of the reference is represented,indicates a cruising demand level of the firstkThe number of stages is such that,,ka serial number representing the level of endurance requirement,mrepresents the maximum level of the endurance requirement level,is shown asOf the first typeThe sensor unit power consumption of each sensor,indicates a cruising demand level of the firstkThe level corresponds to the standard power consumption of a single sensor.
It can be understood that, as can be seen from the formula in step S105, in the above formula of the energy saving association degree, the value of the energy saving association degree is directly related to the unit power consumption of the sensor. To a certain extent, it can be understood that, generally, the higher the unit power consumption of the sensor is, the higher the corresponding energy saving association degree is, and the priority for turning off the sensor is higher. I.e. the power consumption loss of the mobile terminal will be reduced even more significantly if it is switched off.
And S106, if yes, controlling the corresponding sensor to be closed.
It can be understood that the corresponding energy saving association degree is calculated by the formula related to the energy saving association degree in the above step S105, and then compared with the preset association degree. In this step, if the energy saving association degree is greater than the preset association degree, the corresponding sensor may be controlled to be turned off.
The invention provides a control method of a sensor, which comprises the steps of firstly, obtaining the corresponding current endurance time of a mobile terminal in the current state, and obtaining the predicted time point of the mobile terminal at the next charging moment; then judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the current endurance time; if not, calculating to obtain a difference value of the endurance time according to the predicted time point of the next charging moment of the mobile terminal and the terminal value of the current endurance time, and searching and determining to obtain a corresponding endurance requirement grade in a preset mapping table according to the difference value of the endurance time; acquiring sensor information corresponding to all sensors in an activated state in a mobile terminal;
calculating the energy-saving association degree between each sensor and the cruising demand grade according to the unit power consumption of the sensors, and judging whether the energy-saving association degree is greater than the preset association degree; and if so, controlling the corresponding sensor to be closed. The invention can effectively reduce the power consumption of the sensor in an unnecessary state, prolong the service time and ensure the use requirement of an outdoor mode.
Example two:
in order to more clearly and completely illustrate the shutdown control flow of the sensor, referring to fig. 2, a second embodiment of the present invention provides a method for controlling a sensor, the method including the steps of:
s201, after controlling the corresponding sensors to be closed, recording the types and the number of all the sensors switched from the working state to the closed state in the mobile terminal.
S202, calculating to obtain the delay time according to the unit power consumption of the sensor corresponding to each sensor switched from the working state to the closing state, the number of each type of sensor and the residual total electric energy of the mobile terminal.
In this step, the calculation formula of the delay time length is expressed as:
wherein the content of the first and second substances,the duration of the delay time is represented,indicating correctionThe coefficients of which are such that,represents the remaining total power of the mobile terminal,is shown asThe number of types of sensors that can be used,,,a maximum value of the number of types of sensors is indicated,representing a maximum corresponding number of sensors of a single type.
And S203, updating the current endurance time according to the delay time length to obtain the updated current endurance time.
Specifically, the updated current endurance time is represented as:
wherein the content of the first and second substances,indicating the updated current time of flight,representing the current endurance time.
And S204, judging whether the predicted time point of the next charging time of the mobile terminal is within the interval range corresponding to the updated current endurance time.
It will be appreciated that this step is performed to verify that the duration of the mobile terminal after the current turning off of the partial sensor is supported to the expected point in time of the next charging moment to ensure proper use of the base communication of the mobile terminal throughout the outdoor activity.
And S205, if not, adjusting the preset association degree downwards according to a set step length.
Further, if the predicted time point of the next charging time of the mobile terminal is not within the interval range corresponding to the updated current endurance, it indicates that the endurance of the mobile terminal still cannot be supported to the predicted time point of the next charging time after the partial sensor is turned off currently. Based on this, the preset degree of association needs to be adjusted. Specifically, the threshold is adjusted downward, so that the threshold is lowered, and more qualified sensors are controlled to be turned off, so that the service time is prolonged better.
In this embodiment, the method further includes the steps of:
and S2051, when the preset association degree is reduced to the minimum association degree, judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the updated current endurance time.
It should be noted that, in this embodiment, if the preset correlation degree is decreased to the minimum correlation degree, all the sensors that meet the shutdown condition are already shutdown. Further, at this time, whether the predicted time point of the next charging time of the mobile terminal is within the interval range corresponding to the updated current endurance time is continuously judged.
And S2052, if not, acquiring the information of all the components, except the sensor, of the mobile terminal in the working state in the current state.
The information of the components at least comprises component types and unit power consumption of the components.
It can be understood that, as described above, under the condition that all the sensors meeting the shutdown condition are shut down, if the endurance time of the mobile terminal still cannot be supported to the expected time point of the next charging time, it is necessary to continue shutting down other types of components (such as a display screen) for endurance operation.
And S2053, determining the unit power consumption of the components corresponding to each type of component from each component type, and sequencing the components according to the descending order of the unit power consumption of the components to obtain a component power consumption sequence table.
In this embodiment, the unit power consumptions corresponding to the components are also sorted to determine the corresponding closing sequence.
And S2054, judging whether each component in the component power consumption sequence table can be closed in the current state of the mobile terminal.
And S2055, if yes, closing the components of the corresponding types according to the power consumption sequence in the component power consumption sequence table.
It can be understood that, in this embodiment, in a state where all the sensors meeting the shutdown condition are shut down, other components meeting the shutdown condition may be searched for and determined and shut down in response to control, so as to better reduce power consumption and prolong the standby time.
Example three:
in practical applications, since two different types of sensors may have the same energy-saving correlation, it is impossible to determine and control which type of sensor needs to be turned off preferentially. Referring to fig. 3, a third embodiment of the present invention provides a method for controlling a sensor, including the following steps:
and S301, when the energy-saving association degrees between the two sensors of different types and the cruising demand grade are equal, respectively obtaining the mode association degrees between the two sensors and the current mode of the mobile terminal.
For example, if the energy saving association degrees of one of the infrared sensors and one of the magnetic field sensors in the mobile terminal are calculated to be equal, the mode association degrees corresponding to the infrared sensors and the magnetic field sensors are continuously and respectively obtained at this time. And the mode association degree is the correlation between the sensor type and the current mode of the mobile terminal. For example, the mode association degree set between the infrared sensor and the current egress mode is 0.75, and the mode association degree set between the magnetic field sensor and the current egress mode is 0.5.
S302, comparing the mode association degrees corresponding to the two sensors, and preferentially closing the sensor with the larger mode association degree.
As described above, the mode association degree set between the infrared ray sensor and the current egress mode is 0.75, and the mode association degree set between the magnetic field sensor and the current egress mode is 0.5. Here, the infrared sensor is preferably turned off.
And S303, calculating to obtain the delay time according to the unit power consumption of the sensor corresponding to each sensor switched from the working state to the closing state, the number of each type of sensor and the residual total electric energy of the mobile terminal.
The detailed implementation of this step has already been described in detail in the first embodiment, and is not described herein again.
And S304, updating the current endurance time according to the delay time length to obtain the updated current endurance time.
And S305, judging whether the predicted time point of the next charging time of the mobile terminal is within the interval range corresponding to the updated current endurance.
And S306, if not, continuing to close the sensor with the smaller mode association degree.
It can be understood that after the sensor with the larger mode relevance is preferentially turned off, the endurance time of the mobile terminal still cannot support the expected time point of the next charging time, and at this time, the sensor with the smaller mode relevance needs to be turned off continuously, so as to further prolong the endurance time of the mobile terminal, and further meet the long-time endurance requirement of the mobile terminal in the outdoor mode.
Example four:
the mobile terminal repeats the above determination and calculation process each time the user is in the outgoing mode. In order to simplify the whole process, referring to fig. 4, a fourth embodiment of the present invention provides a method for controlling sensors, wherein each sensor corresponds to a sensor number, the method further includes the following steps:
s401, when any sensor in the mobile terminal is switched from a working state to a closed state, corresponding sensor closing time and a corresponding sensor number are recorded in real time.
It can be understood that when any sensor in the mobile terminal is switched from the working state to the off state, the corresponding sensor off time is recorded immediately. It should be noted that the sensor off time refers to a time point.
S402, when the estimated time point of the next charging moment of the mobile terminal is judged to be in the interval range corresponding to the updated current endurance time, counting the sensor closing time and the sensor number corresponding to all closed sensors, and generating a sensor control information table according to the sensor closing time and the sensor number, wherein each sensor control information table corresponds to a endurance requirement grade.
It can be understood that, for all sensors switched from the operating state to the off state, the corresponding sensor off time and the sensor number are recorded respectively. Therefore, the sensor control information table can be automatically generated according to the sensor off time and the sensor number.
It should be noted that each sensor control information table corresponds to a cruising demand level. That is, the particular object of the sensor that it turns off is fixed for each cruising demand level. The system can automatically generate a sensor control information table according to the sensor closing time and the sensor number corresponding to all the sensors switched from the working state to the closing state.
And S403, after confirming that a cruising demand grade is obtained, linking to the corresponding sensor control information table according to the cruising demand grade, and calling the corresponding sensors to perform closing control in sequence according to the sensor control information table.
It can be understood that after the endurance requirement level is confirmed, the system is linked to the corresponding sensor control information table according to the endurance requirement level, the system of the mobile terminal can call the corresponding sensors according to the sensor control information table to perform closing control in sequence, the processes of judgment and calculation do not need to be performed again, the calculated amount is saved, and the program is simplified to a certain extent.
Additionally, the method further comprises the following steps:
when the preset association degree is reduced to the minimum value of the association degree, judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the updated current endurance time;
if not, acquiring a sensor number corresponding to a sensor in a working state in the mobile terminal;
the sensors corresponding to the sensor numbers are marked as white lists.
It can be understood that, when the preset association degree is decreased to the minimum association degree, the predicted time point of the next charging time of the mobile terminal is still not within the interval range corresponding to the updated current endurance, which indicates that even after all the qualified sensors are turned off, the endurance of the mobile terminal still cannot be supported to the predicted time point of the next charging time. Since the remaining sensors still in operation cannot be switched off, the sensors corresponding to the sensor numbers can be marked directly as white lists.
Example five:
referring to fig. 5, a fifth embodiment of the present invention provides a control apparatus for a sensor, wherein the control apparatus is applied to a mobile terminal, and the apparatus includes:
a first obtaining module to:
acquiring the corresponding current endurance time of the mobile terminal in the current state, and acquiring the predicted time point of the next charging moment of the mobile terminal;
a first determining module, configured to:
judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the current endurance time or not;
a first lookup module to:
if the predicted time point of the next charging moment of the mobile terminal is not in the interval range corresponding to the current endurance time, calculating to obtain a difference value of the endurance time according to the predicted time point of the next charging moment of the mobile terminal and the end value of the current endurance time, and searching and determining in a preset mapping table to obtain a corresponding endurance requirement level according to the difference value of the endurance time;
a second obtaining module to:
acquiring sensor information corresponding to all sensors in an activated state in the mobile terminal, wherein the sensor information at least comprises sensor types, sensor unit power consumption and the number corresponding to each type of sensor;
a second determining module configured to:
calculating the energy-saving association degree between each sensor and the cruising demand grade according to the unit power consumption of the sensors, and judging whether the energy-saving association degree is greater than a preset association degree;
a shutdown control module to:
and if the energy-saving correlation degree is greater than the preset correlation degree, controlling the corresponding sensor to be closed.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description of the specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that various changes and modifications can be made by those skilled in the art without departing from the spirit of the invention, and these changes and modifications are all within the scope of the invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (9)
1. A control method of a sensor is characterized by being applied to a mobile terminal, and the method comprises the following steps:
acquiring current endurance time corresponding to the mobile terminal in a current state, and acquiring a predicted time point of the mobile terminal at the next charging moment;
judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the current endurance time;
if not, calculating to obtain a difference value of the time to be continued according to the predicted time point of the next charging moment of the mobile terminal and the terminal value of the current time to be continued, and searching and determining in a preset mapping table according to the difference value of the time to be continued to obtain a corresponding level of the time to be continued;
acquiring sensor information corresponding to all sensors in an activated state in the mobile terminal, wherein the sensor information at least comprises sensor types, sensor unit power consumption and the number corresponding to each type of sensor;
step five, calculating the energy-saving association degree between each sensor and the endurance requirement grade according to the unit power consumption of the sensors, and judging whether the energy-saving association degree is greater than a preset association degree or not;
step six, if yes, controlling the corresponding sensor to be closed;
in the fifth step, the calculation formula of the energy-saving association degree is represented as:
wherein, the first and the second end of the pipe are connected with each other,is shown asOf the first typeIndividual sensor and endurance requirement levelIn between
The degree of association of energy saving is,the degree of association of the reference is represented,indicates a cruising demand level of the firstkThe number of stages is such that,,ka serial number indicating the level of endurance requirement,mrepresents the maximum level of the endurance requirement level,denotes the firstOf the first typeThe sensor unit power consumption of each sensor,indicates a cruising demand level of the firstkThe level corresponds to the standard power consumption of a single sensor.
2. The method for controlling the sensor according to claim 1, wherein at least a fingerprint sensor, an ambient light sensor, a proximity sensor, a gyroscope sensor, an infrared sensor, a magnetic field sensor, a hall sensor and a gravity sensor are arranged in the mobile terminal;
before the first step, the method comprises the following steps:
judging whether the mobile terminal is in a charging state or not;
if not, judging whether the current mode of the mobile terminal is an outdoor mode, wherein the outdoor mode is judged through parameters obtained by an ambient light sensor, a gyroscope sensor or an infrared sensor;
if so, acquiring the corresponding current endurance time of the mobile terminal in the current state, and generating a request information input box, wherein the request information input box is used for receiving the predicted time point of the next charging time of the mobile terminal, which is input by a user.
3. The method of claim 1, wherein after the sixth step, the method further comprises the steps of:
after controlling the corresponding sensors to be closed, recording the types and the number of all the sensors switched from the working state to the closed state in the mobile terminal;
calculating to obtain delay time according to the unit power consumption of each sensor corresponding to the sensor switched from the working state to the closed state, the number of each type of sensors and the residual total electric energy of the mobile terminal;
updating the current endurance time according to the delay time length to obtain the updated current endurance time;
judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the updated current endurance time;
if not, the preset association degree is adjusted downwards according to a set step length.
4. The control method of a sensor according to claim 3, wherein the calculation formula of the delay time period is represented as:
wherein the content of the first and second substances,the duration of the delay time is represented,which represents the correction coefficient(s) of the image,represents the remaining total power of the mobile terminal,is shown asThe number of types of sensors that can be used,,,a maximum value of the number of types of sensors is indicated,a maximum value of the number corresponding to a single type of sensor;
the updated current endurance is represented as:
5. The method of claim 4, further comprising the steps of:
when the preset association degree is reduced to the minimum value of the association degree, judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the updated current endurance time;
if not, acquiring information of all components, except the sensor, in the working state of the mobile terminal in the current state, wherein the information of the components at least comprises component types and unit power consumption of the components;
determining the unit power consumption of the components corresponding to each type of component from each component type, and sequencing the component according to the descending order of the unit power consumption of the components to obtain a component power consumption sequence table;
judging whether each component in the component power consumption sequence table can be closed in the current state of the mobile terminal;
if yes, closing the components of the corresponding types according to the power consumption sequence in the component power consumption sequence table.
6. The method as claimed in claim 5, wherein in the step five, after the step of calculating the energy saving association degree between each sensor and the cruising demand level according to the unit power consumption of the sensor, the method further comprises the steps of:
when the energy-saving association degrees between the two sensors of different types and the endurance requirement grade are calculated to be equal, respectively obtaining the mode association degrees between the two sensors and the current mode of the mobile terminal, wherein the mode association degrees are the correlation between the sensor types and the current mode of the mobile terminal;
comparing the mode association degrees corresponding to the two sensors, and preferentially closing the sensor with the larger mode association degree;
calculating to obtain delay time according to the unit power consumption of each sensor corresponding to each sensor switched from the working state to the closing state, the number of each type of sensor and the residual total electric energy of the mobile terminal;
updating the current endurance time according to the delay time length to obtain the updated current endurance time;
judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the updated current endurance time;
if not, continuing to close the sensor with the smaller mode association degree.
7. The method of claim 6, wherein each sensor has a sensor number, the method further comprising:
when any sensor in the mobile terminal is switched from a working state to a closing state, immediately recording the closing time of the corresponding sensor and the number of the corresponding sensor;
when the estimated time point of the next charging moment of the mobile terminal is judged to be within the interval range corresponding to the updated current endurance time, counting the sensor closing time and the sensor number corresponding to all closed sensors, and generating sensor control information tables according to the sensor closing time and the sensor number, wherein each sensor control information table corresponds to one endurance requirement level;
and after confirming that a cruising demand grade is obtained, linking to a corresponding sensor control information table according to the cruising demand grade, and calling the corresponding sensors to carry out closing control in sequence according to the sensor control information table.
8. The method of claim 7, further comprising the steps of:
when the preset association degree is reduced to the minimum value of the association degree, judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the updated current endurance time;
if not, acquiring a sensor number corresponding to a sensor in a working state in the mobile terminal;
the sensors corresponding to the sensor numbers are marked as a white list.
9. A control device of a sensor, applied to a mobile terminal, the device comprising:
a first obtaining module to:
acquiring the corresponding current endurance time of the mobile terminal in the current state, and acquiring the predicted time point of the next charging moment of the mobile terminal;
a first determining module, configured to:
judging whether the predicted time point of the next charging moment of the mobile terminal is within the interval range corresponding to the current endurance time or not;
a first lookup module to:
if the predicted time point of the next charging moment of the mobile terminal is not in the interval range corresponding to the current endurance time, calculating to obtain a difference value of the endurance time according to the predicted time point of the next charging moment of the mobile terminal and the terminal value of the current endurance time, and searching and determining in a preset mapping table according to the difference value of the endurance time to obtain a corresponding endurance requirement grade;
a second obtaining module to:
acquiring sensor information corresponding to all sensors in an activated state in the mobile terminal, wherein the sensor information at least comprises sensor types, sensor unit power consumption and the number corresponding to each type of sensor;
a second determination module configured to:
calculating the energy-saving association degree between each sensor and the cruising demand grade according to the unit power consumption of the sensors, and judging whether the energy-saving association degree is greater than a preset association degree;
a shutdown control module to:
if the energy-saving correlation degree is greater than the preset correlation degree, controlling the corresponding sensor to be closed;
wherein, the calculation formula of the energy-saving correlation degree is represented as:
wherein the content of the first and second substances,is shown asOf the first typeIndividual sensor and endurance requirement levelThe degree of energy-saving association between the two,the degree of association of the reference is represented,indicates a cruising demand level of the firstkThe number of stages is such that,,ka serial number indicating the level of endurance requirement,mrepresents the maximum level of the endurance requirement level,is shown asOf the first typeThe sensor unit power consumption of each sensor,indicates a cruising demand level of the firstkThe level corresponds to the standard power consumption of a single sensor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210707986.0A CN114828180B (en) | 2022-06-22 | 2022-06-22 | Control method and device of sensor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210707986.0A CN114828180B (en) | 2022-06-22 | 2022-06-22 | Control method and device of sensor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114828180A CN114828180A (en) | 2022-07-29 |
CN114828180B true CN114828180B (en) | 2022-09-09 |
Family
ID=82521184
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210707986.0A Active CN114828180B (en) | 2022-06-22 | 2022-06-22 | Control method and device of sensor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114828180B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115996503B (en) * | 2023-03-23 | 2023-07-25 | 深圳市森辉智能自控技术有限公司 | Self-optimizing building illumination sensor energy-saving control system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017206677A1 (en) * | 2016-06-02 | 2017-12-07 | 中兴通讯股份有限公司 | Method and apparatus for managing device alarm clock |
CN107548142A (en) * | 2017-07-31 | 2018-01-05 | 努比亚技术有限公司 | A kind of electricity-saving control method, terminal and computer-readable recording medium |
CN111158455A (en) * | 2019-12-27 | 2020-05-15 | 惠州Tcl移动通信有限公司 | Power consumption control method and device, storage medium and terminal |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8793520B2 (en) * | 2012-01-25 | 2014-07-29 | Apple Inc. | Power management of electronic devices based on charging location |
KR20140014895A (en) * | 2012-07-27 | 2014-02-06 | 삼성전자주식회사 | Method and apparatus for saving battery of portable terminal |
CN106896890A (en) * | 2015-12-21 | 2017-06-27 | 北京奇虎科技有限公司 | Electric quantity for electronic equipment management method and device |
CN105828424B (en) * | 2016-03-11 | 2019-12-13 | 北京奇虎科技有限公司 | Intelligent terminal and energy consumption quantitative control method thereof |
CN106375604B (en) * | 2016-11-11 | 2019-10-15 | 北京小米移动软件有限公司 | The method and apparatus of controlling terminal electricity |
CN108388335B (en) * | 2018-02-27 | 2020-01-10 | 维沃移动通信有限公司 | Method for controlling mobile terminal and mobile terminal |
-
2022
- 2022-06-22 CN CN202210707986.0A patent/CN114828180B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017206677A1 (en) * | 2016-06-02 | 2017-12-07 | 中兴通讯股份有限公司 | Method and apparatus for managing device alarm clock |
CN107548142A (en) * | 2017-07-31 | 2018-01-05 | 努比亚技术有限公司 | A kind of electricity-saving control method, terminal and computer-readable recording medium |
CN111158455A (en) * | 2019-12-27 | 2020-05-15 | 惠州Tcl移动通信有限公司 | Power consumption control method and device, storage medium and terminal |
Also Published As
Publication number | Publication date |
---|---|
CN114828180A (en) | 2022-07-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7834585B2 (en) | Prioritizing power-consuming applications of an electronic device powered by a battery | |
CN104298336B (en) | Mobile terminal and control method and device of application program of mobile terminal | |
CN111343682B (en) | Network switching method, device, storage medium and terminal | |
CN114828180B (en) | Control method and device of sensor | |
CN110187753A (en) | Application control method, device, terminal and computer readable storage medium | |
CN101162403A (en) | Computer system and control method thereof capable of changing battery charging mode according to user's selection | |
CN111158455A (en) | Power consumption control method and device, storage medium and terminal | |
CN108461834B (en) | Battery pack structure, mobile terminal and charge-discharge control method | |
CN102833389A (en) | Mobile terminal and energy conservation method therefor | |
CN1722884A (en) | Method for operating power source of mobile communication terminal | |
US20190115634A1 (en) | Load power supply circuit and terminal | |
CN106897134B (en) | Positioning function management method and device | |
US20030022699A1 (en) | Method for automatically adjusting the background brightness of cellular phone display | |
CN103593038A (en) | Method and device for controlling applications | |
CN111432599A (en) | Heat dissipation control method, terminal and computer readable storage medium | |
CN106095492A (en) | The method for closing of a kind of application program and device | |
CN106020907A (en) | Application shut-down method and device | |
CN106873756A (en) | A kind of electric quantity managing method and terminal | |
CN108196482A (en) | Power consumption control method, device, storage medium and electronic equipment | |
CN108388335B (en) | Method for controlling mobile terminal and mobile terminal | |
CN108415549B (en) | Method for improving endurance of mobile terminal, mobile terminal and readable storage medium | |
CN106468943A (en) | Application control method and device and terminal | |
CN107104478A (en) | A kind of information processing method and electronic equipment | |
CN108038050B (en) | Performance adjusting method and device, storage medium and electronic equipment | |
CN107291213B (en) | Mode selection method, device, terminal and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |