WO2015197000A1 - Method and apparatus for controlling hardware state of mobile terminal - Google Patents

Method and apparatus for controlling hardware state of mobile terminal Download PDF

Info

Publication number
WO2015197000A1
WO2015197000A1 PCT/CN2015/082243 CN2015082243W WO2015197000A1 WO 2015197000 A1 WO2015197000 A1 WO 2015197000A1 CN 2015082243 W CN2015082243 W CN 2015082243W WO 2015197000 A1 WO2015197000 A1 WO 2015197000A1
Authority
WO
WIPO (PCT)
Prior art keywords
mobile terminal
current mobile
state
time period
vibration
Prior art date
Application number
PCT/CN2015/082243
Other languages
French (fr)
Chinese (zh)
Inventor
潘莹
Original Assignee
可牛网络技术(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 可牛网络技术(北京)有限公司 filed Critical 可牛网络技术(北京)有限公司
Publication of WO2015197000A1 publication Critical patent/WO2015197000A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power

Definitions

  • the present invention relates to the field of mobile terminal technologies, and in particular, to a method and apparatus for controlling a hardware state of a mobile terminal.
  • Wi-Fi Wi-Fi
  • the software controls the power consumption of the hardware through mode setting, that is, the hardware power consumption is controlled by the corresponding relationship between the scene, the mode and the hardware switch state, for example, a certain mode is in the train.
  • the WiFi switch is off
  • the data switch is off
  • the brightness is 100%, and so on.
  • the above implementation manner is not intelligent enough, and the user needs to manually open in the corresponding scenario, and the user needs to memorize the corresponding relationship between the scene and the mode, and the power failure failure caused by the user is also avoided.
  • the present invention aims to solve at least one of the technical problems in the related art to some extent.
  • a second object of the present invention is to provide an apparatus for controlling the hardware state of a mobile terminal having the advantages of automatically saving power for the mobile terminal.
  • a third object of the present invention is to provide a storage medium.
  • a fourth object of the present invention is to provide a mobile terminal.
  • a method for controlling a hardware state of a mobile terminal that automatically saves power for a mobile terminal includes: detecting whether a current mobile terminal is in a mobile state; and detecting that the current mobile terminal is moving The status turns off the hardware switch of the current mobile terminal.
  • the method for controlling the hardware state of the mobile terminal automatically has the advantages of power saving for the mobile terminal, and automatically detects whether the current mobile terminal is in a moving state, and turns off the hardware switch of the current mobile terminal when determining that the current mobile terminal is in a moving state. To achieve the purpose of saving electricity.
  • an apparatus for controlling a hardware state of a mobile terminal that automatically saves power for a mobile terminal includes: a detecting module, configured to detect whether the current mobile terminal is in a moving state; and a control module, If it is detected that the current mobile terminal is in a mobile state, the hardware switch of the current mobile terminal is turned off.
  • the device for controlling the hardware state of the mobile terminal automatically saves the power of the mobile terminal according to the embodiment of the present invention, and the switch detects the state of the mobile terminal to intelligently turn off the switch of the hardware, thereby avoiding serious power consumption, and the whole
  • the device is simple to implement and practical.
  • a storage medium configured to store an application for performing a control mobile having the advantages of automatically saving power for a mobile terminal according to the first aspect of the present invention.
  • the method of the terminal hardware status is configured to store an application for performing a control mobile having the advantages of automatically saving power for a mobile terminal according to the first aspect of the present invention.
  • a mobile terminal includes: one or more processors; a memory; one or more modules, wherein the one or more modules are stored in the memory, when When the one or more processors are executed, the following operations are performed: detecting whether the current mobile terminal is in a mobile state; and if detecting that the current mobile terminal is in a mobile state, turning off the hardware switch of the current mobile terminal.
  • FIG. 1 is a flow chart of a method of controlling a hardware state of a mobile terminal in accordance with one embodiment of the present invention.
  • FIG. 2 is a schematic diagram of a coordinate axis in accordance with one embodiment of the present invention.
  • FIG. 3 is a flow chart of a method of controlling a hardware state of a mobile terminal in accordance with another embodiment of the present invention.
  • FIG. 4 is a flow chart of a method of controlling a hardware state of a mobile terminal in accordance with still another embodiment of the present invention.
  • FIG. 5 is a flow chart of a method of controlling a hardware state of a mobile terminal according to still another embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of an apparatus for controlling a hardware state of a mobile terminal according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of an apparatus for controlling a hardware state of a mobile terminal according to another embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for controlling a hardware state of a mobile terminal according to an embodiment of the present invention.
  • the method embodiment may be applied to a mobile terminal such as a mobile phone.
  • the method includes:
  • S100 Determine whether the current mobile terminal is in a vibrating state. If it is determined that the current mobile terminal is in a vibrating state, execute S101. If it is determined that the current mobile terminal is not in a vibrating state, the operation ends.
  • S100 is an optional step of determining whether to turn off the hardware switch of the mobile terminal only by detecting whether the mobile terminal is in a moving state. In this embodiment, S100 is adopted because if it is determined that the current mobile terminal is not in a vibrating state, subsequent operations need not be performed, thereby eliminating subsequent detection work and simplifying the implementation process.
  • the first way is to obtain the vibration parameter of the current mobile terminal. If the vibration parameter meets the predetermined condition, it is determined that the current mobile terminal is in a vibration state, that is, the network signal may be unstable.
  • the acceleration of each unit time of the current mobile terminal in the preset time period can be obtained by the acceleration sensor. If the probability that the acceleration of the unit time in the preset time period is greater than the preset threshold is greater than the predetermined value, it is determined that the current mobile terminal is in vibration. status.
  • the acceleration information of the current mobile terminal within 4 ms can be obtained by the acceleration sensor, assuming that the acceleration of the first ms is a1, the acceleration of the second ms is a2, the acceleration of the first ms is a3, the acceleration of the fourth ms is a4, and the preset threshold.
  • the predetermined value is 40%. Assuming that a1>A>a2>a3>a4, the probability that the acceleration is greater than the preset threshold within 2ms is 25%. Since 25% ⁇ 40%, the current movement can be determined.
  • the terminal is not in a vibrating state; assuming that a1>a2>a3>A>a4, the probability that the acceleration is greater than the preset threshold within 7ms is 75%, and since 75%>40%, it can be determined that the current mobile terminal is in Vibration state.
  • the acceleration per unit time can be calculated by the following formula:
  • a represents the acceleration of the current mobile terminal such as the mobile phone in the left-right direction (ie, the X-axis in the coordinate axis shown in FIG. 2)
  • b represents the acceleration of the current mobile terminal such as the mobile phone in the front-rear direction (Y-axis)
  • c represents the current mobile terminal.
  • K represents the time interval for acquiring information, that is, the time interval at which the acceleration sensor sends two messages
  • M is the vibration coefficient, which is used to adjust the sensitivity of the vibration, 1 ⁇ M ⁇ 100, the specific value can be selected according to the scene.
  • the predetermined condition may also be a certain rule, which may be determined by a vibration frequency, a maximum vibration amplitude, a frequency distribution, and the like.
  • the average number of vibrations of the current mobile terminal in the preset time period may be obtained. If the average number of vibrations reaches a preset threshold, determining that the current mobile terminal is preset. It is in a state of vibration during the time period.
  • the mobile terminal is considered to be in a state of vibration during that period of time.
  • the maximum vibration amplitude of the current mobile terminal in the preset time period may also be obtained. If the maximum vibration amplitude exceeds the preset amplitude value, it is determined that the current mobile terminal is in a vibration state within the preset time period.
  • the number of vibrations per unit time of the current mobile terminal in the preset time period may also be obtained, and if the number of vibrations per unit time in the preset time period exceeds the first value, the probability is greater than the first threshold and the vibration per unit time. If the probability that the number of times exceeds the second value is greater than the second threshold, it is determined that the current mobile terminal is in a vibrating state within a preset time period.
  • the probability that the mobile terminal vibrates more than X times per minute reaches 50%, and the probability of exceeding Y times reaches 30%, it can be determined that the current mobile terminal is in a vibrating state within a preset time period.
  • the second way first obtain the frequency range of the vibration state, and then obtain the current vibration frequency of the current mobile terminal, and compare the current vibration frequency with the frequency range, if the current vibration frequency is within the frequency range, then It is determined that the current mobile terminal is in a vibrating state.
  • the frequency range of the vibration state can be obtained by collecting and counting the information under the vibration state. Specifically, the mobile phone can be placed on the train for a period of time to collect information, the collected information is collated, and then the frequency of the train vibration is analyzed by counting the vibration frequency of the segment, for example, 30 times. / min -50 times / min.
  • the frequency value range is adopted because the vibration state of the train may not be fixed during the running process. For example, the same train travels on the same road section, but due to the slight environmental changes such as speed and weather. The vibration state is not static. Therefore, the frequency range is more scientific, and it is more accurate to determine whether the current mobile terminal is in a vibrating state.
  • the mobile terminal such as a mobile phone is in a vibrating state, it does not necessarily consume power. For example, when the mobile phone is vibrated or the earthquake does not consume power, it is necessary to continue to determine whether the current mobile terminal should be in a moving state to determine whether the hardware switch should be turned off.
  • the average speed of the current mobile terminal in the preset time period may be calculated, and then it is determined whether the average speed is greater than the preset speed value. If greater than, the current mobile terminal is in a moving state; otherwise, the current mobile terminal is indicated. Not moving.
  • calculating the average speed of the current mobile terminal in the preset time period may be implemented by: obtaining start time information of the preset time period, obtaining first position information of the current mobile terminal according to the start time information; and obtaining the preset time period. End time information, obtaining second position information of the current mobile terminal according to the end time information; then obtaining displacement information in the preset time period according to the first position information and the second position information, and calculating the preset time period according to the displacement information The average speed of current mobile terminals.
  • the current latitude and longitude information can be obtained by a global positioning system (GPS) module of a mobile terminal such as an Android mobile phone, and the displacement difference of the mobile phone within 10 minutes is calculated by the following formula, assuming that the time point is A.
  • the length of time B is 10 minutes:
  • Lat1 represents the latitude and longitude of the mobile phone at time A
  • Lat2 represents the latitude and longitude of the mobile phone at time B
  • S represents the displacement difference; using the displacement difference S divided by the length of time of 10 minutes, the average speed of the time period can be obtained. If the average speed exceeds a certain preset value (such as 20 km/h) during this period, the mobile phone is considered to be moving fast and the signal is unstable.
  • a certain preset value such as 20 km/h
  • the foregoing method for controlling the hardware state of the mobile terminal automatically stops detecting whether the current mobile terminal is in a mobile state, and turns off the hardware switch of the current mobile terminal when determining that the current mobile terminal is in a mobile state, thereby achieving a provincial The purpose of electricity.
  • the example may also include S103:
  • the method embodiment may further include S104-S105:
  • S105 Determine whether the vibration parameter meets a predetermined condition. If not, read the previously recorded status information, and restore the setting of the current mobile terminal hardware.
  • the above method for controlling the hardware state of the mobile terminal is suitable for use in an environment where the signal is unstable, such as on a train or a subway.
  • the mobile terminal such as a mobile phone
  • the switch of the hardware By detecting the state of the mobile terminal, the switch of the hardware is intelligently turned off, thereby avoiding the occurrence of serious power consumption; in addition, when the network environment returns to normal, the setting before the hardware switch is turned off can also be automatically restored, so that the user can use the network normally; Moreover, the user does not need to participate in the whole implementation process, and the user does not need to memorize the corresponding relationship between the scene and the mode, and does not need to worry about the power failure failure caused by the user's forgetting, and the implementation is simple and practical.
  • the present invention also provides an apparatus for controlling the state of the hardware of the mobile terminal.
  • FIG. 6 is a schematic structural diagram of an apparatus for controlling a hardware state of a mobile terminal according to an embodiment of the present invention.
  • the apparatus may include: a detection module 61 and a control module 62, wherein:
  • the detecting module 61 is configured to detect whether the current mobile terminal is in a moving state
  • the control module 62 is configured to detect When the current mobile terminal is in a mobile state, the hardware switch of the current mobile terminal is turned off.
  • the device may further include a determining module 60.
  • the determining module 60 is configured to determine that the current mobile terminal is in a vibrating state before the detecting module 61 detects whether the current mobile terminal is in a moving state. That is, before detecting whether the current mobile terminal is in the moving state by the detecting module 61, it is first necessary to determine whether the current mobile terminal is in a vibrating state, and only after determining that the current mobile terminal is in a vibrating state, the detecting module performs subsequent detecting operations, otherwise The operation ends.
  • the first mode obtaining the vibration parameter of the current mobile terminal by determining the module, and if the vibration parameter meets the predetermined condition, determining that the current mobile terminal is in a vibration state, that is, the network signal may be unstable.
  • the acceleration of each unit time of the current mobile terminal in the preset time period can be obtained by the acceleration sensor. If the probability that the acceleration of the unit time in the preset time period is greater than the preset threshold is greater than the predetermined value, it is determined that the current mobile terminal is in vibration. status.
  • the acceleration information of the current mobile terminal within 4 ms can be obtained by the acceleration sensor, assuming that the acceleration of the first ms is a1, the acceleration of the second ms is a2, the acceleration of the first ms is a3, the acceleration of the fourth ms is a4, and the preset threshold.
  • the predetermined value is 40%. Assuming that a1>A>a2>a3>a4, the probability that the acceleration is greater than the preset threshold within 2ms is 25%. Since 25% ⁇ 40%, the current movement can be determined.
  • the terminal is not in a vibrating state; assuming that a1>a2>a3>A>a4, the probability that the acceleration is greater than the preset threshold within 7ms is 75%, and since 75%>40%, it can be determined that the current mobile terminal is in Vibration state.
  • the acceleration per unit time can be calculated by the following formula:
  • a represents the acceleration of the current mobile terminal such as the mobile phone in the left-right direction (ie, the X-axis in the coordinate axis shown in FIG. 2)
  • b represents the acceleration of the current mobile terminal such as the mobile phone in the front-rear direction (Y-axis)
  • c represents the current mobile terminal.
  • K represents the time interval for acquiring information, that is, the time interval at which the acceleration sensor sends two messages
  • M is the vibration coefficient, which is used to adjust the sensitivity of the vibration, 1 ⁇ M ⁇ 100, the specific value can be selected according to the scene.
  • the predetermined condition may also be a certain rule, which may be determined by a vibration frequency, a maximum vibration amplitude, a frequency distribution, and the like.
  • the current mobile terminal may be obtained after determining that the current mobile terminal continues to vibrate for a time greater than a predetermined value.
  • the average number of vibrations in the preset time period if the average number of vibrations reaches a preset threshold, it is determined that the current mobile terminal is in a vibrating state within a preset time period.
  • the mobile terminal is considered to be in a state of vibration during the period of time.
  • the maximum vibration amplitude of the current mobile terminal in the preset time period may also be obtained. If the maximum vibration amplitude exceeds the preset amplitude value, it is determined that the current mobile terminal is in a vibration state within the preset time period.
  • the number of vibrations per unit time of the current mobile terminal in the preset time period may also be obtained, and if the number of vibrations per unit time in the preset time period exceeds the first value, the probability is greater than the first threshold and the vibration per unit time. If the probability that the number of times exceeds the second value is greater than the second threshold, it is determined that the current mobile terminal is in a vibrating state within a preset time period.
  • the probability that the mobile terminal vibrates more than X times per minute reaches 60%, and the probability of exceeding Y times reaches 30%, it can be determined that the current mobile terminal is in a vibrating state within a preset time period.
  • the second way firstly, the frequency range of the vibration state is obtained by the collecting module, and then the current vibration frequency of the current mobile terminal is obtained by the determining module, and the current vibration frequency and the frequency value range are compared, if the current vibration frequency is at the frequency Within the range of values, it is determined that the current mobile terminal is in a vibrating state.
  • the frequency range of the vibration state can be obtained by collecting and counting the information under the vibration state. Specifically, the mobile phone can be placed on the train for a period of time to collect information, the collected information is collated, and then the frequency of the train vibration is analyzed by counting the vibration frequency of the segment, for example, 30 times. /minute - 60 times / minute.
  • the frequency value range is adopted because the vibration state of the train may not be fixed during the running process. For example, the same train travels on the same road section, but due to the slight environmental changes such as speed and weather. The vibration state is not static. Therefore, the frequency range is more scientific, and it is more accurate to determine whether the current mobile terminal is in a vibrating state.
  • the device may further include: a recording module 63 and a recovery module 64, wherein the recording module 63 closes the current mobile terminal at the control module 62. Before the hardware switch, the status information of the current mobile terminal hardware is recorded; the recovery module 64 is configured to detect whether the current mobile terminal is in a static state after the control module off 62 closes the hardware switch of the current mobile terminal, if the current mobile When the terminal is in a stationary state, the status information recorded by the recording module 63 is read, and the setting of the current mobile terminal hardware is restored.
  • the recovery module 64 can be further configured to: after the control module 62 turns off the hardware switch of the current mobile terminal, obtain the vibration parameter of the current mobile terminal, and determine whether the vibration parameter meets a predetermined condition, if not If it matches, the status information recorded by the recording module 63 is read, and the setting of the current mobile terminal hardware is restored.
  • the foregoing detecting module 61 may be configured to: calculate an average speed of the current mobile terminal in a preset time period, and determine whether the current mobile terminal is in a moving state by determining whether the average speed is greater than a preset speed value.
  • the process of the foregoing detecting module 61 for calculating the average speed of the current mobile terminal in the preset time period may be: obtaining the start time information of the preset time period, and obtaining the first location information of the current mobile terminal according to the start time information. Obtaining the end time information of the preset time period, obtaining the second position information of the current mobile terminal according to the end time information; and obtaining the displacement in the preset time period according to the first position information and the second position information. And calculating, according to the displacement information, an average speed of the current mobile terminal in the preset time period.
  • the above means for controlling the hardware state of the mobile terminal may be located in the mobile terminal and is suitable for use in an environment where the signal is unstable, such as on a train or subway.
  • the mobile terminal such as a mobile phone
  • the detecting module detects the state of the mobile terminal to intelligently turn off the hardware switch, thereby avoiding serious power consumption.
  • the recovery module can automatically restore the setting before the hardware switch is turned off, so that the user can The network is used normally; and the entire device is simple and practical.
  • the present invention also provides a storage medium for storing an application for executing a method for controlling a hardware state of a mobile terminal according to any of the embodiments of the present invention.
  • the present invention also provides a mobile terminal, comprising: one or more processors; a memory; one or more modules, one or more modules stored in the memory, when processed by one or more When the device is executed, do the following:
  • S100' is an optional step of determining whether to turn off the hardware switch of the mobile terminal only by detecting whether the mobile terminal is in a moving state. In this embodiment, S100' is adopted because if it is determined that the current mobile terminal is not in a vibrating state, subsequent operations need not be performed, thereby eliminating subsequent detection work and simplifying the implementation process.
  • the first way is to obtain the vibration parameter of the current mobile terminal. If the vibration parameter meets the predetermined condition, it is determined that the current mobile terminal is in a vibration state, that is, the network signal may be unstable.
  • the acceleration of each unit time of the current mobile terminal in the preset time period can be obtained by the acceleration sensor. If the probability that the acceleration of the unit time in the preset time period is greater than the preset threshold is greater than the predetermined value, the current mobile terminal is determined. In the state of vibration.
  • the acceleration information of the current mobile terminal within 4 ms can be obtained by the acceleration sensor, assuming that the acceleration of the first ms is a1, the acceleration of the second ms is a2, the acceleration of the first ms is a3, the acceleration of the fourth ms is a4, and the preset threshold.
  • the predetermined value is 40%. Assuming that a1>A>a2>a3>a4, the probability that the acceleration is greater than the preset threshold within 2ms is 25%. Since 25% ⁇ 40%, the current movement can be determined.
  • the terminal is not in a vibrating state; assuming that a1>a2>a3>A>a4, the probability that the acceleration is greater than the preset threshold within 7ms is 75%, and since 75%>40%, it can be determined that the current mobile terminal is in Vibration state.
  • the acceleration per unit time can be calculated by the following formula:
  • a represents the acceleration of the current mobile terminal such as the mobile phone in the left-right direction (ie, the X-axis in the coordinate axis shown in FIG. 2)
  • b represents the acceleration of the current mobile terminal such as the mobile phone in the front-rear direction (Y-axis)
  • c represents the current mobile terminal.
  • K represents the time interval for acquiring information, that is, the time interval at which the acceleration sensor sends two messages
  • M is the vibration coefficient, which is used to adjust the sensitivity of the vibration, 1 ⁇ M ⁇ 100, the specific value can be selected according to the scene.
  • the predetermined condition may also be a certain rule, which may be determined by a vibration frequency, a maximum vibration amplitude, a frequency distribution, and the like.
  • the average number of vibrations of the current mobile terminal in the preset time period may be obtained. If the average number of vibrations reaches a preset threshold, determining that the current mobile terminal is preset. It is in a state of vibration during the time period.
  • the mobile terminal is considered to be in a state of vibration during that period of time.
  • the maximum vibration amplitude of the current mobile terminal in the preset time period may also be obtained. If the maximum vibration amplitude exceeds the preset amplitude value, it is determined that the current mobile terminal is in a vibration state within the preset time period.
  • the number of vibrations per unit time of the current mobile terminal in the preset time period may also be obtained, and if the number of vibrations per unit time in the preset time period exceeds the first value, the probability is greater than the first threshold and the vibration per unit time. If the probability that the number of times exceeds the second value is greater than the second threshold, it is determined that the current mobile terminal is in a vibrating state within a preset time period.
  • the probability that the mobile terminal vibrates more than X times per minute reaches 50%, and the probability of exceeding Y times reaches 30%, it can be determined that the current mobile terminal is in a vibrating state within a preset time period.
  • the second way first obtain the frequency range of the vibration state, and then obtain the current vibration of the current mobile terminal The frequency is compared with the current vibration frequency and the frequency range. If the current vibration frequency is within the frequency range, it is determined that the current mobile terminal is in a vibration state.
  • the frequency range of the vibration state can be obtained by collecting and counting the information under the vibration state. Specifically, the mobile phone can be placed on the train for a period of time to collect information, the collected information is collated, and then the frequency of the train vibration is analyzed by counting the vibration frequency of the segment, for example, 30 times. / min -50 times / min.
  • the frequency value range is adopted because the vibration state of the train may not be fixed during the running process. For example, the same train travels on the same road section, but due to the slight environmental changes such as speed and weather. The vibration state is not static. Therefore, the frequency range is more scientific, and it is more accurate to determine whether the current mobile terminal is in a vibrating state.
  • the mobile terminal such as a mobile phone is in a vibrating state, it does not necessarily consume power. For example, when the mobile phone is vibrated or the earthquake does not consume power, it is necessary to continue to determine whether the current mobile terminal should be in a moving state to determine whether the hardware switch should be turned off.
  • the average speed of the current mobile terminal in the preset time period may be calculated, and then it is determined whether the average speed is greater than the preset speed value. If greater than, the current mobile terminal is in a moving state; otherwise, the current mobile terminal is indicated. Not moving.
  • calculating the average speed of the current mobile terminal in the preset time period may be implemented by: obtaining start time information of the preset time period, obtaining first position information of the current mobile terminal according to the start time information; and obtaining the preset time period. End time information, obtaining second position information of the current mobile terminal according to the end time information; then obtaining displacement information in the preset time period according to the first position information and the second position information, and calculating the preset time period according to the displacement information The average speed of current mobile terminals.
  • the current latitude and longitude information can be obtained by a global positioning system (GPS) module of a mobile terminal such as an Android mobile phone, and the displacement difference of the mobile phone within 10 minutes is calculated by the following formula, assuming that the time point is A.
  • the length of time B is 10 minutes:
  • Lat1 represents the latitude and longitude of the mobile phone at time A
  • Lat2 represents the latitude and longitude of the mobile phone at time B
  • S represents the displacement difference
  • the above mobile terminal achieves power saving by automatically detecting whether the current mobile terminal is in a moving state and turning off the hardware switch of the current mobile terminal when determining that the current mobile terminal is in a moving state.
  • Examples can also include S103':
  • the processor may further be used to execute S104'-S105':
  • the vibration parameter meets the predetermined condition, it is necessary to continue to determine whether the current mobile terminal is in a moving state, and if not, the setting of the hardware switch can be resumed, and if still, the hardware of the current mobile terminal is kept closed. .
  • the above mobile terminal can be applied in an environment where signals are unstable, such as on a train or a subway.
  • a mobile terminal such as a mobile phone cannot stably connect to a WiFi or 2G/3G network, frequently search for a network, or disconnect/connect to a network, resulting in a significant increase in power consumption of the mobile terminal.
  • first and second are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated.
  • features defining “first” or “second” may include at least one of the features, either explicitly or implicitly.
  • the meaning of "a plurality” is at least two, such as two, three, etc., unless specifically defined otherwise.
  • a "computer-readable medium” can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or device, or in conjunction with the instruction execution system, apparatus, or device.
  • computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM).
  • the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method is processed to obtain the program electronically and then stored in computer memory.
  • portions of the invention may be implemented in hardware, software, firmware or a combination thereof.
  • multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be used in the art.
  • each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
  • the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.

Abstract

A method and apparatus for controlling a hardware state of a mobile terminal. The method for controlling a hardware state of a mobile terminal comprises: detecting whether a current mobile terminal is in a moving state; and turning off a hardware switch of the mobile terminal when it is detected that the current mobile terminal is in the moving state. According to the method and apparatus for controlling a hardware state of a mobile terminal, by automatically detecting whether the current mobile terminal is in a moving state and turning off a hardware switch of the current mobile terminal when it is determined that the current mobile terminal is in the moving state, the purpose of saving power is achieved.

Description

控制移动终端硬件状态的方法及装置Method and device for controlling hardware state of mobile terminal
相关申请的交叉引用Cross-reference to related applications
本申请要求可牛网络技术(北京)有限公司于2014年6月25日提交的、发明名称为“控制移动终端硬件状态的方法及装置”的、中国专利申请号“201410295210.8”的优先权。The present application claims the priority of the Chinese Patent Application No. "201410295210.8", which is filed on June 25, 2014, which is entitled "Method and Apparatus for Controlling the Hardware Status of a Mobile Terminal" by CB Network Technology (Beijing) Co., Ltd.
技术领域Technical field
本发明涉及移动终端技术领域,尤其涉及一种控制移动终端硬件状态的方法及装置。The present invention relates to the field of mobile terminal technologies, and in particular, to a method and apparatus for controlling a hardware state of a mobile terminal.
背景技术Background technique
随着移动设备的发展,其中央处理单元(CPU)、内存和屏幕等部件的性能越来越强,体积越来越小,由此带来的负面效果就是硬件耗电量急剧增加,但是,电池容量却由于电池体积的限制而没有显著地增加,由此导致目前移动设备的可用时间急剧减少。With the development of mobile devices, the performance of its central processing unit (CPU), memory and screen components is getting stronger and smaller, and the volume is getting smaller and smaller. The negative effect is that the power consumption of the hardware increases sharply. The battery capacity is not significantly increased due to the limitation of the battery volume, thereby causing a drastic reduction in the available time of the current mobile device.
而由于移动设备的使用场景非常复杂,几乎无法设置一个可以在所有场景下都能有效省电的方法,且不影响用户的体验。例如,在火车上关闭无线保真(WiFi),可以减少搜索信号时的耗电量,但是在家里,这种方法会导致用户无法上网。Since the usage scenario of the mobile device is very complicated, it is almost impossible to set a method that can effectively save power in all scenarios without affecting the user experience. For example, turning off Wi-Fi (WiFi) on a train can reduce the power consumption when searching for signals, but at home, this method can result in users not being able to access the Internet.
如何在复杂多变的场景中使移动终端更省电是目前急需解决的问题之一。How to make mobile terminals more power-efficient in complex and ever-changing scenarios is one of the urgent problems to be solved.
在相关的技术方案中,大部分软件都是通过模式设置来完成对硬件耗电的控制,即通过场景、模式及硬件开关状态之间对应的关系来控制硬件耗电,例如某个模式在火车上使用,则该模式下WiFi开关为关闭、数据开关为关闭、亮度为100%等等。In the related technical solutions, most of the software controls the power consumption of the hardware through mode setting, that is, the hardware power consumption is controlled by the corresponding relationship between the scene, the mode and the hardware switch state, for example, a certain mode is in the train. When used, the WiFi switch is off, the data switch is off, the brightness is 100%, and so on.
然而,上述实现方式不够智能,需要用户在相应场景下手动开启,需要用户记忆场景及模式的对应关系,也无法避免用户由于遗忘导致的省电失效情况发生。However, the above implementation manner is not intelligent enough, and the user needs to manually open in the corresponding scenario, and the user needs to memorize the corresponding relationship between the scene and the mode, and the power failure failure caused by the user is also avoided.
发明内容Summary of the invention
本发明旨在至少在一定程度上解决相关技术中的技术问题之一。The present invention aims to solve at least one of the technical problems in the related art to some extent.
为此,本发明的一个目的在于提出一种具有自动为移动终端省电优点的控制移动终端硬件状态的方法。To this end, it is an object of the present invention to provide a method of controlling the hardware state of a mobile terminal with the advantages of automatically saving power for the mobile terminal.
本发明的第二个目的在于提出一种具有自动为移动终端省电优点的控制移动终端硬件状态的装置。A second object of the present invention is to provide an apparatus for controlling the hardware state of a mobile terminal having the advantages of automatically saving power for the mobile terminal.
本发明的第三个目的在于提出一种存储介质。A third object of the present invention is to provide a storage medium.
本发明的第四个目的在于提出一种移动终端。 A fourth object of the present invention is to provide a mobile terminal.
为了实现上述目的,本发明第一方面实施例的具有自动为移动终端省电优点的控制移动终端硬件状态的方法,包括:检测当前移动终端是否处于移动状态;以及若检测到当前移动终端处于移动状态,则关闭当前移动终端的硬件开关。In order to achieve the above object, a method for controlling a hardware state of a mobile terminal that automatically saves power for a mobile terminal according to an embodiment of the first aspect of the present invention includes: detecting whether a current mobile terminal is in a mobile state; and detecting that the current mobile terminal is moving The status turns off the hardware switch of the current mobile terminal.
本发明实施例的具有自动为移动终端省电优点的控制移动终端硬件状态的方法,通过自动检测当前移动终端是否处于移动状态,并在确定当前移动终端处于移动状态时关闭当前移动终端的硬件开关,从而达到省电的目的。The method for controlling the hardware state of the mobile terminal automatically has the advantages of power saving for the mobile terminal, and automatically detects whether the current mobile terminal is in a moving state, and turns off the hardware switch of the current mobile terminal when determining that the current mobile terminal is in a moving state. To achieve the purpose of saving electricity.
为了实现上述目的,本发明第二方面实施例的具有自动为移动终端省电优点的控制移动终端硬件状态的装置,包括:检测模块,用于检测当前移动终端是否处于移动状态;控制模块,用于若检测到当前移动终端处于移动状态,则关闭当前移动终端的硬件开关。In order to achieve the above object, an apparatus for controlling a hardware state of a mobile terminal that automatically saves power for a mobile terminal according to an embodiment of the present invention includes: a detecting module, configured to detect whether the current mobile terminal is in a moving state; and a control module, If it is detected that the current mobile terminal is in a mobile state, the hardware switch of the current mobile terminal is turned off.
本发明实施例的具有自动为移动终端省电优点的控制移动终端硬件状态的装置,通过检测模块检测移动终端的状态来智能地关闭硬件的开关,避免了严重耗电情况的发生,并且,整个装置实现简单、实用性强。The device for controlling the hardware state of the mobile terminal automatically saves the power of the mobile terminal according to the embodiment of the present invention, and the switch detects the state of the mobile terminal to intelligently turn off the switch of the hardware, thereby avoiding serious power consumption, and the whole The device is simple to implement and practical.
为了实现上述目的,本发明第三方面实施例的存储介质,用于存储应用程序,所述应用程序用于执行本发明第一方面实施例所述的具有自动为移动终端省电优点的控制移动终端硬件状态的方法。In order to achieve the above object, a storage medium according to an embodiment of the third aspect of the present invention is configured to store an application for performing a control mobile having the advantages of automatically saving power for a mobile terminal according to the first aspect of the present invention. The method of the terminal hardware status.
为了实现上述目的,本发明第四方面实施例的移动终端,包括:一个或者多个处理器;存储器;一个或者多个模块,所述一个或者多个模块存储在所述存储器中,当被所述一个或者多个处理器执行时进行如下操作:检测当前移动终端是否处于移动状态;以及若检测到当前移动终端处于移动状态,则关闭当前移动终端的硬件开关。In order to achieve the above object, a mobile terminal according to an embodiment of the fourth aspect of the present invention includes: one or more processors; a memory; one or more modules, wherein the one or more modules are stored in the memory, when When the one or more processors are executed, the following operations are performed: detecting whether the current mobile terminal is in a mobile state; and if detecting that the current mobile terminal is in a mobile state, turning off the hardware switch of the current mobile terminal.
本发明附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。The additional aspects and advantages of the invention will be set forth in part in the description which follows.
附图说明DRAWINGS
本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中,The above and/or additional aspects and advantages of the present invention will become apparent and readily understood from
图1是根据本发明一个实施例的控制移动终端硬件状态的方法流程图。1 is a flow chart of a method of controlling a hardware state of a mobile terminal in accordance with one embodiment of the present invention.
图2是根据本发明一个实施例的坐标轴示意图。2 is a schematic diagram of a coordinate axis in accordance with one embodiment of the present invention.
图3是根据本发明另一个实施例的控制移动终端硬件状态的方法流程图。3 is a flow chart of a method of controlling a hardware state of a mobile terminal in accordance with another embodiment of the present invention.
图4是根据本发明又一个实施例的控制移动终端硬件状态的方法流程图。4 is a flow chart of a method of controlling a hardware state of a mobile terminal in accordance with still another embodiment of the present invention.
图5是根据本发明又一个实施例的控制移动终端硬件状态的方法流程图。FIG. 5 is a flow chart of a method of controlling a hardware state of a mobile terminal according to still another embodiment of the present invention.
图6是根据本发明一个实施例的控制移动终端硬件状态的装置结构示意图。FIG. 6 is a schematic structural diagram of an apparatus for controlling a hardware state of a mobile terminal according to an embodiment of the present invention.
图7是根据本发明另一个实施例的控制移动终端硬件状态的装置结构示意图。 FIG. 7 is a schematic structural diagram of an apparatus for controlling a hardware state of a mobile terminal according to another embodiment of the present invention.
具体实施方式detailed description
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。The embodiments of the present invention are described in detail below, and the examples of the embodiments are illustrated in the drawings, wherein the same or similar reference numerals are used to refer to the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the drawings are intended to be illustrative of the invention and are not to be construed as limiting.
下面参考附图描述本发明实施例的控制移动终端硬件状态的方法及装置。A method and apparatus for controlling the hardware state of a mobile terminal according to an embodiment of the present invention are described below with reference to the accompanying drawings.
图1是根据本发明一个实施例的控制移动终端硬件状态的方法流程图,该方法实施例可以应用在手机等移动终端上。如图1所示,该方法包括:FIG. 1 is a flowchart of a method for controlling a hardware state of a mobile terminal according to an embodiment of the present invention. The method embodiment may be applied to a mobile terminal such as a mobile phone. As shown in Figure 1, the method includes:
S100,判断当前移动终端是否处于震动状态,若确定当前移动终端处于震动状态,则执行S101,若确定当前移动终端处于未处于震动状态,则操作结束。S100: Determine whether the current mobile terminal is in a vibrating state. If it is determined that the current mobile terminal is in a vibrating state, execute S101. If it is determined that the current mobile terminal is not in a vibrating state, the operation ends.
在该实施例中,S100为可选步骤,即仅通过检测移动终端是否处于移动状态就可决定是否关闭移动终端的硬件开关。在该实施例中之所以采用S100,是因为若确定当前移动终端处于未处于震动状态,则不需要执行后续操作,从而可以省去后续检测工作,简化实现过程。In this embodiment, S100 is an optional step of determining whether to turn off the hardware switch of the mobile terminal only by detecting whether the mobile terminal is in a moving state. In this embodiment, S100 is adopted because if it is determined that the current mobile terminal is not in a vibrating state, subsequent operations need not be performed, thereby eliminating subsequent detection work and simplifying the implementation process.
其中,判断当前移动终端是否处于震动状态可通过多种方式实现,此处列举两种方式:Among them, judging whether the current mobile terminal is in a vibrating state can be implemented in various ways, and two methods are listed here:
第一种方式:获得当前移动终端的震动参数,若震动参数符合预定条件,则确定当前移动终端处于震动状态,即表示网络信号可能不稳定。The first way is to obtain the vibration parameter of the current mobile terminal. If the vibration parameter meets the predetermined condition, it is determined that the current mobile terminal is in a vibration state, that is, the network signal may be unstable.
对于第一种方式,具体可采用以下几种方式实现:For the first method, it can be implemented in the following ways:
可通过加速度感应器获得当前移动终端在预设时间段内的每个单位时间的加速度,若预设时间段内单位时间的加速度大于预设阈值的概率大于预定值,则确定当前移动终端处于震动状态。The acceleration of each unit time of the current mobile terminal in the preset time period can be obtained by the acceleration sensor. If the probability that the acceleration of the unit time in the preset time period is greater than the preset threshold is greater than the predetermined value, it is determined that the current mobile terminal is in vibration. status.
例如,可通过加速度感应器获得当前移动终端在4ms内的加速度信息,假设第1ms的加速度为a1,第2ms的加速度为a2,第1ms的加速度为a3,第4ms的加速度为a4,预设阈值为A,预定值为40%,假定,a1>A>a2>a3>a4,则在这4ms内加速度大于预设阈值的概率为25%,由于25%<40%,因此,可以确定当前移动终端未处于震动状态;又假定,a1>a2>a3>A>a4,则在这4ms内加速度大于预设阈值的概率为75%,由于75%>40%,因此,可以确定当前移动终端处于震动状态。For example, the acceleration information of the current mobile terminal within 4 ms can be obtained by the acceleration sensor, assuming that the acceleration of the first ms is a1, the acceleration of the second ms is a2, the acceleration of the first ms is a3, the acceleration of the fourth ms is a4, and the preset threshold. For A, the predetermined value is 40%. Assuming that a1>A>a2>a3>a4, the probability that the acceleration is greater than the preset threshold within 2ms is 25%. Since 25%<40%, the current movement can be determined. The terminal is not in a vibrating state; assuming that a1>a2>a3>A>a4, the probability that the acceleration is greater than the preset threshold within 7ms is 75%, and since 75%>40%, it can be determined that the current mobile terminal is in Vibration state.
具体地,可通过以下公式计算单位时间的加速度:Specifically, the acceleration per unit time can be calculated by the following formula:
Figure PCTCN2015082243-appb-000001
Figure PCTCN2015082243-appb-000001
其中,a表示当前移动终端例如手机在左右方向(即图2所示坐标轴中的X轴)的加速度,b表示当前移动终端例如手机在前后方向(Y轴)的加速度,c表示当前移动终端例如手机在垂直方向(Z轴)的加速度,K表示获取信息时间间隔,即加速度传感器发送两次消息的时间间隔,M为震动系数,该震动系数用来调节震动的敏感程度,1≤M≤100,具体取值可根据场景进行选择。Where a represents the acceleration of the current mobile terminal such as the mobile phone in the left-right direction (ie, the X-axis in the coordinate axis shown in FIG. 2), b represents the acceleration of the current mobile terminal such as the mobile phone in the front-rear direction (Y-axis), and c represents the current mobile terminal. For example, the acceleration of the mobile phone in the vertical direction (Z-axis), K represents the time interval for acquiring information, that is, the time interval at which the acceleration sensor sends two messages, and M is the vibration coefficient, which is used to adjust the sensitivity of the vibration, 1 ≤ M ≤ 100, the specific value can be selected according to the scene.
上述预定条件也可以为某种规律,该规律可由震动频率、最大震动幅度和频率分布等来确定。The predetermined condition may also be a certain rule, which may be determined by a vibration frequency, a maximum vibration amplitude, a frequency distribution, and the like.
具体地,可以在确定当前移动终端持续震动的时间大于预定值后,获得当前移动终端在预设时间段内的平均震动次数,若平均震动次数达到预设阈值,则确定当前移动终端在预设时间段内处于震动状态。Specifically, after determining that the current mobile terminal continuously vibrates for more than a predetermined value, the average number of vibrations of the current mobile terminal in the preset time period may be obtained. If the average number of vibrations reaches a preset threshold, determining that the current mobile terminal is preset. It is in a state of vibration during the time period.
例如,若某段时间内平均震动达到了一定的次数,如1分钟内平均震动了5次,则认为该移动终端在该段时间处于震动状态。For example, if the average vibration reaches a certain number of times in a certain period of time, such as an average of 5 vibrations within 1 minute, the mobile terminal is considered to be in a state of vibration during that period of time.
具体地,也可以通过获得当前移动终端在预设时间段内的最大震动幅度,若最大震动幅度超过预设幅度值,则确定当前移动终端在预设时间段内处于震动状态。Specifically, the maximum vibration amplitude of the current mobile terminal in the preset time period may also be obtained. If the maximum vibration amplitude exceeds the preset amplitude value, it is determined that the current mobile terminal is in a vibration state within the preset time period.
具体地,还可以通过获得当前移动终端在预设时间段内每个单位时间的震动次数,若预设时间段内单位时间的震动次数超过第一数值的概率大于第一阈值且单位时间的震动次数超过第二数值的概率大于第二阈值,则确定当前移动终端在预设时间段内处于震动状态。Specifically, the number of vibrations per unit time of the current mobile terminal in the preset time period may also be obtained, and if the number of vibrations per unit time in the preset time period exceeds the first value, the probability is greater than the first threshold and the vibration per unit time. If the probability that the number of times exceeds the second value is greater than the second threshold, it is determined that the current mobile terminal is in a vibrating state within a preset time period.
例如,移动终端在每分钟震动次数超过X次的概率达到50%,超过Y次的概率达到30%,则可以确定当前移动终端在预设时间段内处于震动状态。For example, if the probability that the mobile terminal vibrates more than X times per minute reaches 50%, and the probability of exceeding Y times reaches 30%, it can be determined that the current mobile terminal is in a vibrating state within a preset time period.
第二种方式:首先获得震动状态的频率取值范围,然后获得当前移动终端的当前震动频率,并将当前震动频率和频率取值范围进行比较,若当前震动频率位于频率取值范围内,则确定当前移动终端处于震动状态。The second way: first obtain the frequency range of the vibration state, and then obtain the current vibration frequency of the current mobile terminal, and compare the current vibration frequency with the frequency range, if the current vibration frequency is within the frequency range, then It is determined that the current mobile terminal is in a vibrating state.
其中,震动状态的频率取值范围可通过对震动状态下的信息进行收集、统计来获得。具体地,可以将手机放置在火车上运行一段时间以收集信息,将收集到的信息进行整理,然后通过对分段的震动频率进行统计,分析出火车震动的频率取值范围,例如为30次/分钟-50次/分钟。The frequency range of the vibration state can be obtained by collecting and counting the information under the vibration state. Specifically, the mobile phone can be placed on the train for a period of time to collect information, the collected information is collated, and then the frequency of the train vibration is analyzed by counting the vibration frequency of the segment, for example, 30 times. / min -50 times / min.
在本实施例中之所以采用频率取值范围,是因为火车在运行过程中,其震动状态可能不固定,例如,同一段列车行驶在同样的路段,但由于速度、天气等的细微环境变化导致震动状态并不是一成不变的,因此,采用频率取值范围更科学,对于确定当前移动终端是否处于震动状态更准确。 In this embodiment, the frequency value range is adopted because the vibration state of the train may not be fixed during the running process. For example, the same train travels on the same road section, but due to the slight environmental changes such as speed and weather. The vibration state is not static. Therefore, the frequency range is more scientific, and it is more accurate to determine whether the current mobile terminal is in a vibrating state.
S101,检测当前移动终端是否处于移动状态。S101. Detect whether the current mobile terminal is in a moving state.
由于手机等移动终端处于震动状态,也不一定会耗电,例如手机来电震动或地震时并不会耗电,所以需要继续对当前移动终端是否处于移动状态来判断是否应该关闭硬件的开关。Since the mobile terminal such as a mobile phone is in a vibrating state, it does not necessarily consume power. For example, when the mobile phone is vibrated or the earthquake does not consume power, it is necessary to continue to determine whether the current mobile terminal should be in a moving state to determine whether the hardware switch should be turned off.
在该实施例中,可以通过计算预设时间段内当前移动终端的平均速度,然后判断平均速度是否大于预设速度值,若大于,则表明当前移动终端处于移动状态,否则,表明当前移动终端未处于移动状态。In this embodiment, the average speed of the current mobile terminal in the preset time period may be calculated, and then it is determined whether the average speed is greater than the preset speed value. If greater than, the current mobile terminal is in a moving state; otherwise, the current mobile terminal is indicated. Not moving.
具体地,计算预设时间段内当前移动终端的平均速度可以通过以下步骤实现:获得预设时间段的开始时间信息,根据开始时间信息获得当前移动终端的第一位置信息;获得预设时间段的结束时间信息,根据结束时间信息获得当前移动终端的第二位置信息;然后根据第一位置信息和第二位置信息获得预设时间段内的位移信息,根据位移信息计算出预设时间段内当前移动终端的平均速度。Specifically, calculating the average speed of the current mobile terminal in the preset time period may be implemented by: obtaining start time information of the preset time period, obtaining first position information of the current mobile terminal according to the start time information; and obtaining the preset time period. End time information, obtaining second position information of the current mobile terminal according to the end time information; then obtaining displacement information in the preset time period according to the first position information and the second position information, and calculating the preset time period according to the displacement information The average speed of current mobile terminals.
例如,在该实施例中可以通过移动终端例如安卓(android)手机的全球定位系统(GPS)模块获取当前的经纬度信息,并通过以下公式计算手机在10分钟内的位移差,假设A时间点至B时间点的时间长度为10分钟:For example, in this embodiment, the current latitude and longitude information can be obtained by a global positioning system (GPS) module of a mobile terminal such as an Android mobile phone, and the displacement difference of the mobile phone within 10 minutes is calculated by the following formula, assuming that the time point is A. The length of time B is 10 minutes:
Figure PCTCN2015082243-appb-000002
Figure PCTCN2015082243-appb-000002
其中,Lat1表示手机在A时间点所在的经纬度,Lat2表示手机在B时间点所在的经纬度,S表示位移差;使用该位移差S除以时间长度10分钟,可得到该段时间内的平均速度;若该段时间内平均速度超过某预设值(如20公里/小时),则认为手机正在快速移动,且信号不稳定。Among them, Lat1 represents the latitude and longitude of the mobile phone at time A, Lat2 represents the latitude and longitude of the mobile phone at time B, and S represents the displacement difference; using the displacement difference S divided by the length of time of 10 minutes, the average speed of the time period can be obtained. If the average speed exceeds a certain preset value (such as 20 km/h) during this period, the mobile phone is considered to be moving fast and the signal is unstable.
S102,若检测到当前移动终端处于移动状态,则关闭当前移动终端的硬件开关。S102. If it is detected that the current mobile terminal is in a mobile state, shut down a hardware switch of the current mobile terminal.
通过S100和S101的检测,当移动终端处于震动状态且正快速移动时,应该对某些硬件开关进行控制,例如关闭WiFi、通用无线分组业务(GPRS)等等,从而避免移动终端不断联网而导致的电量消耗。Through the detection of S100 and S101, when the mobile terminal is in a vibrating state and is moving fast, some hardware switches should be controlled, such as turning off WiFi, general wireless packet service (GPRS), etc., thereby avoiding the continuous networking of the mobile terminal. The power consumption.
另外,若通过S101检测到当前移动终端处于移动状态,即可确定出当前移动终端所处的环境信号不好,因此,会自动关闭硬件的开关。In addition, if it is detected by S101 that the current mobile terminal is in a moving state, it can be determined that the current environment signal of the mobile terminal is not good, and therefore, the hardware switch is automatically turned off.
上述控制移动终端硬件状态的方法实施例,通过自动检测当前移动终端是否处于移动状态,并在确定当前移动终端处于移动状态时关闭当前移动终端的硬件开关,从而达到省 电的目的。The foregoing method for controlling the hardware state of the mobile terminal automatically stops detecting whether the current mobile terminal is in a mobile state, and turns off the hardware switch of the current mobile terminal when determining that the current mobile terminal is in a mobile state, thereby achieving a provincial The purpose of electricity.
但是,在关闭移动终端的硬件开关后,当用户离开信号不好的环境例如下火车、地铁时就无法及时使用网络,这时可继续判断移动终端的状态,如图3所示,该方法实施例还可以包括S103:However, after the hardware switch of the mobile terminal is turned off, when the user leaves the environment with a bad signal, such as a train or a subway, the network cannot be used in time, and the state of the mobile terminal can be continuously judged, as shown in FIG. 3, the method is implemented. The example may also include S103:
S103,检测当前移动终端是否处于静止状态,若当前移动终端处于静止状态,则读取记录的状态信息,恢复对当前移动终端硬件的设置,若当前移动终端仍处于移动状态,则继续保持关闭当前移动终端硬件的开关。S103. Detect whether the current mobile terminal is in a static state. If the current mobile terminal is in a static state, read the recorded state information, and restore the setting of the current mobile terminal hardware. If the current mobile terminal is still in the mobile state, continue to keep the current state. The switch of the mobile terminal hardware.
当然,在该实施例中,还需要在关闭当前移动终端的硬件开关之前,记录当前移动终端硬件的状态信息,以便根据记录的状态信息进行恢复,从而省去了用户手动设置的不便。Of course, in this embodiment, it is also required to record the status information of the current mobile terminal hardware before the hardware switch of the current mobile terminal is closed, so as to perform recovery according to the recorded status information, thereby eliminating the inconvenience that the user manually sets.
同样地,为了让用户在离开信号不好的环境后可以及时使用网络,这时需要继续判断移动终端的状态,如图4所示,在S102之后,该方法实施例还可以包括S104-S105:Similarly, in order to allow the user to use the network in a timely manner after leaving the environment with a bad signal, the state of the mobile terminal needs to be continuously determined. As shown in FIG. 4, after S102, the method embodiment may further include S104-S105:
S104,获得当前移动终端的震动参数。S104. Obtain a vibration parameter of the current mobile terminal.
S105,判断震动参数是否符合预定条件,若不符合,则读取之前记录的状态信息,恢复对当前移动终端硬件的设置。S105. Determine whether the vibration parameter meets a predetermined condition. If not, read the previously recorded status information, and restore the setting of the current mobile terminal hardware.
通过S105的判断,在确定当前移动终端的震动参数不符合预定条件时,即可获知当前移动终端已离开信号不好的环境,故此时可以恢复对硬件的设置。By determining in S105, when it is determined that the vibration parameter of the current mobile terminal does not meet the predetermined condition, it can be known that the current mobile terminal has left the environment with a bad signal, so the setting of the hardware can be resumed at this time.
另外,如图5所示,若确定震动参数符合预定条件,则需继续判断当前移动终端是否处于移动状态,若未处于,则可以恢复对硬件开关的设置,若仍处于,则继续保持当前移动终端的硬件处于关闭状态。In addition, as shown in FIG. 5, if it is determined that the vibration parameter meets the predetermined condition, it is necessary to continue to determine whether the current mobile terminal is in a moving state, and if not, the setting of the hardware switch can be resumed, and if still, the current mobile is maintained. The hardware of the terminal is turned off.
上述控制移动终端硬件状态的方法,适合应用在信号不稳定的环境,例如在火车或者地铁上。在这些场景下,移动终端例如手机无法稳定地连接WiFi或2G/3G网络,频繁地搜索网络,或者断开/连接网络都会导致手机耗电量大大增加,而采用本实施例的技术方案,可以通过检测移动终端的状态来智能地关闭硬件的开关,避免了严重耗电情况的发生;另外,当网络环境恢复正常时,也可以自动恢复硬件开关关闭前的设置,使用户可以正常使用网络;并且,整个实现过程中不需要用户的参与,不需要用户记忆场景及模式的对应关系,也不用担心因用户的遗忘而导致的省电失效情况发生,实现简单、实用性强。The above method for controlling the hardware state of the mobile terminal is suitable for use in an environment where the signal is unstable, such as on a train or a subway. In these scenarios, the mobile terminal, such as a mobile phone, cannot stably connect to the WiFi or the 2G/3G network, and frequently searches for the network, or disconnects/connects the network, which causes the power consumption of the mobile phone to be greatly increased, and the technical solution of the embodiment can be used. By detecting the state of the mobile terminal, the switch of the hardware is intelligently turned off, thereby avoiding the occurrence of serious power consumption; in addition, when the network environment returns to normal, the setting before the hardware switch is turned off can also be automatically restored, so that the user can use the network normally; Moreover, the user does not need to participate in the whole implementation process, and the user does not need to memorize the corresponding relationship between the scene and the mode, and does not need to worry about the power failure failure caused by the user's forgetting, and the implementation is simple and practical.
为了实现上述实施例,本发明还提出一种控制移动终端硬件状态的装置。In order to implement the above embodiments, the present invention also provides an apparatus for controlling the state of the hardware of the mobile terminal.
图6是根据本发明一个实施例的控制移动终端硬件状态的装置结构示意图。如图6所示,该装置可以包括:检测模块61和控制模块62,其中:FIG. 6 is a schematic structural diagram of an apparatus for controlling a hardware state of a mobile terminal according to an embodiment of the present invention. As shown in FIG. 6, the apparatus may include: a detection module 61 and a control module 62, wherein:
检测模块61用于检测当前移动终端是否处于移动状态,控制模块62用于若检测到上 述当前移动终端处于移动状态,则关闭上述当前移动终端的硬件开关。The detecting module 61 is configured to detect whether the current mobile terminal is in a moving state, and the control module 62 is configured to detect When the current mobile terminal is in a mobile state, the hardware switch of the current mobile terminal is turned off.
为了优化实现过程,该装置还可以包括确定模块60,如图6所示,该确定模块60用于在上述检测模块61检测当前移动终端是否处于移动状态之前,确定上述当前移动终端处于震动状态。也即在通过检测模块61检测当前移动终端是否处于移动状态之前,首先需要判断当前移动终端是否处于震动状态,只有在确定当前移动终端处于震动状态的情况下才通过检测模块进行后续检测操作,否则,操作结束。In order to optimize the implementation process, the device may further include a determining module 60. As shown in FIG. 6, the determining module 60 is configured to determine that the current mobile terminal is in a vibrating state before the detecting module 61 detects whether the current mobile terminal is in a moving state. That is, before detecting whether the current mobile terminal is in the moving state by the detecting module 61, it is first necessary to determine whether the current mobile terminal is in a vibrating state, and only after determining that the current mobile terminal is in a vibrating state, the detecting module performs subsequent detecting operations, otherwise The operation ends.
其中,判断当前移动终端是否处于震动状态可通过多种方式实现,此处列举两种方式:Among them, judging whether the current mobile terminal is in a vibrating state can be implemented in various ways, and two methods are listed here:
第一种方式:通过确定模块获得当前移动终端的震动参数,若震动参数符合预定条件,则确定当前移动终端处于震动状态,即表示网络信号可能不稳定。The first mode: obtaining the vibration parameter of the current mobile terminal by determining the module, and if the vibration parameter meets the predetermined condition, determining that the current mobile terminal is in a vibration state, that is, the network signal may be unstable.
对于第一种方式,具体可采用以下几种方式实现:For the first method, it can be implemented in the following ways:
可通过加速度感应器获得当前移动终端在预设时间段内的每个单位时间的加速度,若预设时间段内单位时间的加速度大于预设阈值的概率大于预定值,则确定当前移动终端处于震动状态。The acceleration of each unit time of the current mobile terminal in the preset time period can be obtained by the acceleration sensor. If the probability that the acceleration of the unit time in the preset time period is greater than the preset threshold is greater than the predetermined value, it is determined that the current mobile terminal is in vibration. status.
例如,可通过加速度感应器获得当前移动终端在4ms内的加速度信息,假设第1ms的加速度为a1,第2ms的加速度为a2,第1ms的加速度为a3,第4ms的加速度为a4,预设阈值为A,预定值为40%,假定,a1>A>a2>a3>a4,则在这4ms内加速度大于预设阈值的概率为25%,由于25%<40%,因此,可以确定当前移动终端未处于震动状态;又假定,a1>a2>a3>A>a4,则在这4ms内加速度大于预设阈值的概率为75%,由于75%>40%,因此,可以确定当前移动终端处于震动状态。For example, the acceleration information of the current mobile terminal within 4 ms can be obtained by the acceleration sensor, assuming that the acceleration of the first ms is a1, the acceleration of the second ms is a2, the acceleration of the first ms is a3, the acceleration of the fourth ms is a4, and the preset threshold. For A, the predetermined value is 40%. Assuming that a1>A>a2>a3>a4, the probability that the acceleration is greater than the preset threshold within 2ms is 25%. Since 25%<40%, the current movement can be determined. The terminal is not in a vibrating state; assuming that a1>a2>a3>A>a4, the probability that the acceleration is greater than the preset threshold within 7ms is 75%, and since 75%>40%, it can be determined that the current mobile terminal is in Vibration state.
具体地,可通过以下公式计算单位时间的加速度:Specifically, the acceleration per unit time can be calculated by the following formula:
Figure PCTCN2015082243-appb-000003
Figure PCTCN2015082243-appb-000003
其中,a表示当前移动终端例如手机在左右方向(即图2所示坐标轴中的X轴)的加速度,b表示当前移动终端例如手机在前后方向(Y轴)的加速度,c表示当前移动终端例如手机在垂直方向(Z轴)的加速度,K表示获取信息时间间隔,即加速度传感器发送两次消息的时间间隔,M为震动系数,该震动系数用来调节震动的敏感程度,1≤M≤100,具体取值可根据场景进行选择。Where a represents the acceleration of the current mobile terminal such as the mobile phone in the left-right direction (ie, the X-axis in the coordinate axis shown in FIG. 2), b represents the acceleration of the current mobile terminal such as the mobile phone in the front-rear direction (Y-axis), and c represents the current mobile terminal. For example, the acceleration of the mobile phone in the vertical direction (Z-axis), K represents the time interval for acquiring information, that is, the time interval at which the acceleration sensor sends two messages, and M is the vibration coefficient, which is used to adjust the sensitivity of the vibration, 1 ≤ M ≤ 100, the specific value can be selected according to the scene.
上述预定条件也可以为某种规律,该规律可由震动频率、最大震动幅度和频率分布等来确定。The predetermined condition may also be a certain rule, which may be determined by a vibration frequency, a maximum vibration amplitude, a frequency distribution, and the like.
具体地,可以在确定当前移动终端持续震动的时间大于预定值后,获得当前移动终端 在预设时间段内的平均震动次数,若平均震动次数达到预设阈值,则确定当前移动终端在预设时间段内处于震动状态。Specifically, the current mobile terminal may be obtained after determining that the current mobile terminal continues to vibrate for a time greater than a predetermined value. The average number of vibrations in the preset time period, if the average number of vibrations reaches a preset threshold, it is determined that the current mobile terminal is in a vibrating state within a preset time period.
例如,若某段时间内平均震动达到了一定的次数,如1分钟内平均震动了6次,则认为该移动终端在该段时间处于震动状态。For example, if the average vibration reaches a certain number of times within a certain period of time, such as an average of 6 vibrations within 1 minute, the mobile terminal is considered to be in a state of vibration during the period of time.
具体地,也可以通过获得当前移动终端在预设时间段内的最大震动幅度,若最大震动幅度超过预设幅度值,则确定当前移动终端在预设时间段内处于震动状态。Specifically, the maximum vibration amplitude of the current mobile terminal in the preset time period may also be obtained. If the maximum vibration amplitude exceeds the preset amplitude value, it is determined that the current mobile terminal is in a vibration state within the preset time period.
具体地,还可以通过获得当前移动终端在预设时间段内每个单位时间的震动次数,若预设时间段内单位时间的震动次数超过第一数值的概率大于第一阈值且单位时间的震动次数超过第二数值的概率大于第二阈值,则确定当前移动终端在预设时间段内处于震动状态。Specifically, the number of vibrations per unit time of the current mobile terminal in the preset time period may also be obtained, and if the number of vibrations per unit time in the preset time period exceeds the first value, the probability is greater than the first threshold and the vibration per unit time. If the probability that the number of times exceeds the second value is greater than the second threshold, it is determined that the current mobile terminal is in a vibrating state within a preset time period.
例如,移动终端在每分钟震动次数超过X次的概率达到60%,超过Y次的概率达到30%,则可以确定当前移动终端在预设时间段内处于震动状态。For example, if the probability that the mobile terminal vibrates more than X times per minute reaches 60%, and the probability of exceeding Y times reaches 30%, it can be determined that the current mobile terminal is in a vibrating state within a preset time period.
第二种方式:首先通过收集模块获得震动状态的频率取值范围,然后通过确定模块获得当前移动终端的当前震动频率,并将当前震动频率和频率取值范围进行比较,若当前震动频率位于频率取值范围内,则确定当前移动终端处于震动状态。The second way: firstly, the frequency range of the vibration state is obtained by the collecting module, and then the current vibration frequency of the current mobile terminal is obtained by the determining module, and the current vibration frequency and the frequency value range are compared, if the current vibration frequency is at the frequency Within the range of values, it is determined that the current mobile terminal is in a vibrating state.
其中,震动状态的频率取值范围可通过对震动状态下的信息进行收集、统计来获得。具体地,可以将手机放置在火车上运行一段时间以收集信息,将收集到的信息进行整理,然后通过对分段的震动频率进行统计,分析出火车震动的频率取值范围,例如为30次/分钟-60次/分钟。The frequency range of the vibration state can be obtained by collecting and counting the information under the vibration state. Specifically, the mobile phone can be placed on the train for a period of time to collect information, the collected information is collated, and then the frequency of the train vibration is analyzed by counting the vibration frequency of the segment, for example, 30 times. /minute - 60 times / minute.
在本实施例中之所以采用频率取值范围,是因为火车在运行过程中,其震动状态可能不固定,例如,同一段列车行驶在同样的路段,但由于速度、天气等的细微环境变化导致震动状态并不是一成不变的,因此,采用频率取值范围更科学,对于确定当前移动终端是否处于震动状态更准确。In this embodiment, the frequency value range is adopted because the vibration state of the train may not be fixed during the running process. For example, the same train travels on the same road section, but due to the slight environmental changes such as speed and weather. The vibration state is not static. Therefore, the frequency range is more scientific, and it is more accurate to determine whether the current mobile terminal is in a vibrating state.
为了让用户在离开信号不好的环境例如下火车、地铁时可以及时使用网络,该装置还可以包括:记录模块63和恢复模块64,其中,记录模块63在上述控制模块62关闭上述当前移动终端的硬件开关之前,记录上述当前移动终端硬件的状态信息;恢复模块64用于在上述控制模块关62关闭上述当前移动终端的硬件开关之后,检测上述当前移动终端是否处于静止状态,若上述当前移动终端处于静止状态,则读取记录模块63记录的状态信息,恢复对上述当前移动终端硬件的设置。In order to enable the user to use the network in time when the signal is not good, such as when the train or the subway is taken off, the device may further include: a recording module 63 and a recovery module 64, wherein the recording module 63 closes the current mobile terminal at the control module 62. Before the hardware switch, the status information of the current mobile terminal hardware is recorded; the recovery module 64 is configured to detect whether the current mobile terminal is in a static state after the control module off 62 closes the hardware switch of the current mobile terminal, if the current mobile When the terminal is in a stationary state, the status information recorded by the recording module 63 is read, and the setting of the current mobile terminal hardware is restored.
同样地,恢复模块64还可以用于在上述控制模块62关闭上述当前移动终端的硬件开关之后,获得上述当前移动终端的震动参数,判断上述震动参数是否符合预定条件,若不 符合,则读取记录模块63记录的状态信息,恢复对上述当前移动终端硬件的设置。Similarly, the recovery module 64 can be further configured to: after the control module 62 turns off the hardware switch of the current mobile terminal, obtain the vibration parameter of the current mobile terminal, and determine whether the vibration parameter meets a predetermined condition, if not If it matches, the status information recorded by the recording module 63 is read, and the setting of the current mobile terminal hardware is restored.
具体地,上述检测模块61可以用于:计算预设时间段内上述当前移动终端的平均速度,通过判断上述平均速度是否大于预设速度值来检测当前移动终端是否处于移动状态。其中,上述检测模块61计算预设时间段内上述当前移动终端的平均速度的过程可以为:获得上述预设时间段的开始时间信息,根据上述开始时间信息获得上述当前移动终端的第一位置信息;获得上述预设时间段的结束时间信息,根据上述结束时间信息获得上述当前移动终端的第二位置信息;然后根据上述第一位置信息和上述第二位置信息获得上述预设时间段内的位移信息,根据上述位移信息计算出上述预设时间段内上述当前移动终端的平均速度。Specifically, the foregoing detecting module 61 may be configured to: calculate an average speed of the current mobile terminal in a preset time period, and determine whether the current mobile terminal is in a moving state by determining whether the average speed is greater than a preset speed value. The process of the foregoing detecting module 61 for calculating the average speed of the current mobile terminal in the preset time period may be: obtaining the start time information of the preset time period, and obtaining the first location information of the current mobile terminal according to the start time information. Obtaining the end time information of the preset time period, obtaining the second position information of the current mobile terminal according to the end time information; and obtaining the displacement in the preset time period according to the first position information and the second position information. And calculating, according to the displacement information, an average speed of the current mobile terminal in the preset time period.
上述控制移动终端硬件状态的装置可以位于移动终端中,且适合应用在信号不稳定的环境,例如在火车或者地铁上。在这些场景下,移动终端例如手机无法稳定地连接WiFi或2G/3G网络,频繁地搜索网络,或者断开/连接网络都会导致手机耗电量大大增加,而采用本实施例的技术方案,通过检测模块检测移动终端的状态来智能地关闭硬件的开关,避免了严重耗电情况的发生;另外,当网络环境恢复正常时,也可以通过恢复模块自动恢复硬件开关关闭前的设置,使用户可以正常使用网络;并且,整个装置实现简单、实用性强。The above means for controlling the hardware state of the mobile terminal may be located in the mobile terminal and is suitable for use in an environment where the signal is unstable, such as on a train or subway. In these scenarios, the mobile terminal, such as a mobile phone, cannot stably connect to the WiFi or the 2G/3G network, and frequently searches for the network, or disconnects/connects the network, which causes the power consumption of the mobile phone to be greatly increased, and adopts the technical solution of the embodiment. The detecting module detects the state of the mobile terminal to intelligently turn off the hardware switch, thereby avoiding serious power consumption. In addition, when the network environment returns to normal, the recovery module can automatically restore the setting before the hardware switch is turned off, so that the user can The network is used normally; and the entire device is simple and practical.
为了实现上述实施例,本发明还提出了一种存储介质,用于存储应用程序,该应用程序用于执行本发明任一个实施例所述的控制移动终端硬件状态的方法。In order to implement the above embodiments, the present invention also provides a storage medium for storing an application for executing a method for controlling a hardware state of a mobile terminal according to any of the embodiments of the present invention.
为了实现上述实施例,本发明还提出了一种移动终端,包括:一个或者多个处理器;存储器;一个或者多个模块,一个或者多个模块存储在存储器中,当被一个或者多个处理器执行时进行如下操作:In order to implement the above embodiments, the present invention also provides a mobile terminal, comprising: one or more processors; a memory; one or more modules, one or more modules stored in the memory, when processed by one or more When the device is executed, do the following:
S100’,判断当前移动终端是否处于震动状态,若确定当前移动终端处于震动状态,则执行S101’,若确定当前移动终端处于未处于震动状态,则操作结束。S100', determining whether the current mobile terminal is in a vibrating state, and if it is determined that the current mobile terminal is in a vibrating state, executing S101', and if it is determined that the current mobile terminal is not in a vibrating state, the operation ends.
在该实施例中,S100’为可选步骤,即仅通过检测移动终端是否处于移动状态就可决定是否关闭移动终端的硬件开关。在该实施例中之所以采用S100’,是因为若确定当前移动终端处于未处于震动状态,则不需要执行后续操作,从而可以省去后续检测工作,简化实现过程。In this embodiment, S100' is an optional step of determining whether to turn off the hardware switch of the mobile terminal only by detecting whether the mobile terminal is in a moving state. In this embodiment, S100' is adopted because if it is determined that the current mobile terminal is not in a vibrating state, subsequent operations need not be performed, thereby eliminating subsequent detection work and simplifying the implementation process.
其中,判断当前移动终端是否处于震动状态可通过多种方式实现,此处列举两种方式:Among them, judging whether the current mobile terminal is in a vibrating state can be implemented in various ways, and two methods are listed here:
第一种方式:获得当前移动终端的震动参数,若震动参数符合预定条件,则确定当前移动终端处于震动状态,即表示网络信号可能不稳定。The first way is to obtain the vibration parameter of the current mobile terminal. If the vibration parameter meets the predetermined condition, it is determined that the current mobile terminal is in a vibration state, that is, the network signal may be unstable.
对于第一种方式,具体可采用以下几种方式实现:For the first method, it can be implemented in the following ways:
可通过加速度感应器获得当前移动终端在预设时间段内的每个单位时间的加速度,若预设时间段内单位时间的加速度大于预设阈值的概率大于预定值,则确定当前移动终端处 于震动状态。The acceleration of each unit time of the current mobile terminal in the preset time period can be obtained by the acceleration sensor. If the probability that the acceleration of the unit time in the preset time period is greater than the preset threshold is greater than the predetermined value, the current mobile terminal is determined. In the state of vibration.
例如,可通过加速度感应器获得当前移动终端在4ms内的加速度信息,假设第1ms的加速度为a1,第2ms的加速度为a2,第1ms的加速度为a3,第4ms的加速度为a4,预设阈值为A,预定值为40%,假定,a1>A>a2>a3>a4,则在这4ms内加速度大于预设阈值的概率为25%,由于25%<40%,因此,可以确定当前移动终端未处于震动状态;又假定,a1>a2>a3>A>a4,则在这4ms内加速度大于预设阈值的概率为75%,由于75%>40%,因此,可以确定当前移动终端处于震动状态。For example, the acceleration information of the current mobile terminal within 4 ms can be obtained by the acceleration sensor, assuming that the acceleration of the first ms is a1, the acceleration of the second ms is a2, the acceleration of the first ms is a3, the acceleration of the fourth ms is a4, and the preset threshold. For A, the predetermined value is 40%. Assuming that a1>A>a2>a3>a4, the probability that the acceleration is greater than the preset threshold within 2ms is 25%. Since 25%<40%, the current movement can be determined. The terminal is not in a vibrating state; assuming that a1>a2>a3>A>a4, the probability that the acceleration is greater than the preset threshold within 7ms is 75%, and since 75%>40%, it can be determined that the current mobile terminal is in Vibration state.
具体地,可通过以下公式计算单位时间的加速度:Specifically, the acceleration per unit time can be calculated by the following formula:
Figure PCTCN2015082243-appb-000004
Figure PCTCN2015082243-appb-000004
其中,a表示当前移动终端例如手机在左右方向(即图2所示坐标轴中的X轴)的加速度,b表示当前移动终端例如手机在前后方向(Y轴)的加速度,c表示当前移动终端例如手机在垂直方向(Z轴)的加速度,K表示获取信息时间间隔,即加速度传感器发送两次消息的时间间隔,M为震动系数,该震动系数用来调节震动的敏感程度,1≤M≤100,具体取值可根据场景进行选择。Where a represents the acceleration of the current mobile terminal such as the mobile phone in the left-right direction (ie, the X-axis in the coordinate axis shown in FIG. 2), b represents the acceleration of the current mobile terminal such as the mobile phone in the front-rear direction (Y-axis), and c represents the current mobile terminal. For example, the acceleration of the mobile phone in the vertical direction (Z-axis), K represents the time interval for acquiring information, that is, the time interval at which the acceleration sensor sends two messages, and M is the vibration coefficient, which is used to adjust the sensitivity of the vibration, 1 ≤ M ≤ 100, the specific value can be selected according to the scene.
上述预定条件也可以为某种规律,该规律可由震动频率、最大震动幅度和频率分布等来确定。The predetermined condition may also be a certain rule, which may be determined by a vibration frequency, a maximum vibration amplitude, a frequency distribution, and the like.
具体地,可以在确定当前移动终端持续震动的时间大于预定值后,获得当前移动终端在预设时间段内的平均震动次数,若平均震动次数达到预设阈值,则确定当前移动终端在预设时间段内处于震动状态。Specifically, after determining that the current mobile terminal continuously vibrates for more than a predetermined value, the average number of vibrations of the current mobile terminal in the preset time period may be obtained. If the average number of vibrations reaches a preset threshold, determining that the current mobile terminal is preset. It is in a state of vibration during the time period.
例如,若某段时间内平均震动达到了一定的次数,如1分钟内平均震动了5次,则认为该移动终端在该段时间处于震动状态。For example, if the average vibration reaches a certain number of times in a certain period of time, such as an average of 5 vibrations within 1 minute, the mobile terminal is considered to be in a state of vibration during that period of time.
具体地,也可以通过获得当前移动终端在预设时间段内的最大震动幅度,若最大震动幅度超过预设幅度值,则确定当前移动终端在预设时间段内处于震动状态。Specifically, the maximum vibration amplitude of the current mobile terminal in the preset time period may also be obtained. If the maximum vibration amplitude exceeds the preset amplitude value, it is determined that the current mobile terminal is in a vibration state within the preset time period.
具体地,还可以通过获得当前移动终端在预设时间段内每个单位时间的震动次数,若预设时间段内单位时间的震动次数超过第一数值的概率大于第一阈值且单位时间的震动次数超过第二数值的概率大于第二阈值,则确定当前移动终端在预设时间段内处于震动状态。Specifically, the number of vibrations per unit time of the current mobile terminal in the preset time period may also be obtained, and if the number of vibrations per unit time in the preset time period exceeds the first value, the probability is greater than the first threshold and the vibration per unit time. If the probability that the number of times exceeds the second value is greater than the second threshold, it is determined that the current mobile terminal is in a vibrating state within a preset time period.
例如,移动终端在每分钟震动次数超过X次的概率达到50%,超过Y次的概率达到30%,则可以确定当前移动终端在预设时间段内处于震动状态。For example, if the probability that the mobile terminal vibrates more than X times per minute reaches 50%, and the probability of exceeding Y times reaches 30%, it can be determined that the current mobile terminal is in a vibrating state within a preset time period.
第二种方式:首先获得震动状态的频率取值范围,然后获得当前移动终端的当前震动 频率,并将当前震动频率和频率取值范围进行比较,若当前震动频率位于频率取值范围内,则确定当前移动终端处于震动状态。The second way: first obtain the frequency range of the vibration state, and then obtain the current vibration of the current mobile terminal The frequency is compared with the current vibration frequency and the frequency range. If the current vibration frequency is within the frequency range, it is determined that the current mobile terminal is in a vibration state.
其中,震动状态的频率取值范围可通过对震动状态下的信息进行收集、统计来获得。具体地,可以将手机放置在火车上运行一段时间以收集信息,将收集到的信息进行整理,然后通过对分段的震动频率进行统计,分析出火车震动的频率取值范围,例如为30次/分钟-50次/分钟。The frequency range of the vibration state can be obtained by collecting and counting the information under the vibration state. Specifically, the mobile phone can be placed on the train for a period of time to collect information, the collected information is collated, and then the frequency of the train vibration is analyzed by counting the vibration frequency of the segment, for example, 30 times. / min -50 times / min.
在本实施例中之所以采用频率取值范围,是因为火车在运行过程中,其震动状态可能不固定,例如,同一段列车行驶在同样的路段,但由于速度、天气等的细微环境变化导致震动状态并不是一成不变的,因此,采用频率取值范围更科学,对于确定当前移动终端是否处于震动状态更准确。In this embodiment, the frequency value range is adopted because the vibration state of the train may not be fixed during the running process. For example, the same train travels on the same road section, but due to the slight environmental changes such as speed and weather. The vibration state is not static. Therefore, the frequency range is more scientific, and it is more accurate to determine whether the current mobile terminal is in a vibrating state.
S101’,检测当前移动终端是否处于移动状态。S101', detecting whether the current mobile terminal is in a moving state.
由于手机等移动终端处于震动状态,也不一定会耗电,例如手机来电震动或地震时并不会耗电,所以需要继续对当前移动终端是否处于移动状态来判断是否应该关闭硬件的开关。Since the mobile terminal such as a mobile phone is in a vibrating state, it does not necessarily consume power. For example, when the mobile phone is vibrated or the earthquake does not consume power, it is necessary to continue to determine whether the current mobile terminal should be in a moving state to determine whether the hardware switch should be turned off.
在该实施例中,可以通过计算预设时间段内当前移动终端的平均速度,然后判断平均速度是否大于预设速度值,若大于,则表明当前移动终端处于移动状态,否则,表明当前移动终端未处于移动状态。In this embodiment, the average speed of the current mobile terminal in the preset time period may be calculated, and then it is determined whether the average speed is greater than the preset speed value. If greater than, the current mobile terminal is in a moving state; otherwise, the current mobile terminal is indicated. Not moving.
具体地,计算预设时间段内当前移动终端的平均速度可以通过以下步骤实现:获得预设时间段的开始时间信息,根据开始时间信息获得当前移动终端的第一位置信息;获得预设时间段的结束时间信息,根据结束时间信息获得当前移动终端的第二位置信息;然后根据第一位置信息和第二位置信息获得预设时间段内的位移信息,根据位移信息计算出预设时间段内当前移动终端的平均速度。Specifically, calculating the average speed of the current mobile terminal in the preset time period may be implemented by: obtaining start time information of the preset time period, obtaining first position information of the current mobile terminal according to the start time information; and obtaining the preset time period. End time information, obtaining second position information of the current mobile terminal according to the end time information; then obtaining displacement information in the preset time period according to the first position information and the second position information, and calculating the preset time period according to the displacement information The average speed of current mobile terminals.
例如,在该实施例中可以通过移动终端例如安卓(android)手机的全球定位系统(GPS)模块获取当前的经纬度信息,并通过以下公式计算手机在10分钟内的位移差,假设A时间点至B时间点的时间长度为10分钟:For example, in this embodiment, the current latitude and longitude information can be obtained by a global positioning system (GPS) module of a mobile terminal such as an Android mobile phone, and the displacement difference of the mobile phone within 10 minutes is calculated by the following formula, assuming that the time point is A. The length of time B is 10 minutes:
Figure PCTCN2015082243-appb-000005
Figure PCTCN2015082243-appb-000005
其中,Lat1表示手机在A时间点所在的经纬度,Lat2表示手机在B时间点所在的经纬度,S表示位移差;使用该位移差S除以时间长度10分钟,可得到该段时间内的平均速度; 若该段时间内平均速度超过某预设值(如20公里/小时),则认为手机正在快速移动,且信号不稳定。Among them, Lat1 represents the latitude and longitude of the mobile phone at time A, Lat2 represents the latitude and longitude of the mobile phone at time B, and S represents the displacement difference; using the displacement difference S divided by the length of time of 10 minutes, the average speed of the time period can be obtained. ; If the average speed exceeds a certain preset value (such as 20 km/h) during this period, the mobile phone is considered to be moving fast and the signal is unstable.
S102’,若检测到当前移动终端处于移动状态,则关闭当前移动终端的硬件开关。S102', if it is detected that the current mobile terminal is in a mobile state, the hardware switch of the current mobile terminal is turned off.
通过S100’和S101’的检测,当移动终端处于震动状态且正快速移动时,应该对某些硬件开关进行控制,例如关闭WiFi、通用无线分组业务(GPRS)等等,从而避免移动终端不断联网而导致的电量消耗。Through the detection of S100' and S101', when the mobile terminal is in a vibrating state and is moving fast, some hardware switches should be controlled, such as turning off WiFi, general wireless packet service (GPRS), etc., thereby avoiding continuous networking of mobile terminals. And the resulting power consumption.
另外,若通过S101’检测到当前移动终端处于移动状态,即可确定出当前移动终端所处的环境信号不好,因此,会自动关闭硬件的开关。In addition, if it is detected by S101' that the current mobile terminal is in a moving state, it can be determined that the current environment signal of the mobile terminal is not good, and therefore, the hardware switch is automatically turned off.
上述移动终端,通过自动检测当前移动终端是否处于移动状态,并在确定当前移动终端处于移动状态时关闭当前移动终端的硬件开关,从而达到省电的目的。The above mobile terminal achieves power saving by automatically detecting whether the current mobile terminal is in a moving state and turning off the hardware switch of the current mobile terminal when determining that the current mobile terminal is in a moving state.
但是,在关闭移动终端的硬件开关后,当用户离开信号不好的环境例如下火车、地铁时就无法及时使用网络,这时可继续判断移动终端的状态,如图3所示,该方法实施例还可以包括S103’:However, after the hardware switch of the mobile terminal is turned off, when the user leaves the environment with a bad signal, such as a train or a subway, the network cannot be used in time, and the state of the mobile terminal can be continuously judged, as shown in FIG. 3, the method is implemented. Examples can also include S103':
S103’,检测当前移动终端是否处于静止状态,若当前移动终端处于静止状态,则读取记录的状态信息,恢复对当前移动终端硬件的设置。S103', detecting whether the current mobile terminal is in a static state, and if the current mobile terminal is in a static state, reading the recorded status information, and restoring the setting of the current mobile terminal hardware.
当然,在该实施例中,还需要在关闭当前移动终端的硬件开关之前,记录当前移动终端硬件的状态信息,以便根据记录的状态信息进行恢复,从而省去了用户手动设置的不便。Of course, in this embodiment, it is also required to record the status information of the current mobile terminal hardware before the hardware switch of the current mobile terminal is closed, so as to perform recovery according to the recorded status information, thereby eliminating the inconvenience that the user manually sets.
同样地,为了让用户在离开信号不好的环境后可以及时使用网络,这时需要继续判断移动终端的状态,在S102’之后,该处理器还可以进一步用于执行S104’-S105’:Similarly, in order to allow the user to use the network in time after leaving the environment with poor signal, it is necessary to continue to judge the state of the mobile terminal. After S102', the processor may further be used to execute S104'-S105':
S104’,获得当前移动终端的震动参数。S104', obtaining a vibration parameter of the current mobile terminal.
S105’,判断震动参数是否符合预定条件,若不符合,则读取之前记录的状态信息,恢复对当前移动终端硬件的设置。S105', determining whether the vibration parameter meets a predetermined condition, and if not, reading the previously recorded status information, and restoring the setting of the current mobile terminal hardware.
通过S105’的判断,在确定当前移动终端的震动参数不符合预定条件时,即可获知当前移动终端已离开信号不好的环境,故此时可以恢复对硬件的设置。By determining in S105', when it is determined that the vibration parameter of the current mobile terminal does not meet the predetermined condition, it can be known that the current mobile terminal has left the environment with a bad signal, so the setting of the hardware can be resumed at this time.
另外,若确定震动参数符合预定条件,则需继续判断当前移动终端是否处于移动状态,若未处于,则可以恢复对硬件开关的设置,若仍处于,则继续保持当前移动终端的硬件处于关闭状态。In addition, if it is determined that the vibration parameter meets the predetermined condition, it is necessary to continue to determine whether the current mobile terminal is in a moving state, and if not, the setting of the hardware switch can be resumed, and if still, the hardware of the current mobile terminal is kept closed. .
上述移动终端可以应用在信号不稳定的环境,例如在火车或者地铁上。在这些场景下,移动终端例如手机无法稳定地连接WiFi或2G/3G网络,频繁地搜索网络,或者断开/连接网络都会导致移动终端耗电量大大增加。 The above mobile terminal can be applied in an environment where signals are unstable, such as on a train or a subway. In these scenarios, a mobile terminal such as a mobile phone cannot stably connect to a WiFi or 2G/3G network, frequently search for a network, or disconnect/connect to a network, resulting in a significant increase in power consumption of the mobile terminal.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of the present specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" and the like means a specific feature described in connection with the embodiment or example. A structure, material or feature is included in at least one embodiment or example of the invention. In the present specification, the schematic representation of the above terms is not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. In addition, various embodiments or examples described in the specification, as well as features of various embodiments or examples, may be combined and combined.
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本发明的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。Moreover, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, features defining "first" or "second" may include at least one of the features, either explicitly or implicitly. In the description of the present invention, the meaning of "a plurality" is at least two, such as two, three, etc., unless specifically defined otherwise.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。Any process or method description in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a particular logical function or process. And the scope of the preferred embodiments of the invention includes additional implementations, in which the functions may be performed in a substantially simultaneous manner or in an opposite order depending on the functions involved, in the order shown or discussed. It will be understood by those skilled in the art to which the embodiments of the present invention pertain.
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer readable medium, Used in conjunction with, or in conjunction with, an instruction execution system, apparatus, or device (eg, a computer-based system, a system including a processor, or other system that can fetch instructions and execute instructions from an instruction execution system, apparatus, or device) Or use with equipment. For the purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or device, or in conjunction with the instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM). In addition, the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method is processed to obtain the program electronically and then stored in computer memory.
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下 列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that portions of the invention may be implemented in hardware, software, firmware or a combination thereof. In the above-described embodiments, multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be used in the art. Any one of the column technologies or a combination thereof: discrete logic circuits with logic gates for implementing logic functions on data signals, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGA) ), field programmable gate array (FPGA), etc.
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art can understand that all or part of the steps carried by the method of implementing the above embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, one or a combination of the steps of the method embodiments is included.
此外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。 The above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like. Although the embodiments of the present invention have been shown and described, it is understood that the above-described embodiments are illustrative and are not to be construed as limiting the scope of the invention. The embodiments are subject to variations, modifications, substitutions and variations.

