CN103837910B - Method and terminal that a kind of proximity transducer threshold value is determined - Google Patents
Method and terminal that a kind of proximity transducer threshold value is determined Download PDFInfo
- Publication number
- CN103837910B CN103837910B CN201410104205.4A CN201410104205A CN103837910B CN 103837910 B CN103837910 B CN 103837910B CN 201410104205 A CN201410104205 A CN 201410104205A CN 103837910 B CN103837910 B CN 103837910B
- Authority
- CN
- China
- Prior art keywords
- signal value
- current
- value
- scale factor
- signal
- 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
Links
Landscapes
- Electronic Switches (AREA)
Abstract
The embodiment of the invention discloses a kind of method that proximity transducer threshold value is determined, including:Obtain current first signal value of proximity transducer;According to acquired current first signal value, the corresponding default scale factor is chosen;The threshold value of the proximity transducer is determined according to the product of the selected default scale factor and current first signal value.Correspondingly, the embodiment of the invention also discloses a kind of terminal.Using the embodiment of the present invention, it is possible to achieve the self calibration of the threshold value of proximity transducer, so as to strengthen the experience of user.
Description
Technical field
The present invention relates to electronic technology field, more particularly to the method and terminal that a kind of proximity transducer threshold value is determined.
Background technology
User using touch-screen mobile phone when being received calls, and face is often encountered on touch screen, it is not intended to middle possible point
On-hook key or Hands-free key are hit, so as to cause unnecessary embarrassment.Because proximity transducer can be according to the pole of infrared receiver two
The distance of the infrared reflection intensity judgment object for the reflected light that pipe is received, therefore, proximity transducer is designed into touch
Screen mobile phone, the infrared reflection intensity and threshold value received by comparing, automatically controls the lock of screen when user receives calls
Whether determine.At present, the threshold value is fixed value, is typically set before dispatching from the factory.With the use of mobile phone, the structure of mobile phone is total
It can change, for example light shield aging, TP(Touch panel, contact panel)Light transmittance changes or silica gel leather sheath loosens etc.,
So that the threshold value of the fixation can not accurately control the locking of screen.
The content of the invention
The embodiment of the present invention provides the method and terminal that a kind of proximity transducer threshold value is determined, it is possible to achieve close to sensing
The self calibration of the threshold value of device, so as to strengthen the experience of user.
The embodiments of the invention provide a kind of method that proximity transducer threshold value is determined, including:
Obtain current first signal value of proximity transducer;
According to acquired current first signal value, the corresponding default scale factor is chosen;
The door of the proximity transducer is determined according to the product of the selected default scale factor and current first signal value
Limit value.
Correspondingly, the embodiment of the present invention additionally provides a kind of terminal, including:
First signal value acquiring unit, current first signal value for obtaining proximity transducer;
Default scale predictor selection unit, for current first letter according to acquired in the first signal value acquiring unit
Number value, chooses the corresponding default scale factor;
Threshold value determining unit, for according to the selected default scale factor and the determination of the product of current first signal value
The threshold value of the proximity transducer.
The embodiment of the present invention can multiplying by the first current acquired signal value and the selected default scale factor
Product determines the threshold value of proximity transducer, the self calibration of the threshold value of proximity transducer is realized, so as to enhance the body of user
Test.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, below by using required in embodiment
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, general for this area
For logical technical staff, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the method flow schematic diagram that a kind of proximity transducer threshold value provided in an embodiment of the present invention is determined;
Fig. 2 is the method flow schematic diagram that a kind of proximity transducer threshold value that another embodiment of the present invention is provided is determined;
Fig. 3 is the method flow schematic diagram that a kind of proximity transducer threshold value that another embodiment of the present invention is provided is determined;
Fig. 4 is a kind of structural representation of terminal provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is a part of embodiment of the invention, rather than whole embodiments.Based on this hair
Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made
Example, belongs to the scope of protection of the invention.
Show referring to Fig. 1, Fig. 1 is the method flow that a kind of proximity transducer threshold value provided in an embodiment of the present invention is determined
It is intended to.The flow that proximity transducer threshold value in the present embodiment as shown in Figure 1 is determined can include:
S110, obtains current first signal value of proximity transducer.
Specifically, proximity transducer can include infrarede emitting diode and infrared receiving diode, connect when terminal is met
During the calibration condition of nearly sensor, infrarede emitting diode can outwards be launched infrared ray, work as end panel along terminal screen direction
When there is object in curtain front, object can reflecting part infrared ray, the object reflection that terminal can receive infrared receiving diode
The infrared ray returned is converted into electric signal, then converts electrical signals to data signal, so as to obtain current the first of proximity transducer
Signal value.
If as an alternative embodiment, terminal detects the presence of call request or detection reaches proximity transducer
Calibration cycle or when receiving the proximity transducer calibration command of user, it can be determined that meet the calibration condition of proximity transducer,
So as to obtain current first signal value of proximity transducer.
Wherein, current first signal value for the proximity transducer that terminal is obtained can include current maximum signal level or current
Minimum signal value, the current minimum signal value can be in terminal screen front end without object(I.e. in proximity transducer investigative range
It is interior to exist without object, such as terminal unlocking or screen is lighted manually)When obtain, the current maximum signal level can be in end panel
Curtain is close to object(As user receives calls)When obtain.In the specific implementation, terminal can prestore peak signal interval value with
Minimum signal interval value, can be by get current when terminal gets current first signal value of proximity transducer
One signal value is matched with the peak signal interval value prestored with minimum signal interval value, it is determined that current first signal value is to work as
Preceding maximum signal level or current minimum signal value, so that it is determined that the corresponding default scale factor.
S120, according to acquired current first signal value, chooses the corresponding default scale factor.
The default scale factor can include the corresponding default scale factor of n 1 of maximum signal level or minimum signal value pair
The default scale factor of n 2 answered, wherein, the span of the corresponding default scale factor of n 1 of maximum signal level is 0<n1<1, it is minimum
The span of the corresponding default scale factor of n 2 of signal value is n2>1.
Specifically, when terminal gets current first signal value of proximity transducer, terminal may determine that current first
Signal value is maximum signal level or minimum signal value, if current first signal value is maximum signal level, terminal is then chosen
The corresponding default scale factor of n 1 of maximum signal level;If current first signal value is minimum signal value, terminal is then chosen most
The corresponding default scale factor of n 2 of small signal value.
S130, the proximity transducer is determined according to the product of the selected default scale factor and current first signal value
Threshold value.
Specifically, the threshold value can be included close to threshold value A and leaving threshold value B, if terminal obtain current the
One signal value be maximum signal level, then can be determined according to current first signal value and the product of the corresponding default scale factor from
Open threshold value B;If terminal obtain current first signal value be minimum signal value, can according to current first signal value with it is right
The product for the default scale factor answered is determined close to threshold value A.
Optionally, can also be according to the current first letter if current first signal value that terminal is obtained is maximum signal level
Number value determines close threshold value A with the product of the corresponding default scale factor;If current first signal value that terminal is obtained is most
Small signal value, then can also determine to leave threshold value B according to current first signal value with the product of the corresponding default scale factor.
Wherein, can be same value, i.e. A=B with leaving threshold value close to threshold value;When close to threshold value and leaving threshold value
When differing, A<When the reflection light intensity that B, i.e. proximity transducer are obtained is more than B, judgement has object to shut out the light, that is, has thing
Body is close to terminal;When proximity transducer obtain reflection light intensity be less than A when, judge that light is blocked and be eliminated, i.e., object from
Open terminal.
The embodiment of the present invention can multiplying by the first current acquired signal value and the selected default scale factor
Product determines the threshold value of proximity transducer, the self calibration of the threshold value of proximity transducer is realized, so as to enhance the body of user
Test.
Referring to Fig. 2, the method stream that a kind of proximity transducer threshold value that Fig. 2 is another offer of the embodiment of the present invention is determined
Journey schematic diagram.The flow that proximity transducer threshold value in the present embodiment as shown in Figure 2 is determined can include:
S210, obtains current first signal value of proximity transducer.
Specifically, proximity transducer can include infrarede emitting diode and infrared receiving diode, connect when terminal is met
During the calibration condition of nearly sensor, infrarede emitting diode can outwards be launched infrared ray, work as end panel along terminal screen direction
When there is object in curtain front, object can reflecting part infrared ray, the object reflection that terminal can receive infrared receiving diode
The infrared ray returned is converted into electric signal, then converts electrical signals to data signal, so as to obtain current the first of proximity transducer
Signal value.
If as an alternative embodiment, terminal detects the presence of call request or detection reaches proximity transducer
Calibration cycle or when receiving the proximity transducer calibration command of user, it can be determined that meet the calibration condition of proximity transducer,
So as to obtain current first signal value of proximity transducer.
Wherein, current first signal value for the proximity transducer that terminal is obtained can include current maximum signal level or current
Minimum signal value, the current minimum signal value can be in terminal screen front end without object(I.e. in proximity transducer investigative range
It is interior to exist without object, such as terminal unlocking or screen is lighted manually)When obtain, the current maximum signal level can be in end panel
Curtain is close to object(As user receives calls)When obtain.In the specific implementation, terminal can prestore peak signal interval value with
Minimum signal interval value, can be by get current when terminal gets current first signal value of proximity transducer
One signal value is matched with the peak signal interval value prestored with minimum signal interval value, it is determined that current first signal value is to work as
Preceding maximum signal level or current minimum signal value, so that it is determined that the corresponding default scale factor.
S220, according to acquired current first signal value, chooses the corresponding default scale factor.
The default scale factor can include the corresponding default scale factor of n 1 of maximum signal level or minimum signal value pair
The default scale factor of n 2 answered, wherein, the span of the corresponding default scale factor of n 1 of maximum signal level is 0<n1<1, it is minimum
The span of the corresponding default scale factor of n 2 of signal value is n2>1.
Specifically, when terminal gets current first signal value of proximity transducer, terminal may determine that current first
Signal value is maximum signal level or minimum signal value, if current first signal value is maximum signal level, terminal is then chosen
The corresponding default scale factor of n 1 of maximum signal level;If current first signal value is minimum signal value, terminal is then chosen most
The corresponding default scale factor of n 2 of small signal value.
S230, according to current first signal value, chooses the secondary signal value prestored.
Specifically, terminal can prestore the corresponding secondary signal value of maximum signal level and minimum signal value is corresponding
Secondary signal value, when current first signal value that terminal is obtained can illustrate what is obtained in the range of peak signal interval value, then
Current first signal value is maximum signal level, then can choose secondary signal value corresponding with maximum signal level;When terminal is obtained
Current first signal value can illustrate that current first signal value obtained is believed to be minimum in the range of minimum signal interval value, then
Number value, then can choose secondary signal value corresponding with minimum signal value.
As an alternative embodiment, terminal can determine parameter of dispatching from the factory, by connecing for being obtained when determining and dispatching from the factory parameter
The maximum signal level of nearly sensor saves as the secondary signal value with minimum signal value, for example, terminal is dispatched from the factory parameter in measure
When the maximum signal level of proximity transducer that obtains be that b1, minimum signal value are b2, b1 and b2 are saved as secondary signal by terminal
Value.When terminal gets the first signal value of proximity transducer, if first signal value is maximum signal level, terminal then will
B1 is used as the secondary signal value;If first signal value is minimum signal value, terminal then regard b2 as the secondary signal
Value.
S240, acquired current first signal value of contrast and secondary signal value.
S250, the selected default scale factor is adjusted according to the comparing result.
Specifically, one or more scale factor values that prestore in the terminal, for example, the scale factor n1 that can prestore,
The default scale factor is adjusted according to comparing result;Can also be prestored multiple default scale factor of n 1, n1 ', n1 ' ' etc., root
The corresponding default scale factor is selected according to comparing result.It is right if acquired current first signal value is maximum signal level
Than current first signal value and corresponding secondary signal value, if current first signal value is more than corresponding secondary signal
Value, illustrates that the structure or terminal of terminal are presently in environmental change, and the reflection light intensity of the proximity transducer obtained is overall
Increase, the corresponding default scale factor is then heightened or selected to terminal, so that corresponding increase threshold value.
If acquired current first signal value is minimum signal value, contrast current first signal value with it is corresponding
Secondary signal value, if current first signal value is less than corresponding secondary signal value, illustrates that the structure or terminal of terminal are current
Local environment changes, and the reflection light intensity of the proximity transducer obtained integrally reduces, and terminal then reduces or selected correspondence
The default scale factor so that corresponding reduction threshold value.
Optionally, if acquired current first signal value is maximum signal level, current first signal value is contrasted
With corresponding secondary signal value, if current first signal value be less than corresponding secondary signal value, illustrate terminal structure or
Terminal is presently in environmental change, and the reflection light intensity of the proximity transducer obtained integrally reduces, terminal then reduce or
The corresponding default scale factor is selected, so that corresponding reduction threshold value.
If acquired current first signal value is minimum signal value, contrast current first signal value with it is corresponding
Secondary signal value, if current first signal value is more than corresponding secondary signal value, illustrates that the structure or terminal of terminal are current
Local environment changes, and the reflection light intensity of the proximity transducer obtained integrally increases, and terminal then increases correspondence or selected
The default scale factor so that corresponding increase threshold value.
For example, multiple scale factor values n1, n1 that prestore in the terminal ', n1 ' ' etc., wherein n1 is the default scale factor, and
n1’<n1<n1’’.When the first signal value is maximum signal level, when current first signal value is more than corresponding secondary signal
Then it is n1 ' ' by default scale selecting predictors during value;When current first signal value is more than corresponding secondary signal value, then
It is n1 ' by default scale selecting predictors.When the first signal value is minimum signal value, principle is identical, will not be repeated here.Example again
Such as:The default scale factor that terminal prestores is n1, when the first signal value is maximum signal level, wherein the first signal value is with a1 tables
Show.When current first signal value is more than corresponding secondary signal value, wherein secondary signal value is represented with a2.Then can be by
The corresponding default scale factor is also adjusted to n1*a1/a2, and the default scale factor is adjusted by the way of linear scale.In reality
During use, other adjustment modes, such as index, increase offset can be selected as needed(Adjusted after n1+ offsets silent
Recognize scale factor), the mode of linear scale is not limited to adjust.When the first signal value is minimum signal value, principle is identical,
This is repeated no more.
S260, the proximity transducer is determined according to the product of the default scale factor after adjustment and current first signal value
Threshold value.
Specifically, the threshold value can be included close to threshold value A and leaving threshold value B, if terminal obtain current the
One signal value is maximum signal level, then can be determined according to current first signal value and the product of the default scale factor after adjustment
Leave threshold value B;If terminal obtain current first signal value be minimum signal value, can according to current first signal value with
The product of the default scale factor after adjustment is determined close to threshold value A.
Optionally, can also be according to the current first letter if current first signal value that terminal is obtained is maximum signal level
The product of number value and the default scale factor after adjustment is determined close to threshold value A;If current first signal value that terminal is obtained is
Minimum signal value, then can also determine to leave thresholding according to the product of current first signal value and the default scale factor after adjustment
Value B.
The embodiment of the present invention can according to comparing result of the signal value of proximity transducer first with corresponding secondary signal value,
The selected default scale factor of adjustment, compared to a upper embodiment, further increases the reasonability of identified threshold value.
Referring to Fig. 3, the method stream that a kind of proximity transducer threshold value that Fig. 3 is another offer of the embodiment of the present invention is determined
Journey schematic diagram.The flow that proximity transducer threshold value in the present embodiment as shown in Figure 3 is determined can include:
S310, obtains current first signal value of proximity transducer.
Specifically, proximity transducer can include infrarede emitting diode and infrared receiving diode, connect when terminal is met
During the calibration condition of nearly sensor, infrarede emitting diode can outwards be launched infrared ray, work as end panel along terminal screen direction
When there is object in curtain front, object can reflecting part infrared ray, the object reflection that terminal can receive infrared receiving diode
The infrared ray returned is converted into electric signal, then converts electrical signals to data signal, so as to obtain current the first of proximity transducer
Signal value.
If as an alternative embodiment, terminal detects the presence of call request or detection reaches proximity transducer
Calibration cycle or when receiving the proximity transducer calibration command of user, it can be determined that meet the calibration condition of proximity transducer,
So as to obtain current first signal value of proximity transducer.
Wherein, current first signal value for the proximity transducer that terminal is obtained can include current maximum signal level or current
Minimum signal value, the current minimum signal value can be in terminal screen front end without object(I.e. in proximity transducer investigative range
It is interior to exist without object, such as terminal unlocking or screen is lighted manually)When obtain, the current maximum signal level can be in end panel
Curtain is close to object(As user receives calls)When obtain.In the specific implementation, terminal can prestore peak signal interval value with
Minimum signal interval value, can be by get current when terminal gets current first signal value of proximity transducer
One signal value is matched with the peak signal interval value prestored with minimum signal interval value, it is determined that current first signal value is to work as
Preceding maximum signal level or current minimum signal value, so that it is determined that the corresponding default scale factor.
S320, obtains threeth signal value minimum with the current first signal value difference prestored.
Specifically, terminal can prestore various scenes(As light shield aging, TP light transmittances change or silica gel leather sheath pine
It is dynamic)The mapping table of lower proximity transducer signal value, can be pre- at this when terminal gets the first signal value of proximity transducer
The echo signal value minimum with the first signal value difference is obtained in the mapping table of the proximity transducer signal value first stored, and
Using the echo signal value as the 3rd signal value, for example, the mapping table for the proximity transducer signal value that terminal is prestored
Such as table 1, it is minimum with the first signal value difference it can be seen from table 1 if the first signal value of the proximity transducer that terminal is obtained is 75
Echo signal value be 71, terminal is then used as the 3rd signal value using 71.
Table 1
S330, by acquired scale factor corresponding with the current first signal value difference is minimum the 3rd signal value
It is defined as the default scale factor.
Specifically, by taking table 1 as an example, if the 3rd signal value that terminal is obtained is 71,71 corresponding scale factors 8 are determined
For the default scale factor.
S340, is determined described close to sensing according to the product of the default scale factor of the determination and current first signal value
The threshold value of device.
Specifically, the threshold value can be included close to threshold value A and leaving threshold value B, if terminal obtain current the
One signal value is maximum signal level, then can be determined according to the product of current first signal value and the identified default scale factor
Leave threshold value B;If terminal obtain current first signal value be minimum signal value, can according to current first signal value with
The product of the identified default scale factor is determined close to threshold value A.
Optionally, can also be according to the current first letter if current first signal value that terminal is obtained is maximum signal level
Number value is determined close to threshold value A with the product of the identified default scale factor;If current first signal value that terminal is obtained is
Minimum signal value, then can also determine to leave thresholding according to the product of current first signal value and the identified default scale factor
Value B.
Terminal of the embodiment of the present invention can prestore corresponding scale factor under various scenes, according to acquired current
The contrast of first signal value and the 3rd signal value, determines the corresponding default scale factor, realizes the threshold value of proximity transducer
Self calibration, improve determined by threshold value reasonability.
Referring to Fig. 4, Fig. 4 is a kind of structural representation of terminal provided in an embodiment of the present invention.It is of the invention as shown in Figure 4
Terminal in embodiment can at least include the first signal value acquiring unit 410, default scale predictor selection unit 420 and door
Limit value determining unit 430, wherein:
First signal value acquiring unit 410, current first signal value for obtaining proximity transducer.
In the specific implementation, proximity transducer can include infrarede emitting diode and infrared receiving diode, when satisfaction connects
During the calibration condition of nearly sensor, the first signal value acquiring unit 410 can trigger infrarede emitting diode along screen orientation, to
Outer transmitting infrared ray, when having object in front of screen, object meeting reflecting part infrared ray, the first signal value acquiring unit 410 can
The infrared ray being reflected back with the object for receiving infrared receiving diode is converted into electric signal, then converts electrical signals to numeral
Signal, so as to obtain current first signal value of proximity transducer.
Optionally, the first signal value acquiring unit 410 can be used for the current minimum for obtaining the proximity transducer
One kind in signal value and current maximum signal level.The current minimum signal value can hold no object before screen(Connecing
There is no object presence in nearly sensor investigative range, such as unlock or light screen manually)When obtain, the current maximum signal level
Can be in screen close to object(As user receives calls)When obtain.In the specific implementation, the first signal value acquiring unit 410 can be with
Peak signal interval value and minimum signal interval value are prestored, when getting current first signal value of proximity transducer,
Peak signal interval value that can be by current first signal value got with prestoring is matched with minimum signal interval value, really
Settled preceding first signal value is current maximum signal level or current minimum signal value, so that default scale predictor selection unit
420 determine the corresponding default scale factor according to current first signal value.
Default scale predictor selection unit 420, for current according to acquired in the first signal value acquiring unit 410
First signal value, chooses the corresponding default scale factor.
In the specific implementation, the default scale factor can include the corresponding default scale factor of n 1 of maximum signal level or most
The corresponding default scale factor of n 2 of small signal value, wherein, the span of the corresponding default scale factor of n 1 of maximum signal level is 0
<n1<1, the span of the corresponding default scale factor of n 2 of minimum signal value is n2>1.If current first signal value is most
Big signal value, default scale predictor selection unit 420 then chooses the corresponding default scale factor of n 1 of maximum signal level;If described work as
Preceding first signal value is minimum signal value, and default scale predictor selection unit 420 then chooses the corresponding acquiescence ratio of minimum signal value
Example factor of n 2.
Threshold value determining unit 430, for the product according to the selected default scale factor and current first signal value
Determine the threshold value of the proximity transducer.
In the specific implementation, the threshold value can include close to threshold value A and leave threshold value B, if the first signal value is obtained
Current first signal value for taking unit 410 to obtain is maximum signal level, then threshold value determining unit 430 can be according to current first
Signal value determines to leave threshold value B with the product of the corresponding default scale factor;What if the first signal value acquiring unit 410 was obtained
Current first signal value be minimum signal value, then threshold value determining unit 430 can according to current first signal value with it is corresponding
The product of the default scale factor is determined close to threshold value A.
Optionally, if current first signal value that the first signal value acquiring unit 410 is obtained is maximum signal level, thresholding
Being worth determining unit 430 can also determine close to threshold value according to current first signal value with the product of the corresponding default scale factor
A;If current first signal value that the first signal value acquiring unit 410 is obtained is minimum signal value, threshold value determining unit 430
It can also determine to leave threshold value B with the product of the corresponding default scale factor according to current first signal value.
As an alternative embodiment, the terminal further can also include secondary signal value choose unit 440,
Comparison unit 450 and adjustment unit 460, wherein:
Secondary signal value choose unit 440, for obtained according to the first signal value acquiring unit 410 current first
Signal value, chooses the secondary signal value prestored.
In the specific implementation, terminal can prestore the corresponding secondary signal value of maximum signal level and minimum signal value pair
The secondary signal value answered, when current first signal value of the first signal value acquiring unit 410 acquisition is in peak signal interval value model
In enclosing, then it is maximum signal level that can illustrate current first signal value obtained, then secondary signal value is chosen unit 440 and can selected
Take secondary signal value corresponding with maximum signal level;When current first signal value that the first signal value acquiring unit 410 is obtained exists
In the range of minimum signal interval value, then it is minimum signal value that can illustrate current first signal value obtained, then secondary signal value
Secondary signal value corresponding with minimum signal value can be chosen by choosing unit 440.
Comparison unit 450, for contrasting acquired current first signal value and secondary signal value.
Adjustment unit 460, for adjusting the default scale factor according to the comparing result of the comparison unit 450.
As an alternative embodiment, one or more scale factor values that can prestore in the terminal, for example, can be with
Prestored a scale factor n1, and the default scale factor is adjusted according to comparing result;Can also be prestored multiple default scales
Factor of n 1, n1 ', n1 ' ' etc., the corresponding default scale factor is selected according to comparing result.If acquired current first signal
When being worth for maximum signal level, comparison unit 450 contrasts acquired current first signal value and secondary signal value, if the contrast
The comparing result of unit 450 is that current first signal value is more than corresponding secondary signal value, then adjustment unit 460 is heightened corresponding
The default scale factor.
If acquired current first signal value is minimum signal value, comparison unit 450 contrasts acquired current the
One signal value and secondary signal value, are less than corresponding the if the comparing result of the comparison unit 450 is current first signal value
Binary signal value, then adjustment unit 460 reduce the corresponding default scale factor.
If acquired current first signal value is maximum signal level, comparison unit 450 contrasts acquired current the
One signal value and secondary signal value, are less than corresponding the if the comparing result of the comparison unit 450 is current first signal value
Binary signal value, then adjustment unit 460 reduce the corresponding default scale factor.
If acquired current first signal value is minimum signal value, comparison unit 450 contrasts acquired current the
One signal value and secondary signal value, are more than corresponding the if the comparing result of the comparison unit 450 is current first signal value
Binary signal value, then adjustment unit 460 heighten the corresponding default scale factor.
For example, multiple scale factor values n1, n1 that prestore in the terminal ', n1 ' ' etc., wherein n1 is the default scale factor, and
n1’<n1<n1’’.When the first signal value is maximum signal level, when current first signal value is more than corresponding secondary signal
During value, then the default scale factor is adjusted to n1 ' ';When current first signal value is more than corresponding secondary signal value, then
The default scale factor is adjusted to n1 '.When the first signal value is minimum signal value, principle is identical, will not be repeated here.
Again for example:The default scale factor that terminal prestores is n1, when the first signal value is maximum signal level, wherein first
Signal value is represented with a1.When current first signal value is more than corresponding secondary signal value, wherein secondary signal value is with a2
Represent.Then the corresponding default scale factor can be also adjusted to n1*a1/a2, acquiescence ratio is adjusted by the way of linear scale
The example factor.In actual use, other adjustment modes, such as index, increase offset can be selected as needed(n1+
The default scale factor is adjusted after offset), the mode of linear scale is not limited to adjust.When the first signal value is minimum signal value
Shi Yuanli is identical, will not be repeated here.
Optionally, the terminal further can also include the 3rd signal value acquiring unit 470, for obtain prestore with
The 3rd minimum signal value of the current first signal value difference, the adjustment unit 460 is used to described work as acquired
The minimum corresponding scale factor of the 3rd signal value of preceding first signal value difference is defined as the default scale factor.
In the specific implementation, terminal can prestore various scenes(As light shield aging, TP light transmittances change or Silicone Rubber
Set loosens)The mapping table of lower proximity transducer signal value, when the first signal value acquiring unit 410 gets the of proximity transducer
During one signal value, the 3rd signal value acquiring unit 470 can be in the mapping table of the proximity transducer prestored the signal value
The echo signal value minimum with the first signal value difference is obtained, and using the echo signal value as the 3rd signal value,
For example, the mapping table for the proximity transducer signal value that terminal is prestored is as shown in table 1, if the first signal value acquiring unit 410
First signal value of the proximity transducer of acquisition is 75, it can be seen from table 1, the minimum echo signal value with the first signal value difference
For 71, the 3rd signal value acquiring unit 470 is then used as the 3rd signal value using 71.
The embodiment of the present invention can multiplying by the first current acquired signal value and the selected default scale factor
Product determines the threshold value of proximity transducer, the self calibration of the threshold value of proximity transducer is realized, so as to enhance the body of user
Test;Further, terminal can be adjusted according to comparing result of the signal value of proximity transducer first with corresponding secondary signal value
The selected default scale factor, improves the reasonability of identified threshold value;
Optionally, terminal can also prestore corresponding scale factor under various scenes, according to acquired current
The contrast of one signal value and the 3rd signal value, determines the corresponding default scale factor, realizes the threshold value of proximity transducer
Self calibration.
It should be noted that in the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, in some embodiment
The part being not described in, may refer to the associated description of other embodiment.Secondly, those skilled in the art should also know
Know, embodiment described in this description belongs to preferred embodiment, involved action not necessarily present invention institute is necessary
's.
Step in present invention method can be sequentially adjusted, merged and deleted according to actual needs.
Unit in device of the embodiment of the present invention can be combined, divided and deleted according to actual needs.
Unit described in the embodiment of the present invention, can pass through universal integrated circuit, such as CPU(Central
Processing Unit, central processing unit), or pass through ASIC(Application Specific Integrated
Circuit, application specific integrated circuit)To realize.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with
The hardware of correlation is instructed to complete by computer program, described program can be stored in a computer read/write memory medium
In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic
Dish, CD, read-only memory(Read-Only Memory, ROM)Or random access memory(Random Access
Memory, RAM)Deng.
Above disclosure is only preferred embodiment of present invention, can not limit the right model of the present invention with this certainly
Enclose, therefore the equivalent variations made according to the claims in the present invention, still belong to the scope that the present invention is covered.
Claims (6)
1. a kind of method that proximity transducer threshold value is determined, it is characterised in that including:
Obtain current first signal value of proximity transducer;
According to acquired current first signal value, the corresponding default scale factor is chosen;
According to current first signal value, the secondary signal value prestored is chosen;
Acquired current first signal value of contrast and secondary signal value;
The default scale factor is adjusted according to the comparing result;
The threshold value of the proximity transducer is determined according to the product of the default scale factor of adjustment and current first signal value;
Wherein, current first signal value for obtaining proximity transducer includes:Obtain the current minimum of the proximity transducer
One kind in signal value and current maximum signal level, if current first signal value is maximum signal level, according to the silent of adjustment
What the product for recognizing scale factor and current first signal value determined the proximity transducer leaves threshold value;If described current first
Signal value is minimum signal value, is determined according to the product of the default scale factor of adjustment and current first signal value described close to biography
The close threshold value of sensor.
2. the method as described in claim 1, it is characterised in that
It is described to be compared according to the comparing result adjustment acquiescence if acquired current first signal value is maximum signal level
The example factor includes:
If current first signal value is more than corresponding secondary signal value, the corresponding default scale factor is heightened or selected;
It is described to be compared according to the comparing result adjustment acquiescence if acquired current first signal value is minimum signal value
The example factor includes:
If current first signal value is less than corresponding secondary signal value, the corresponding default scale factor is reduced or selected.
3. a kind of method that proximity transducer threshold value is determined, it is characterised in that including:
Obtain current first signal value of proximity transducer;
Obtain threeth signal value minimum with the current first signal value difference prestored;
Acquired scale factor corresponding with the current first signal value difference is minimum the 3rd signal value is defined as writing from memory
Recognize scale factor;
The threshold value of the proximity transducer is determined according to the product of the selected default scale factor and current first signal value;
Wherein, current first signal value for obtaining proximity transducer includes:
One kind in the current minimum signal value and current maximum signal level of the proximity transducer is obtained, if described current first
Signal value is maximum signal level, is determined according to the product of the selected default scale factor and current first signal value described close
Sensor leaves threshold value;If current first signal value is minimum signal value, according to the selected default scale factor
The close threshold value of the proximity transducer is determined with the product of current first signal value.
4. a kind of terminal, it is characterised in that including:
First signal value acquiring unit, current first signal value for obtaining proximity transducer;
Default scale predictor selection unit, for current first signal according to acquired in the first signal value acquiring unit
Value, chooses the corresponding default scale factor;
Secondary signal value chooses unit, for current first signal value obtained according to the first signal value acquiring unit, choosing
Take the secondary signal value prestored;
Comparison unit, for contrasting acquired current first signal value and secondary signal value;
Adjustment unit, for adjusting the default scale factor according to the comparing result of the comparison unit
Threshold value determining unit, for being connect described in the default scale factor according to adjustment and the determination of the product of current first signal value
The threshold value of nearly sensor;
Wherein, the first signal value acquiring unit be used for the current minimum signal value for obtaining the proximity transducer and it is current most
One kind in big signal value, if current first signal value is maximum signal level, the threshold value determining unit is according to adjustment
The default scale factor and current first signal value product determine the proximity transducer leave threshold value;If described current
First signal value is minimum signal value, and the threshold value determining unit is according to the default scale factor and current first signal of adjustment
The product of value determines the close threshold value of the proximity transducer.
5. terminal as claimed in claim 4, it is characterised in that
If acquired current first signal value is maximum signal level, the adjustment unit is used for:
If the comparing result of the comparison unit, which is current first signal value, is more than corresponding secondary signal value, heightens or select
The corresponding default scale factor;
If acquired current first signal value is minimum signal value, the adjustment unit is used for:
If the comparing result of the comparison unit, which is current first signal value, is less than corresponding secondary signal value, reduction or selection
The corresponding default scale factor.
6. a kind of terminal, it is characterised in that including:
First signal value acquiring unit, current first signal value for obtaining proximity transducer;
3rd signal value acquiring unit, threeth signal minimum with the current first signal value difference prestored for obtaining
Value;
Default scale predictor selection unit, for by acquired threeth signal minimum with the current first signal value difference
It is worth corresponding scale factor and is defined as the default scale factor;
Threshold value determining unit, described in being determined according to the selected default scale factor and the product of current first signal value
The threshold value of proximity transducer;
The first signal value acquiring unit is used for:Obtain the current minimum signal value and current maximum letter of the proximity transducer
Number value in one kind, if current first signal value be maximum signal level, the threshold value determining unit is according to selected
What the default scale factor and the product of current first signal value determined the proximity transducer leaves threshold value;If described current
One signal value is minimum signal value, and the threshold value determining unit is according to the selected default scale factor and current first signal
The product of value determines the close threshold value of the proximity transducer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410104205.4A CN103837910B (en) | 2014-03-20 | 2014-03-20 | Method and terminal that a kind of proximity transducer threshold value is determined |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410104205.4A CN103837910B (en) | 2014-03-20 | 2014-03-20 | Method and terminal that a kind of proximity transducer threshold value is determined |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103837910A CN103837910A (en) | 2014-06-04 |
CN103837910B true CN103837910B (en) | 2017-09-26 |
Family
ID=50801608
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410104205.4A Expired - Fee Related CN103837910B (en) | 2014-03-20 | 2014-03-20 | Method and terminal that a kind of proximity transducer threshold value is determined |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103837910B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6380875B2 (en) * | 2014-09-26 | 2018-08-29 | 華為技術有限公司Huawei Technologies Co.,Ltd. | Detection distance calibration method, apparatus, and device |
CN106094055B (en) * | 2016-06-21 | 2018-07-03 | 广东欧珀移动通信有限公司 | The calibration method and terminal of a kind of proximity sensor |
CN106249872B (en) * | 2016-07-12 | 2019-04-05 | Oppo广东移动通信有限公司 | A kind of control method of proximity sensor, device and mobile terminal |
CN106484141B (en) * | 2016-10-19 | 2019-03-29 | Oppo广东移动通信有限公司 | The setting method and mobile terminal of threshold value |
CN106502819B (en) * | 2016-11-08 | 2020-01-14 | Oppo广东移动通信有限公司 | Control method and device based on proximity sensor and mobile terminal |
CN109840032B (en) * | 2019-01-24 | 2022-04-12 | Oppo广东移动通信有限公司 | Method and device for calibrating proximity sensor, electronic equipment and storage medium |
CN112905035B (en) * | 2019-12-04 | 2024-09-17 | 北京小米移动软件有限公司 | Touch screen control method and device and computer storage medium |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9019237B2 (en) * | 2008-04-06 | 2015-04-28 | Lester F. Ludwig | Multitouch parameter and gesture user interface employing an LED-array tactile sensor that can also operate as a display |
US8030914B2 (en) * | 2008-12-29 | 2011-10-04 | Motorola Mobility, Inc. | Portable electronic device having self-calibrating proximity sensors |
WO2011150887A2 (en) * | 2011-06-24 | 2011-12-08 | 华为终端有限公司 | Method and device for adjusting detecting threshold of infrared proximity sensor |
CN102271177B (en) * | 2011-07-18 | 2015-06-17 | 惠州Tcl移动通信有限公司 | Method and system for calibrating proximity sensor of mobile phone |
CN102411425B (en) * | 2011-07-22 | 2014-07-09 | 华为终端有限公司 | Method and device for controlling function of touch screen |
CN102404448B (en) * | 2011-09-07 | 2013-11-27 | 惠州Tcl移动通信有限公司 | Mobile terminal screen control method and mobile terminal |
US9137848B2 (en) * | 2012-01-31 | 2015-09-15 | Lg Electronics Inc. | Mobile terminal, controlling method thereof and recording medium thereof |
CN102917124B (en) * | 2012-09-27 | 2014-11-26 | 东莞宇龙通信科技有限公司 | Method for dynamically adjusting threshold of distance sensor, and mobile terminal |
CN103197357A (en) * | 2013-02-26 | 2013-07-10 | 深圳市中兴移动通信有限公司 | Infrared proximity detector self-calibration method and device |
-
2014
- 2014-03-20 CN CN201410104205.4A patent/CN103837910B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN103837910A (en) | 2014-06-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103837910B (en) | Method and terminal that a kind of proximity transducer threshold value is determined | |
CN107290802B (en) | Proximity sensor calibration method, proximity sensor calibrating installation and intelligent terminal | |
CN104811544B (en) | A kind of screen luminance adjustment method | |
CN103632666B (en) | Audio recognition method, speech recognition apparatus and electronic equipment | |
CN104182145B (en) | A kind of method for preventing misoperation of touch screen, device and mobile device | |
CN103823213B (en) | A kind of method found range by proximity transducer and terminal | |
CN107295195A (en) | A kind of fingerprint identification method and mobile terminal | |
CN106101453A (en) | A kind of method controlling screen and terminal | |
US11599608B2 (en) | Unlocking control method and related products | |
CN105959492A (en) | Control method and device for infrared proximity sensor and mobile terminal | |
CN106101450B (en) | A kind of compensation method of ambient light intensity and mobile terminal | |
CN108965594B (en) | Terminal equipment adjusting method, system and storage medium | |
CN106790978A (en) | The control method of mobile terminal screen state, device and mobile terminal | |
CN106657614A (en) | Sunscreen prompt method and terminal | |
CN107527048A (en) | Fingerprint identification method, device, storage medium and mobile terminal | |
CN108536333A (en) | Screen touch control adjustment method and device, intelligent device and storage medium | |
CN105446695B (en) | A kind of sweep-out method and device of notification message | |
CN107479058A (en) | A kind of distance detection method, mobile terminal and computer-readable recording medium | |
CN106768311A (en) | A kind of environment light detection method, device and terminal | |
CN107291294A (en) | The control method and mobile terminal of a kind of touch screen sensitivity | |
CN105554218B (en) | A kind of Headphone volume adjusting method and relevant device | |
CN105425958B (en) | Income prompting method, device and mobile terminal | |
CN105788568A (en) | Screen brightness adjustment method and device | |
CN106686222A (en) | Ambient light sensor control method, ambient light sensor control device and terminal | |
CN106708332B (en) | threshold setting method and device of proximity sensor 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 | ||
PP01 | Preservation of patent right |
Effective date of registration: 20180428 Granted publication date: 20170926 |
|
PP01 | Preservation of patent right | ||
PD01 | Discharge of preservation of patent |
Date of cancellation: 20210428 Granted publication date: 20170926 |
|
PD01 | Discharge of preservation of patent | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170926 Termination date: 20200320 |
|
CF01 | Termination of patent right due to non-payment of annual fee |