CN106443639B - A kind of range calibration method and terminal - Google Patents

A kind of range calibration method and terminal Download PDF

Info

Publication number
CN106443639B
CN106443639B CN201610851482.0A CN201610851482A CN106443639B CN 106443639 B CN106443639 B CN 106443639B CN 201610851482 A CN201610851482 A CN 201610851482A CN 106443639 B CN106443639 B CN 106443639B
Authority
CN
China
Prior art keywords
value
uproar
threshold value
close
range sensor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201610851482.0A
Other languages
Chinese (zh)
Other versions
CN106443639A (en
Inventor
周贞卿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jinli Communication Equipment Co Ltd
Original Assignee
Shenzhen Jinli Communication Equipment Co Ltd
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 Shenzhen Jinli Communication Equipment Co Ltd filed Critical Shenzhen Jinli Communication Equipment Co Ltd
Priority to CN201610851482.0A priority Critical patent/CN106443639B/en
Publication of CN106443639A publication Critical patent/CN106443639A/en
Application granted granted Critical
Publication of CN106443639B publication Critical patent/CN106443639B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/48Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00
    • G01S7/497Means for monitoring or calibrating

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention discloses a kind of range calibration method and terminals, if wherein method includes: to detect the corresponding trigger signal of range sensor, the initial bottom for then obtaining the range sensor is made an uproar value, and is calculated according to initial bottom value of making an uproar close to threshold value and far from threshold value;It makes an uproar value at the current bottom for obtaining the range sensor;According to the current bottom make an uproar value to described close to threshold value and the separate threshold value carries out dynamic update.The embodiment of the present invention passes through dynamic calibration mode, it can make the state that exact value is calibrated to close to threshold value and far from threshold value, so that accurate detection object is close and separate, so that the perceived distance of range sensor is accurately calibrated, to improve the operating experience and intelligent level of user.

Description

A kind of range calibration method and terminal
Technical field
The present invention relates to electronic technology field more particularly to a kind of range calibration methods and terminal.
Background technique
Currently, range sensor (Proximity Sensor, P-sensor) has become the standard configuration of intelligent terminal, When there is P-sensor upper area of the object close to terminal, terminal system will close display screen, the master control of simultaneity factor Device processed also enters sleep state, has the function that power saving and false-touch prevention, and when object far from when, master controller is waken up, display Screen is also lighted again, and terminal user is allowed to carry out other operations.
The testing principle of P-sensor be the end P-sensor have a light emitting diode (Light Emitting Diode, LED) infraluminescence module, the infraluminescence module can periodically issue infrared light pulse, and the wavelength of infrared light mainstream uses at present Between 550nm~850nm, when have object close to when, P-sensor, which receives reflected infrared light, slowly to be increased, object Closer, the infrared light received is more;Object far from when, the infrared light that P-sensor is detected can be reduced accordingly, and object is got over When remote, the infrared light received is fewer, thus can by detection infrared light number determine the close and separate of object.But Due to one layer of glass cover-plate of cover in the P-sensor module of current most terminals, and P-sensor module is from terminal glass Lower surface have a certain distance, when there is spot on glass cover-plate or when P-sensor is remote one at a distance from lower glass surface Point or it is close some when can all influence the infrared light reflection amount of P-sensor, and in ambient enviroment difference light sources also contain it is rich Rich infrared light, leads to the infrared photo-labile detected.Therefore the calibration of P-sensor is introduced.
Summary of the invention
The embodiment of the present invention provides a kind of range calibration method and terminal, and the perceived distance for the sensor that can adjust the distance carries out Dynamic accurate alignment.
In a first aspect, the embodiment of the invention provides a kind of range calibration methods, this method comprises:
If detecting the corresponding trigger signal of range sensor, the initial bottom for obtaining the range sensor is made an uproar value, and Value calculating is made an uproar close to threshold value and far from threshold value according to the initial bottom;
It makes an uproar value at the current bottom for obtaining the range sensor;
According to the current bottom make an uproar value to described close to threshold value and the separate threshold value carries out dynamic update.
On the other hand, the embodiment of the invention provides a kind of terminal, which includes:
Initialization unit, if obtaining the range sensor for detecting the corresponding trigger signal of range sensor Initial bottom make an uproar value, and calculated according to initial bottom value of making an uproar close to threshold value and far from threshold value;
Acquiring unit, the current bottom for obtaining the range sensor are made an uproar value;
Updating unit, for carrying out dynamic more with the separate threshold value close to threshold value to described according to current bottom value of making an uproar Newly.
The embodiment of the present invention obtains the initial bottom of range sensor when detecting the corresponding trigger signal of range sensor It makes an uproar value, calculates close to threshold value and make an uproar value, and root far from the current bottom for after threshold value, obtaining range sensor according to initial bottom value of making an uproar According to the current bottom make an uproar value to described close to threshold value and the separate threshold value carries out dynamic update.Pass through this dynamic calibration side Formula makes the state that exact value is calibrated to close to threshold value and far from threshold value, so that accurate detection object is close and separate, so that The perceived distance of range sensor is accurately calibrated, to improve the operating experience and intelligent level of user.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of schematic flow diagram for range calibration method that the embodiment of the present invention one provides;
Fig. 2 is a kind of schematic flow diagram of range calibration method provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of schematic block diagram for terminal that the embodiment of the present invention three provides;
Fig. 4 is a kind of schematic block diagram for terminal that the embodiment of the present invention four provides;
Fig. 5 is a kind of schematic block diagram for terminal that the embodiment of the present invention five provides.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded Body, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt Be construed to " when ... " or " once " or " in response to determination " or " in response to detecting ".Similarly, phrase " if it is determined that " or " if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In the specific implementation, terminal described in the embodiment of the present invention is including but not limited to such as with touch sensitive surface The mobile phone, laptop computer or tablet computer of (for example, touch-screen display and/or touch tablet) etc it is other just Portable device.It is to be further understood that in certain embodiments, the equipment is not portable communication device, but there is touching Touch the desktop computer of sensing surface (for example, touch-screen display and/or touch tablet).
In following discussion, the terminal including display and touch sensitive surface is described.It is, however, to be understood that It is that terminal may include one or more of the other physical user-interface device of such as physical keyboard, mouse and/or control-rod.
Terminal supports various application programs, such as one of the following or multiple: drawing application program, demonstration application journey Sequence, word-processing application, website create application program, disk imprinting application program, spreadsheet applications, game application Program, telephony application, videoconference application, email application, instant messaging applications, exercise Support application program, photo management application program, digital camera application program, digital camera application program, web-browsing application Program, digital music player application and/or video frequency player application program.
The various application programs that can be executed at the terminal can be used such as touch sensitive surface at least one is public Physical user-interface device.It can adjust and/or change among applications and/or in corresponding application programs and touch sensitive table The corresponding information shown in the one or more functions and terminal in face.In this way, the public physical structure of terminal is (for example, touch Sensing surface) it can support the various application programs with user interface intuitive and transparent for a user.
Embodiment one:
It is a kind of schematic flow diagram for range calibration method that the embodiment of the present invention one provides, this implementation referring to Fig. 1, Fig. 1 The executing subject of example can be terminal, can be the equipment such as mobile phone or other intelligent terminals.Range calibration side shown in FIG. 1 Method may comprise steps of:
If S101, detecting the corresponding trigger signal of range sensor, the initial bottom for obtaining the range sensor is made an uproar value, And value calculating is made an uproar close to threshold value and far from threshold value according to the initial bottom.
Specifically, when range sensor is triggered, terminal detects that the corresponding trigger signal of range sensor, terminal obtain It takes the initial bottom of range sensor to make an uproar value, and is calculated according to initial bottom value of making an uproar close to threshold value and far from threshold value.
Usually there is an infrared LED lamp in the outside of range sensor, when range sensor enables, LED can be to External emission goes out the infrared light of certain frequency, and the light-sensitive device inside range sensor can detect it is reflected infrared Light, the infrared light value are that the initial bottom of range sensor is made an uproar value.
Terminal makes an uproar value calculating close to threshold value and far from threshold value according to the initial bottom of range sensor.It can be used to close to threshold value It is judged whether or not object close to terminal, can be used to judge whether have object far from terminal in the ban far from threshold value.
It should be noted that distance passes when needing to use range sensor, i.e. range sensor is triggered Sensor can enter enabled state, and initial bottom value of making an uproar is acquisition when range sensor is triggered.For example, when terminal dials electricity When talking about or receive calls, range sensor can be triggered, and terminal obtains initial bottom and makes an uproar value at this time, and calculating is close to threshold Value and separate threshold value.
S102, the current bottom for obtaining range sensor are made an uproar value.
Specifically, after range sensor enters enabled state, terminal is in real time or timing acquisition range sensor is worked as Preceding bottom is made an uproar value.
The current bottom that terminal obtains range sensor by detecting current infrared light value is made an uproar value.
Further, the current bottom that terminal can obtain range sensor in real time in such a way that triggering is interrupted is made an uproar value, or Person can also be made an uproar value at the current bottom of timing acquisition range sensor by way of poll.Concrete mode can according to actual needs into Row selection, herein with no restrictions.
S103, value of being made an uproar according to current bottom carry out dynamic update to close to threshold value and far from threshold value.
Specifically, terminal is made an uproar value according to the current bottom of acquisition, it is judged whether or not object proximity or far from terminal, and Again value calibration is made an uproar close to threshold value and far from threshold value according to current bottom.
It should be noted that if just thering is object to block in range sensor when range sensor is triggered Top causes range sensor top object reflected infrared light to be also mistakenly considered bottom and makes an uproar, at this time terminal get just Value is made an uproar at beginning bottom will be abnormal higher, thus be calculated close to threshold value and also can be higher far from threshold value, and close to threshold value and remote It is to determine whether judgment basis that object is close and separate with making a return journey from threshold value, then sentences extremely when close to threshold value and far from threshold value The inevitable inaccuracy of disconnected result, thus cannot effectively object close to when close the peripheral hardwares such as display screen and reach power saving and false-touch prevention Effect.Therefore in order to solve this problem, range sensor it is enabled after, terminal in real time or timing acquisition Distance-sensing The current bottom of device is made an uproar value, and is recalculated according to current bottom value of making an uproar close to threshold value and far from threshold value, is made close to threshold value and far from threshold The state for the exact value that value calibration is blocked to no object, so that accurate detection object is close and separate.
From the exemplary range calibration method of above-mentioned Fig. 1 it is found that in the present embodiment, the corresponding touching of range sensor is being detected When signalling, the initial bottom for obtaining range sensor is made an uproar value, is calculated according to initial bottom value of making an uproar close to threshold value and far from after threshold value, The current bottom for obtaining range sensor is made an uproar value, and makes an uproar value to close to threshold value and separate threshold value progress dynamic update according to current bottom. By this dynamic calibration mode, make the state that exact value is calibrated to close to threshold value and far from threshold value, thus accurate detectable substance Body it is close and separate so that the perceived distance of range sensor is accurately calibrated, to improve the operating body of user It tests and intelligent level.
Embodiment two:
Referring to fig. 2, Fig. 2 is a kind of schematic flow diagram of range calibration method provided by Embodiment 2 of the present invention, this implementation The executing subject of example can be terminal, can be the equipment such as mobile phone or other intelligent terminals.Range calibration side shown in Fig. 2 Method may comprise steps of:
If S201, detecting the corresponding trigger signal of range sensor, the bottom of the range sensor preset quantity is obtained It makes an uproar value.
Specifically, when range sensor is triggered, terminal detects that the corresponding trigger signal of range sensor, terminal obtain The initial bottom of range sensor preset quantity is taken to make an uproar value.
Wherein, preset quantity can be 10, that is, obtains 10 bottoms and make an uproar value, but it is not limited to this, and specific preset quantity can To be configured according to the actual situation, herein with no restrictions.
S202, the bottom for calculating preset quantity make an uproar the average value of value, set initial bottom for the average value and make an uproar value.
Specifically, the bottom for calculating preset quantity is made an uproar the average value of value, and initial bottom when being triggered as range sensor is made an uproar Value.
The sum of S203, value that initial bottom is made an uproar and preset separate threshold shift are disposed remotely from threshold value.
Specifically, initial bottom make an uproar be worth preset separate threshold shift and for far from threshold value.
S204, value that initial bottom is made an uproar and the preset sum close to threshold shift are disposed proximate to threshold value.
Specifically, initial bottom make an uproar be worth it is preset close to threshold shift and for close to threshold value.
Wherein, preset separate threshold shift can be set to 100, preset to can be set to close to threshold shift 150, but it is not limited to this, specific according to the actual situation to be set far from threshold shift and close to threshold shift It sets, herein with no restrictions.The standard shielded and more than 5cm Shi Liangping of going out when being usually lower than 2cm according to object and terminal distance carries out Setting.
S205, the current bottom for obtaining range sensor are made an uproar value.
Specifically, after range sensor enters enabled state, the terminal infrared light value current by detection, in real time or The current bottom of timing acquisition range sensor is made an uproar value, and judge current bottom make an uproar value whether be less than it is current far from threshold value, and judgement Whether bottom value of making an uproar is greater than close to threshold value.
Further, the current bottom that terminal can obtain range sensor in real time in such a way that triggering is interrupted is made an uproar value, or Person can also be made an uproar value at the current bottom of timing acquisition range sensor by way of poll.Concrete mode can according to actual needs into Row selection, herein with no restrictions.
Terminal executes step S206 when confirming that value is made an uproar less than far from threshold value in current bottom;Confirming that current bottom value of making an uproar is greater than When close to threshold value, step S207 is executed.
If S206, current bottom make an uproar, value is less than separate the threshold value, will be far from threshold value be updated to current bottom make an uproar value with preset Droop value difference, and by close to threshold value be updated to current bottom make an uproar value and it is preset close to threshold shift and.
Specifically, if current bottom is made an uproar, value is less than far from threshold value, illustrates have object far from range sensor, terminal at this time Using current bottom make an uproar value and preset droop value difference as updated separate threshold value, current bottom value of making an uproar is connect with preset The sum of nearly threshold shift as updated close to threshold value so that updated separate threshold value and reducing close to threshold value.
Wherein, droop value is a constant, usually can be set to 50, and but it is not limited to this, specific fixed inclined Difference can be configured according to the actual situation, herein with no restrictions.
It should be noted that being under normal conditions the positive number greater than zero close to threshold value and far from threshold value, if current bottom The difference of value of making an uproar and preset droop value then can be updated directly to zero far from threshold value less than zero.
Further, if current bottom is made an uproar, value is less than far from threshold value, can be by way of triggering far from interrupting Reason.When terminal is detected far from interruption, then it is updated according to current bottom value of making an uproar to separate threshold value and close to threshold value.
It is understood that in embodiments of the present invention, when value is made an uproar less than far from threshold value in current bottom, updating far from threshold value With close to threshold value, in other embodiments, or value is made an uproar when being less than or equal to far from threshold value in current bottom, updates separate threshold Value and close to threshold value.
Optionally, it if the method can also include: that value is made an uproar less than the separate threshold value in the current bottom, reports separate Event.
Specifically, terminal, which is reported, is handled far from event to application layer, if application layer is worked as according to far from event judgement The devices such as preceding display screen are closed, and the operation such as can execute and enable the devices such as display screen again, and wake up system.
If S207, current bottom make an uproar, value greater than described close to threshold value, make an uproar value, and will be remote by the smallest base for obtaining range sensor From threshold value be updated to smallest base make an uproar value and preset separate threshold shift and, range sensor will be updated to close to threshold value Maximum range.
Specifically, if current bottom is made an uproar, value is greater than close to threshold value, illustrates there is object proximity range sensor, terminal at this time The smallest base for obtaining range sensor is made an uproar value, using smallest base make an uproar value and preset separate threshold shift sum as updated Far from threshold value, and using the maximum range of range sensor as updated close to threshold value.Wherein, smallest base value of making an uproar refers to distance The sensor bottom that terminal has currently been got under enabled state is made an uproar the minimum value in value, and the maximum range of range sensor is Refer to the infrared light value of maximum that range sensor can receive, such as maximum range is 1024, i.e., it is maximum to can receive back red Outer light value is 1024.
Further, if current bottom is made an uproar, value is greater than close to threshold value, can be triggering close to by way of interrupting Reason.When terminal is detected close to interruption, then it is updated according to current bottom value of making an uproar to far from threshold value and close to threshold value.
It is understood that in embodiments of the present invention, current bottom make an uproar value be greater than close to threshold value when, update far from threshold value With close to threshold value, in other embodiments, or value is made an uproar when being more than or equal to close to threshold value in current bottom, updates separate threshold Value and close to threshold value.
Optionally, if the method can also include: the current bottom make an uproar value be greater than it is described close to threshold value, report close Event.
Specifically, terminal is reported close to event and is handled to application layer, and application layer can be carried out according to this close to event The devices such as current display screen are closed, and sleeping system etc. operates.
In order to better understand the present embodiment, now it is described as follows by a specific application example.
Assuming that bottom of the mobile phone terminal when no any object is blocked is made an uproar, value is 300, it is assumed that separate threshold values offset is 100, Close to threshold values offset be 150, then under no any object circumstance of occlusion it is available close to threshold value be 300+150=450, far It is 300+100=400 from threshold value.
When mobile phone terminal is when an incoming call sound phone, just there is object to block above range sensor, this When according to the initial bottom of step S201 to the calculated range sensor of step S202 make an uproar value be 700, it is assumed that far from threshold values deviate Amount is 100, is 150 close to threshold values offset, then calculated close to threshold value 700+150=according to step S203 to step S204 850, it is 700+100=800 far from threshold value.If using at this time close to threshold value and far from threshold value as judging whether there is object Close and separate foundation, then it is understood that object closely can just must be considered having object close by mobile phone terminal.But If blocking the object above range sensor during mobile phone connects phone and being removed, then obtained according to step S205 The current bottom taken value of making an uproar becomes smaller, and if judge that current bottom value of making an uproar is less than far from threshold value according to step S206, to separate threshold value It is updated with close to threshold value, specifically, if current bottom is made an uproar, value is 500, according to the updated separate threshold value of step S206 For 500-50=450, updated close to threshold value is 500+150=650, is continued when blocking the object above range sensor Far from when, it is assumed that for object infinitely far from when blocking without any object, current bottom value of making an uproar is restored to 300, then basis at this time The updated separate threshold values that step S206 is obtained be 300-50=250, it is updated close to threshold values be 300+150=450;And When there is object proximity, obtaining current the smallest bottom value of making an uproar according to step S207 is 300, then updated close to threshold value is maximum Range 1024, updated separate threshold value are 300+100=400.As can be seen that at this time close to threshold values and far from threshold values It is calibrated to threshold range when no any object is blocked.
From the exemplary range calibration method of above-mentioned Fig. 2 it is found that in the present embodiment, firstly, detecting range sensor pair When the trigger signal answered, the bottom for obtaining range sensor preset quantity is made an uproar value, and the bottom of calculated preset quantity is made an uproar value Average value is made an uproar value as initial bottom, and acquisition that can be relatively accurate by the way of average value is calculated after this multiple specimen samples Initial bottom is made an uproar value, and the interference of individual exceptional samples is avoided;Then, value calculating is made an uproar close to threshold value and far from threshold value according to initial bottom Afterwards, terminal is in real time or the current bottom of timing acquisition range sensor is made an uproar value, if current bottom is made an uproar, value, will be remote less than separate threshold value Current bottom is updated to from threshold value to make an uproar the difference of value and preset droop value, and will be updated to current bottom close to threshold value and be made an uproar value and pre- If the sum close to threshold shift, if current bottom is made an uproar, value is made an uproar value greater than the smallest base for close to threshold value, obtaining range sensor, And will be far from threshold value be updated to smallest base make an uproar value and preset separate threshold shift and, will be updated to close to threshold value apart from biography The maximum range of sensor.By this dynamic calibration mode, make the state that exact value is calibrated to close to threshold value and far from threshold value, So that accurate detection object is close and separate, so that the perceived distance of range sensor is accurately calibrated, to improve The operating experience and intelligent level of user;Finally, passing through on the basis of close to threshold value and separate threshold value by accurate alignment It reports close to event and far from event, enables application layer current according to closing is accurately executed close to event and far from event The devices such as display screen and sleeping system, and the operation such as the devices such as display screen are enabled again and wake up system, it further improves Intelligent level and the operating experience for promoting user.
Embodiment three:
Referring to Fig. 3, Fig. 3 is a kind of terminal schematic block diagram that the embodiment of the present invention three provides.For ease of description, only show Part related to the embodiment of the present invention is gone out.The exemplary terminal 300 of Fig. 3 can be a kind of distance of the offer of previous embodiment one The executing subject of calibration method.The exemplary terminal 300 of Fig. 3 specifically includes that initialization unit 31, acquiring unit 32 and updating unit 33.Detailed description are as follows for each unit:
Initialization unit 31, if obtaining the range sensor for detecting the corresponding trigger signal of range sensor Initial bottom make an uproar value, and calculated according to the initial bottom got value of making an uproar close to threshold value and far from threshold value;
Acquiring unit 32, the current bottom for obtaining range sensor are made an uproar value;
Value is made an uproar to close to threshold value and far from threshold value progress in updating unit 33, the current bottom for being obtained according to acquiring unit 32 Dynamic updates.
Each unit realizes the process of respective function in a kind of terminal provided in this embodiment, specifically refers to 1 institute of earlier figures Show the description of embodiment, details are not described herein again.
From the exemplary terminal 300 of above-mentioned Fig. 3 it is found that in the present embodiment, the corresponding triggering letter of range sensor is being detected Number when, the initial bottom for obtaining range sensor is made an uproar value, is calculated according to initial bottom value of making an uproar close to threshold value and far from after threshold value, is obtained The current bottom of range sensor is made an uproar value, and carries out dynamic update to close to threshold value and far from threshold value according to current bottom value of making an uproar.Pass through This dynamic calibration mode makes the state that exact value is calibrated to close to threshold value and far from threshold value, thus accurate detection object It is close and separate so that the perceived distance of range sensor is accurately calibrated, thus improve user operating experience and Intelligent level.
Example IV:
Referring to Fig. 4, Fig. 4 is a kind of terminal schematic block diagram that the embodiment of the present invention four provides.For ease of description, only show Part related to the embodiment of the present invention is gone out.The exemplary terminal 400 of Fig. 4 can be a kind of of the offer of previous embodiment two The executing subject of range calibration method.The exemplary terminal 400 of Fig. 4 specifically includes that initialization unit 41, acquiring unit 42 and updates Unit 43.Detailed description are as follows for each unit:
Initialization unit 41, if obtaining the range sensor for detecting the corresponding trigger signal of range sensor Initial bottom make an uproar value, and calculated according to the initial bottom got value of making an uproar close to threshold value and far from threshold value;
Acquiring unit 42, the current bottom for obtaining range sensor are made an uproar value;
Value is made an uproar to close to threshold value and far from threshold value progress in updating unit 43, the current bottom for being obtained according to acquiring unit 42 Dynamic updates.
Further, updating unit 43 includes:
Far from calibration unit 431, if making an uproar value less than far from threshold value for the current bottom that acquiring unit 42 obtains, will be far from Threshold value is updated to current bottom and makes an uproar the difference of value and preset droop value, and will be updated to current bottom close to threshold value and make an uproar value and default The sum close to threshold shift.
Further, updating unit 43 further include:
Close to calibration unit 432, if being greater than for the current bottom that acquiring unit 42 obtains value of making an uproar close to threshold value, acquisition away from Smallest base from sensor is made an uproar value, and will be far from threshold value and be updated to the smallest base making an uproar value and preset separate threshold shift With the maximum range of range sensor will be updated to close to threshold value.
Further, initialization unit 41 includes:
Trigger unit 411, if it is pre- to obtain the range sensor for detecting the corresponding trigger signal of range sensor The value if bottom of quantity is made an uproar;
Computing unit 412 makes an uproar the average value of value for calculating the bottom of preset quantity of the acquisition of trigger unit 411, this is put down Mean value is set as initial bottom and makes an uproar value;
Far from threshold setting unit 413, the initial bottom for computing unit 412 to be calculated make an uproar value with it is preset separate The sum of threshold shift is disposed remotely from threshold value;
Close to threshold setting unit 414, the initial bottom for computing unit 412 to be calculated is made an uproar value and preset close The sum of threshold shift is disposed proximate to threshold value.
Further, terminal 400 further include:
Far from event reporting unit 44, if the current bottom for the acquisition of acquiring unit 42 is made an uproar, value is less than far from threshold value, on It reports far from event;
Close to event reporting unit 45, if the current bottom for the acquisition of acquiring unit 42 is made an uproar, value is greater than close to threshold value, on It reports close to event.
Each unit realizes the process of respective function in a kind of terminal provided in this embodiment, specifically refers to 2 institute of earlier figures Show the description of embodiment, details are not described herein again.
From the exemplary terminal 400 of above-mentioned Fig. 4 it is found that in the present embodiment, firstly, detecting the corresponding touching of range sensor When signalling, the bottom for obtaining range sensor preset quantity is made an uproar value, and the bottom of calculated preset quantity is made an uproar the average value of value It makes an uproar value as initial bottom, the initial bottom of acquisition that can be relatively accurate by the way of average value is calculated after this multiple specimen samples It makes an uproar value, avoids the interference of individual exceptional samples;Then, value calculating is made an uproar close to after threshold value and separate threshold value according to initial bottom, terminal In real time or the current bottom of timing acquisition range sensor is made an uproar value, if current bottom is made an uproar, value will be far from threshold value less than separate threshold value It is updated to current bottom to make an uproar the difference of value and preset droop value, and current bottom value of making an uproar will be updated to close to threshold value and connect with preset Sum of nearly threshold shift, if current bottom is made an uproar, value is made an uproar value greater than the smallest base for close to threshold value, obtaining range sensor, and will be remote From threshold value be updated to smallest base make an uproar value and preset separate threshold shift and, range sensor will be updated to close to threshold value Maximum range.By this dynamic calibration mode, make the state that exact value is calibrated to close to threshold value and far from threshold value, thus quasi- Really detection object is close and separate, so that the perceived distance of range sensor is accurately calibrated, to improve user Operating experience and intelligent level;Finally, being connect on the basis of close to threshold value and separate threshold value by accurate alignment by reporting Nearly event and separate event, enable application layer accurately to execute according to close to event and separate event and close current display screen Equal devices and sleeping system, and the operation such as the devices such as display screen are enabled again and wake up system, further improve intelligence Operating experience that is horizontal and promoting user.
Embodiment five:
Referring to Fig. 5, Fig. 5 is a kind of terminal schematic block diagram that the embodiment of the present invention five provides.The present embodiment shown in fig. 5 In terminal 500 may include: one or more processors 501 (one is only shown in Fig. 5);One or more input equipments 502 (one is only shown in Fig. 5), one or more output equipments 503 (one is only shown in Fig. 5), memory 504.Above-mentioned place Reason device 501, input equipment 502, output equipment 503 and memory 504 are connected by bus 505.Memory 504 refers to for storing It enables, processor 501 is used to execute the instruction of the storage of memory 504.
Wherein, processor 501 is used for:
If detecting the corresponding trigger signal of range sensor, the initial bottom for obtaining the range sensor is made an uproar value, and root Value calculating is made an uproar close to threshold value and far from threshold value according to the initial bottom got;
It makes an uproar value at the current bottom for obtaining range sensor;
Value is made an uproar to close to threshold value and far from threshold value progress dynamic update according to current bottom.
Further, processor 501 is also used to:
If current bottom is made an uproar, value is less than far from threshold value, will be far from threshold value and be updated to current bottom making an uproar value and preset droop The difference of value, and if being less than current bottom value of making an uproar is updated to close to threshold value close to threshold shift and current bottom value of making an uproar with preset Far from threshold value, then it will be far from threshold value and be updated to current bottom making an uproar the difference of value and preset droop value, and will be updated close to threshold value For current bottom make an uproar value and it is preset close to threshold shift and.
Further, processor 501 is also used to:
If current bottom is made an uproar, value is made an uproar value greater than the smallest base for close to threshold value, obtaining range sensor, and will be far from threshold value more It is new for smallest base make an uproar value and preset separate threshold shift and, the maximum of range sensor will be updated to close to threshold value Journey.
Further, processor 501 is also used to:
If detecting the corresponding trigger signal of range sensor, the bottom for obtaining the range sensor preset quantity is made an uproar value;
The bottom for calculating preset quantity is made an uproar the average value of value, is set initial bottom for the average value and is made an uproar value;
The make an uproar sum of value and preset separate threshold shift of initial bottom is disposed remotely from threshold value;
Value is made an uproar at initial bottom and the preset sum close to threshold shift is disposed proximate to threshold value.
Further, processor 501 is also used to:
If current bottom is made an uproar, value is less than far from threshold value, reports far from event;
If current bottom is made an uproar, value is greater than close to threshold value, reports close to event.
It should be appreciated that in embodiments of the present invention, alleged processor 501 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at Reason device is also possible to any conventional processor etc..
Input equipment 502 may include that Trackpad, fingerprint adopt sensor (for acquiring the finger print information and fingerprint of user Directional information), light sensor (for detecting the intensity of light), microphone etc., output equipment 503 may include display (LCD etc.), loudspeaker etc..
The memory 504 may include read-only memory and random access memory, and to processor 501 provide instruction and Data.The a part of of memory 504 can also include nonvolatile RAM.For example, memory 504 can also be deposited Store up the information of device type.
In the specific implementation, processor 501 described in the embodiment of the present invention and the executable present invention of input equipment 502 are real Implementation described in a kind of range calibration method that example one and embodiment two provide is applied, the embodiment of the present invention three also can be performed With the implementation of terminal described in example IV, details are not described herein.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not It is considered as beyond the scope of this invention.
It is apparent to those skilled in the art that for convenience of description and succinctly, the end of foregoing description The specific work process at end and unit, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
In several embodiments provided herein, it should be understood that disclosed terminal and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.In addition, shown or discussed phase Mutually between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication of device or unit Connection is also possible to electricity, mechanical or other form connections.
The steps in the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.
Unit in the terminal of that embodiment of the invention can be combined, divided and deleted according to actual needs.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.Some or all of unit therein can be selected to realize the embodiment of the present invention according to the actual needs Purpose.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, is also possible to two or more units and is integrated in one unit.It is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right It is required that protection scope subject to.

Claims (8)

1. a kind of range calibration method characterized by comprising
If detecting the corresponding trigger signal of range sensor, the initial bottom for obtaining the range sensor is made an uproar value, and according to Initial bottom value of making an uproar is calculated close to threshold value and far from threshold value, and value is made an uproar when being that the range sensor enables in the initial bottom, institute State the infrared light value for the infrared light that the light-sensitive device inside range sensor detects;
The current bottom for obtaining the range sensor is made an uproar value, and current bottom value of making an uproar is photosensor inside the range sensor The infrared light value for the infrared light that part real-time detection arrives;
According to the current bottom make an uproar value to described close to threshold value and the separate threshold value carries out dynamic update;
It is described according to the current bottom make an uproar value to it is described close to threshold value carry out dynamic with the separate threshold value and update include:
If the current bottom is made an uproar value be less than separate the threshold value, by separate the threshold value be updated to the current bottom make an uproar value in advance If droop value difference, and be updated to the current bottom by described close to threshold value and make an uproar value and preset close to threshold shift Sum.
2. the method according to claim 1, wherein it is described according to the current bottom make an uproar value to described close to threshold value Dynamic update is carried out with the separate threshold value further include:
If the current bottom is made an uproar, value is greater than described close to threshold value, and the smallest base for obtaining the range sensor is made an uproar value, and by institute State far from threshold value be updated to the smallest base make an uproar value and preset separate threshold shift and, be updated to described close to threshold value The maximum range of the range sensor, smallest base value of making an uproar refer to that range sensor terminal under enabled state is current The bottom got is made an uproar the minimum value in value.
3. method according to claim 1 or 2, which is characterized in that if described detect the corresponding triggering of range sensor Signal, the then initial bottom for obtaining the range sensor are made an uproar value, and are calculated according to initial bottom value of making an uproar close to threshold value and separate Threshold value includes:
If detecting the corresponding trigger signal of range sensor, the bottom for obtaining the range sensor preset quantity is made an uproar value;
The bottom for calculating the preset quantity is made an uproar the average value of value, is set initial bottom for the average value and is made an uproar value;
The make an uproar sum of value and preset separate threshold shift of the initial bottom is disposed remotely from threshold value;
Value is made an uproar at the initial bottom and the preset sum close to threshold shift is disposed proximate to threshold value.
4. the method according to any one of claims 1 and 2, which is characterized in that described to obtain working as the range sensor Preceding bottom is made an uproar after value, the method also includes:
If the current bottom is made an uproar, value is less than the separate threshold value, reports far from event;
If the current bottom is made an uproar, value is greater than described close to threshold value, reports close to event.
5. a kind of terminal characterized by comprising
Initialization unit, if obtaining the first of the range sensor for detecting the corresponding trigger signal of range sensor Beginning bottom is made an uproar value, and is calculated according to initial bottom value of making an uproar close to threshold value and far from threshold value, and value is made an uproar as the distance in the initial bottom When sensor enables, the infrared light value for the infrared light that the light-sensitive device inside the range sensor detects;
Acquiring unit, the current bottom for obtaining the range sensor are made an uproar value, and current bottom value of making an uproar is the Distance-sensing The infrared light value for the infrared light that light-sensitive device real-time detection inside device arrives;
Updating unit, for according to the current bottom make an uproar value to described close to threshold value and the separate threshold value carries out dynamic update;
The updating unit includes:
Far from calibration unit, if making an uproar value less than the separate threshold value for the current bottom, the separate threshold value is updated to The current bottom is made an uproar the difference of value and preset droop value, and is updated to the current bottom by described close to threshold value and is made an uproar value and pre- If the sum close to threshold shift.
6. terminal according to claim 5, which is characterized in that the updating unit further include:
Close to calibration unit, if for the current bottom make an uproar value be greater than it is described close to threshold value, obtain the range sensor Smallest base is made an uproar value, and by the separate threshold value be updated to the smallest base make an uproar value and preset separate threshold shift and, general The maximum range that the range sensor is updated to close to threshold value, smallest base value of making an uproar refer to that the range sensor exists The bottom that terminal has currently been got under enabled state is made an uproar the minimum value in value.
7. terminal according to claim 5 or 6, which is characterized in that the initialization unit includes:
Trigger unit, if obtaining the range sensor present count for detecting the corresponding trigger signal of range sensor The bottom of amount is made an uproar value;
Computing unit, the bottom for calculating the preset quantity are made an uproar the average value of value, are set initial bottom for the average value and are made an uproar Value;
Far from threshold setting unit, for the make an uproar sum of value and preset separate threshold shift of the initial bottom to be disposed remotely from Threshold value;
Close to threshold setting unit, for initial bottom value of making an uproar to be disposed proximate to the preset sum close to threshold shift Threshold value.
8. terminal according to claim 5 or 6, which is characterized in that the terminal further include:
Far from event reporting unit, if making an uproar value less than the separate threshold value for the current bottom, report far from event;
Close to event reporting unit, if for the current bottom make an uproar value be greater than it is described close to threshold value, report close to event.
CN201610851482.0A 2016-09-26 2016-09-26 A kind of range calibration method and terminal Expired - Fee Related CN106443639B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610851482.0A CN106443639B (en) 2016-09-26 2016-09-26 A kind of range calibration method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610851482.0A CN106443639B (en) 2016-09-26 2016-09-26 A kind of range calibration method and terminal

Publications (2)

Publication Number Publication Date
CN106443639A CN106443639A (en) 2017-02-22
CN106443639B true CN106443639B (en) 2019-05-17

Family

ID=58170253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610851482.0A Expired - Fee Related CN106443639B (en) 2016-09-26 2016-09-26 A kind of range calibration method and terminal

Country Status (1)

Country Link
CN (1) CN106443639B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791209A (en) * 2017-03-10 2017-05-31 上海传英信息技术有限公司 The self-checking device and method of distance of mobile terminal sensor
CN106973163B (en) * 2017-03-30 2020-07-14 深圳市君利信达科技有限公司 Dynamic calibration method and device of infrared proximity sensor
CN107219515A (en) * 2017-05-25 2017-09-29 深圳市金立通信设备有限公司 The parameter calibrating method and terminal of a kind of range sensor
CN109241488A (en) * 2017-06-30 2019-01-18 北京小米移动软件有限公司 Bottom is made an uproar calculation method and device, computer readable storage medium
CN107764406B (en) * 2017-10-26 2020-12-04 珠海市魅族科技有限公司 Infrared detection management method and electronic equipment
CN107991664A (en) * 2017-11-30 2018-05-04 努比亚技术有限公司 Calibration method, device and the computer-readable recording medium of ultrasonic wave threshold value
CN108267728A (en) * 2018-01-23 2018-07-10 北京小米移动软件有限公司 Calibration method, device, equipment and the storage medium of range sensor
CN108965594B (en) * 2018-07-09 2020-12-15 珠海市魅族科技有限公司 Terminal equipment adjusting method, system and storage medium
CN111208473B (en) * 2018-11-22 2023-09-08 富士通株式会社 Sensor deployment method in object detection system, object detection method, device and system
CN111487649A (en) * 2019-01-25 2020-08-04 北京石头世纪科技股份有限公司 Distance measuring device and autonomous robot
CN111182115B (en) * 2019-12-27 2022-06-10 荣耀终端有限公司 Method and device for detecting abnormity of proximity sensor and mobile terminal
CN113671512B (en) * 2020-05-14 2024-01-30 北京小米移动软件有限公司 Proximity sensor angle adjustment method, device and storage medium
CN111835912B (en) * 2020-06-15 2021-09-21 北京小米移动软件有限公司 Terminal, distance judgment method and distance judgment device
CN111736139B (en) * 2020-06-22 2023-05-23 歌尔科技有限公司 Infrared calibration method, distance detection method, device and medium
CN112260672B (en) * 2020-10-19 2024-02-06 深圳市太美亚电子科技有限公司 Method for adjusting induction distance of infrared device
CN112101340B (en) * 2020-11-16 2021-02-05 展讯通信(上海)有限公司 Screen stain recognition method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833419A (en) * 2012-08-31 2012-12-19 华为终端有限公司 Method and terminal for controlling screen state
CN102843469A (en) * 2012-08-16 2012-12-26 广东欧珀移动通信有限公司 Method for setting threshold of infrared proximity sensor and mobile terminal
CN102917124A (en) * 2012-09-27 2013-02-06 东莞宇龙通信科技有限公司 Method for dynamically adjusting threshold of distance sensor, and mobile terminal
CN104570144A (en) * 2013-10-24 2015-04-29 展讯通信(上海)有限公司 Self-adaptive induction threshold adjusting system and method for proximity sensor
TW201539010A (en) * 2014-04-09 2015-10-16 Qisda Corp Calibration method of proximity sensor and calibration system thereof
CN105628079A (en) * 2015-12-30 2016-06-01 上海闻泰电子科技有限公司 Dynamic calibration method of distance sensor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102843469A (en) * 2012-08-16 2012-12-26 广东欧珀移动通信有限公司 Method for setting threshold of infrared proximity sensor and mobile terminal
CN102833419A (en) * 2012-08-31 2012-12-19 华为终端有限公司 Method and terminal for controlling screen state
CN102917124A (en) * 2012-09-27 2013-02-06 东莞宇龙通信科技有限公司 Method for dynamically adjusting threshold of distance sensor, and mobile terminal
CN104570144A (en) * 2013-10-24 2015-04-29 展讯通信(上海)有限公司 Self-adaptive induction threshold adjusting system and method for proximity sensor
TW201539010A (en) * 2014-04-09 2015-10-16 Qisda Corp Calibration method of proximity sensor and calibration system thereof
CN105628079A (en) * 2015-12-30 2016-06-01 上海闻泰电子科技有限公司 Dynamic calibration method of distance sensor

Also Published As

Publication number Publication date
CN106443639A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN106443639B (en) A kind of range calibration method and terminal
EP3443446B1 (en) Electronic device comprising force sensor
CN109478393B (en) Electronic device and method for displaying image
US10725657B2 (en) Method for displaying graphical user interface and mobile terminal
CN108710469B (en) Application program starting method, mobile terminal and medium product
CN107219515A (en) The parameter calibrating method and terminal of a kind of range sensor
US10334095B2 (en) Method for switching off communication screen to avoid false triggering based on mobile terminal and system employing the same
US10739994B2 (en) Method and electronic device for recognizing touch
CN106101450B (en) A kind of compensation method of ambient light intensity and mobile terminal
CN107885534A (en) A kind of screen locking method, terminal and computer-readable medium
US20130159927A1 (en) Electronic device with touch screen and screen unlocking method thereof
CN105025159A (en) A proximity sensor adjusting method and apparatus
KR20180014625A (en) Electronic device and operating method thereof
WO2013188173A1 (en) Glove touch detection for touch devices
CN107463290B (en) Response control method and device for touch operation, storage medium and mobile terminal
JP2014529138A (en) Multi-cell selection using touch input
CN106662975A (en) Method and apparatus for processing touch input
CN106453904A (en) Information reminding method and terminal
US20180032248A1 (en) Method and electronic device for recognizing touch
CN104238794B (en) The response method and terminal, mobile terminal of a kind of pair of contact action
CN107181858A (en) A kind of method and terminal for showing notification message
CN107390969B (en) A kind of method and terminal controlling suspended window
CN107920162A (en) Control method, mobile terminal and the computer-readable recording medium of alarm clock
CN107197082A (en) A kind of information prompting method and terminal
CN106200976A (en) A kind of motion-activated method and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190517

Termination date: 20200926

CF01 Termination of patent right due to non-payment of annual fee