Claims (20)

  1. 一种控制移动终端硬件状态的方法,其特征在于,包括:A method for controlling a hardware state of a mobile terminal, comprising:
    检测当前移动终端是否处于移动状态;以及Detecting whether the current mobile terminal is in a mobile state;
    若检测到所述当前移动终端处于移动状态,则关闭所述当前移动终端的硬件开关。If it is detected that the current mobile terminal is in a mobile state, the hardware switch of the current mobile terminal is turned off.
  2. 根据权利要求1所述的方法,其特征在于,在所述检测当前移动终端是否处于移动状态之前,还包括:The method according to claim 1, wherein before the detecting whether the current mobile terminal is in a mobile state, the method further comprises:
    确定所述当前移动终端处于震动状态。It is determined that the current mobile terminal is in a vibrating state.
  3. 根据权利要求2所述的方法,其特征在于,所述确定所述当前移动终端处于震动状态,包括:The method according to claim 2, wherein the determining that the current mobile terminal is in a vibrating state comprises:
    获得所述当前移动终端的震动参数,若所述震动参数符合预定条件,则确定所述当前移动终端处于震动状态。Obtaining a vibration parameter of the current mobile terminal, and if the vibration parameter meets a predetermined condition, determining that the current mobile terminal is in a vibration state.
  4. 根据权利要求3所述的方法,其特征在于,所述获得所述当前移动终端的震动参数,若所述震动参数符合预定条件,则确定所述当前移动终端处于震动状态,包括:The method according to claim 3, wherein the obtaining the vibration parameter of the current mobile terminal, if the vibration parameter meets a predetermined condition, determining that the current mobile terminal is in a vibration state, comprising:
    通过加速度感应器获得所述当前移动终端在预设时间段内的每个单位时间的加速度,若所述预设时间段内单位时间的加速度大于预设阈值的概率大于预定值,则确定所述当前移动终端在所述预设时间段内处于震动状态;或者Obtaining, by the acceleration sensor, an acceleration of each unit time of the current mobile terminal in a preset time period, if the probability that the acceleration of the unit time in the preset time period is greater than a preset threshold is greater than a predetermined value, determining the The current mobile terminal is in a state of vibration during the preset time period; or
    确定所述当前移动终端持续震动的时间大于预定值后,获得所述当前移动终端在预设时间段内的平均震动次数,若所述平均震动次数达到预设阈值,则确定所述当前移动终端在所述预设时间段内处于震动状态;或者After determining that the current mobile terminal continues to vibrate for more than a predetermined value, obtaining an average number of vibrations of the current mobile terminal in a preset time period, and determining the current mobile terminal if the average number of vibrations reaches a preset threshold Being in a state of vibration during the preset period of time; or
    获得所述当前移动终端在预设时间段内的最大震动幅度,若所述最大震动幅度超过预设幅度值,则确定所述当前移动终端在所述预设时间段内处于震动状态;或者Obtaining a maximum vibration amplitude of the current mobile terminal in a preset time period, if the maximum vibration amplitude exceeds a preset amplitude value, determining that the current mobile terminal is in a vibrating state within the preset time period; or
    获得所述当前移动终端在预设时间段内的每个单位时间的震动次数,若所述预设时间段内单位时间的震动次数超过第一数值的概率大于第一阈值且单位时间的震动次数超过第二数值的概率大于第二阈值,则确定所述当前移动终端在所述预设时间段内处于震动状态。Obtaining a vibration number of each unit time of the current mobile terminal in a preset time period, if the probability that the number of vibrations per unit time exceeds the first value in the preset time period is greater than a first threshold and the number of vibrations per unit time If the probability of exceeding the second value is greater than the second threshold, determining that the current mobile terminal is in a vibrating state within the preset time period.
  5. 根据权利要求2所述的方法,其特征在于,在所述确定所述当前移动终端处于震动状态之前,还包括:在预设时间段内收集震动环境的信息,根据所述信息获得震动状态的频率取值范围;The method according to claim 2, wherein before the determining that the current mobile terminal is in a vibrating state, the method further comprises: collecting information of a vibrating environment within a preset time period, and obtaining a vibrating state according to the information. Frequency range of values;
    所述确定所述当前移动终端处于震动状态,包括:获得所述当前移动终端的当前震动频率,若所述当前震动频率位于所述频率取值范围内,则确定所述当前移动终端处于震动 状态。Determining that the current mobile terminal is in a vibrating state comprises: obtaining a current vibration frequency of the current mobile terminal, and determining that the current mobile terminal is vibrating if the current vibration frequency is within the frequency value range status.
  6. 根据权利要求1所述的方法,其特征在于,在所述关闭所述当前移动终端的硬件开关之前,还包括:The method according to claim 1, wherein before the shutting down the hardware switch of the current mobile terminal, the method further comprises:
    记录所述当前移动终端硬件的状态信息;Recording status information of the current mobile terminal hardware;
    在所述关闭所述当前移动终端的硬件开关之后,还包括:After the hardware switch of the current mobile terminal is closed, the method further includes:
    检测所述当前移动终端是否处于静止状态,若所述当前移动终端处于静止状态,则读取记录的状态信息,恢复对所述当前移动终端硬件的设置。Detecting whether the current mobile terminal is in a static state, and if the current mobile terminal is in a static state, reading the recorded state information, and restoring the setting of the current mobile terminal hardware.
  7. 根据权利要求3所述的方法,其特征在于,在所述关闭所述当前移动终端的硬件开关之前,还包括:The method according to claim 3, further comprising: before the shutting down the hardware switch of the current mobile terminal,
    记录所述当前移动终端硬件的状态信息;Recording status information of the current mobile terminal hardware;
    在所述关闭所述当前移动终端的硬件开关之后,还包括:After the hardware switch of the current mobile terminal is closed, the method further includes:
    获得所述当前移动终端的震动参数,判断所述震动参数是否符合预定条件,若不符合,则读取记录的状态信息,恢复对所述当前移动终端硬件的设置。Obtaining a vibration parameter of the current mobile terminal, determining whether the vibration parameter meets a predetermined condition, and if not, reading the recorded status information, and restoring the setting of the current mobile terminal hardware.
  8. 根据权利要求1所述的方法,其特征在于,所述检测当前移动终端是否处于移动状态,包括:The method according to claim 1, wherein the detecting whether the current mobile terminal is in a mobile state comprises:
    计算预设时间段内所述当前移动终端的平均速度,通过判断所述平均速度是否大于预设速度值来检测当前移动终端是否处于移动状态。And calculating an average speed of the current mobile terminal in the preset time period, and determining whether the current mobile terminal is in a moving state by determining whether the average speed is greater than a preset speed value.
  9. 根据权利要求8所述的方法,其特征在于,所述计算预设时间段内所述当前移动终端的平均速度,包括:The method according to claim 8, wherein the calculating an average speed of the current mobile terminal in a preset time period comprises:
    获得所述预设时间段的开始时间信息,根据所述开始时间信息获得所述当前移动终端的第一位置信息;Obtaining start time information of the preset time period, and obtaining first location information of the current mobile terminal according to the start time information;
    获得所述预设时间段的结束时间信息,根据所述结束时间信息获得所述当前移动终端的第二位置信息;以及Obtaining end time information of the preset time period, and obtaining second location information of the current mobile terminal according to the end time information;
    根据所述第一位置信息和所述第二位置信息获得所述预设时间段内的位移信息,根据所述位移信息计算出所述预设时间段内所述当前移动终端的平均速度。Obtaining the displacement information in the preset time period according to the first location information and the second location information, and calculating an average speed of the current mobile terminal in the preset time period according to the displacement information.
  10. 一种控制移动终端硬件状态的装置,其特征在于,包括:An apparatus for controlling a hardware state of a mobile terminal, comprising:
    检测模块,用于检测当前移动终端是否处于移动状态;a detecting module, configured to detect whether the current mobile terminal is in a moving state;
    控制模块,用于若检测到所述当前移动终端处于移动状态,则关闭所述当前移动终端的硬件开关。And a control module, configured to: if it is detected that the current mobile terminal is in a mobile state, turn off a hardware switch of the current mobile terminal.
  11. 根据权利要求10所述的装置,其特征在于,还包括: The device according to claim 10, further comprising:
    确定模块,用于在所述检测模块检测当前移动终端是否处于移动状态之前,确定所述当前移动终端处于震动状态。And a determining module, configured to determine, before the detecting module detects whether the current mobile terminal is in a moving state, determining that the current mobile terminal is in a vibrating state.
  12. 根据权利要求11所述的装置,其特征在于,所述确定模块,具体用于:The device according to claim 11, wherein the determining module is specifically configured to:
    获得所述当前移动终端的震动参数,若所述震动参数符合预定条件,则确定所述当前移动终端处于震动状态。Obtaining a vibration parameter of the current mobile terminal, and if the vibration parameter meets a predetermined condition, determining that the current mobile terminal is in a vibration state.
  13. 根据权利要求12所述的装置,其特征在于,所述确定模块,具体用于:The device according to claim 12, wherein the determining module is specifically configured to:
    通过加速度感应器获得所述当前移动终端在预设时间段内的每个单位时间的加速度,若所述预设时间段内单位时间的加速度大于预设阈值的概率大于预定值,则确定所述当前移动终端在所述预设时间段内处于震动状态;或者Obtaining, by the acceleration sensor, an acceleration of each unit time of the current mobile terminal in a preset time period, if the probability that the acceleration of the unit time in the preset time period is greater than a preset threshold is greater than a predetermined value, determining the The current mobile terminal is in a state of vibration during the preset time period; or
    确定所述当前移动终端持续震动的时间大于预定值后,获得所述当前移动终端在预设时间段内的平均震动次数,若所述平均震动次数达到预设阈值,则确定所述当前移动终端在所述预设时间段内处于震动状态;或者After determining that the current mobile terminal continues to vibrate for more than a predetermined value, obtaining an average number of vibrations of the current mobile terminal in a preset time period, and determining the current mobile terminal if the average number of vibrations reaches a preset threshold Being in a state of vibration during the preset period of time; or
    获得所述当前移动终端在预设时间段内的最大震动幅度,若所述最大震动幅度超过预设幅度值,则确定所述当前移动终端在所述预设时间段内处于震动状态;或者Obtaining a maximum vibration amplitude of the current mobile terminal in a preset time period, if the maximum vibration amplitude exceeds a preset amplitude value, determining that the current mobile terminal is in a vibrating state within the preset time period; or
    获得所述当前移动终端在预设时间段内的每个单位时间的震动次数,若所述预设时间段内单位时间的震动次数超过第一数值的概率大于第一阈值且单位时间的震动次数超过第二数值的概率大于第二阈值,则确定所述当前移动终端在所述预设时间段内处于震动状态。Obtaining a vibration number of each unit time of the current mobile terminal in a preset time period, if the probability that the number of vibrations per unit time exceeds the first value in the preset time period is greater than a first threshold and the number of vibrations per unit time If the probability of exceeding the second value is greater than the second threshold, determining that the current mobile terminal is in a vibrating state within the preset time period.
  14. 根据权利要求11所述的装置,其特征在于,还包括:收集模块,用于在所述确定模块确定所述当前移动终端处于震动状态之前,在预设时间段内收集震动环境的信息,根据所述信息获得震动状态的频率取值范围;The device according to claim 11, further comprising: a collecting module, configured to collect information of the vibrating environment within a preset time period before the determining module determines that the current mobile terminal is in a vibrating state, according to The information obtains a frequency range of values of the vibration state;
    其中,所述确定模块,具体用于:获得所述当前移动终端的当前震动频率,若所述当前震动频率位于所述频率取值范围内,则确定所述当前移动终端处于震动状态。The determining module is specifically configured to: obtain a current vibration frequency of the current mobile terminal, and if the current vibration frequency is within the frequency value range, determine that the current mobile terminal is in a vibration state.
  15. 根据权利要求10所述的装置,其特征在于,还包括:The device according to claim 10, further comprising:
    记录模块,在所述控制模块关闭所述当前移动终端的硬件开关之前,记录所述当前移动终端硬件的状态信息;a recording module, before the control module closes the hardware switch of the current mobile terminal, recording state information of the current mobile terminal hardware;
    恢复模块,用于在所述控制模块关闭所述当前移动终端的硬件开关之后,检测所述当前移动终端是否处于静止状态,若所述当前移动终端处于静止状态,则读取所述记录模块记录的状态信息,恢复对所述当前移动终端硬件的设置。a recovery module, configured to: after the control module closes the hardware switch of the current mobile terminal, detecting whether the current mobile terminal is in a static state, and if the current mobile terminal is in a static state, reading the recording module record The status information restores the settings of the current mobile terminal hardware.
  16. 根据权利要求12所述的装置,其特征在于,还包括:The device according to claim 12, further comprising:
    记录模块,在所述控制模块关闭所述当前移动终端的硬件开关之前,记录所述当前移 动终端硬件的状态信息;a recording module, recording the current shift before the control module turns off the hardware switch of the current mobile terminal Status information of the mobile terminal hardware;
    恢复模块,用于在所述控制模块关闭所述当前移动终端的硬件开关之后,获得所述当前移动终端的震动参数,判断所述震动参数是否符合预定条件,若不符合,则读取所述记录模块记录的状态信息,恢复对所述当前移动终端硬件的设置。a recovery module, configured to: after the control module closes the hardware switch of the current mobile terminal, obtain a vibration parameter of the current mobile terminal, determine whether the vibration parameter meets a predetermined condition, and if not, read the The status information recorded by the module is recorded, and the settings of the current mobile terminal hardware are restored.
  17. 根据权利要求10所述的装置,其特征在于,所述检测模块,具体用于:The device according to claim 10, wherein the detecting module is specifically configured to:
    计算预设时间段内所述当前移动终端的平均速度,通过判断所述平均速度是否大于预设速度值来检测当前移动终端是否处于移动状态。And calculating an average speed of the current mobile terminal in the preset time period, and determining whether the current mobile terminal is in a moving state by determining whether the average speed is greater than a preset speed value.
  18. 根据权利要求17所述的装置,其特征在于,所述检测模块,具体用于:The device according to claim 17, wherein the detecting module is specifically configured to:
    获得所述预设时间段的开始时间信息,根据所述开始时间信息获得所述当前移动终端的第一位置信息;Obtaining start time information of the preset time period, and obtaining first location information of the current mobile terminal according to the start time information;
    获得所述预设时间段的结束时间信息,根据所述结束时间信息获得所述当前移动终端的第二位置信息;以及Obtaining end time information of the preset time period, and obtaining second location information of the current mobile terminal according to the end time information;
    根据所述第一位置信息和所述第二位置信息获得所述预设时间段内的位移信息,根据所述位移信息计算出所述预设时间段内所述当前移动终端的平均速度。Obtaining the displacement information in the preset time period according to the first location information and the second location information, and calculating an average speed of the current mobile terminal in the preset time period according to the displacement information.
  19. 一种存储介质,其特征在于,用于存储应用程序,所述应用程序用于执行权利要求1至9中任一项所述的控制移动终端硬件状态的方法。A storage medium for storing an application for executing the method of controlling a hardware state of a mobile terminal according to any one of claims 1 to 9.
  20. 一种移动终端,其特征在于,包括:A mobile terminal, comprising:
    一个或者多个处理器;One or more processors;
    存储器;Memory
    一个或者多个模块,所述一个或者多个模块存储在所述存储器中,当被所述一个或者多个处理器执行时进行如下操作:One or more modules, the one or more modules being stored in the memory, and when executed by the one or more processors, do the following:
    检测当前移动终端是否处于移动状态;以及Detecting whether the current mobile terminal is in a mobile state;
    若检测到所述当前移动终端处于移动状态,则关闭所述当前移动终端的硬件开关。 If it is detected that the current mobile terminal is in a mobile state, the hardware switch of the current mobile terminal is turned off.
