Method for dynamically adjusting threshold of distance sensor, and mobile terminal

A distance sensor and threshold technology, which is applied in the field of dynamic adjustment of distance sensor thresholds, can solve problems such as inconvenience in actual use, and achieve the effect of convenient use.

Active Publication Date: 2013-02-06
SHENZHEN TRANSSION HLDG CO LTD
4 Cites 49 Cited by

AI-Extracted Technical Summary

Problems solved by technology

[0005] In summary, the existing distance detection technology for mobile terminals during ...
View more

Abstract

The invention provides a method for dynamically adjusting a threshold of a distance sensor. The method comprises the following stepsf: when starting the distance sensor to converse, judging whether the distance sensor detects an approach state, if not, at least increasing a preset value or preset ratio to the approach state detection distance of the distance sensor one time within a preset system off-screen time T; judging whether the distance sensor detects the approach state according to the approach state detection distance after being adjusted each time, if the approach state is detected after the approach state detection distance is adjusted, switching a screen into an off-screen state from a bright screen state, and if the approach state is still not detected after the system off-screen time T is achieved, switching the screen into the off-screen state from the bright screen state. The invention also provides a mobile terminal, therefore, the problem that the distance sensor leaves out detection of the approach state when the mobile terminal converses can be avoided, so as to automatically turn off the screen, and the mobile terminal can automatically turn on the screen after the conversation is finished, so as to be convenient to use by the user.

Application Domain

Substation equipment

Technology Topic

Distance sensorsScreen time +2

Image

  • Method for dynamically adjusting threshold of distance sensor, and mobile terminal
  • Method for dynamically adjusting threshold of distance sensor, and mobile terminal
  • Method for dynamically adjusting threshold of distance sensor, and mobile terminal

Examples

  • Experimental program(1)

Example Embodiment

