WO2017143720A1 - 一种终端保护方法及装置 - Google Patents

一种终端保护方法及装置 Download PDF

Info

Publication number
WO2017143720A1
WO2017143720A1 PCT/CN2016/088906 CN2016088906W WO2017143720A1 WO 2017143720 A1 WO2017143720 A1 WO 2017143720A1 CN 2016088906 W CN2016088906 W CN 2016088906W WO 2017143720 A1 WO2017143720 A1 WO 2017143720A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
value
acceleration
preset
acceleration value
Prior art date
Application number
PCT/CN2016/088906
Other languages
English (en)
French (fr)
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 WO2017143720A1 publication Critical patent/WO2017143720A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02HEMERGENCY PROTECTIVE CIRCUIT ARRANGEMENTS
    • H02H5/00Emergency protective circuit arrangements for automatic disconnection directly responsive to an undesired change from normal non-electric working conditions with or without subsequent reconnection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/81Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer by operating on the power supply, e.g. enabling or disabling power-on, sleep or resume operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0346Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of the device orientation or free movement in a 3D space, e.g. 3D mice, 6-DOF [six degrees of freedom] pointers using gyroscopes, accelerometers or tilt-sensors

Definitions

  • This application relates to, but is not limited to, the field of terminal technology.
  • terminals such as mobile phones and tablet computers have become essential items for users, and are usually carried by users.
  • the terminal may fall into the water, thereby damaging the terminal and causing inconvenience to the user.
  • the terminal protection method provided by the related art generally adds a waterproof cover to the key components of the terminal circuit board, and increases the sealing property of the terminal, thereby avoiding the water inlet of the key components of the terminal and reducing the amount of water entering the terminal.
  • the terminal protection method provided in the related art has the following problem: the terminal is protected only physically, and after the terminal is dropped into the water, the terminal cannot be effectively prevented from being damaged.
  • the invention provides a terminal protection method and device, which realizes the water inlet protection mode of the terminal after the terminal falls into the water, thereby effectively preventing the terminal from being damaged after falling into the water, and facilitating the user to use the terminal.
  • a terminal protection method comprising:
  • the water entering protection mode of the terminal is started.
  • the method further includes: before the determining whether the similarity between the acceleration value of the terminal and the preset water inlet acceleration curve exceeds a preset threshold, the method further includes:
  • the determining whether the similarity between the change curve of the acceleration value during the falling process of the terminal and the preset water intake acceleration curve exceeds a preset threshold includes:
  • the determining the preset water inlet acceleration curve according to the drop height value and the angle value of the terminal including:
  • the angle value of the terminal is calculated according to the angular velocity value of the terminal
  • the drop height value of the terminal is calculated according to the change of the vertical direction acceleration value
  • the preset water inlet acceleration curve is selected according to the drop height value and the angle value.
  • calculating a drop height value of the terminal according to the change of the vertical direction acceleration value including:
  • the first acceleration value is not equal to the second acceleration value.
  • the method further includes: before the determining whether the similarity between the acceleration value of the terminal and the preset water inlet acceleration curve exceeds a preset threshold, the method further includes:
  • the inflow water acceleration curve is used as a preset inflow acceleration curve of the terminal, and is stored in the terminal.
  • the ingress protection mode of the terminal is started, including:
  • the power of the terminal is turned off.
  • the method further includes:
  • the method further includes:
  • the method further includes:
  • the user is prompted to perform the shutdown operation when the humidity value exceeds the preset humidity threshold.
  • a terminal protection device comprising:
  • the judging module is configured to: determine a change curve of the acceleration value during the falling process of the terminal, and whether the similarity with the preset water inflow change curve exceeds a preset threshold;
  • the protection module is configured to: when the determining module determines that the similarity exceeds the preset threshold, initiate a water entering protection mode of the terminal.
  • the device further includes:
  • the selection module is configured to: determine, according to the determining module, a change curve of the acceleration value during the falling process of the terminal, and whether the similarity between the preset water inlet acceleration curve exceeds a preset threshold, according to the falling height value of the terminal And the angle value selects the preset water inlet acceleration curve;
  • the determining module is configured to: determine a change curve of the acceleration value during the falling process of the terminal, and whether the similarity with the selected preset water intake acceleration curve exceeds a preset threshold.
  • the selecting module includes:
  • the first calculating unit is configured to: when the vertical acceleration value of the terminal falling is equal to the gravity acceleration value, calculate an angle value of the terminal according to the angular velocity value of the terminal;
  • a second calculating unit configured to: when the change of the vertical direction acceleration value satisfies a preset falling condition, calculate a falling height value of the terminal according to the change of the vertical direction acceleration value;
  • a selecting unit configured to: select the preset water inflow acceleration curve according to the falling height value calculated by the second calculating unit and the angle value calculated by the first calculating unit.
  • the second calculating unit includes:
  • a determining subunit configured to: determine whether the vertical direction acceleration value has changed from a gravity acceleration value to a first acceleration value, and whether it has changed from the first acceleration value to a second acceleration value;
  • Calculating the subunit configured to: determine, in the determining subunit, that the vertical direction acceleration value has changed from the gravity acceleration value to the first acceleration value, and change from the first acceleration value to the second acceleration And determining, according to the gravity acceleration value and the gravity acceleration duration, a first falling height value, and calculating a second falling height value according to the first acceleration value and the first acceleration duration, according to the second acceleration value Calculating a third drop height value and a second acceleration duration;
  • Determining a subunit configured to: determine, by the calculation subunit, a sum of the first drop height value, the second drop height value, and the third drop height value as a drop height value of the terminal Wherein the first acceleration value is not equal to the second acceleration value.
  • the device further includes:
  • a setting module configured to: when the determining module determines, according to the change curve of the acceleration value during the falling of the terminal, whether the similarity of the preset water inlet acceleration curve exceeds a preset threshold, according to the terminal falling into the water
  • the acceleration value of the terminal is generated to generate an inflow water acceleration curve of the terminal; the inflow water acceleration curve is used as a preset inflow water acceleration curve of the terminal, and is stored in the terminal.
  • the protection module is configured to: when the determining module determines that the similarity exceeds the preset threshold, turn off power of the terminal.
  • the protection module is further configured to: when the similarity exceeds the preset threshold, and before the power of the terminal is turned off, record, by using a shutdown state parameter, that the terminal is temporarily shut down Abnormal shutdown
  • the device also includes:
  • the booting module is configured to: determine, according to the shutdown state parameter, whether the last shutdown of the terminal belongs to an abnormal shutdown during the booting process of the terminal; and determine the humidity of the terminal when the last shutdown of the terminal belongs to an abnormal shutdown Whether the value exceeds a preset humidity threshold; when the humidity value exceeds the preset humidity threshold, performing a shutdown operation.
  • the booting module is further configured to: when the humidity value exceeds the preset humidity threshold, and before the performing the shutdown operation, prompting the user that the humidity value exceeds the preset humidity threshold, Perform a shutdown operation.
  • the terminal protection method and device provided by the embodiment of the present invention determine whether the similarity between the acceleration curve and the preset water inlet acceleration curve exceeds a preset threshold by determining a curve of the acceleration value during the falling process of the terminal; and the similarity exceeds the pre- When the threshold is set, the water inlet protection mode of the terminal is activated.
  • the embodiment of the invention realizes that the terminal enters the water entering protection mode of the terminal after falling into the water, thereby effectively preventing the terminal from being damaged after falling into the water, facilitating the user to use the terminal, and improving the user experience.
  • FIG. 1 is a schematic flowchart diagram of a terminal protection method according to an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of another terminal protection method according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a preset water inflow acceleration curve in a terminal protection method according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of an application scenario of a terminal falling in a terminal protection method according to an embodiment of the present disclosure
  • FIG. 5 is a schematic flowchart diagram of still another terminal protection method according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a terminal protection device according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of another terminal protection apparatus according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of a selection module in a terminal protection device according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of still another terminal protection device according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic flowchart diagram of still another terminal protection method according to an embodiment of the present invention.
  • the terminal determines whether the variation curve of the acceleration value during the falling process of the terminal exceeds a preset threshold value by the preset water inlet acceleration curve; when the similarity exceeds the preset threshold, the terminal starts the terminal. Into the water protection mode.
  • FIG. 1 is a schematic flowchart diagram of a terminal protection method according to an embodiment of the present invention. As shown in FIG. 1 , the terminal protection method provided in this embodiment may include the following steps: Step 110 to Step 120:
  • Step 110 The terminal determines whether the relationship between the acceleration value of the terminal falling process and the preset inflow water acceleration curve exceeds a preset threshold.
  • step 110 may be: determining, by the terminal, a change curve of the acceleration value during the falling process of the terminal, and whether the similarity between the preset water inlet acceleration curve exceeds a preset threshold.
  • the preset water inlet acceleration curve refers to a curve in which the vertical direction acceleration value of the terminal falls during the time when the terminal starts to fall to the terminal falling into the water, and the vertical direction of the terminal drop is the Z axis in the three-dimensional coordinate system. direction.
  • the terminal in the embodiment of the present invention may be a terminal such as a mobile phone or a tablet computer, and an acceleration sensor is disposed in the terminal.
  • Step 120 When the terminal changes the acceleration value of the acceleration value during the falling process of the terminal and the preset water inlet acceleration curve exceeds a preset threshold, the terminal enters the water protection mode.
  • the terminal protection method provided in this embodiment determines whether the similarity between the acceleration curve and the preset water inlet acceleration curve exceeds a preset threshold by determining a curve of the acceleration value during the falling process of the terminal; and when the similarity exceeds the preset threshold, the method starts.
  • the water inlet protection mode of the terminal The embodiment of the invention realizes that the terminal enters the water entering protection mode of the terminal after falling into the water, thereby effectively preventing the terminal from being damaged after falling into the water, facilitating the user to use the terminal, and improving the user experience.
  • FIG. 2 is a schematic flowchart diagram of another terminal protection method according to an embodiment of the present invention.
  • the terminal protection method provided in this embodiment may further include:
  • Step 100 The terminal generates an inflow acceleration curve of the terminal according to the acceleration value of the terminal falling into the water;
  • step 101 the terminal uses the inflow water acceleration curve as the preset influent water acceleration curve of the terminal, and stores it in the terminal.
  • the implementation manner of the foregoing process provided in this embodiment may include the following manners 1 or 2.
  • the process of generating the preset water inflow acceleration curve by the terminal may include: when the processor of the terminal receives the measurement start instruction, the acceleration sensor of the terminal starts to measure the acceleration value of the terminal in real time; the acceleration value in the vertical direction of the terminal is equal to the acceleration of gravity When the value is up, the processor of the terminal starts to read the measurement result of the acceleration sensor in real time, and the measurement result includes the measurement time and the vertical direction acceleration value of the terminal; the processor of the terminal records the vertical direction acceleration value of the terminal corresponding to the measurement time; When the processor receives the measurement stop command, the acceleration sensor of the terminal stops measuring the acceleration value of the terminal, and generates a water inlet acceleration curve according to the measurement time recorded by the measurement process and the vertical direction acceleration value of the terminal; the processor of the terminal inputs the water into the water.
  • the acceleration curve is used as the preset water inlet acceleration curve of the terminal, and the preset water inflow acceleration curve in the memory of the terminal is updated.
  • a surveyor can send a measurement start command or a measurement stop command to a terminal through a personal computer (Personal Computer, PC for short), and throw the terminal to the terminal after sending a measurement start command to the terminal.
  • the container with water sends a measurement stop command to the terminal after the terminal falls into the water, thereby implementing the above measurement process.
  • a preset water inflow acceleration curve can be stored in the terminal.
  • the step 110 in this embodiment may be: the terminal directly determines the change curve of the acceleration value during the falling process of the terminal, and whether the similarity with the preset water inlet acceleration curve exceeds a preset threshold.
  • the gyro sensor is further disposed in the terminal, and the process of generating the preset water acceleration curve by the terminal may include: when the processor of the terminal receives the measurement start instruction, the acceleration sensor of the terminal starts to measure the acceleration value of the terminal in real time, and the terminal The gyro sensor starts to measure the angular velocity value of the terminal in real time; when the vertical acceleration value of the terminal is equal to the gravity acceleration value, the processor of the terminal reads and records the angular velocity value measured by the gyro sensor, and starts to read the acceleration in real time.
  • the measurement result of the sensor includes the measurement time and the vertical direction acceleration value of the terminal; the processor of the terminal records the vertical direction acceleration value of the terminal corresponding to the measurement time; and the acceleration sensor of the terminal when the processor of the terminal receives the measurement stop instruction Stop measuring the acceleration value of the terminal, and generate a water inlet acceleration curve according to the measurement time recorded by the measurement process and the vertical direction acceleration value of the terminal; the processor of the terminal calculates the angle value of the terminal according to the recorded angular velocity value, according to The recorded measurement time and the vertical acceleration value of the terminal calculate the drop height value of the terminal; the processor of the terminal uses the inflow water acceleration curve as a preset water inflow acceleration curve of the terminal, and correspondingly calculates the calculated angle value of the terminal and The drop height value stores the preset water acceleration curve in the memory of the terminal.
  • the drop height value of the terminal is the height value of the terminal drop; the angle value of the terminal is the angle value of the angle formed by the terminal when the terminal falls.
  • the terminal may store a plurality of preset water inflow acceleration curves according to different drop height values and angle values. Thereby, it is possible to more accurately determine whether the terminal falls into the water. For example, in practical applications, when the drop height value of the terminal is 0.3 m and the angle value of the terminal is 45 degrees, the terminal stores the first preset water inflow acceleration curve; the drop height value at the terminal is 0.5 m, the terminal When the angle value is 45 degrees, the terminal stores a second preset water inflow acceleration curve; when the terminal has a drop height value of 0.3 meters and the terminal angle value is 50 degrees, the terminal stores a third preset water inlet acceleration.
  • FIG. 3 is a schematic diagram of a preset water inflow acceleration curve in a terminal protection method according to an embodiment of the present invention, wherein a horizontal axis, that is, an X axis is a time axis, and a vertical axis, that is, a Y axis is an acceleration value axis. ,image 3
  • the curve 201 in the middle is the preset water inflow acceleration curve.
  • the terminal protection method provided by the embodiment of the present invention may further include:
  • Step 102 The terminal selects a preset water inflow acceleration curve according to the drop height value and the angle value of the terminal.
  • the implementation of the step 110 may be: the terminal determines whether the acceleration curve of the terminal during the falling process changes the similarity with the selected preset water acceleration curve to exceed a preset threshold.
  • the terminal may select the preset water inflow acceleration curve according to the drop height value and the angle value of the terminal, and the method may be: when the vertical acceleration value of the terminal falling is equal to the gravity acceleration value.
  • the terminal calculates the angle value of the terminal according to the angular velocity value of the terminal; when the change of the vertical acceleration value of the terminal falls to meet the preset drop condition, the terminal calculates the drop height value according to the change of the vertical direction acceleration value;
  • the drop height value and the angle value are selected as a preset water inflow acceleration curve.
  • the terminal protection method may further include: the terminal's acceleration sensor real-time measurement terminal Acceleration value; the processor of the terminal reads the measurement result of the acceleration sensor in real time, and the measurement result includes the measurement time and the vertical direction acceleration value of the terminal; the processor of the terminal records the vertical direction acceleration value of the terminal corresponding to the measurement time; wherein the acceleration value Includes vertical acceleration values.
  • the terminal protection method may further include: the gyro sensor of the terminal measures the angular velocity value of the terminal in real time.
  • the terminal calculates the angle value of the terminal according to the angular velocity value of the terminal, which may include: determining, by the processor of the terminal Whether the obtained vertical acceleration value is equal to the gravity acceleration value; when it is confirmed that the vertical acceleration value is equal to the gravity acceleration value, the processor of the terminal reads the angular velocity value measured by the gyro sensor, and calculates the angular velocity value according to the read angular velocity value. The angle value of the terminal. Otherwise, the processor of the terminal does not read the angular velocity value obtained by the measurement of the gyro sensor. Thereby, the terminal knows the angle value of the angle with the horizontal plane when it falls, that is, the angle value of the terminal.
  • the above gravitational acceleration value may be 9.8 meters per second squared (m/s 2 ) or 10 m/s 2 .
  • the acceleration sensor when the acceleration value obtained by the measurement errors, e.g. freefall the object the gravitational acceleration of the acceleration sensor value obtained by the measurement object is not 9.8m / s 2 or 10m / s 2, but is equal to 9.7 m / s 2 , 9.9 m / s 2 or 10.1 m / s 2 , in this case, the gravitational acceleration value can be a range of values, for example 9.7 ⁇ 10.1 m / s 2 , if the terminal processor obtains The vertical acceleration value is within the range value, and the processor of the terminal confirms that the vertical acceleration value is equal to the gravity acceleration value.
  • FIG. 4 An example of an angle of the terminal in the process of falling, as shown in FIG. 4 is a schematic diagram of an application scenario in which the terminal is dropped in the terminal protection method according to the embodiment of the present invention.
  • the terminal 301 is angled with the horizontal plane 302 when falling.
  • the angle value of 303 is 45 degrees, that is, the angle value of the terminal is 45 degrees.
  • the terminal calculates the drop height value of the terminal according to the change of the vertical direction acceleration value, which may include : the terminal determines whether the falling vertical acceleration value has changed from the gravity acceleration value to the first acceleration value, and has changed from the first acceleration value to the second acceleration value; when the vertical acceleration value of the terminal drop has undergone the above change The terminal calculates a first falling height value according to the gravity acceleration value and the gravity acceleration duration, calculates a second falling height value according to the first acceleration value and the first acceleration duration, and calculates according to the second acceleration value and the second acceleration duration And a third drop height value; the terminal determines the sum of the first drop height value, the second drop height value, and the third drop height value as the drop height value of the terminal. Thereby the terminal is informed of its current falling height value, ie the drop height value of the terminal.
  • the first acceleration value is not equal to the second acceleration value.
  • the preset falling condition in the embodiment is, for example, that the vertical acceleration value of the terminal falling changes from the gravity acceleration value to the first acceleration value, and changes from the first acceleration value to the second acceleration value;
  • the terminal confirms that the change of the vertical acceleration value of the drop satisfies the preset drop condition.
  • the gravity acceleration duration is a time when the vertical acceleration value of the terminal falling is maintained as the gravity acceleration value;
  • the first acceleration duration is a time when the vertical acceleration value of the terminal falling is maintained as the first acceleration value;
  • the acceleration duration is the time during which the vertical acceleration value of the terminal drop is maintained at the second acceleration value.
  • the duration may be calculated based on the measurement result of the acceleration sensor of the terminal, and the measurement result may include a measurement time and a vertical acceleration value of the terminal drop.
  • the gravity acceleration value, the first acceleration value, and the second addition are illustrated by taking the terminal into the water as an example.
  • the magnitude relationship of the speed value, the user holds the terminal, and normally the acceleration value of the vertical direction obtained by the acceleration sensor of the terminal is zero.
  • the resultant force of the terminal may be zero, and the vertical acceleration value obtained by the measurement is zero.
  • the terminal is detached from the user's hand, and the terminal is free to fall.
  • the vertical acceleration obtained by the measurement is the gravitational acceleration value g.
  • the terminal continues to fall and contact with the water surface. Since the terminal is subjected to the water surface impact force and buoyancy, the vertical acceleration value of the terminal drop suddenly changes.
  • the vertical acceleration value of the terminal drop is reduced, and is much smaller than the gravity acceleration value;
  • the vertical acceleration value obtained by the measurement at this time changes from the gravity acceleration value to the first acceleration value.
  • the terminal continues to fall into the water, the impact force of the water facing the terminal disappears, and the vertical acceleration value of the terminal falling changes from the first acceleration value to the second acceleration value, and the second acceleration value is smaller than the gravity acceleration value, and is greater than the first Acceleration value.
  • the drop height 304 of the terminal starts from the fall of the terminal 301, that is, from the position of the plane 302, and falls into the water, that is, the position below the horizontal plane 305.
  • the terminal selects a preset water intake acceleration curve according to the calculated drop height value and the angle value, that is, the step 102 may include: the terminal determines the calculated drop height value and The angle value is the same as the drop height value and the angle value corresponding to any one of the preset water inlet acceleration curves stored in the terminal; and the calculated drop height value and the angle value correspond to one of the preset water inlet acceleration curves When the drop height value and the angle value are the same, the terminal uses the preset water inlet acceleration curve as the selected water inlet preset acceleration curve.
  • the terminal can also store a plurality of preset water inflow acceleration curves corresponding to different models, different drop height values and angle values.
  • the terminal may select a preset water acceleration curve according to the model, the drop height value and the angle value of the terminal.
  • the preset water inlet acceleration curve corresponding to different models, drop height values and angle values can also be obtained by actual measurement.
  • the step 110 may include: the terminal searches for the vertical direction acceleration value during the falling process of the terminal from the read vertical direction acceleration value; and the terminal is configured according to the vertical direction of the search.
  • Each acceleration value and its measurement time obtain a curve of the acceleration value of the terminal during the falling process; the variation curve of the acceleration value obtained by the terminal judges and the preset water addition Whether the similarity of the speed change curve exceeds a preset threshold.
  • the above-described falling process refers to a process from when the vertical acceleration value falling from the terminal changes to the gravity acceleration value to when the vertical acceleration value changes to the second acceleration value.
  • the preset threshold may be set according to the actual measurement situation. For example, if the terminal determines the change curve of the acceleration value of the terminal during the actual measurement process, the degree of similarity with the preset water acceleration curve exceeds 80%. The above two curves are usually similar, in which case the preset threshold can be set to 80%.
  • step 120 in the embodiment shown in Figures 1 and 2 will now be described by way of several embodiments.
  • the step 120 may be: when the relationship between the acceleration value of the terminal falling process and the preset inflow acceleration curve exceeds a preset threshold, the terminal confirms the terminal. Drop into the water and activate the terminal's water protection mode.
  • the preset water inlet acceleration curve is used to determine whether the terminal falls into the water, and when the terminal is determined to fall into the middle, the water inlet protection mode of the terminal is activated, and the water inlet protection mode of the terminal is activated after the terminal falls into the water. Therefore, the terminal is effectively prevented from being damaged after falling into the water, and the user is convenient to use the terminal, thereby improving the user experience.
  • the step 120 may be: when the change curve of the acceleration value during the falling of the terminal exceeds the preset threshold by the preset change of the preset water intake acceleration curve, the terminal controls the The terminal sounds an alarm. That is to say, the terminal initiates its own water inlet protection mode, that is, the terminal controls its own alarm sound. Therefore, the user terminal can be prompted to fall into the water by the alarm sound, so that the user can quickly take out the terminal from the water, avoiding increasing the time of the terminal in the water and preventing the terminal from being damaged.
  • step 120 may further be: when the relationship between the acceleration value of the terminal falling process and the preset inflow acceleration curve exceeds a preset threshold, the terminal closes the terminal. Power supply. Therefore, after the terminal falls into the water, the power of the terminal is quickly cut off, and the motherboard of the terminal is prevented from being damaged, thereby effectively preventing the terminal from being damaged.
  • the terminal usually performs the following steps when shutting down:
  • the power of the terminal can be quickly cut off.
  • the terminal when the terminal confirms that the terminal falls into the water, that is, the similarity exceeds a preset threshold, the terminal directly closes the terminal.
  • the power supply that is, the terminal does not perform the above steps (1) to (5), directly performs the power supply operation of turning off the terminal.
  • the power of the terminal to shut down the terminal may be: the terminal directly performs a power off command to turn off the power of the terminal.
  • the terminal directly performs a power off command through its power management service to turn off the power of the terminal.
  • the terminal protection method provided by the embodiment of the present invention when the relationship between the acceleration curve of the terminal falling process and the preset water inlet acceleration curve exceeds a preset threshold, the terminal may further include: the terminal is shut down to the abnormal shutdown by the shutdown state parameter; as shown in FIG. 5, the flow diagram of another terminal protection method provided by the embodiment of the present invention is shown in the figure. On the basis of the embodiment shown in FIG.
  • the step 120 in this embodiment may be: when the terminal changes the acceleration value of the acceleration value during the falling process of the terminal, and the similarity between the preset water inlet acceleration curve exceeds the preset threshold,
  • the shutdown status parameter records that the terminal is shut down abnormally and shuts down the power of the terminal.
  • the terminal protection method provided by the embodiment of the present invention may further include:
  • Step 130 During the startup process of the terminal, the terminal determines, according to the shutdown state parameter, whether the last shutdown of the terminal belongs to an abnormal shutdown;
  • Step 140 When it is confirmed that the last shutdown of the terminal is abnormal shutdown, the terminal determines whether the humidity value of the terminal exceeds a preset humidity threshold;
  • Step 150 When the humidity value of the terminal exceeds the preset humidity threshold, the terminal performs a shutdown operation; otherwise, the terminal continues to perform the power-on operation.
  • the terminal after the terminal is turned off due to falling into the water and the terminal is powered on again by the above method.
  • the terminal can decide whether to turn on the power according to the humidity value of the terminal, so as to prevent the terminal from being turned on when the terminal motherboard is not completely dry, thereby preventing the terminal from being damaged.
  • the terminal indicates in the system attribute (sys.shutdown.requested) that the terminal is shut down abnormally during the booting process.
  • the terminal determines whether the last shutdown of the terminal is abnormal according to sys.shutdown.requested. Shut down.
  • the terminal protection method when the humidity value of the terminal exceeds the preset humidity threshold, and the terminal performs the shutdown operation, the method further includes: the terminal prompting the user that the humidity value exceeds the preset humidity threshold, Perform a shutdown operation. That is, when the humidity value of the terminal exceeds the preset humidity threshold, the processor performs operations including prompting the user that the humidity value exceeds the preset humidity threshold, and performing a shutdown operation and a shutdown operation. Therefore, the terminal can prompt the user that the current startup is not normally started because the humidity value of the terminal is high.
  • the terminal prompts the user that the humidity value exceeds the preset humidity threshold, and performs a shutdown operation, where the processor of the terminal controls the vibrator vibration of the terminal, so that the terminal can pass the The vibration of the vibrator indicates that the user is not properly turned on this time because the humidity value of the terminal is high.
  • the terminal prompts the user that the humidity value exceeds the preset humidity threshold, and performs a shutdown operation, and may also be: the terminal's processor control terminal issues a prompt sound, so that the terminal can prompt the user to use the prompt sound to prompt the user to not start normally. It is the humidity value of the terminal is higher.
  • the terminal of each embodiment of the present invention may include a boot program module (Second Boot Loader 1, referred to as: SBL1), and the SBL1 is used to load memory.
  • SBL1 Boot Loader 1
  • the terminal determines whether the last shutdown of the terminal belongs to an abnormal shutdown according to the shutdown state parameter.
  • the terminal determines whether the humidity value of the terminal exceeds a preset humidity threshold.
  • the terminal prompts the user that the humidity value exceeds the preset humidity threshold, and the shutdown operation is performed, which can be performed by the boot program module.
  • the terminal protection method provided by the embodiment of the present invention may further include: during the startup process of the terminal, the terminal determines whether the humidity value of the terminal exceeds a preset humidity threshold; and the humidity value of the terminal exceeds the preset humidity threshold.
  • the terminal performs a shutdown operation, otherwise, the terminal continues to perform the power-on operation. That is, the terminal does not judge whether the terminal is shut down abnormally, and only determines whether the humidity value of the terminal exceeds the preset humidity threshold, so as to avoid the terminal opening when the terminal motherboard is not completely dry. Machine, thus preventing the terminal from being damaged.
  • the terminal protection method provided by the embodiment of the present invention may further include: when the terminal receives the waterproof protection mode open command, the terminal turns on the acceleration sensor and the gyro sensor of the terminal; otherwise, the terminal closes the terminal. Acceleration sensor and gyro sensor. That is, when the terminal receives the waterproof protection mode on command, the terminal performs step 110 and step 120 provided by the embodiment of the present invention. Otherwise, the terminal does not perform step 110 and step 120 provided by the embodiment of the present invention.
  • the terminal can input a waterproof protection mode open command to the terminal, so that the terminal can implement the terminal protection method provided by the embodiment of the present invention. Thereby, the user experience is improved; at the same time, the terminal is prevented from opening the acceleration sensor and the gyro sensor in real time, thereby saving terminal power.
  • the present invention discloses a terminal protection device.
  • FIG. 6 is a schematic structural diagram of a terminal protection device according to an embodiment of the present invention. As shown in FIG. 6, the terminal protection device provided in this embodiment includes:
  • the determining module 10 is configured to: determine a change curve of the acceleration value during the falling process of the terminal, and whether the similarity with the preset water inlet acceleration curve exceeds a preset threshold;
  • the protection module 20 is configured to: when the determining module 10 determines that the similarity exceeds the preset threshold, start the water inlet protection mode of the terminal.
  • FIG. 7 is a schematic structural diagram of another terminal protection device according to an embodiment of the present invention.
  • the device provided in this embodiment may further include:
  • the selection module 30 is configured to: before the determining module 10 determines the change curve of the acceleration value during the falling process of the terminal, and whether the similarity between the preset water inlet acceleration curve exceeds the preset threshold, according to the drop height value and the angle value of the terminal.
  • the preset water acceleration curve is preset.
  • the judging module 10 in the example is configured to: determine a change curve of the acceleration value during the falling process of the terminal, and whether the similarity with the selected preset inflow water acceleration curve exceeds a preset threshold.
  • FIG. 8 is a schematic structural diagram of a selection module in a terminal protection device according to an embodiment of the present invention.
  • the selection module 30 in this embodiment may include:
  • the first calculating unit 301 is configured to: when the vertical acceleration value of the terminal falling is equal to the gravity acceleration value, calculate an angle value of the terminal according to the angular velocity value of the terminal;
  • the second calculating unit 302 is configured to: when the change of the vertical direction acceleration value satisfies the preset falling condition, calculate the falling height value of the terminal according to the change of the vertical direction acceleration value;
  • the selecting unit 303 is configured to select a preset water inflow acceleration curve according to the falling height value calculated by the second calculating unit 302 and the angle value calculated by the first calculating unit 301.
  • the second calculating unit 302 in this embodiment may further include:
  • the determining subunit 3021 is configured to: determine whether the vertical direction acceleration value has changed from the gravity acceleration value to the first acceleration value, and has changed from the first acceleration value to the second acceleration value;
  • the calculating subunit 3022 is configured to: when the determining subunit 3021 determines that the vertical direction acceleration value has undergone the above change, calculate the first falling height value according to the gravity acceleration value and the gravity acceleration duration, according to the first acceleration value and the first Calculating a second falling height value according to the acceleration time, and calculating a third falling height value according to the second acceleration value and the second acceleration duration;
  • the determining subunit 3023 is configured to: determine, by the calculation subunit 3022, a sum of the first drop height value, the second drop height value, and the third drop height value as a drop height value of the terminal; wherein the first acceleration value is Not equal to the second acceleration value.
  • FIG. 9 is a schematic structural diagram of still another terminal protection device according to an embodiment of the present invention. Based on the structure of the device shown in FIG. 7, the device provided in this embodiment may further include:
  • the setting module 40 is configured to: after the judging module 10 judges the change curve of the acceleration value during the falling process of the terminal, whether the similarity of the preset water inflow acceleration curve exceeds the preset threshold value, and generate the acceleration value according to the falling water entering process of the terminal.
  • the inflow water acceleration curve of the terminal; the water inflow acceleration curve is used as a preset inflow acceleration curve of the terminal, and is stored in the terminal.
  • the protection module 20 in this embodiment is configured to: when the determining module 10 determines that the similarity exceeds a preset threshold, turn off the power of the terminal.
  • the protection module 20 in this embodiment is further configured to: when the similarity exceeds the preset threshold, and before the power of the terminal is turned off, record, by the shutdown state parameter, that the terminal is shut down abnormally;
  • the apparatus provided in this embodiment further includes:
  • the booting module 50 is configured to: determine whether the terminal is shut down abnormally according to the shutdown state parameter during the booting process of the terminal; and determine whether the humidity value of the terminal exceeds the preset humidity when the last shutdown of the terminal belongs to abnormal shutdown. Threshold; performs a shutdown operation when the humidity value exceeds the preset humidity threshold.
  • the booting module 50 in this embodiment is further configured to: when the humidity value exceeds the preset humidity threshold, and prompt the user that the humidity value exceeds the preset humidity threshold before performing the shutdown operation, the shutdown is performed. operating.
  • the determining module 10, the protection module 20, the selecting module 30, the setting module 40, and the booting module 50 in the foregoing embodiments of the present invention may be configured by a central processing unit (CPU) located in the terminal.
  • CPU central processing unit
  • a microprocessor Micro Processor Unit, MPU for short
  • DSP digital signal processor
  • FPGA Field Programmable Gate Array
  • FIG. 10 is a schematic flowchart of still another terminal protection method according to an embodiment of the present invention.
  • the terminal protection method provided in this embodiment may include the following steps, that is, steps 601 to 609:
  • Step 601 When the waterproof protection mode on command is received, the waterproof protection mode is turned on.
  • the implementation manner of the step may be: when receiving the waterproof protection mode open command, the terminal turns on the acceleration sensor of the terminal and the gyro sensor of the terminal.
  • Step 602 Measure the vertical acceleration value of the terminal falling and the angular velocity value of the terminal in real time.
  • the implementation manner of the step may be: the acceleration sensor of the terminal measures the acceleration value of the terminal in real time; the gyro sensor of the terminal measures the angular velocity value of the terminal in real time.
  • Step 603 Read the vertical acceleration value and the measurement time of the falling of the terminal in real time, and record the read vertical acceleration value corresponding to the measurement time.
  • the implementation of the step may be: the processor of the terminal reads the acceleration value of the Z-axis direction and the measurement time obtained by the acceleration sensor of the terminal in real time, and records the read vertical acceleration value corresponding to the measurement time.
  • Step 604 When the vertical acceleration value of the terminal falling is equal to the gravity acceleration value, the angular velocity value measured by the gyro sensor is read, and the angle value of the terminal is calculated according to the read angular velocity value.
  • the implementation manner of the step may be: when confirming that the vertical acceleration value of the terminal falling is equal to the gravity acceleration value, the processor of the terminal reads the angular velocity value measured by the gyro sensor of the terminal, and according to the read The angular velocity value calculates the angular value of the terminal.
  • Step 605 When the vertical acceleration value of the terminal has changed from the gravity acceleration value to the first acceleration value, and has changed from the first acceleration value to the second acceleration value, calculate the drop height value of the terminal according to the vertical direction acceleration value. .
  • the implementation manner of the step may be: when the vertical acceleration value of the terminal falling has changed from the gravity acceleration value to the first acceleration value, and the terminal has changed from the first acceleration value to the second acceleration value, the terminal according to the gravity Calculating a first drop height value according to the acceleration value and the gravitational acceleration duration, calculating a second drop height value according to the first acceleration value and the first acceleration duration, and calculating a third drop according to the second acceleration value and the second acceleration duration a height value; the terminal determines a sum of the first drop height value, the second drop height value, and the third drop height value as a drop height value of the terminal.
  • Step 606 Select a preset water inflow acceleration curve according to the calculated drop height value and the angle value.
  • the implementation manner of the step may be: the terminal determines whether the calculated drop height value and the angle value are the same as the drop height value and the angle value corresponding to any preset water inlet acceleration curve; and the calculated drop height The value and the angle value are the same as the selected preset water inflow acceleration curve when the drop height value and the angle value corresponding to one of the same preset water inflow acceleration curves are the same.
  • Step 607 When the similarity between the acceleration value of the terminal falling process and the selected preset water acceleration curve exceeds a preset threshold, confirm that the terminal falls into the water, and the terminal is shut down by the shutdown state parameter recording terminal. Abnormal shutdown and power off the terminal.
  • Step 608 During the startup process of the terminal, determine whether the last shutdown of the terminal belongs to an abnormal shutdown according to the shutdown state parameter, and determine whether the humidity value of the terminal exceeds a preset humidity threshold when it is confirmed that the terminal is shut down abnormally.
  • the implementation manner of the step may be: during the startup process of the terminal, the terminal determines, according to the shutdown state parameter, whether the last shutdown of the terminal belongs to an abnormal shutdown; When the system is normally shut down, the terminal determines whether the humidity value of the terminal exceeds the preset humidity threshold.
  • Step 609 When the humidity value of the terminal exceeds the preset humidity threshold, the vibrator of the terminal is vibrated to perform a shutdown operation; otherwise, the power-on operation is continued.
  • the implementation manner of the step may be: when the humidity value of the terminal exceeds the preset humidity threshold, the terminal controls the vibrator of the terminal to vibrate, and performs a shutdown operation; otherwise, the terminal continues to perform the power-on operation.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • the device/function module/functional unit in the above embodiment When the device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the water inlet protection mode of the terminal is activated.
  • the embodiment of the invention realizes that the terminal enters the water entering protection mode of the terminal after falling into the water, thereby effectively preventing the terminal from being damaged after falling into the water, facilitating the user to use the terminal, and improving the user experience.