PCT/CN2015/082243 2014-06-25 2015-06-24 Method and apparatus for controlling hardware state of mobile terminal WO2015197000A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410295210.8 2014-06-25
CN201410295210.8A CN104076904B (en) 2014-06-25 2014-06-25 Control the method and device of mobile terminal hardware state

Publications (1)

Publication Number Publication Date
WO2015197000A1 true WO2015197000A1 (en) 2015-12-30

Family

ID=51598219

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/082243 WO2015197000A1 (en) 2014-06-25 2015-06-24 Method and apparatus for controlling hardware state of mobile terminal

Country Status (2)

Country Link
CN (1) CN104076904B (en)
WO (1) WO2015197000A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110647231A (en) * 2018-06-07 2020-01-03 阿里巴巴集团控股有限公司 Data processing method, device and machine readable medium
CN113824837A (en) * 2020-06-19 2021-12-21 北京字节跳动网络技术有限公司 Terminal control method and device, terminal and storage medium
US11314309B2 (en) 2016-11-03 2022-04-26 Huawei Technologies Co., Ltd. Electronic device control method and apparatus, and electronic device
US11762983B2 (en) 2016-11-03 2023-09-19 Huawei Technologies Co., Ltd. Payment application isolation method and apparatus, and terminal

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104076904B (en) * 2014-06-25 2017-08-29 可牛网络技术(北京)有限公司 Control the method and device of mobile terminal hardware state
CN104484623B (en) * 2014-11-26 2021-01-01 北京小米移动软件有限公司 Protection mode starting method and device
CN105094281A (en) * 2015-07-20 2015-11-25 京东方科技集团股份有限公司 Control method and control module used for controlling display device and display device
CN105183132A (en) * 2015-08-18 2015-12-23 小米科技有限责任公司 Energy conservation mode starting method and apparatus
CN106201843A (en) * 2016-06-28 2016-12-07 乐视控股(北京)有限公司 The processing method of a kind of terminal data, device and terminal
CN106535122A (en) * 2016-11-04 2017-03-22 北京奇虎科技有限公司 Control method and device for wireless communication module of smart terminal
CN106817752A (en) * 2016-12-30 2017-06-09 广东欧珀移动通信有限公司 The detection control method of wireless network signal, device and terminal
CN107015947A (en) * 2017-04-07 2017-08-04 深圳市银河风云网络系统股份有限公司 Judge the method and system of opening of device state
WO2019047238A1 (en) * 2017-09-11 2019-03-14 深圳传音通讯有限公司 Incoming call processing method, user terminal, and electronic device
CN117147974A (en) * 2023-10-19 2023-12-01 北京江云智能科技有限公司 Underground water collecting and quality analyzing device with integrated temperature, water level and conductivity

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1452414A (en) * 2002-04-17 2003-10-29 微软公司 Reduction of energy consumption in battery power supply network apparatus using sensor
US20040233153A1 (en) * 2003-05-22 2004-11-25 Heber Robinson Communication device with automatic display and lighting activation and method therefore
CN101729658A (en) * 2008-10-16 2010-06-09 Lg电子株式会社 Mobile terminal with an image projector and method for controlling the same
CN103312874A (en) * 2012-03-12 2013-09-18 联想(北京)有限公司 Mobile equipment operation state converting method and mobile equipment
CN104076904A (en) * 2014-06-25 2014-10-01 可牛网络技术(北京)有限公司 Method and device for controlling hardware state of mobile terminal

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090163226A1 (en) * 2007-12-20 2009-06-25 Burges Karkaria Device, system, and method of power saving using location sensing modules
US9367119B2 (en) * 2012-10-22 2016-06-14 Maxim Integrated Products, Inc. System and method to reduce power consumption in a multi-sensor environment
CN102984352B (en) * 2012-11-02 2014-12-24 小米科技有限责任公司 Method and device of adjusting of screen luminance of terminal and terminal
CN103809725B (en) * 2012-11-12 2017-03-29 联想(北京)有限公司 A kind of electronic equipment and the state switching method based on the electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1452414A (en) * 2002-04-17 2003-10-29 微软公司 Reduction of energy consumption in battery power supply network apparatus using sensor
US20040233153A1 (en) * 2003-05-22 2004-11-25 Heber Robinson Communication device with automatic display and lighting activation and method therefore
CN101729658A (en) * 2008-10-16 2010-06-09 Lg电子株式会社 Mobile terminal with an image projector and method for controlling the same
CN103312874A (en) * 2012-03-12 2013-09-18 联想(北京)有限公司 Mobile equipment operation state converting method and mobile equipment
CN104076904A (en) * 2014-06-25 2014-10-01 可牛网络技术(北京)有限公司 Method and device for controlling hardware state of mobile terminal

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11314309B2 (en) 2016-11-03 2022-04-26 Huawei Technologies Co., Ltd. Electronic device control method and apparatus, and electronic device
US11762983B2 (en) 2016-11-03 2023-09-19 Huawei Technologies Co., Ltd. Payment application isolation method and apparatus, and terminal
US11914446B2 (en) 2016-11-03 2024-02-27 Huawei Technologies Co., Ltd. Electronic device control method and apparatus, and electronic device
CN110647231A (en) * 2018-06-07 2020-01-03 阿里巴巴集团控股有限公司 Data processing method, device and machine readable medium
CN113824837A (en) * 2020-06-19 2021-12-21 北京字节跳动网络技术有限公司 Terminal control method and device, terminal and storage medium