[0050] In order to make the objectives, technical solutions and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
[0051] figure 1 It is a schematic structural diagram of a mobile terminal of the present invention. The mobile terminal 100 can be a mobile phone, a PDA (Personal Digital Assistant), a tablet computer, etc., and the mobile terminal 100 includes a first judgment module 10 and a threshold adjustment module 20 , The second judgment module 30, the first screen-off module 40 and the second screen-off module 50, wherein:
[0052] The first judgment module 10 is used for judging whether the proximity sensor detects the proximity state when the proximity sensor is turned on, that is, whether the distance between the mobile terminal 100 and the user's head is less than the default proximity state detection distance. If the first judgment module 10 detects the approaching state, it can directly switch the screen from the on-screen state to the off-screen state.
[0053] The threshold adjustment module 20 is used to increase the proximity detection distance of the distance sensor at least once by a predetermined value or a predetermined ratio within a predetermined system off-screen time T (for example, 15 seconds) when the proximity state is not detected. It is easy to detect the approaching state.
[0054] The second judgment module 30 is used for judging whether the proximity sensor detects the proximity state according to the proximity detection distance after each adjustment.
[0055] The first screen-off module 40 is configured to switch the screen from the on-screen state to the off-screen state when the approaching state is detected after adjusting the approaching state detection distance. In this way, when the call is completed and the mobile terminal leaves the head, the mobile terminal 100 can still realize the automatic screen-on.
[0056] The second screen-off module 50 is used to switch the screen from the screen-on state to the screen-off state if the system does not detect the close state after the screen-off time T reaches. At this time, it means that the distance sensor is not close to the head during the call. At this time, the screen off time T set by the system will cause the mobile terminal 100 to automatically turn off the screen.
[0057] figure 2 It is a schematic structural diagram of a preferred mobile terminal of the present invention. The mobile terminal 100 includes a first judgment module 10, a threshold adjustment module 20, a second judgment module 30, a first screen-off module 40, a second screen-off module 50, and a third screen-off module. The screen module 60, the third judgment module 70, the screen bright module 80 and/or the recalibration module 90, wherein:
[0058] The first judging module 10 is used for judging whether the distance sensor detects the proximity state when the distance sensor is turned on for a call. In this embodiment, the distance sensor is a light value detection distance sensor. The principle of the light value detection distance sensor is: when the distance sensor detects the light value (the light value is the infrared light emitted by the distance sensor chip after being blocked by an object) When the reflected light value) is greater than the upper limit light threshold, an approach interruption occurs, where the upper limit light threshold determines the length of the detection distance.
[0059] The third screen-off module 60 is configured to directly switch the screen from the on-screen state to the off-screen state when the first judgment module 10 detects the approaching state.
[0060] The threshold adjustment module 20 further includes:
[0061] The setting sub-module 21 is used to divide the predetermined system screen-off time T into N levels if the first judgment module 10 does not detect the approaching state, and set the timer, the interval threshold value M, and the variable i. The initial value is. Preferably, the setting submodule 21 first obtains the system off-screen time T (for example, 15 seconds) set by the system, divides the system off-screen time T into N levels (for example, N=3), increases the timer, and sets the interval The timer is triggered at T/N; set variable i to determine whether the number of automatic adjustment thresholds is reached, the initial value of variable i is 0; set interval threshold M (for example, M=50) to ensure that the adjusted upper limit light threshold must be greater than The lower light threshold is M light values, the upper light threshold corresponds to the close state, and the lower light threshold corresponds to the far state, but there must be a certain interval threshold M between the upper light threshold and the lower light threshold, otherwise it will be in the close state and far away The critical point of the state is not stable enough to meet the purpose of the working principle of the distance sensor. At the beginning, the adjusted upper light threshold is set to the default upper threshold: that is, current_hi_threshold=hi_threshold.
[0062] The adjustment sub-module 22 is used to trigger the timer when the i-th T/N time arrives (that is, when the i-th level arrives), set i=i+1, and reduce the upper limit light threshold corresponding to the proximity detection distance by a predetermined value Value or predetermined ratio. For example, current_hi_threshold=(1-X%) current_hi_threshold, that is, adjust the upper limit light threshold to reduce it by X% (for example, 5%).
[0063] The second judgment module 30 further includes:
[0064] The first judging sub-module 31 is used to judge whether i low_thresldhold+M) simultaneously If yes, if both are established, it will be handled by the second judgment sub-module 32; otherwise, it will be handled by the second screen-off module 50.
[0065] The second judging sub-module 32 is used to judge whether the distance sensor detects the approaching state according to the adjusted upper limit light threshold. If the approaching state is detected, the approaching interrupt is generated and handed over to the first screen-off module 40 for processing, otherwise handed over to The adjustment sub-module 22 performs processing to dynamically adjust the threshold for i+1 times, and exits the process until (i low_thresldhold+M) is false.
[0066] The second screen-off module 50 is configured to switch the screen from the on-screen state to the off-screen state to save power consumption and end the entire process if the close state is not detected after the system off-screen time T arrives.
[0067] The first screen-off module 40 is configured to switch the screen from the on-screen state to the off-screen state if the approaching state is detected after adjusting the approaching state detection distance.
[0068] The third judgment module 70 is used for judging whether the distance sensor detects the far away state after the first screen-off module 40 switches the screen from the on-screen state to the off-screen state and the call is completed. Interrupted.
[0069] The screen-on module 80 is used to switch the screen from the off-screen state to the on-screen state if the far away state is detected, so that the user can use the mobile terminal 100 normally.
[0070] The recalibration module 90 is used to cancel the timer after the first screen-off module 40 switches the screen from the on-screen state to the off-screen state, and call the distance calibration interface to set the currently adjusted upper limit light threshold to the default Upper limit light threshold to ensure the reliability of the distance sensor.
[0071] The present invention dynamically adjusts the upper limit threshold of the distance to avoid the proximity interrupt from being missed by the distance sensor when the mobile terminal 100 is close to the head (and the interrupt is generally not missed when it is far away), resulting in the mobile terminal 100 being unable to light up the screen after the call is completed problem. In the present invention, before the mobile terminal automatically turns off the screen, an N-level dynamic adjustment distance upper limit threshold is set. The upper limit light threshold is inversely proportional to the approaching state detection distance, that is, reducing the distance upper limit light threshold makes the approaching state detection distance longer and makes approaching interruption Easier to produce.
[0072] image 3 It is a flow chart of the method for dynamically adjusting the threshold value of the distance sensor of the present invention, which can be used as figure 1 or figure 2 The illustrated implementation of the mobile terminal 100 includes the following steps:
[0073] Step S301, the first judging step, when the distance sensor is turned on to make a call, it is judged whether the distance sensor detects an approaching state. That is, it is detected whether the distance between the mobile terminal 100 and the user's head is less than the default proximity detection distance. If the first judgment module 10 detects the approaching state, it can directly switch the screen from the on-screen state to the off-screen state.
[0074] Step S302, the threshold adjustment step, if the proximity state is not detected, the proximity state detection distance of the distance sensor is increased at least once by a predetermined value or a predetermined ratio within the predetermined system off-screen time T, so that the proximity state can be detected more easily.
[0075] In step S303, the second judgment step is to judge whether the proximity sensor detects the proximity state according to the proximity detection distance after each adjustment.
[0076] Step S304, the first screen-off step, if the approaching state is detected after adjusting the approaching state detection distance, the screen is switched from the on-screen state to the off-screen state. In this way, when the call is completed and the mobile terminal leaves the head, the mobile terminal 100 can still realize the automatic screen-on.
[0077] Step S305, the second screen-off step, if the system does not detect the approaching state after the screen-off time T is reached, the screen is switched from the on-screen state to the off-screen state. At this time, it means that the distance sensor is never close to the head during the call. When the system screen-off time T is reached, the mobile terminal 100 will automatically turn off the screen.
[0078] Figure 4 It is a preferred flow chart of the method for dynamically adjusting the threshold value of the distance sensor of the present invention, which can be used as figure 2 The illustrated implementation of the mobile terminal 100 includes the following steps:
[0079] Step S401: Turn on the distance sensor to talk.
[0080] In step S402, it is judged whether the proximity sensor detects the approaching state, if yes, step S403 is executed, otherwise, step S404 is executed. In this embodiment, the distance sensor is a light value detection distance sensor.
[0081] In step S403, if the approaching state is detected, the screen is directly switched from the on-screen state to the off-screen state and the process is exited.
[0082] Step S404, if the approaching state is not detected, the system first obtains the system off-screen time T (for example, 15 seconds) set by the system, divides the system off-screen time T into N levels (for example, N=3), adds a timer, and sets Set the timer to be triggered every T/N; set variable i to determine whether the number of automatic adjustment thresholds is reached, the initial value of variable i is 0; set interval threshold M (for example, M=50) to ensure the upper limit light after adjustment The threshold must be greater than the lower light threshold M light values, the upper light threshold corresponds to the close state, the lower light threshold corresponds to the far state, but there must be a certain interval threshold M between the upper light threshold and the lower light threshold, otherwise it will be close The critical points of the state and the far state are not stable enough to meet the purpose of the working principle of the distance sensor. At the beginning, the adjusted upper light threshold is set to the default upper threshold: that is, current_hi_threshold=hi_threshold.
[0083] Step S405, trigger the timer when the i-th T/N time arrives (that is, when the i-th level arrives), execute the timer function, set i=i+1 in the timer function, and correspond to the proximity detection distance The upper limit light threshold is reduced by a predetermined value or a predetermined ratio, for example, current_hi_threshold=(1-X%) current_hi_threshold, that is, the upper limit light threshold is adjusted to reduce it by X% (for example, 5%).
[0084] Step S406: Determine whether (i low_thresldhold+M) is simultaneously established, that is, determine whether i
[0085] Step S407: According to the adjusted upper limit light threshold, it is judged whether the distance sensor detects the approaching state. If the approaching state is detected, step S409 is executed, otherwise, it returns to step S405, and the dynamic adjustment threshold is performed i+1 times until (i< =n&¤t_hi_threshold>low_thresldhold+M) is false to exit the process.
[0086] In step S408, if the system does not detect the close state after the screen-off time T is reached, the screen is switched from the on-screen state to the off-screen state to save power consumption, and the entire process is ended. Indicates that the distance sensor still detects the far away state after the threshold is adjusted for the ith time (i is the number of times the threshold is adjusted last time), indicating that the distance sensor is not close to the head during the call. At this time, the automatic screen-off time set by the system will cause the mobile terminal to automatically turn off the screen.
[0087] Step S409: If the proximity state is detected after adjusting the proximity state detection distance, the screen is switched from the on-screen state to the off-screen state. At this time, it means that the distance sensor has turned off the screen of the mobile terminal, and an approach interruption will be generated at this time.
[0088] Step S410: Cancel the timer, and call the distance calibration interface to set the currently adjusted upper limit light threshold to the default upper limit light threshold to complete the entire dynamic adjustment threshold process to ensure the reliability of the distance sensor, that is, the distance sensor performs the upper limit again The calibration of the threshold will be tested with the revised upper limit light threshold in the future.
[0089] In step S411, after the call is completed, it is determined whether the distance sensor detects the far away state, if yes, step S412 is executed, otherwise, step S411 is continued.
[0090] In step S412, if the far away state is detected, the screen is switched from the off-screen state to the on-screen state, so that the user can use the mobile terminal 100 normally.
[0091] In summary, the present invention dynamically adjusts the distance sensor threshold, that is, within the system screen-off time T, the proximity detection distance of the proximity sensor is increased at least once by a predetermined value or a predetermined ratio, so that the proximity status can be detected more easily, thereby avoiding The mobile terminal fails to detect the proximity state of the proximity sensor during a call, which causes the problem that the mobile terminal cannot automatically turn on the screen after the call is completed. Thereby, the mobile terminal of the present invention can increase the possibility of automatically turning off the screen due to the detection of the approaching state during a call. Therefore, when the call is completed and the mobile terminal leaves the head, the mobile terminal can still automatically turn on the screen, which is greatly convenient User use.
[0092] Of course, the present invention can also have various other embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and modifications according to the present invention, but these corresponding All changes and deformations shall belong to the protection scope of the appended claims of the present invention.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.

Similar technology patents

Household appliance control method and device and mobile terminal

InactiveCN103605531Aeasy to operateeasy to use
Owner:GD MIDEA AIR-CONDITIONING EQUIP CO LTD +1

Multi-stage oral-fluid testing device

ActiveUS20160121322A1easy to use
Owner:PREMIER BIOTECH LLC

System and method of monitoring temperature

InactiveUS7140768B2less susceptible to tampereasy to use
Owner:COLD CHAIN TECH

Wireless charging transmitter, receiver, charging device and wireless charging method

ActiveCN104158269ASimple codingeasy to use
Owner:湖南长城科技信息有限公司 +1

Classification and recommendation of technical efficacy words

  • easy to use
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products