Abstract

一种终端保护方法及装置,其中,该方法包括:判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值;在相似度超过预设阈值时,启动终端的入水保护模式。

Description

一种终端保护方法及装置 技术领域
本申请涉及但不限于终端技术领域。
背景技术
目前,手机、平板电脑等终端已成为用户必备用品,且通常会被用户随身携带。但在使用或携带终端的过程中,终端可能会跌落至水中,从而损坏终端,给用户带来不便。相关技术提供的终端保护方式通常为,在终端电路板的关键器件上增加防水罩,以及增加终端的密封性,从而避免终端的关键器件进水,及减少进入终端内的水量。
然而,相关技术中提供的终端保护方式存在如下问题:仅在物理方式上对终端进行了保护,在终端跌落至水中后,不能有效地防止终端被损坏。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本文提供一种终端保护方法及装置,实现了终端在落入水中后,启动终端的入水保护模式,从而有效地防止终端落入水中后被损坏,方便用户使用终端。
一种终端保护方法,所述方法包括:
判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值;
在所述相似度超过所述预设阈值时,启动所述终端的入水保护模式。
可选地,在所述判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值之前,所述方法还包括:
根据所述终端的下落高度值和角度值选定所述预设入水加速度变化曲 线;
所述判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值,包括:
判断所述终端下落过程中的加速度值的变化曲线,与选定的所述预设入水加速度变化曲线的相似度是否超过预设阈值。
可选地,所述根据所述终端的下落高度值和角度值选定所述预设入水加速度变化曲线,包括:
在所述终端下落的垂直方向加速度值等于重力加速度值时,根据所述终端的角速度值计算出所述终端的角度值;
在所述垂直方向加速度值的变化满足预设下落条件时,根据所述垂直方向加速度值的变化计算出所述终端的下落高度值;
根据所述下落高度值和所述角度值选定所述预设入水加速度变化曲线。
可选地,所述在所述垂直方向加速度值的变化满足预设下落条件时,根据所述垂直方向加速度值的变化计算出所述终端的下落高度值,包括:
判断所述垂直方向加速度值是否已经从重力加速度值变化为第一加速度值,并且是否已经从所述第一加速度值变化为第二加速度值;
在所述垂直方向加速度值已经从重力加速度值变化为所述第一加速度值,并且从所述第一加速度值变化为所述第二加速度值时,根据所述重力加速度值和重力加速度持续时间计算出第一下落高度值,根据所述第一加速度值和第一加速度持续时间计算出第二下落高度值,根据所述第二加速度值和第二加速度持续时间计算出第三下落高度值;
将所述第一下落高度值、所述第二下落高度值和所述第三下落高度值之和确定为所述终端的下落高度值;
其中,所述第一加速度值不等于所述第二加速度值。
可选地,在所述判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值之前,所述方法还包括:
根据所述终端下落入水过程中的加速度值,生成所述终端的入水加速度 变化曲线;
将所述入水加速度变化曲线作为所述终端的预设入水加速度变化曲线,并存储在所述终端内。
可选地,所述在所述相似度超过所述预设阈值时,启动所述终端的入水保护模式,包括:
在所述相似度超过所述预设阈值时,关闭所述终端的电源。
可选地,在所述相似度超过所述预设阈值时,且所述关闭所述终端的电源之前,所述方法还包括:
通过关机状态参数记录所述终端本次关机为异常关机;
在所述关闭所述终端的电源之后,所述方法还包括:
在所述终端开机过程中,根据所述关机状态参数判断所述终端上次关机是否属于异常关机;
在所述终端上次关机属于异常关机时,判断所述终端的湿度值是否超过预设湿度阈值;
在所述湿度值超过所述预设湿度阈值时,执行关机操作。
可选地,在所述湿度值超过所述预设湿度阈值时,且所述执行关机操作之前,所述方法还包括:
提示用户所述湿度值超过所述预设湿度阈值,将执行关机操作。
一种终端保护装置,所述装置包括:
判断模块,设置为:判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值;
保护模块,设置为:在所述判断模块判断出所述相似度超过所述预设阈值时,启动所述终端的入水保护模式。
可选地,所述装置还包括:
选择模块,设置为:在所述判断模块判断所述终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值之前,根据所述终端的下落高度值和角度值选定所述预设入水加速度变化曲线;
所述判断模块,是设置为:判断所述终端下落过程中的加速度值的变化曲线,与选定的所述预设入水加速度变化曲线的相似度是否超过预设阈值。
可选地,所述选择模块包括:
第一计算单元,设置为:在所述终端下落的垂直方向加速度值等于重力加速度值时,根据所述终端的角速度值计算出所述终端的角度值;
第二计算单元,设置为:在所述垂直方向加速度值的变化满足预设下落条件时,根据所述垂直方向加速度值的变化计算出所述终端的下落高度值;
选择单元,设置为:根据所述第二计算单元计算出的所述下落高度值和所述第一计算单元计算出的所述角度值选定所述预设入水加速度变化曲线。
可选地,所述第二计算单元包括:
判断子单元,设置为:判断所述垂直方向加速度值是否已经从重力加速度值变化为第一加速度值,并且是否已经从所述第一加速度值变化为第二加速度值;
计算子单元,设置为:在所述判断子单元判断出所述垂直方向加速度值已经从重力加速度值变化为所述第一加速度值,并且从所述第一加速度值变化为所述第二加速度值时,根据所述重力加速度值和重力加速度持续时间计算出第一下落高度值,根据所述第一加速度值和第一加速度持续时间计算出第二下落高度值,根据所述第二加速度值和第二加速度持续时间计算出第三下落高度值;
确定子单元,设置为:将所述计算子单元计算出的所述第一下落高度值、所述第二下落高度值和所述第三下落高度值之和确定为所述终端的下落高度值;其中,所述第一加速度值不等于所述第二加速度值。
可选地,所述装置还包括:
设置模块,设置为:在所述判断模块判断所述终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值之前,根据所述终端下落入水过程中的加速度值,生成所述终端的入水加速度变化曲线;将所述入水加速度变化曲线作为所述终端的预设入水加速度变化曲线,并存储在所述终端内。
可选地,所述保护模块,是设置为:在所述判断模块判断出所述相似度超过所述预设阈值时,关闭所述终端的电源。
可选地,所述保护模块,还设置为:在所述相似度超过所述预设阈值时,且在所述关闭所述终端的电源之前,通过关机状态参数记录所述终端本次关机为异常关机;
所述装置还包括:
开机模块,设置为:在所述终端开机过程中,根据所述关机状态参数判断所述终端上次关机是否属于异常关机;在所述终端上次关机属于异常关机时,判断所述终端的湿度值是否超过预设湿度阈值;在所述湿度值超过所述预设湿度阈值时,执行关机操作。
可选地,所述开机模块,还设置为:在所述湿度值超过所述预设湿度阈值时,且所述执行关机操作之前,提示用户所述湿度值超过所述预设湿度阈值,将执行关机操作。
本发明实施例提供的一种终端保护方法及装置,通过判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值;并且在该相似度超过预设阈值时,启动终端的入水保护模式。本发明实施例实现了终端在落入水中后,启动终端的入水保护模式,从而有效地防止了终端落入水中后被损坏,方便用户使用终端,提高用户的体验度。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为本发明实施例提供的一种终端保护方法的流程示意图;
图2为本发明实施例提供的另一种终端保护方法的流程示意图;
图3为本发明实施例提供的终端保护方法中一种预设入水加速度变化曲线的示意图;
图4为本发明实施例提供的终端保护方法中一种终端下落的应用场景示意图;
图5为本发明实施例提供的又一种终端保护方法的流程示意图;
图6为本发明实施例提供的一种终端保护装置的结构示意图;
图7为本发明实施例提供的另一种终端保护装置的结构示意图;
图8为本发明实施例提供的终端保护装置中一种选择模块的结构示意图
图9为本发明实施例提供的又一种终端保护装置的结构示意图;
图10为本发明实施例提供的再一种终端保护方法的流程示意图。
本发明的实施方式
下文中将结合附图对本发明的实施方式进行详细说明。需要说明的是,在不冲突的情况下,本文中的实施例及实施例中的特征可以相互任意组合。
在附图的流程图示出的步骤可以在诸根据一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
在本发明实施例中,终端判断该终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值;在相似度超过预设阈值时,终端启动终端的入水保护模式。
图1为本发明实施例提供的一种终端保护方法的流程示意图。如图1所示,本实施例提供的终端保护方法可以包括如下步骤,即步骤110~步骤120:
步骤110:终端判断该终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值。
在本发明实施例中,步骤110可以为,终端判断该终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值。
其中,上述预设入水加速度变化曲线是指在终端开始下落到终端落入水中的时间段内,终端下落的垂直方向加速度值变化的曲线,终端下落的垂直方向即为三维坐标系中的Z轴方向。本发明实施例中的终端可以为手机或平板电脑等终端,并且该终端内设置有加速度传感器。
步骤120,终端在该终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度超过预设阈值时,启动该终端的入水保护模式。
本实施例提供的终端保护方法,通过判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值;并且在该相似度超过预设阈值时,启动终端的入水保护模式。本发明实施例实现了终端在落入水中后,启动终端的入水保护模式,从而有效地防止了终端落入水中后被损坏,方便用户使用终端,提高用户的体验度。
可选地,图2为本发明实施例提供的另一种终端保护方法的流程示意图。在图1所示实施例的基础上,在未获得终端的预设入水加速度变化曲线时,本实施例提供的终端保护方法在步骤110之前,还可以包括:
步骤100,终端根据该终端下落入水过程中的加速度值,生成该终端的入水加速度变化曲线;
步骤101,终端将该入水加速度变化曲线作为终端的预设入水加速度变化曲线,并存储在终端内。
本实施例提供的上述过程的实现方式可以包括以下方式一或方式二。
方式一,上述终端生成预设入水加速度变化曲线过程可以包括:在终端的处理器接收到测量开始指令时,终端的加速度传感器开始实时测量终端的加速度值;在终端的垂直方向加速度值等于重力加速度值时,终端的处理器开始实时读取其加速度传感器的测量结果,该测量结果包括测量时间及终端的垂直方向加速度值;终端的处理器对应测量时间记录终端的垂直方向加速度值;在终端的处理器接收到测量停止指令时,终端的加速度传感器停止测量终端的加速度值,并根据测量过程记录的测量时间及终端的垂直方向加速度值生成终端的入水加速度变化曲线;终端的处理器将该入水加速度变化曲线作为终端的预设入水加速度变化曲线,并更新终端的存储器内的预设入水加速度变化曲线。
举例来说,在实际测量应用中,测量人员可以通过个人计算机(Personal Computer,简称为:PC)机向终端发送测量开始指令或测量停止指令,在向终端发送测量开始指令后将终端抛向装有水的容器,在终端落入水中后向终端发送测量停止指令,从而实现上述测量过程。
在方式一中,终端内可以存储有一个预设入水加速度变化曲线。相应地, 本实施例中的步骤110可以为:终端直接判断其自身下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值。
方式二,终端内还设置有陀螺仪传感器,上述终端生成预设入水加速度变化曲线过程可以包括:在终端的处理器接收到测量开始指令时,终端的加速度传感器开始实时测量终端的加速度值,终端的陀螺仪传感器开始实时测量终端的角速度值;在终端的垂直方向加速度值等于重力加速度值时,终端的处理器读取并记录其陀螺仪传感器测量获得的角速度值,并开始实时读取其加速度传感器的测量结果,该测量结果包括测量时间及终端的垂直方向加速度值;终端的处理器对应测量时间记录终端的垂直方向加速度值;在终端的处理器接收到测量停止指令时,终端的加速度传感器停止测量终端的加速度值,并根据测量过程记录的测量时间及终端的垂直方向加速度值生成终端的入水加速度变化曲线;终端的处理器根据记录的角速度值计算出终端的角度值,根据记录的测量时间及终端的垂直方向加速度值计算出终端的下落高度值;终端的处理器将该入水加速度变化曲线作为终端的一个预设入水加速度变化曲线,并对应计算出的终端的角度值及下落高度值将该预设入水加速度变化曲线存储在终端的存储器内。
其中,终端的下落高度值即为终端下落的高度值;终端的角度值即为终端下落时与水平平面所成角的角度值。
在方式二中,终端可以根据不同的下落高度值及角度值存储有多个预设入水加速度变化曲线。从而可以更准确地判断出终端是否落入水中。例如,在实际应用中,在终端的下落高度值为0.3米,终端的角度值为45度时,终端存储有第一个预设入水加速度变化曲线;在终端的下落高度值为0.5米,终端的角度值为45度时,终端存储有第二个预设入水加速度变化曲线;在终端的下落高度值为0.3米,终端的角度值为50度时,终端存储有第三个预设入水加速度变化曲线;在终端的下落高度值为0.5米,终端的角度值为50度时,终端存储有第四个预设入水加速度变化曲线等。在实际应用中,不同的下落高度值及角度值对应的预设入水加速度变化曲线,可以通过实际测量获得。如图3所示,为本发明实施例提供的终端保护方法中一种预设入水加速度变化曲线的示意图,其中,横轴,即X轴为时间轴,纵轴,即Y轴为加速度值轴,图3 中的曲线201即为预设入水加速度变化曲线。
相应地,本发明实施例提供的终端保护方法在步骤110之前,还可以包括:
步骤102,终端根据该终端的下落高度值和角度值选定预设入水加速度变化曲线。并且本实施例中步骤110的实现方式可以为:终端判断该终端下落过程中的加速度值的变化曲线,与选定的预设入水加速度变化曲线的相似度是否超过预设阈值。
可选地,在本发明的一个实施例中,终端根据终端的下落高度值和角度值选定预设入水加速度变化曲线的实现方式可以为:在终端下落的垂直方向加速度值等于重力加速度值时,终端根据终端的角速度值计算出终端的角度值;在终端下落的垂直方向加速度值的变化满足预设下落条件时,终端根据其垂直方向加速度值的变化计算出其下落高度值;终端根据计算出的下落高度值及角度值选定一个预设入水加速度变化曲线。
可选地,在本发明的一个实施例中,在终端根据终端的下落高度值和角度值选定预设入水加速度变化曲线之前,该终端保护方法还可以包括:终端的加速度传感器实时测量终端的加速度值;终端的处理器实时读取加速度传感器的测量结果,该测量结果包括测量时间和终端的垂直方向加速度值;终端的处理器对应测量时间记录终端的垂直方向加速度值;其中,该加速度值包括垂直方向加速度值。该终端保护方法还可以包括:终端的陀螺仪传感器实时测量终端的角速度值。
可选地,在本实施例的一种实现方式中,在终端下落的垂直方向加速度值等于重力加速度值时,终端根据终端的角速度值计算出终端的角度值,可以包括:终端的处理器判断获得的垂直方向加速度值是否等于重力加速度值;在确认该垂直方向加速度值等于重力加速度值时,终端的处理器读取陀螺仪传感器测量获得的角速度值,并根据读取到的角速度值计算出终端的角度值,否则,终端的处理器不读取陀螺仪传感器测量获得的角速度值。从而使得终端获知其自身下落时与水平平面所成角的角度值,即终端的角度值。
在实际应用中,上述重力加速度值可以为9.8米每秒的平方(m/s2)或10m/s2。当然,在实际应用中,若加速度传感器测量获得的加速度值存在误差,例如物体自由下落时,加速度传感器测量获得的物体的重力加速度值不 为9.8m/s2或10m/s2,而是等于9.7m/s2、9.9m/s2或10.1m/s2,在这种情况下,重力加速度值可以为一个范围值,例如为9.7~10.1m/s2,若终端的处理器获得的垂直方向加速度值在该范围值内,终端的处理器即确认该垂直方向加速度值等于重力加速度值。
举例说明终端下落过程中的角度值,如图4所示,为本发明实施例提供的终端保护方法中一种终端下落的应用场景示意图,图4中终端301下落时与水平平面302所成角303的角度值为45度,即终端的角度值为45度。
可选地,在本实施例的一种实现方式中,在终端的垂直方向加速度值的变化满足预设下落条件时,终端根据该垂直方向加速度值的变化计算出该终端下落高度值,可以包括:终端判断下落的垂直方向加速度值是否已经从重力加速度值变化为第一加速度值,并且是否已经从第一加速度值变化为第二加速度值;在终端下落的垂直方向加速度值已经历上述变化时,终端根据重力加速度值和重力加速度持续时间计算出第一下落高度值,根据第一加速度值和第一加速度持续时间计算出第二下落高度值,根据第二加速度值和第二加速度持续时间计算出第三下落高度值;终端将第一下落高度值、第二下落高度值和第三下落高度值之和确定为终端的下落高度值。从而使得终端获知其当前下落的高度值,即终端的下落高度值。
在本实施例中,上述第一加速度值不等于第二加速度值。在实际应用中,本实施例中的预设下落条件例如为终端下落的垂直方向加速度值从重力加速度值变化为第一加速度值,并且从第一加速度值变化为第二加速度值;在终端下落的垂直方向加速度值经历上述变化时,终端即确认其下落的垂直方向加速度值的变化满足预设下落条件。
在本实施例中,重力加速度持续时间为终端下落的垂直方向加速度值保持为重力加速度值的时间;第一加速度持续时间为终端下落的垂直方向加速度值保持为第一加速度值的时间;第二加速度持续时间为终端下落的垂直方向加速度值保持为第二加速度值的时间。上述持续时间可以根据终端的加速度传感器的测量结果来计算获得,该测量结果可以包括测量时间和终端下落的垂直方向加速度值。
例如,以终端落入水中为例说明重力加速度值、第一加速度值和第二加 速度值的大小关系,用户手握终端,通常情况下此时终端的加速度传感器测量获得的垂直方向加速度值为零。由于用户手握终端时,终端受到的合力可能为零,此时测量获得的垂直方向加速度值为零。接着终端从用户手中脱落,终端自由下落,此时测量获得的垂直方向加速度值为重力加速度值g。终端继续下落与水面接触,由于终端受到水面冲击力及浮力,此时终端下落的垂直方向加速度值发生了突变,具体地,终端下落的垂直方向加速度值减小,且远小于重力加速度值;即此时测量获得的垂直方向加速度值从重力加速度值变化至第一加速度值。随后,终端继续下落至水中,水面对终端的冲击力消失,终端下落的垂直方向加速度值从第一加速度值变化为第二加速度值,该第二加速度值小于重力加速度值,且大于第一加速度值。
如图4所示,以终端301落入水中为例,终端的下落高度304从终端301下落开始,即从平面302位置开始,落入水中,即水平面305以下的位置。
可选地,在本实施例的一个实现方式中,终端根据计算出的下落高度值和角度值选定一个预设入水加速度变化曲线,即步骤102可以包括:终端判断计算出的下落高度值和角度值,是否与该终端中存储的任意一个预设入水加速度变化曲线对应的下落高度值及角度值相同;在计算出的下落高度值和角度值,与其中一个预设入水加速度变化曲线对应的下落高度值及角度值相同时,终端将该预设入水加速度变化曲线作为选定的入水预设加速度变化曲线。
在实际应用中,由于不同机型的终端,终端的体积、重量可能不同,从终端开始下落到入水过程中,终端下落的垂直方向加速度值变化也不同,为了更加准确地判断出终端是否落入水中,终端还可以对应不同的机型、不同的下落高度值及角度值存储多个预设入水加速度变化曲线。在需终端选定预设入水加速度变化曲线时,终端可以根据本终端的机型、下落高度值及角度值选定一个预设入水加速度变化曲线。另外,不同的机型、下落高度值及角度值对应的预设入水加速度变化曲线,也可以通过实际测量获得。
可选地,在本实施例的一个实现方式中,步骤110可以包括:终端从读取到的垂直方向加速度值中查找出终端下落过程中的垂直方向加速度值;终端根据查找出的垂直方向的每个加速度值及其测量时间,获得下落过程中终端的加速度值的变化曲线;终端判断获得的加速度值的变化曲线与预设入水加 速度变化曲线的相似度是否超过预设阈值。
在本实施例中,上述下落过程是指从终端下落的垂直方向加速度值变为重力加速度值开始,至该垂直方向加速度值变化为第二加速度值为止的过程。其中,该预设阈值可以根据实际测量情况进行设置,例如若在实际测量过程中,终端判定下落过程中终端的加速度值的变化曲线,与预设入水加速度变化曲线的相似度程度超过80%时,上述两个曲线通常是相似的,在这种情况下该预设阈值即可设置为80%。
以下通过几个实施例对图1和图2所示实施例中步骤120的实现方式予以说明。
可选地,在本发明的一个实施例中,步骤120可以为:在终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度超过预设阈值时,终端确认该终端落入水中,并启动终端的入水保护模式。如本实施例中,通过预设入水加速度变化曲线判断终端是否落入水中,在判定终端落入中时启动终端的入水保护模式,能实现在终端落入水中后,启动终端的入水保护模式,从而有效地防止了终端落入水中后被损坏,方便用户使用终端,提高用户的体验度。
可选地,在本发明的一个实施例中,步骤120还可以为:在终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度超过预设阈值时,终端控制该终端发出报警声音。也就是说,终端启动其自身的入水保护模式即为终端控制其自身发出报警声音。从而可以通过报警声音提示用户终端落入水中,使得用户可以迅速从水中取出终端,避免增加终端在水中的时间,防止终端被损坏。
可选地,在本发明的一个实施例中,步骤120还可以为:在终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度超过预设阈值时,终端关闭终端的电源。从而在终端落入水中后,快速地切断终端的电源,防止终端的主板被损坏,从而有效地防止了终端被损坏。
在实际应用中,终端在关机时通常需执行以下步骤:
(1)发送关机广播ACTION_SHUTDOWN;该ACTION_SHUTDOWN为 关机广播信息;
(2)关闭活动管理器(ActivityManager)服务;
(3)关闭无线相关的服务;
(4)关闭集成时钟控制器服务(Integrated clock controller service,Iccs);
(5)关闭挂载(MountService)服务;接着关闭终端的电源。
为了在确认终端落入水中时,可以快速切断终端的电源,本实施例提供的方法在步骤120中,在终端确认终端落入水中时,即相似度超过预设阈值时,终端直接关闭了终端的电源,即终端未执行上述步骤(1)到(5),直接执行了关闭终端的电源操作。
可选地,在本实施例的一个实现方式中,终端关闭终端的电源可以为:终端直接执行关闭电源命令关闭终端的电源。例如,在实际应用中,终端通过其电源管理服务直接执行关闭电源命令关闭终端的电源。
可选地,为了实现更有效的保护终端,本发明实施例提供的终端保护方法,在终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度超过预设阈值时,且终端关闭其电源之前,还可以包括:终端通过关机状态参数记录终端本次关机为异常关机;如图5所示,为本发明实施例提供的又一种终端保护方法的流程示意图,在图1所示实施例的基础上,本实施例中的步骤120可以为:终端在该终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度超过预设阈值时,通过关机状态参数记录终端本次关机为异常关机,并关闭该终端的电源。相应地,本发明实施例提供的终端保护方法在终端关闭其电源之后,即步骤120之后,还可以包括:
步骤130,在终端开机过程中,终端根据关机状态参数判断终端上次关机是否属于异常关机;
步骤140,在确认终端上次关机属于异常关机时,终端判断该终端的湿度值是否超过预设湿度阈值;
步骤150,在终端的湿度值超过预设湿度阈值时,终端执行关机操作,否则,终端继续执行开机操作。
本实施例通过上述方法,在终端由于落入水中被关机后且终端再次开机 时,终端可以根据终端的湿度值来决策是否开机,实现避免在终端主板未完全干燥时终端开机,从而防止了终端被损坏。
例如,在实际应用中,终端在系统属性(sys.shutdown.requested)中写明终端本次关机为异常关机,在终端开机过程中,终端根据sys.shutdown.requested判断终端上次关机是否属于异常关机。
可选地,本发明实施例提供的终端保护方法,在终端的湿度值超过预设湿度阈值时,且该终端执行关机操作之前,还可以包括:终端提示用户湿度值超过预设湿度阈值,将执行关机操作。即在终端的湿度值超过预设湿度阈值时,终端的处理器执行的操作包括:提示用户湿度值超过预设湿度阈值,将执行关机操作,及关机操作。从而使得终端可以提示用户本次未正常开机的原因是终端的湿度值较高。
可选地,在本实施例的一个实现方式中,终端提示用户湿度值超过预设湿度阈值,将执行关机操作,可以为:终端的处理器控制终端的振动器震动,从而使得终端可以通过其振动器的震动,来提示用户本次未正常开机的原因是终端的湿度值较高。另外,终端提示用户湿度值超过预设湿度阈值,将执行关机操作,还可以为:终端的处理器控制终端发出提示声音,从而使得终端可以通过提示声音,来提示用户本次未正常开机的原因是终端的湿度值较高。
在实际应用中,本发明各实施例的终端可以包括引导程序模块(Second BootLoader 1,简称为:SBL1),该SBL1用于加载内存。本实施例在终端开机过程中,终端根据关机状态参数判断终端上次关机是否属于异常关机,在确认终端上次关机属于异常关机时,终端判断终端的湿度值是否超过预设湿度阈值,在终端的湿度值超过预设湿度阈值时,终端提示用户湿度值超过预设湿度阈值,将执行关机操作,即可通过引导程序模块执行。
为了更有效的保护终端,本发明实施例提供的终端保护方法或者还可以包括:在终端开机过程中,终端判断终端的湿度值是否超过预设湿度阈值;在终端的湿度值超过预设湿度阈值时,终端执行关机操作,否则,终端继续执行开机操作。即终端不判断终端上次关机是否属于异常关机,仅判断终端的湿度值是否超过预设湿度阈值,实现避免在终端主板未完全干燥时终端开 机,从而防止了终端被损坏。
可选地,本发明实施例提供的终端保护方法在步骤110之前,还可以包括:在终端接收到防水保护模式开启指令时,终端开启终端的加速度传感器及陀螺仪传感器,否则,终端关闭终端的加速度传感器及陀螺仪传感器。即在终端接收到防水保护模式开启指令时,终端执行本发明实施例提供的步骤110及步骤120,否则,终端不执行本发明实施例提供的步骤110及步骤120。如在用户工作在有水的场景,用即可向终端输入防水保护模式开启指令,使得终端可以实施本发明实施例提供的终端保护方法。从而实现提高用户的体验度;同时,实现避免终端实时开启加速度传感器及陀螺仪传感器,节约终端电能。
为了实现上述方法,本发明公开了一种终端保护装置。
图6为本发明实施例提供的一种终端保护装置的结构示意图。如图6所示,本实施例提供的终端保护装置包括:
判断模块10,设置为:判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值;
保护模块20,设置为:在判断模块10判断出该相似度超过所述预设阈值时,启动该终端的入水保护模式。
可选地,如图7所示,为本发明实施例提供的另一种终端保护装置的结构示意图。在图6所示装置的结构基础上,本实施例提供的装置还可以包括:
选择模块30,设置为:在判断模块10判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值之前,根据终端的下落高度值和角度值选定预设入水加速度变化曲线。
相应地,本实例中的判断模块10,是设置为:判断终端下落过程中的加速度值的变化曲线,与选定的预设入水加速度变化曲线的相似度是否超过预设阈值。
可选地,如图8所示,为本发明实施例提供的终端保护装置中一种选择模块的结构示意图。本实施例中的选择模块30可以包括:
第一计算单元301,设置为:在终端下落的垂直方向加速度值等于重力加速度值时,根据该终端的角速度值计算出该终端的角度值;
第二计算单元302,设置为:在该垂直方向加速度值的变化满足预设下落条件时,根据垂直方向加速度值的变化计算出该终端的下落高度值;
选择单元303,设置为:根据第二计算单元302计算出的下落高度值和第一计算单元301计算出的角度值选定一个预设入水加速度变化曲线。
可选地,本实施例中的第二计算单元302还可以包括:
判断子单元3021,设置为:判断垂直方向加速度值是否已经从重力加速度值变化为第一加速度值,并且是否已经从第一加速度值变化为第二加速度值;
计算子单元3022,设置为:在判断子单元3021判断出垂直方向加速度值已经历上述变化时,根据重力加速度值和重力加速度持续时间计算出第一下落高度值,根据第一加速度值和第一加速度时间计算出第二下落高度值,根据第二加速度值和第二加速度持续时间计算出第三下落高度值;
确定子单元3023,设置为:将计算子单元3022计算出的第一下落高度值、第二下落高度值和第三下落高度值之和确定为终端的下落高度值;其中,上述第一加速度值不等于第二加速度值。
可选地,如图9所示,为本发明实施例提供的又一种终端保护装置的结构示意图。在图7所示装置的结构基础上,本实施例提供的装置还可以包括:
设置模块40,设置为:在判断模块10判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值之前,根据终端下落入水过程的加速度值,生成所述终端的入水加速度变化曲线;将所述入水加速度变化曲线作为所述终端的预设入水加速度变化曲线,并存储在所述终端内。
可选地,本实施例中的保护模块20,是设置为:在判断模块10判断出相似度超过预设阈值时,关闭该终端的电源。
可选地,本实施例中的保护模块20,还设置为:在相似度超过预设阈值时,且在关闭终端的电源之前,通过关机状态参数记录所述终端本次关机为异常关机;
如图9所示,本实施例提供的装置还包括:
开机模块50,设置为:在终端开机过程中,根据关机状态参数判断该终端上次关机是否属于异常关机;在该终端上次关机属于异常关机时,判断该终端的湿度值是否超过预设湿度阈值;在湿度值超过预设湿度阈值时,执行关机操作。
可选地,本实施例中的开机模块50,还设置为:在湿度值超过所述预设湿度阈值时,且执行关机操作之前,提示用户所述湿度值超过预设湿度阈值,将执行关机操作。
在实际应用中,本发明上述实施例中的判断模块10、保护模块20、选择模块30、设置模块40及开机模块50均可由位于终端中的中央处理器(Central Processing Unit,简称为:CPU)、微处理器(Micro Processor Unit,简称为:MPU)、数字信号处理器(Digital Signal Processor,简称为:DSP)、或现场可编程门阵列(Field Programmable Gate Array,简称为:FPGA)等实现。
图10为本发明实施例提供的再一种终端保护方法的流程示意图,如图10所示,本实施例提供的终端保护方法可以包括如下步骤,即步骤601~步骤609:
步骤601:在接收到防水保护模式开启指令时,开启防水保护模式。
可选地,本步骤的实现方式可以为:在接收到防水保护模式开启指令时,终端开启终端的加速度传感器及终端的陀螺仪传感器。
步骤602:实时测量终端下落的垂直方向加速度值及终端的角速度值。
可选地,本步骤的实现方式可以为:终端的加速度传感器实时测量终端的加速度值;终端的陀螺仪传感器实时测量终端的角速度值。
步骤603:实时读取终端下落的垂直方向加速度值及测量时间,并对应测量时间记录读取到的垂直方向加速度值。
可选地,本步骤的实现方式可以为:终端的处理器实时读取终端的加速度传感器测量获得的Z轴方向加速度值及测量时间,并对应及测量时间记录读取到的垂直方向加速度值。
步骤604:在终端下落的垂直方向加速度值等于重力加速度值时,读取陀螺仪传感器测量获得的角速度值,并根据读取到的角速度值计算出终端的角度值。
可选地,本步骤的实现方式可以为:在确认终端下落的垂直方向加速度值等于重力加速度值时,终端的处理器读取终端的陀螺仪传感器测量获得的角速度值,并根据读取到的角速度值计算出终端的角度值。
步骤605:在终端下落的垂直方向加速度值已从重力加速度值变化为第一加速度值,并且已经从第一加速度值变化为第二加速度值时,根据垂直方向加速度值计算出终端的下落高度值。
可选地,本步骤的实现方式可以为:在终端下落的垂直方向加速度值已从重力加速度值变化为第一加速度值,并且已经从第一加速度值变化为第二加速度值时,终端根据重力加速度值及重力加速度持续时间计算出第一下落高度值,根据第一加速度值及第一加速度持续时间计算出第二下落高度值,根据第二加速度值及第二加速度持续时间计算出第三下落高度值;终端将第一下落高度值、第二下落高度值及第三下落高度值之和确定为终端的下落高度值。
步骤606:根据计算出的下落高度值和角度值选定一个预设入水加速度变化曲线。
可选地,本步骤的实现方式可以为:终端判断计算出的下落高度值及角度值,是否与任意一个预设入水加速度变化曲线对应的下落高度值及角度值相同;在计算出的下落高度值及角度值,与其中一个相同预设入水加速度变化曲线对应的下落高度值及角度值相同时,终端将该预设入水加速度变化曲线作为选定的预设入水加速度变化曲线。
步骤607:在终端下落过程中的加速度值的变化曲线,与选定的预设入水加速度变化曲线的相似度超过预设阈值时,确认终端落入水中,通过关机状态参数记录终端本次关机为异常关机,并关闭终端的电源。
步骤608:在终端开机过程中,根据关机状态参数判断终端上次关机是否属于异常关机,在确认终端上次关机属于异常关机时,判断终端的湿度值是否超过预设湿度阈值。
可选地,本步骤的实现方式可以为:在终端开机过程中,终端根据关机状态参数判断终端上次关机是否属于异常关机;在确认终端上次关机属于异 常关机时,终端判断终端的湿度值是否超过预设湿度阈值。
步骤609:在终端的湿度值超过预设湿度阈值时,控制终端的振动器震动,执行关机操作,否则,继续执行开机操作。
可选地,本步骤的实现方式可以为:在终端的湿度值超过预设湿度阈值时,终端控制终端的振动器震动,执行关机操作,否则,终端继续执行开机操作。
以上所述仅为本发明的实施例和可选地实现方式,并不用于限制本发明实施例的保护范围,对于本领域的技术人员来说,本发明可以有各种更改和变化,本发明的保护范围以权利要求为准。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(根据系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。
上述实施例中的装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
工业实用性
本发明实施例通过判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值;并且在该相似度超过预设阈值时,启动终端的入水保护模式。本发明实施例实现了终端在落入水中后,启动终端的入水保护模式,从而有效地防止了终端落入水中后被损坏,方便用户使用终端,提高用户的体验度。

Claims (16)

  1. 一种终端保护方法,包括:
    判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值;
    在所述相似度超过所述预设阈值时,启动所述终端的入水保护模式。
  2. 根据权利要求1所述的方法,其中,在所述判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值之前,所述方法还包括:
    根据所述终端的下落高度值和角度值选定所述预设入水加速度变化曲线;
    所述判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值,包括:
    判断所述终端下落过程中的加速度值的变化曲线,与选定的所述预设入水加速度变化曲线的相似度是否超过预设阈值。
  3. 根据权利要求2所述的方法,其中,所述根据所述终端的下落高度值和角度值选定所述预设入水加速度变化曲线,包括:
    在所述终端下落的垂直方向加速度值等于重力加速度值时,根据所述终端的角速度值计算出所述终端的角度值;
    在所述垂直方向加速度值的变化满足预设下落条件时,根据所述垂直方向加速度值的变化计算出所述终端的下落高度值;
    根据所述下落高度值和所述角度值选定所述预设入水加速度变化曲线。
  4. 根据权利要求3所述的方法,其中,所述在所述垂直方向加速度值的变化满足预设下落条件时,根据所述垂直方向加速度值的变化计算出所述终端的下落高度值,包括:
    判断所述垂直方向加速度值是否已经从重力加速度值变化为第一加速度值,并且是否已经从所述第一加速度值变化为第二加速度值;
    在所述垂直方向加速度值已经从重力加速度值变化为所述第一加速度 值,并且从所述第一加速度值变化为所述第二加速度值时,根据所述重力加速度值和重力加速度持续时间计算出第一下落高度值,根据所述第一加速度值和第一加速度持续时间计算出第二下落高度值,根据所述第二加速度值和第二加速度持续时间计算出第三下落高度值;
    将所述第一下落高度值、所述第二下落高度值和所述第三下落高度值之和确定为所述终端的下落高度值;
    其中,所述第一加速度值不等于所述第二加速度值。
  5. 根据权利要求1所述的方法,其中,在所述判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值之前,所述方法还包括:
    根据所述终端下落入水过程中的加速度值,生成所述终端的入水加速度变化曲线;
    将所述入水加速度变化曲线作为所述终端的预设入水加速度变化曲线,并存储在所述终端内。
  6. 根据权利要求1所述的方法,其中,所述在所述相似度超过所述预设阈值时,启动所述终端的入水保护模式,包括:
    在所述相似度超过所述预设阈值时,关闭所述终端的电源。
  7. 根据权利要求6所述的方法,其中,在所述相似度超过所述预设阈值时,且所述关闭所述终端的电源之前,所述方法还包括:
    通过关机状态参数记录所述终端本次关机为异常关机;
    在所述关闭所述终端的电源之后,所述方法还包括:
    在所述终端开机过程中,根据所述关机状态参数判断所述终端上次关机是否属于异常关机;
    在所述终端上次关机属于异常关机时,判断所述终端的湿度值是否超过预设湿度阈值;
    在所述湿度值超过所述预设湿度阈值时,执行关机操作。
  8. 根据权利要求7所述的方法,其中,在所述湿度值超过所述预设湿度 阈值时,且所述执行关机操作之前,所述方法还包括:
    提示用户所述湿度值超过所述预设湿度阈值,将执行关机操作。
  9. 一种终端保护装置,包括:
    判断模块,设置为:判断终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值;
    保护模块,设置为:在所述判断模块判断出所述相似度超过所述预设阈值时,启动所述终端的入水保护模式。
  10. 根据权利要求9所述的装置,还包括:
    选择模块,设置为:在所述判断模块判断所述终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值之前,根据所述终端的下落高度值和角度值选定所述预设入水加速度变化曲线;
    所述判断模块,是设置为:判断所述终端下落过程中的加速度值的变化曲线,与选定的所述预设入水加速度变化曲线的相似度是否超过预设阈值。
  11. 根据权利要求10所述的装置,其中,所述选择模块包括:
    第一计算单元,设置为:在所述终端下落的垂直方向加速度值等于重力加速度值时,根据所述终端的角速度值计算出所述终端的角度值;
    第二计算单元,设置为:在所述垂直方向加速度值的变化满足预设下落条件时,根据所述垂直方向加速度值的变化计算出所述终端的下落高度值;
    选择单元,设置为:根据所述第二计算单元计算出的所述下落高度值和所述第一计算单元计算出的所述角度值选定所述预设入水加速度变化曲线。
  12. 根据权利要求11所述的装置,其中,所述第二计算单元包括:
    判断子单元,设置为:判断所述垂直方向加速度值是否已经从重力加速度值变化为第一加速度值,并且是否已经从所述第一加速度值变化为第二加速度值;
    计算子单元,设置为:在所述判断子单元判断出所述垂直方向加速度值已经从重力加速度值变化为所述第一加速度值,并且从所述第一加速度值变化为所述第二加速度值时,根据所述重力加速度值和重力加速度持续时间计 算出第一下落高度值,根据所述第一加速度值和第一加速度持续时间计算出第二下落高度值,根据所述第二加速度值和第二加速度持续时间计算出第三下落高度值;
    确定子单元,设置为:将所述计算子单元计算出的所述第一下落高度值、所述第二下落高度值和所述第三下落高度值之和确定为所述终端的下落高度值;其中,所述第一加速度值不等于所述第二加速度值。
  13. 根据权利要求9所述的装置,还包括:
    设置模块,设置为:在所述判断模块判断所述终端下落过程中的加速度值的变化曲线,与预设入水加速度变化曲线的相似度是否超过预设阈值之前,根据所述终端下落入水过程中的加速度值,生成所述终端的入水加速度变化曲线;将所述入水加速度变化曲线作为所述终端的预设入水加速度变化曲线,并存储在所述终端内。
  14. 根据权利要求9所述的装置,其中,所述保护模块,是设置为:在所述判断模块判断出所述相似度超过所述预设阈值时,关闭所述终端的电源。
  15. 根据权利要求14所述的装置,其中,所述保护模块,还设置为:在所述相似度超过所述预设阈值时,且在所述关闭所述终端的电源之前,通过关机状态参数记录所述终端本次关机为异常关机;
    所述装置还包括:
    开机模块,设置为:在所述终端开机过程中,根据所述关机状态参数判断所述终端上次关机是否属于异常关机;在所述终端上次关机属于异常关机时,判断所述终端的湿度值是否超过预设湿度阈值;在所述湿度值超过所述预设湿度阈值时,执行关机操作。
  16. 根据权利要求15所述的装置,其中,所述开机模块,还设置为:在所述湿度值超过所述预设湿度阈值时,且所述执行关机操作之前,提示用户所述湿度值超过所述预设湿度阈值,将执行关机操作。
PCT/CN2016/088906 2016-02-23 2016-07-06 一种终端保护方法及装置 WO2017143720A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610098533.7 2016-02-23
CN201610098533.7A CN107103258A (zh) 2016-02-23 2016-02-23 一种终端保护方法及装置

Publications (1)

Publication Number Publication Date
WO2017143720A1 true WO2017143720A1 (zh) 2017-08-31

Family

ID=59658866

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/088906 WO2017143720A1 (zh) 2016-02-23 2016-07-06 一种终端保护方法及装置

Country Status (2)

Country Link
CN (1) CN107103258A (zh)
WO (1) WO2017143720A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109839245A (zh) * 2017-11-29 2019-06-04 富泰华工业(深圳)有限公司 电子装置及其防水质保条件判断方法

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107831983B (zh) * 2017-10-31 2020-10-27 深圳市万普拉斯科技有限公司 过压保护控制方法、装置、移动终端及可读存储介质
CN108156294A (zh) * 2017-12-21 2018-06-12 上海摩软通讯技术有限公司 一种移动终端及保护壳
CN108810269A (zh) * 2018-06-04 2018-11-13 努比亚技术有限公司 电池浸水的报警方法、移动终端及计算机可读存储介质
CN109743466A (zh) * 2019-03-18 2019-05-10 努比亚技术有限公司 移动终端断电方法、移动终端及计算机可读存储介质
CN110174857A (zh) * 2019-04-04 2019-08-27 安徽天帆智能科技有限责任公司 一种电动救生艇自由落体开机

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101060244A (zh) * 2006-04-19 2007-10-24 鸿富锦精密工业(深圳)有限公司 具有自动关机保护功能的便携式电子装置
CN103542829A (zh) * 2013-10-28 2014-01-29 惠州Tcl移动通信有限公司 检测电子产品落水深度的方法及电子产品
CN103561171A (zh) * 2013-10-31 2014-02-05 惠州Tcl移动通信有限公司 一种手机落水的保护处理方法及系统
CN105262908A (zh) * 2015-11-24 2016-01-20 上海斐讯数据通信技术有限公司 一种终端落水保护方法及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102005722B (zh) * 2010-10-29 2014-05-07 播思通讯技术(北京)有限公司 一种防止手持终端短路的方法及装置
CN102724335B (zh) * 2012-04-16 2015-06-03 中兴通讯股份有限公司 防水装置
US20150016000A1 (en) * 2013-07-10 2015-01-15 International Business Machines Corporation Preventing moisture damage to a device
CN104427092A (zh) * 2013-08-22 2015-03-18 中兴通讯股份有限公司 移动终端自动关机方法、装置及移动终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101060244A (zh) * 2006-04-19 2007-10-24 鸿富锦精密工业(深圳)有限公司 具有自动关机保护功能的便携式电子装置
CN103542829A (zh) * 2013-10-28 2014-01-29 惠州Tcl移动通信有限公司 检测电子产品落水深度的方法及电子产品
CN103561171A (zh) * 2013-10-31 2014-02-05 惠州Tcl移动通信有限公司 一种手机落水的保护处理方法及系统
CN105262908A (zh) * 2015-11-24 2016-01-20 上海斐讯数据通信技术有限公司 一种终端落水保护方法及系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109839245A (zh) * 2017-11-29 2019-06-04 富泰华工业(深圳)有限公司 电子装置及其防水质保条件判断方法

Also Published As

Publication number Publication date
CN107103258A (zh) 2017-08-29

Similar Documents

Publication Publication Date Title
WO2017143720A1 (zh) 一种终端保护方法及装置
KR102052724B1 (ko) 침수 여부 결정 방법 및 그 전자 장치
TWI476630B (zh) 由至少一處理器所執行的連續服務方法、連續服務設備及非暫態電腦可讀取儲存媒體
CN102520858B (zh) 一种移动终端的应用控制方法及装置
CN106412249B (zh) 跌落信息的检测方法及装置
WO2014161337A1 (zh) 移动终端及其自动关机方法、装置和计算机存储介质
US10474814B2 (en) System, apparatus and method for platform protection against cold boot attacks
EP2849025A1 (en) An error operation preventing method, apparatus and device
WO2019101185A1 (zh) 播放音频数据的方法和装置
TWI748039B (zh) 電子裝置及其防水質保條件判斷方法
JP6521106B2 (ja) 判断装置、監視システム、判断方法及びプログラム
TW201327265A (zh) 鬧鐘控制系統及方法
KR20150100476A (ko) 도난 방지를 위한 보안 방법 및 그 전자 장치
KR101658012B1 (ko) 사용자 구성 능력을 갖는 적응형 열 스로틀링
CN107302633B (zh) 应用控制方法、装置、存储介质以及电子设备
CN110955580A (zh) 壳体温度的获取方法、装置、存储介质和电子设备
JP2013131081A (ja) 情報処理装置の制御プログラム、制御方法及び情報処理装置
TW201301140A (zh) 電子設備及其任務控制方法
WO2021016857A1 (zh) 一种手持云台的控制方法、设备、手持云台及存储介质
TW201803247A (zh) 不斷電的電源控制方法及具不斷電之電源的電子裝置
WO2021046735A1 (zh) 屏幕的控制方法和终端
CN107959736B (zh) 降低滤光片开裂风险的方法、装置和移动终端
US20140325639A1 (en) Electronic device and authentication method
WO2019128430A1 (zh) 带宽确定方法、装置、设备及存储介质
KR102417186B1 (ko) 노트북 컴퓨터의 동작 방법

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 16891171

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16891171

Country of ref document: EP

Kind code of ref document: A1