Also Published As

Publication number Publication date
CN104076904B (en) 2017-08-29
CN104076904A (en) 2014-10-01

Similar Documents

Publication Publication Date Title
WO2015197000A1 (en) Method and apparatus for controlling hardware state of mobile terminal
US10274336B2 (en) Context aware map application
US10598735B2 (en) Method and apparatus for estimating battery life corresponding to characteristic of usage based on pattern information
JP5936198B2 (en) Power efficient method of operating motion sensor
US9268399B2 (en) Adaptive sensor sampling for power efficient context aware inferences
WO2015078201A1 (en) Control method and device for mobile terminal, and mobile terminal
US10035425B2 (en) Apparatus and method for managing battery in consideration of rest period of battery
JP6955092B2 (en) Methods for reducing terminal power consumption, and terminals
WO2015168183A1 (en) Automated detection of vehicle parking and location
JP2013524216A5 (en)
CN104950318B (en) The electricity saving method and mobile device of a kind of d GPS locating module
CN103186225B (en) state switching method and device for electronic equipment
JP2012233882A (en) Global navigation satellite system receiver and control method therefor
US9454208B2 (en) Preventing sleep mode for devices based on sensor inputs
CN105264456A (en) Motion fencing
CN104580721A (en) Alarm clock implementation method for terminal
CN106055079A (en) Method and device for managing central processing unit
JP2020529814A (en) Connecting to a wireless network based on device mobility status
CN111721312B (en) Running track generation method and device
JP7272694B2 (en) Method and terminal for reducing power consumption of terminal
Hao et al. Energy-efficient mobile video management using smartphones
US20200310514A1 (en) Selective notification based on charge history
CN105709400A (en) Method and device for determining user movement recording duration and electronic device
CN113032028A (en) Air mouse awakening method and device, electronic equipment and storage medium
JP2012173200A (en) Abnormality state detection method and electronic apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15811256

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 19/05/17)

122 Ep: pct application non-entry in european phase

Ref document number: 15811256

Country of ref document: EP

Kind code of ref document: A1