CN108873005A - Proximity test method and device, electronic device, storage medium and equipment - Google Patents
Proximity test method and device, electronic device, storage medium and equipment Download PDFInfo
- Publication number
- CN108873005A CN108873005A CN201810554869.9A CN201810554869A CN108873005A CN 108873005 A CN108873005 A CN 108873005A CN 201810554869 A CN201810554869 A CN 201810554869A CN 108873005 A CN108873005 A CN 108873005A
- Authority
- CN
- China
- Prior art keywords
- electronic device
- intensity value
- proximity sensor
- trough
- period
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO 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
- G01S17/00—Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
- G01S17/02—Systems using the reflection of electromagnetic waves other than radio waves
- G01S17/06—Systems determining position data of a target
- G01S17/08—Systems determining position data of a target for measuring distance only
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO 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/00—Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
- G01S7/02—Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S13/00
- G01S7/36—Means for anti-jamming, e.g. ECCM, i.e. electronic counter-counter measures
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Electromagnetism (AREA)
- Photometry And Measurement Of Optical Pulse Characteristics (AREA)
- Geophysics And Detection Of Objects (AREA)
Abstract
The invention discloses a kind of proximity test methods for electronic device.Electronic device includes proximity sensor, and proximity sensor includes multiple subpulse periods for emitting infrared pulse signal, a pulse period of infrared pulse signal, and each subpulse period includes a wave crest and a trough.Control method includes step:Obtain the first intensity value that proximity sensor acquires in the trough in any subpulse period;Obtain the second intensity value that proximity sensor acquires in the wave crest in subpulse period identical as trough;With according to the difference judgment object of the first intensity value and the second intensity value whether close to or away from electronic device.In this way, according to the first intensity value acquired in trough and wave crest acquisition the second intensity value difference come judgment object whether close to or away from electronic device, the interference caused by the detection of proximity sensor of environment light can be reduced.The invention also discloses a kind of proximity test device, electronic device, computer readable storage medium and computer equipments.
Description
Technical field
The present invention relates to electronic technology field, in particular to a kind of proximity test method, proximity test device, electronics dress
It sets, computer readable storage medium and computer equipment.
Background technique
Proximity sensor is using the infrared light detection object of transmitting to judgment object and movement at a distance from mobile terminal
Terminal it is separate or close.In certain usage scenarios, proximity sensor will be led by the interference of the infrared ray in sunlight
Judgement is caused error occur.
Summary of the invention
In order to solve the above technical problems, the present invention provides a kind of control method, proximity test device, electronic devices, meter
Calculation machine readable storage medium storing program for executing and computer equipment.
The present invention provides a kind of proximity test methods, are used for electronic device, and the electronic device includes proximity sensor,
For the proximity sensor for emitting infrared pulse signal, a pulse period of the infrared pulse signal includes multiple sub- arteries and veins
It rushes the period, each subpulse period includes a wave crest and a trough, the control method include step:
Obtain the first intensity value of the proximity sensor acquisition in the trough in any subpulse period;
Obtain the second intensity value of the proximity sensor acquisition in the wave crest in subpulse period identical as the trough;
With
Judge the object whether close to or away from institute according to the difference of first intensity value and second intensity value
State electronic device.
In some embodiments, the proximity test method includes step:
Detect the brightness value of current environment light;With
The brightness value be greater than or equal to brightness predetermined threshold when, obtain in the trough in any subpulse period described in
First intensity value of proximity sensor acquisition.
In some embodiments, the proximity test method includes step:
When the brightness value is less than the brightness predetermined threshold, whether the object is judged according to second intensity value
Close to or away from the electronic device.
In some embodiments, the step of brightness value of the detection current environment light includes:
Obtain the multiple image of current environment;With
The brightness value of current environment is calculated according to the multiple image.
In some embodiments, it when the brightness value is greater than or equal to brightness predetermined threshold, obtains in any sub- arteries and veins
The step of the first intensity value of the proximity sensor acquisition, includes when rushing the trough in period:
Detect the tilt angle of the electronic device;With
When the tilt angle is less than angle predetermined threshold, obtain described close in the trough in any subpulse period
First intensity value of sensor acquisition.
In some embodiments, the proximity test method includes step:
When the tilt angle is greater than or equal to angle predetermined threshold, the object is judged according to second intensity value
Whether close to or away from the electronic device.
The present invention provides a kind of proximity test devices, are used for electronic device, and the electronic device includes proximity sensor,
For the proximity sensor for emitting infrared pulse signal, a pulse period of the infrared pulse signal includes multiple sub- arteries and veins
It rushes the period, each subpulse period includes a wave crest and a trough, and the proximity test device includes:
Module is obtained, for obtaining the first intensity of the proximity sensor acquisition in the trough in any subpulse period
Value;
The acquisition module is also used to obtain described close to sensing in the wave crest in subpulse period identical as the trough
Second intensity value of device acquisition;With
Judgment module, for whether judging the object according to the difference of first intensity value and second intensity value
Close to or away from the electronic device.
The present invention provides a kind of electronic device, the electronic device includes:
Proximity sensor, the proximity sensor is for emitting infrared pulse signal, and one of the infrared pulse signal
Pulse period includes multiple subpulse periods, and each subpulse period includes a wave crest and a trough;With
Processor, the processor are used for:
Obtain the first intensity value of the proximity sensor acquisition in the trough in any subpulse period;
Obtain the second intensity value of the proximity sensor acquisition in the wave crest in subpulse period identical as the trough;
With
Judge the object whether close to or away from institute according to the difference of first intensity value and second intensity value
State electronic device.
In some embodiments, the electronic device further includes ambient light sensor, and the ambient light sensor is used for
The brightness value of current environment light is detected, the processor is also used to when the brightness value is greater than or equal to brightness predetermined threshold,
Obtain the first intensity value of the proximity sensor acquisition in the trough in any subpulse period.
In some embodiments, the processor is also used to:
When the brightness value is less than the brightness predetermined threshold, whether the object is judged according to second intensity value
Close to or away from the electronic device.
In some embodiments, the electronic device includes camera, and the camera is for obtaining current environment
Multiple image, the processor are used to calculate the brightness value of current environment according to the multiple image.
In some embodiments, the electronic device includes acceleration transducer, and the acceleration transducer is for examining
The tilt angle of the electronic device is surveyed, the processor is used to obtain when the tilt angle is less than angle predetermined threshold
The first intensity value of the proximity sensor acquisition in the trough in any subpulse period.
In some embodiments, the processor is used to be greater than or equal to the predetermined threshold of the angle in the tilt angle
When value, judge the object whether close to or away from the electronic device according to second intensity value.
The present invention provides one or more non-volatile computer readable storage mediums comprising computer executable instructions
Matter, when the computer executable instructions are executed by one or more processors, so that the processor executes described approach
Detection method.
The present invention provides a kind of computer equipment, including memory and processor, calculating is stored in the memory
Machine readable instruction, when described instruction is executed by the processor, so that the processor executes the proximity test method.
The proximity test method of embodiment of the present invention, proximity test device, electronic device, computer readable storage medium
And computer equipment, the first intensity value when infrared pulse signal is in trough is acquired respectively and the last the second when in wave crest
Angle value, then according to the difference of the first intensity value and the second intensity value come judgment object whether close to or far away from electronic device.
It so, it is possible to reduce infrared light interference caused by the detection of proximity sensor in environment light.
Additional aspect and advantage of the invention will be set forth in part in the description, and will partially become from the following description
Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention is from combining in description of the following accompanying drawings to embodiment by change
It obtains obviously and is readily appreciated that, wherein:
Fig. 1 is the module diagram of the electronic device of embodiment of the present invention;
Fig. 2 is the pulse signal schematic diagram of the proximity test method of embodiment of the present invention;
Fig. 3 is the flow diagram of the proximity test method of embodiment of the present invention;
Fig. 4 is the module diagram of the proximity test device of embodiment of the present invention;
Fig. 5 is the module diagram of the computer equipment of embodiment of the present invention;
Fig. 6 is the application scenarios schematic diagram of the electronic device of embodiment of the present invention;
Fig. 7 is the another application schematic diagram of a scenario of the electronic device of embodiment of the present invention;
Fig. 8 is another flow diagram of the proximity test method of embodiment of the present invention;
Fig. 9 is the another application scenarios schematic diagram of the electronic device of embodiment of the present invention;
Figure 10 is another flow diagram of the proximity test method of embodiment of the present invention;
Figure 11 is another flow diagram of the proximity test method of embodiment of the present invention;
Figure 12 is another application scenarios schematic diagram of the electronic device of embodiment of the present invention;
Figure 13 is another application scenarios schematic diagram of the electronic device of embodiment of the present invention;
Figure 14 is another application scenarios schematic diagram of the electronic device of embodiment of the present invention.
Specific embodiment
Embodiments of the present invention are described below in detail, the example of the embodiment is shown in the accompanying drawings, wherein from beginning
Same or similar element or element with the same or similar functions are indicated to same or similar label eventually.Below by ginseng
The embodiment for examining attached drawing description is exemplary, and for explaining only the invention, and is not considered as limiting the invention.
Proximity test method, proximity test device below with reference to Fig. 1 to Figure 14 the present invention is described in detail embodiment
200, electronic device 100, computer readable storage medium and computer equipment 300.
Fig. 1 to Fig. 5 is please referred to, embodiment of the present invention provides a kind of proximity test method for electronic device 100.Electricity
Sub-device 100 includes proximity sensor 162, and proximity sensor 162 is for emitting infrared pulse signal, and the one of infrared pulse signal
A pulse period (T) includes multiple subpulse periods (t), and each subpulse period (t) includes a wave crest and a trough.It connects
Nearly detection method includes step:
S10:Obtain the first intensity value that proximity sensor 162 acquires in the trough in any subpulse period;
S20:Obtain the second intensity value that proximity sensor 162 acquires in the wave crest in subpulse period identical as trough;
With
S30:According to the difference judgment object of the first intensity value and the second intensity value whether close to or away from electronic device
100。
Embodiment of the present invention additionally provides a kind of proximity test device 200 for electronic device 100.The present invention is implemented
The proximity test method of mode can be realized by the proximity test device 200 of embodiment of the present invention.Proximity test device 200 wraps
Including acquisition module 21 and judgment module 22, step S10 and step S20 can be realized that step S30 can be by sentencing by acquisition module 21
Disconnected module 22 is realized.Obtaining module 21 can be used for obtaining the acquisition of proximity sensor 162 in the trough in any subpulse period
The first intensity value and obtain in the wave crest in subpulse period identical as trough proximity sensor 162 acquire the second intensity
Value.Whether judgment module 22 can be used for according to the difference judgment object of the first intensity value and the second intensity value close to or away from electronics
Device 100.
Embodiment of the present invention additionally provides a kind of electronic device 100.Electronic device 100 includes 162 He of proximity sensor
Processor 24.Step S10, step S20 and step S30 can be realized by processor 24.In other words, processor 24 can be used for obtaining
Take the first intensity value and obtain in sub- arteries and veins identical as trough that proximity sensor 162 acquires in the trough in any subpulse period
The second intensity value that proximity sensor 162 acquires when rushing the wave crest in period, and according to the difference of the first intensity value and the second intensity value
Whether it is worth judgment object close to or away from electronic device 100.
Embodiment of the present invention additionally provides a kind of computer equipment 300.In an embodiment of the present invention, proximity test fills
Setting 200 can apply in computer equipment 300.Computer equipment 300 can be mobile phone, tablet computer, laptop, intelligence
Can bracelet, smartwatch, intelligent helmet, intelligent glasses, game machine etc., the electronic device 100 of embodiment of the present invention can also be with
It is one of computer equipment 300.
The embodiment of the present invention is that mobile phone is illustrated as an example with electronic device 100.Proximity sensor in mobile phone
The distance between 162 detection electronic installations 100 and user are to control display screen extinguishing or light.Fig. 6 and Fig. 7 are please referred to,
Carry out distance detection when, for example, when user answer or make a phone call and by mobile phone close to head when, proximity sensor 162
By calculating the intensity generation distance detection letter that transmitter issues infrared luminous intensity and receiver receives reflected infrared light
Breath, detection information sends command adapted thereto to controller to processor 24 according to this distance, and controller extinguishes screen according to instruction.Work as hand
When machine is far from head, the detection information that processor is fed back again according to proximity sensor 162 calculates and sends instruction, control
Device lights screen according to instruction again.
However, proximity sensor is in strong light environment sometimes in the actual application of proximity sensor, such as
Outdoors in the use environment of sun light direct beam, due to containing infrared light in sunlight, the data that proximity sensor will be acquired
Certain interference is caused, particularly, when electronic device is in different receiving angles, proximity sensor is infrared because what is received
Whether luminous intensity will generate fluctuation, have object to block or close to electronic device so that proximity sensor is unable to judge accurately.
The proximity test method of embodiment of the present invention, electronic device 100, computer-readable is deposited proximity test device 200
Storage media and computer equipment 300 acquire the first intensity value when infrared pulse signal is in trough respectively and are in wave crest
When the second intensity value, then according to the difference of the first intensity value and the second intensity value come judgment object whether close to or far away from
Electronic device 100.It so, it is possible to reduce infrared light interference caused by the detection of proximity sensor 162 in environment light.
Specifically, when pulse signal is in trough (low level), proximity sensor 162 does not emit infrared ray.At this point,
The collected infra-red intensity value of proximity sensor 162 is infra-red intensity value in environment.Wave crest is in pulse signal
When (high level), proximity sensor 162 emits infrared ray.At this point, the collected infra-red intensity of proximity sensor 162 is ring
Infra-red intensity in the light of border is with transmitting and by the sum of reflected infra-red intensity of object.By what is acquired in wave crest
Data and trough are that the data of acquisition make the difference the intensity value that can be obtained by by the reflected infrared ray of object, and difference is made
For judgment object whether close to electronic device 100 data.So, it is possible to reduce the infrared light in environment light is to proximity sensor
It is interfered caused by 162 detection data.
It should be noted that referring to Fig. 2, in embodiments of the present invention, a pulse period (T) includes multiple sub- arteries and veins
The period (t) is rushed it is to be understood that there are multiple wave crests and multiple troughs in a pulse period (T).One sub- pulse period
It (t) include a wave crest and a trough.When following implementation has similar illustrate and describe, explanation herein can also be joined
To understand.
In embodiments of the present invention, proximity sensor 162 emits the mode of infrared light pulse signal using more
Impulse ejection mode.The radiation pattern of multiple-pulse is it is to be understood that there are multiple wave crests with trough in a pulse period (T)
(as shown in Figure 2), in other words, there are multiple pulse durations and multiple pulse spacings in a pulse period (T), i.e.,
There are multiple wave crests with multiple troughs.For the mode of pulse, multiple-pulse mode can be sent out within the identical period
Multiple pulses are penetrated, pulse duration and interpulse period can shorten each time.In pulse duration each time and pulse
In interval time, influence of the infrared light for proximity sensor 162 in external environmental light is held essentially constant.In this way, can
To improve the accuracy of detection information.
It is to be appreciated that calculating object to electronic device in such a way that the second intensity value and the first intensity value are made difference
100 range information can effectively reduce infrared light interference caused by the detection of proximity sensor 162 in environment.Tool
Body, for example, in normal state, proximity sensor 162 receive the intensity of infrared light 50lm (Lumen) below when, table
Show that perhaps face shows object or face far from electronic device 100 to object at a distance from electronic device 100 in 90mm or more.
Proximity sensor 162 receives the intensity of infrared light in 200lm or more, indicates object or face and electronic device 100
Distance is in 50mm hereinafter, showing object or face close to electronic device 100.When ambient light sensor 161 detects environment light
First intensity value of mid-infrared light is 70lm, when the second intensity value of the infrared light that proximity sensor 162 detects is 85lm, by the
It is 15lm (15lm be less than 50lm) that two intensity values, which are that 85lm subtracts after the first intensity value is 70lm, shows that object or face are separate
Electronic device 100.When ambient light sensor 161 detects that the first intensity value of environment light mid-infrared light is 70lm, close to sensing
It is that 350lm subtracts the first intensity value and is by the second intensity value when second intensity value of the infrared light that device 162 detects is 350lm
It is 280lm (280lm is greater than 200lm) after 70lm, shows have object or face close to electronic device 100.It is appreciated that these
Intensity value and distance value are only used as illustratively, do not have limited effect, specific intensity value and distance value to the present invention
It can be set as the case may be.
Referring to Fig. 8, in some embodiments, proximity test method includes step:
S101:Detect the brightness value of current environment light;With
S102:When brightness value is greater than or equal to brightness predetermined threshold, acquisition connects in the trough in any subpulse period
The first intensity value that nearly sensor 162 acquires.
Referring to Fig. 4, in some embodiments, step S101 and step S102 can be realized by acquisition module 21.?
I other words obtaining module 21 can detecte the brightness value of current environment light, and it is greater than or equal to brightness predetermined threshold in brightness value
When, trigger step S10.
Referring to Fig. 1, in some embodiments, electronic device 100 includes ambient light sensor 161, step S101 and
Step S102 can be realized by processor 24.I.e. the available ambient light sensor 161 of processor 24 detects current environment light
Brightness value, and when brightness value is greater than or equal to brightness predetermined threshold, trigger step S10.
Specifically, Fig. 9 is please referred to, when user is under strong light environment, such as is exposed under the sun, close to biography
Sensor 162 is being affected in detection process by the infrared ray in surrounding environment light, it is easier to cause proximity sensor
162 detection error.Whether electronic device 100 is in strong light environment, can be judged by the environmental sensor 161, such as
The brightness predetermined threshold is 5000 luxs, when the current light intensity angle value that ambient light sensor 161 is got has been more than 5000 Le
Ke Si then assert that electronic device 100 is currently in strong light environment, at this point, proximity sensor 162 may be by the interference of strong light
And cause the numerical exception of acquisition.It should be noted that the numerical value of above-mentioned brightness predetermined threshold is only as illustrative explanation, tool
The size of body can be set as the case may be.Furthermore, it is possible to calculate ring by the imaging sensor in electronic device 100
The brightness value of border light.
Referring to Fig. 8, in some embodiments, proximity test method includes step:
S103:When brightness value is less than brightness predetermined threshold, according to the second intensity value object whether close to or away from electronics
Device 100.
Referring to Fig. 4, in some embodiments, step S103 can be realized by judgment module 22.In other words, judge
Whether module 22 can be when brightness value be less than brightness predetermined threshold, according to the second intensity value judgment object close to or away from electronics
Device 100.
Referring to Fig. 1, in some embodiments, step S103 can be realized by processor 24.In other words, processor
Whether 24 can be when brightness value be less than brightness predetermined threshold, according to the second intensity value judgment object close to or away from electronic device
100。
Specifically, when brightness value is less than brightness predetermined threshold, indicating electronic device 100, there is no be in strong light environment
In, at this point, influence of the infrared light to proximity sensor 162 in current environment is smaller.For example, being in the dim lights such as interior in user
When in environment, the infrared light in surrounding environment light is less, and the influence to proximity sensor 162 can be ignored, it is possible to
Whether the second intensity value for directly proximity sensor 162 being used to detect is close or remote as detection information progress judgment object
From electronic device 100.
Referring to Fig. 10, in some embodiments, the step S101 for detecting the brightness value of current environment light includes:
S1011:Obtain the multiple image of current environment;With
S1012:The brightness value of current environment is calculated according to multiple image.
Referring to Fig. 4, in some embodiments, proximity test device 200 includes computing module 23.Step S1011 can
To be realized by acquisition module 21, step S1012 can be realized by computing module 23.In other words, it is available to obtain module 21
The multiple image of current environment, computing module 23 can calculate the brightness value of current environment according to multiple image.
Referring to Fig. 1, in some embodiments, electronic device 100 includes camera 163, step S1011 and step
S1012 can be realized by processor 24.In other words, processor 24 can use the multiframe that camera 163 obtains current environment
Image, and according to the brightness value of multiple image calculating current environment.
Specifically, the brightness value of current environment can also be obtained by detecting 163 captured image of camera.For example, can
To calculate the brightness value of current environment according to the brightness of the rgb pixel of captured image.It is appreciated that these detection environment light
Mode be only used as illustratively, to the present invention do not have limited effect, detection environment light mode can also be other
Form.
Figure 11 is please referred to, in some embodiments, step S102 includes:
S104:The tilt angle of detection electronic installation 100;With
S105:When tilt angle is less than angle predetermined threshold, obtain in the trough in any subpulse period close to biography
The first intensity value that sensor 162 acquires.
Referring to Fig. 4, in some embodiments, step S104 and step S105 can be realized by acquisition module 21.?
I other words obtaining module 21 can detecte the tilt angle of electronic device 100, and predetermined more than or equal to angle in tilt angle
When threshold value, step S10 is triggered.
Referring to Fig. 1, in some embodiments, electronic device 100 includes acceleration transducer 164, step S104 and
Step S105 can be realized by processor 24.In other words, processor 24 can use acceleration transducer 164 and detect electronics dress
100 tilt angle is set, and when tilt angle is greater than or equal to angle predetermined threshold, triggers step S10.
Specifically, Figure 12 is please referred to, the tilt angle of electronic device 100 is 0 degree of (electronic device 100 and level side at this time
To in parallel).Figure 13 is please referred to, the tilt angle of electronic device 100 is 30 degree of (folders of electronic device 100 and horizontal direction at this time
Angle is 30 degree).Proximity sensor 162 is easier to receive the infrared light in environment light, the influence to proximity sensor 162 compared with
Greatly, it so when the tilt angle of electronic device 100 is less than angle reservation threshold, can be connect by detecting proximity sensor 162
The intensity of the intensity and environment light mid-infrared light that receive infrared light carrys out judgment object at a distance from electronic device 100, can reduce
It is interfered caused by detection of the environment light proximity sensor 162.In addition, the tilt angle of electronic device 100 can also include electricity
The tilt angle of sub-device 100 and vertical direction.The tilt angle of detection electronic installation 100 can also using gravity sensor or
Person's gyro sensor detects.It is appreciated that the specific data of angle predetermined threshold can be set according to the actual situation
It is fixed.
Figure 11 is please referred to, in some embodiments, proximity test method includes step:
S106:When tilt angle is greater than or equal to angle predetermined threshold, whether connect according to the second intensity value judgment object
Close or remote from electronic device 100.
Referring to Fig. 4, in some embodiments, step S106 can be realized by judgment module 22.In other words, judge
Whether module 22 can be greater than or equal to angle predetermined threshold in tilt angle, close or remote according to the second intensity value judgment object
From electronic device 100.
Referring to Fig. 1, in some embodiments, step S106 can be realized by processor 24.In other words, processor
Whether 24 can be greater than or equal to angle predetermined threshold in tilt angle, according to the second intensity value judgment object close to or away from electricity
Sub-device 100.
Specifically, Figure 14 is please referred to, the tilt angle of electronic device 100 is 120 degree at this time.Proximity sensor 162 is less
Ground receives the infrared light in environment light, and the influence to proximity sensor 162 can be ignored, it is possible to which direct use connects
Whether the second intensity value that nearly sensor 162 detects is as detection information progress judgment object close to or far away from electronic device
100。
Embodiment of the present invention additionally provides a kind of computer readable storage medium.One or more can be held comprising computer
The non-volatile computer readable storage medium storing program for executing of row instruction, when computer executable instructions are executed by one or more processors 24
When, so that processor 24 executes the proximity test method of any of the above-described embodiment.Such as execute step S10:It obtains any
The first intensity value that proximity sensor 162 acquires when the trough in subpulse period.Step S20:It obtains in sub- arteries and veins identical as trough
The second intensity value that proximity sensor 162 acquires when rushing the wave crest in period.With step S30:According to the first intensity value and the last the second
Whether the difference judgment object of angle value is close to or away from electronic device 100.
Referring to Fig. 5, embodiment of the present invention additionally provides a kind of computer equipment 300.Computer equipment includes storage
Device 32 and processor 24 store computer-readable instruction in memory 32, and when instruction is executed by processor 24, processor 24 is held
The proximity test method of any of the above-described embodiment of row.Such as execute step S10:It obtains in the trough in any subpulse period
The first intensity value that proximity sensor 162 acquires.Step S20:It obtains and is approached in the wave crest in subpulse period identical as trough
The second intensity value that sensor 162 acquires.With step S30:According to the difference judgment object of the first intensity value and the second intensity value
Whether close to or away from electronic device 100.
Fig. 5 is the internal module schematic diagram of the computer equipment 300 in one embodiment.Computer equipment 300 includes logical
Cross processor 24, memory 32 (for example, non-volatile memory medium), built-in storage 33, the input dress of the connection of system bus 31
Set 34, ambient light sensor 161, proximity sensor 162, camera 163 and acceleration transducer 164.Wherein, computer equipment
300 memory 32 is stored with operating system and computer-readable instruction.The computer-readable instruction can be executed by processor 24,
To realize the proximity test method of above-mentioned any one embodiment.Processor 24 can be used for providing calculating and control ability, branch
Support the operation of entire computer equipment 300.The built-in storage 33 of computer equipment 300 is the computer-readable finger in memory 32
Operation is enabled to provide environment.The input unit 34 of computer equipment 300 can be the touch panel on display screen, be also possible to calculate
Key, trace ball or the Trackpad being arranged on 300 shell of machine equipment, are also possible to external keyboard, Trackpad or mouse etc..It should
It is (such as intelligent that computer equipment 300 can be mobile phone, tablet computer, laptop, personal digital assistant or wearable device
Bracelet, smartwatch, intelligent helmet, intelligent glasses) etc..It will be understood by those skilled in the art that structure shown in figure, only
It is the schematic diagram of part-structure relevant to the present invention program, does not constitute the computer being applied thereon to the present invention program
The restriction of equipment 300, specific computer equipment 300 may include than more or fewer components as shown in the figure, or combination
Certain components, or with different component layouts.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in that a non-volatile computer is readable to be deposited
In storage media, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium
It can be magnetic disk, CD, read-only memory (Read-Only Memory, ROM) etc..
Above disclosure provides many different embodiments or example is used to realize different structure of the invention.In order to
Simplify disclosure of the invention, above the component of specific examples and setting are described.Certainly, they are merely examples, and
And it is not intended to limit the present invention.In addition, the present invention can in different examples repeat reference numerals and/or reference letter,
This repetition is for purposes of simplicity and clarity, itself not indicate between discussed various embodiments and/or setting
Relationship.In addition, the present invention provides various specific techniques and material example, but those of ordinary skill in the art can be with
Recognize the application of other techniques and/or the use of other materials.
In the description of this specification, reference term " embodiment ", " some embodiments ", " schematically implementation
The description of mode ", " example ", " specific example " or " some examples " etc. means embodiment or example is combined to describe specific
Feature, structure, material or feature are contained at least one embodiment or example of the invention.In the present specification, right
The schematic representation of above-mentioned term is not necessarily referring to identical embodiment or example.Moreover, the specific features of description, knot
Structure, material or feature can be combined in any suitable manner in any one or more embodiments or example.
While embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that:?
These embodiments can be carried out with a variety of variations, modification, replacement in the case where not departing from the principle of the present invention and objective and become
Type, the scope of the present invention are defined by the claims and their equivalents.
Claims (15)
1. a kind of proximity test method is used for electronic device, which is characterized in that the electronic device includes proximity sensor, institute
Proximity sensor is stated for emitting infrared pulse signal, a pulse period of the infrared pulse signal includes multiple subpulses
In the period, each subpulse period includes a wave crest and a trough, the control method include step:
Obtain the first intensity value of the proximity sensor acquisition in the trough in any subpulse period;
Obtain the second intensity value of the proximity sensor acquisition in the wave crest in subpulse period identical as the trough;With
Judge the object whether close to or away from the electricity according to the difference of first intensity value and second intensity value
Sub-device.
2. proximity test method as described in claim 1, which is characterized in that the proximity test method includes step:
Detect the brightness value of current environment light;With
When the brightness value is greater than or equal to brightness predetermined threshold, obtain described close in the trough in any subpulse period
First intensity value of sensor acquisition.
3. proximity test method as claimed in claim 2, which is characterized in that the proximity test method includes step:
When the brightness value is less than the brightness predetermined threshold, judge whether the object approaches according to second intensity value
Or far from the electronic device.
4. proximity test method as claimed in claim 2, which is characterized in that the step of the brightness value of the detection current environment light
Suddenly include:
Obtain the multiple image of current environment;With
The brightness value of current environment is calculated according to the multiple image.
5. proximity test method as claimed in claim 2, which is characterized in that predetermined more than or equal to brightness in the brightness value
When threshold value, acquisition includes the step of the first intensity value of the proximity sensor acquisition in the trough in any subpulse period:
Detect the tilt angle of the electronic device;With
When the tilt angle is less than angle predetermined threshold, obtain described close to sensing in the trough in any subpulse period
First intensity value of device acquisition.
6. proximity test method as claimed in claim 5, which is characterized in that the proximity test method includes step:
When the tilt angle is greater than or equal to angle predetermined threshold, whether the object is judged according to second intensity value
Close to or away from the electronic device.
7. a kind of proximity test device is used for electronic device, which is characterized in that the electronic device includes proximity sensor, institute
Proximity sensor is stated for emitting infrared pulse signal, a pulse period of the infrared pulse signal includes multiple subpulses
Period, each subpulse period include a wave crest and a trough, and the proximity test device includes:
Module is obtained, for obtaining the first intensity value of the proximity sensor acquisition in the trough in any subpulse period;
The acquisition module is also used to obtain the proximity sensor in the wave crest in subpulse period identical as the trough and adopts
Second intensity value of collection;With
Judgment module, for judging whether the object approaches according to the difference of first intensity value and second intensity value
Or far from the electronic device.
8. a kind of electronic device, which is characterized in that the electronic device includes:
Proximity sensor, the proximity sensor is for emitting infrared pulse signal, a pulse of the infrared pulse signal
Period includes multiple subpulse periods, and each subpulse period includes a wave crest and a trough;With
Processor, the processor are used for:
Obtain the first intensity value of the proximity sensor acquisition in the trough in any subpulse period;
Obtain the second intensity value of the proximity sensor acquisition in the wave crest in subpulse period identical as the trough;With
Judge the object whether close to or away from the electricity according to the difference of first intensity value and second intensity value
Sub-device.
9. electronic device as claimed in claim 8, which is characterized in that the electronic device further includes ambient light sensor, institute
It states ambient light sensor and is also used to be greater than or wait in the brightness value for detecting the brightness value of current environment light, the processor
When brightness predetermined threshold, the first intensity value of the proximity sensor acquisition in the trough in any subpulse period is obtained.
10. electronic device as claimed in claim 9, which is characterized in that the processor is also used to:When the brightness value is less than
When the brightness predetermined threshold, judge the object whether close to or away from the electronic device according to second intensity value.
11. electronic device as claimed in claim 9, which is characterized in that the electronic device includes camera, described to take the photograph
As head is used to calculate the institute of current environment according to the multiple image for obtaining the multiple image of current environment, the processor
State brightness value.
12. electronic device as claimed in claim 9, which is characterized in that the electronic device includes acceleration transducer, described
Acceleration transducer is used to detect the tilt angle of the electronic device, and the processor is used to be less than angle in the tilt angle
When spending predetermined threshold, the first intensity value of the proximity sensor acquisition in the trough in any subpulse period is obtained.
13. electronic device as claimed in claim 12, which is characterized in that the processor in the tilt angle for being greater than
Or when being equal to the angle predetermined threshold, judge the object whether close to or away from the electronics according to second intensity value
Device.
14. one or more includes the non-volatile computer readable storage medium storing program for executing of computer executable instructions, when the calculating
When machine executable instruction is executed by one or more processors, so that the processor perform claim requires any one of 1 to 6 institute
The proximity test method stated.
15. a kind of computer equipment, including memory and processor, computer-readable instruction is stored in the memory, institute
When stating instruction by processor execution, so that proximity test described in any one of processor perform claim requirement 1 to 6
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810554869.9A CN108873005B (en) | 2018-06-01 | 2018-06-01 | Proximity detection method and apparatus, electronic apparatus, storage medium, and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810554869.9A CN108873005B (en) | 2018-06-01 | 2018-06-01 | Proximity detection method and apparatus, electronic apparatus, storage medium, and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108873005A true CN108873005A (en) | 2018-11-23 |
CN108873005B CN108873005B (en) | 2021-11-02 |
Family
ID=64336146
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810554869.9A Active CN108873005B (en) | 2018-06-01 | 2018-06-01 | Proximity detection method and apparatus, electronic apparatus, storage medium, and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108873005B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111310627A (en) * | 2020-02-07 | 2020-06-19 | 广州视源电子科技股份有限公司 | Detection method and device of sensing device and electronic equipment |
CN112260672A (en) * | 2020-10-19 | 2021-01-22 | 深圳市太美亚电子科技有限公司 | Method for adjusting induction distance of infrared device |
CN112399012A (en) * | 2020-11-17 | 2021-02-23 | 惠州Tcl移动通信有限公司 | Proximity sensor setting method, device and storage medium |
CN112698420A (en) * | 2019-10-23 | 2021-04-23 | 广州奕至家居科技有限公司 | Object approach sensing method and device |
CN113407068A (en) * | 2020-03-16 | 2021-09-17 | 罗姆股份有限公司 | Light-receiving IC, non-contact sensor, and electronic device |
CN115529382A (en) * | 2022-02-28 | 2022-12-27 | 荣耀终端有限公司 | Method for calculating optical proximity parameter and related electronic equipment |
CN116662789A (en) * | 2023-07-31 | 2023-08-29 | 杭州泽天春来科技有限公司 | Signal processing method and system of Fourier infrared spectrometer and readable storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090190007A1 (en) * | 2008-01-30 | 2009-07-30 | Mesa Imaging Ag | Adaptive Neighborhood Filtering (ANF) System and Method for 3D Time of Flight Cameras |
US20100036592A1 (en) * | 2008-08-07 | 2010-02-11 | Denso Corporation | Engine starting controller |
CN101719387A (en) * | 2009-12-10 | 2010-06-02 | 清华大学 | External ball passage detecting method and device for ball-bed high temperature gas cooled reactor |
CN102883061A (en) * | 2012-09-26 | 2013-01-16 | 广东欧珀移动通信有限公司 | Method and system for controlling working state of touch screen of mobile terminal |
CN106506794A (en) * | 2016-09-05 | 2017-03-15 | 广东欧珀移动通信有限公司 | The state monitoring method of terminal unit, device and terminal unit |
CN107506757A (en) * | 2017-09-30 | 2017-12-22 | 努比亚技术有限公司 | A kind of lateral fingerprint module and the mobile terminal with lateral fingerprint module |
CN107884764A (en) * | 2017-11-22 | 2018-04-06 | 广东欧珀移动通信有限公司 | Detection method, device, storage medium and the electronic equipment of proximity state |
US10117598B1 (en) * | 2015-11-08 | 2018-11-06 | Sensogram Technologies, Inc. | Non-invasive wearable respiration rate monitoring system |
-
2018
- 2018-06-01 CN CN201810554869.9A patent/CN108873005B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090190007A1 (en) * | 2008-01-30 | 2009-07-30 | Mesa Imaging Ag | Adaptive Neighborhood Filtering (ANF) System and Method for 3D Time of Flight Cameras |
US20100036592A1 (en) * | 2008-08-07 | 2010-02-11 | Denso Corporation | Engine starting controller |
CN101719387A (en) * | 2009-12-10 | 2010-06-02 | 清华大学 | External ball passage detecting method and device for ball-bed high temperature gas cooled reactor |
CN102883061A (en) * | 2012-09-26 | 2013-01-16 | 广东欧珀移动通信有限公司 | Method and system for controlling working state of touch screen of mobile terminal |
US10117598B1 (en) * | 2015-11-08 | 2018-11-06 | Sensogram Technologies, Inc. | Non-invasive wearable respiration rate monitoring system |
CN106506794A (en) * | 2016-09-05 | 2017-03-15 | 广东欧珀移动通信有限公司 | The state monitoring method of terminal unit, device and terminal unit |
CN107506757A (en) * | 2017-09-30 | 2017-12-22 | 努比亚技术有限公司 | A kind of lateral fingerprint module and the mobile terminal with lateral fingerprint module |
CN107884764A (en) * | 2017-11-22 | 2018-04-06 | 广东欧珀移动通信有限公司 | Detection method, device, storage medium and the electronic equipment of proximity state |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112698420A (en) * | 2019-10-23 | 2021-04-23 | 广州奕至家居科技有限公司 | Object approach sensing method and device |
CN112698420B (en) * | 2019-10-23 | 2023-11-03 | 广州奕至家居科技有限公司 | Object proximity sensing method and device |
CN111310627A (en) * | 2020-02-07 | 2020-06-19 | 广州视源电子科技股份有限公司 | Detection method and device of sensing device and electronic equipment |
CN111310627B (en) * | 2020-02-07 | 2024-01-30 | 广州视源电子科技股份有限公司 | Detection method and device of sensing device and electronic equipment |
CN113407068A (en) * | 2020-03-16 | 2021-09-17 | 罗姆股份有限公司 | Light-receiving IC, non-contact sensor, and electronic device |
CN113407068B (en) * | 2020-03-16 | 2023-12-05 | 罗姆股份有限公司 | Light receiving IC, noncontact sensor, and electronic device |
CN112260672A (en) * | 2020-10-19 | 2021-01-22 | 深圳市太美亚电子科技有限公司 | Method for adjusting induction distance of infrared device |
CN112260672B (en) * | 2020-10-19 | 2024-02-06 | 深圳市太美亚电子科技有限公司 | Method for adjusting induction distance of infrared device |
CN112399012A (en) * | 2020-11-17 | 2021-02-23 | 惠州Tcl移动通信有限公司 | Proximity sensor setting method, device and storage medium |
CN115529382A (en) * | 2022-02-28 | 2022-12-27 | 荣耀终端有限公司 | Method for calculating optical proximity parameter and related electronic equipment |
CN116662789A (en) * | 2023-07-31 | 2023-08-29 | 杭州泽天春来科技有限公司 | Signal processing method and system of Fourier infrared spectrometer and readable storage medium |
CN116662789B (en) * | 2023-07-31 | 2023-10-27 | 杭州泽天春来科技有限公司 | Signal processing method and system of Fourier infrared spectrometer and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108873005B (en) | 2021-11-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108873005A (en) | Proximity test method and device, electronic device, storage medium and equipment | |
CN108874128A (en) | Proximity test method and device, electronic device, storage medium and equipment | |
CN108983250A (en) | Proximity test method and device, electronic device, storage medium and equipment | |
CN110249613B (en) | Display screen state control method and device, storage medium and electronic equipment | |
KR101792866B1 (en) | Method and Apparatus for Motion Recognition using event sensor and color sensor | |
US20210243347A1 (en) | Generating static images with an event camera | |
CN105511846B (en) | Electronic equipment and display control method | |
CN108700934A (en) | It can carry out the wearable device of eye tracks | |
US8860660B2 (en) | System and method of determining pupil center position | |
EP3627810B1 (en) | Proximity detection method and apparatus, storage medium, and electronic device | |
CN103576857A (en) | Fast wake-up in gaze tracking system | |
US20180321739A1 (en) | Electronic device and method for controlling display | |
CN106899766A (en) | A kind of safety instruction method and its device and mobile terminal | |
CN102216890A (en) | Touch input with image sensor and signal processor | |
KR20110005737A (en) | Interactive input system with optical bezel | |
US20130169532A1 (en) | System and Method of Moving a Cursor Based on Changes in Pupil Position | |
US9223407B2 (en) | Gesture recognition apparatus and complex optical apparatus | |
CN105593786A (en) | Gaze-assisted touchscreen inputs | |
CN113031840B (en) | False triggering prevention method and device for wrist-worn device, electronic device and storage medium | |
CN104423721A (en) | Frameless multipoint touch man-machine interaction method and system based on radar eye | |
US9329700B2 (en) | Interactive system with successively activated illumination sources | |
KR20160061699A (en) | Electronic device and method for controlling dispaying | |
CN109164917B (en) | Electronic device control method, storage medium, and electronic device | |
CN107004132B (en) | Eyeball tracking device, auxiliary light source control method thereof and related device | |
CN108833695A (en) | Control method, control device, electronic device, computer storage medium and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |