CN109061662A - Infrared detection method, device, computer equipment and storage medium - Google Patents

Infrared detection method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109061662A
CN109061662A CN201810704677.1A CN201810704677A CN109061662A CN 109061662 A CN109061662 A CN 109061662A CN 201810704677 A CN201810704677 A CN 201810704677A CN 109061662 A CN109061662 A CN 109061662A
Authority
CN
China
Prior art keywords
infrared
energy
receiving module
infrared energy
module
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
Application number
CN201810704677.1A
Other languages
Chinese (zh)
Other versions
CN109061662B (en
Inventor
郭富豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201810704677.1A priority Critical patent/CN109061662B/en
Publication of CN109061662A publication Critical patent/CN109061662A/en
Application granted granted Critical
Publication of CN109061662B publication Critical patent/CN109061662B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • G01S17/06Systems determining position data of a target
    • G01S17/08Systems determining position data of a target for measuring distance only
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser

Abstract

The embodiment of the present application discloses infrared detection method, device, computer equipment and storage medium, in the case where infrared transmission module is in running order, determines the first infrared receiving module received first infrared energy in acquisition time section;The second infrared receiving module received second infrared energy in the acquisition time section is obtained, environment infrared energy is removed from the first infrared energy according to the second infrared energy and obtains practical infrared energy;Since the second infrared receiving module not less than second distance threshold value and is not higher than third distance threshold at a distance from infrared transmission module, the period that first and second infrared receiving module obtains infrared energy is identical, so can accurately estimate the energy that the infrared ray from environment that the first infrared receiving module receives in acquisition time section has according to the second infrared energy, to which removal is derived from the interference of the infrared ray of external environment in the first infrared energy, interference of the infrared ray to infrared detections in environment is reduced, accuracy in detection is promoted.

Description

Infrared detection method, device, computer equipment and storage medium
Technical field
The present invention relates to infrared technology field more particularly to a kind of infrared detection method, device, computer equipment and deposit Storage media.
Background technique
In the use process of terminal, triggering terminal is many times needed according to terminal at a distance from user to execute corresponding Operation readiness, such as in triggering terminal automatic extinguishing screen when being closer of terminal and user, alternatively, in terminal at a distance from user Triggering terminal bright screen etc. automatically when farther out.These convenient and fast functions need terminal that can obtain itself at a distance from user, right In the distance, terminal can be detected using modes such as ultrasound examination, infrared detections.
For infrared detection, terminal emits infrared ray generally by the infrared proximity transducer of itself, and it is red to receive this Reflection light of the outside line after shelter reflects obtains variation of the reflection light relative to the infrared ray of transmitting, and then controls eventually End.But in practice since the infrared ray in the sunlight and/or light in external environment will form interference, infrared proximity There will necessarily be the infrared light that a part is originated from environment in the received reflection light of sensor, not so as to cause infrared detections Accurately.
Summary of the invention
The main purpose of the embodiment of the present invention is to provide a kind of infrared detection method, device, computer equipment and storage Medium can reduce the infrared ray pair in environment in the energy for detecting the reflection light of infrared ray of infrared sensor transmitting The interference of testing result promotes the accuracy of testing result.
To achieve the above object, first aspect of the embodiment of the present invention provides a kind of infrared detection method, is applied to electronics and fills It sets, the electronic device is provided with infrared transmission module and the first infrared receiving module, and the infrared detection method includes:
In the case where the infrared transmission module is in running order, it is infrared that first is obtained by first infrared receiving module Energy, first infrared energy are first infrared receiving module received infrared energy in acquisition time section, wherein First infrared receiving module is no more than first distance threshold value at a distance from the infrared transmission module;
The second infrared energy is obtained, second infrared energy is the second infrared receiving module in the acquisition time section Received infrared energy, wherein second infrared receiving module at a distance from the infrared transmission module not less than second away from From threshold value and it is not higher than third distance threshold, the second distance threshold value is greater than the first distance threshold value;
Removed from first infrared energy according to second infrared energy environment infrared energy obtain it is practical infrared Energy, the environment infrared energy are that first infrared receiving module is received derived from extraneous ring in the acquisition time section The infrared energy that the infrared ray in border has.
To achieve the above object, second aspect of the embodiment of the present invention provides a kind of infrared detecting device, is provided with red Outer transmitting module and the first infrared receiving module, the infrared detecting device include:
Detection module, for passing through first infrared receiving in the case where the infrared transmission module is in running order Block obtains the first infrared energy, and first infrared energy is that first infrared receiving module is received in acquisition time section Infrared energy, wherein first infrared receiving module is no more than first distance threshold value at a distance from the infrared transmission module;
Module is obtained, for obtaining the second infrared energy, second infrared energy is the second infrared receiving module in institute State received infrared energy in acquisition time section, wherein second infrared receiving module and the infrared transmission module away from From not less than second distance threshold value and not higher than third distance threshold, the second distance threshold value is greater than the first distance threshold Value;
Module is filtered out, for removing environment infrared energy from first infrared energy according to second infrared energy Practical infrared energy is obtained, the environment infrared energy is that first infrared receiving module receives in the acquisition time section The infrared energy being had derived from the infrared ray of external environment.
To achieve the above object, the third aspect of the embodiment of the present invention provides a kind of computer equipment, the computer equipment packet Include infrared transmission module, the first infrared receiving module, processor, memory and communication bus;
The communication bus is for realizing the processor, the memory, the infrared transmission module and described first Connection communication between infrared receiving module;
For storing one or more programs, the processor is used to executing to be stored the memory in the memory One or more program, to realize such as the step of above-mentioned infrared detection method.
To achieve the above object, fourth aspect of the embodiment of the present invention provides a kind of storage medium, which is stored with One or more program, one or more of programs can be executed by one or more processor, to realize institute as above The step of infrared detection method stated.
The embodiment of the invention provides a kind of infrared detection method, device, computer equipment and storage medium, to being provided with The electronic device of infrared transmission module and the first infrared receiving module, in the case where infrared transmission module is in running order, described The one infrared receiving module energy that received infrared ray has in acquisition time section is as the first infrared energy;It is red to obtain second The outer receiving module energy that received infrared ray has in the acquisition time section is the second infrared energy, red according to described second Outer energy removes environment infrared energy from first infrared energy and obtains practical infrared energy;In the embodiment of the present invention due to Second infrared receiving module not less than second distance threshold value and is not higher than third distance threshold at a distance from infrared transmission module, the One, the period of two infrared receiving modules acquisition infrared energy is identical, so the second of the second infrared receiving module acquisition is infrared Energy may be considered its received energy for being originated from extraneous infrared ray and having in acquisition time section, so red according to second What outer energy can relatively accurately estimate that the first infrared receiving module receives in acquisition time section is originated from red in environment The energy that outside line has, so that removal is derived from the interference of the infrared ray of external environment in the first infrared energy, so passing through this The energy of the reflection light for the infrared ray that the infrared ray in environment emits infrared transmission module can be effectively reduced in inventive embodiments The influence for measuring testing result, promotes the energy measuring accuracy of reflection light, to promote the parameter obtained according to testing result The accuracy of (such as electronic device is at a distance from shelter).
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those skilled in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.
Fig. 1 is a kind of structural block diagram of electronic device;
Fig. 2 is a kind of flow diagram of infrared detection method in first embodiment of the invention;
The second infrared receiving module and infrared transmission module that Fig. 3 is first embodiment of the invention are on same electronic device The schematic diagram of setting;
Fig. 4 is the flow diagram of another infrared detection method in first embodiment of the invention;
Fig. 5 for where the second infrared receiving module in first embodiment of the invention electronic equipment and infrared transmission module institute Electronic device communication schematic diagram;
Fig. 6 is the flow diagram of another infrared detection method in first embodiment of the invention;
Fig. 7 is the program module schematic diagram of infrared detecting device in second embodiment of the invention.
Specific embodiment
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described reality Applying example is only a part of the embodiment of the present invention, and not all embodiments.Based on the embodiments of the present invention, those skilled in the art Member's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Referring to Fig.1, Fig. 1 shows a kind of structural block diagram of electronic device.Infrared detection side provided in an embodiment of the present invention Method can be applied in electronic device 10 as shown in Figure 1, and illustratively, electronic device 10 can be mobile or portable and execute Any one of various types of computer system devices of wireless communication (only illustratively show a kind of shape in Fig. 1 State).Specifically, electronic device 10 (for example, being based on iPhone TM, can be based on Android for mobile phone or smart phone The phone of TM), portable gaming device (such as Nintendo DS TM, PlayStation Portable TM, Gameboy Advance TM, iPhone TM), laptop computer, PDA, portable Internet appliance, music player and data storage Equipment, other handheld devices and wrist-watch, earphone, pendant, earphone etc., electronic device 10 can also be other wearable Equipment is (for example, such as electronic glasses, electronics clothes, electronics bracelet, electronics necklace, electronics are tatooed, electronic equipment or smartwatch Headset equipment (HMD)).
Electronic device 10 can also be that any one of multiple electronic equipments, multiple electronic equipments include but is not limited to bee Cellular telephone, smart phone, other wireless telecom equipments, personal digital assistant, audio player, other media players, music Logger, camera, other medium recorders, radio, Medical Devices, vehicle transport instrument, calculator, can be compiled video recorder Journey remote controler, pager, laptop computer, desktop computer, printer, netbook computer, personal digital assistant (PDA), Portable media player (PMP), Motion Picture Experts Group (MPEG-1 or MPEG-2) audio layer 3 (MP3) player, it is portable Formula Medical Devices and digital camera and combinations thereof.
In some cases, electronic device 10 can execute multiple functions and (for example, playing music, show video, storage figure Piece and send and receive call).If desired, electronic device 10 can be such as cellular phone, media player, its The portable device of his handheld device, watch equipment, pendant equipment, receiver device or other compact portable equipment.
As shown in Figure 1, electronic device 10 may include control circuit, which may include storage and processing circuit 30.The storage and processing circuit 30 can store device, such as hard drive memory, nonvolatile memory (such as flash memory or Be used to form other electrically programmable read only memories etc. of solid state drive), volatile memory (such as either statically or dynamically with Machine accesses memory etc.) etc., the embodiment of the present application is with no restriction.Processing circuit in storage and processing circuit 30 can be used for controlling The operating of electronic device 10 processed.The processing circuit can microprocessor based on one or more, microcontroller, Digital Signal Processing Device, baseband processor, power management unit, audio codec chip, specific integrated circuit, display-driver Ics etc. To realize.
Storage and processing circuit 30 can be used for running the software in electronic device 10, such as the Internet browser application program, Voice over internet protocol (Voice over Internet Protocol, VOIP) call application program, Email are answered With program, media play-back application, operation system function etc..These softwares can be used for executing some control operations, for example, Image Acquisition based on camera, the ambient light measurement based on ambient light sensor, the proximity sensor based on proximity sensor Measurement, the information display function that the positioning indicators such as status indicator lamp based on light emitting diode are realized are passed based on touching The touch event of sensor detects, function associated with information show on multiple (such as layering) displays, with execution nothing The associated operation of line communication function, operation associated with collecting and generating audio signal, presses with collection and treatment button Other functions etc. in the associated control operation of event data and electronic device 10, the embodiment of the present application is with no restriction.
Electronic device 10 can also include input-output circuit 42.Input-output circuit 42 can be used for making electronic device 10 Realize outputting and inputting for data, i.e. permission electronic device 10 allows electronic device 10 that will count from outer equipment receiving data and also According to from the output of electronic device 10 to external equipment.Input-output circuit 42 may further include sensor 32.Sensor 32 can To include ambient light sensor, the proximity sensor based on light and capacitor, touch sensor is (for example, be based on light touch sensor And/or capacitive touch sensors, wherein touch sensor can be a part of touching display screen, can also be used as one Touch sensor arrangement independently uses), acceleration transducer and other sensors etc..
Input-output circuit 42 can also include one or more displays, such as display 14.Display 14 can wrap Include liquid crystal display, organic light emitting diode display, electronic ink display, plasma display uses other display skills One or several kinds of combination in the display of art.Display 14 may include touch sensor array (that is, display 14 can be with It is touching display screen).Touch sensor can be by transparent touch sensor electrode (such as tin indium oxide (ITO) electrode) battle array The capacitive touch sensors formed are arranged, or can be the touch sensor formed using other touching techniques, such as sound wave Touch-control, pressure sensible touch, resistive touch, optical touch etc., the embodiment of the present application is with no restriction.
Electronic device 10 can also include audio component 36.Audio component 36 can be used for providing audio for electronic device 10 Output and input function.Audio component 36 in electronic device 10 may include loudspeaker, microphone, buzzer, tone generation Device and other components for being used to generate and detect sound.
Telecommunication circuit 38 can be used for providing the ability with external device communication for electronic device 10.Telecommunication circuit 38 can be with Radio communication circuit including analog- and digital- input-output interface circuit, and based on radiofrequency signal and/or optical signal.Communication Radio communication circuit in circuit 38 may include radio-frequency transceiver circuitry, power amplifier circuit, low-noise amplifier, open Pass, filter and antenna.For example, the radio communication circuit in telecommunication circuit 38 may include for by transmitting and reception Near-field coupling electromagnetic signal supports the circuit of near-field communication (Near Field Communication, NFC).For example, communication Circuit 38 may include near-field communication aerial and near-field communication transceiver.Telecommunication circuit 38 can also include cellular telephone transceiver And antenna, wireless lan transceiver circuit and antenna etc..
Electronic device 10 can further include battery, power management circuitry and other input-output units 40.It is defeated Enter-output unit 40 may include button, control stick, click wheel, scroll wheel, touch tablet, keypad, keyboard, camera shines Diode and other positioning indicators etc..
User can input a command for the operation of control electronic device 10 by input-output circuit 42, and can make Status information and other outputs from electronic device 10 are received with the output data of input-output circuit 42 to realize.
Infrared detection method in the embodiment of the present invention is described based on above-mentioned electronic device.
In the prior art, infrared detection is at present in a kind of mode of the detecting distance generally used, infrared communication number With difference at a distance from barrier, the intensity for reflecting signal is also different, so can be true by the energy measuring to reflection signal Determine the attenuation of infrared signal, so determine infrared proximity transducer at a distance from barrier, but infrared proximity transducer External environment in itself just there is infrared ray, so can to the detection of infrared proximity transducer generate interference, reduce to reflection Infrared ray energy measuring accuracy, reduce the accuracy of infrared distance measurement.
For above-mentioned technical problem, the present embodiment proposes a kind of infrared detection method, and this method is applied to as shown in Figure 1 Electronic device is provided with infrared transmission module and the first infrared receiving module on the electronic device.Referring to fig. 2, Fig. 2 is the present invention The flow diagram of infrared detection method in first embodiment, this method comprises:
Step 201, in the case where infrared transmission module is in running order, the first infrared receiving module obtain the first infrared energy Amount, the first infrared energy is the first infrared receiving module received infrared energy in acquisition time section, wherein first infrared connects It receives module and is no more than first distance threshold value at a distance from infrared transmission module;
The first infrared energy includes two parts in the present embodiment, and a part is by the infrared ray of infrared transmission module transmitting through electricity The reflection light after shelter reflection outside sub-device is brought, and another part is brought by the infrared ray for being originated from external environment.The One infrared energy can be used to do close to judgement, in order to promote judgment accuracy, need to be promoted reflection light bring energy and exist Ratio in first infrared energy, so needing to guarantee that the first infrared receiving module is no more than the at a distance from infrared transmission module One distance threshold;The first distance threshold value can be arranged according to the actual situation, such as first distance threshold value is 0.1cm etc., to protect Demonstrate,prove the reflection light that the first infrared receiving module receives the infrared ray of infrared transmission module transmitting as much as possible.Show at one In example, the first infrared receiving module and infrared transmission module are on the same infrared proximity transducer.
The duration being carved between finish time at the beginning of the above-mentioned acquisition time section can be arranged according to the actual needs, example 1s such as is set by duration, the present embodiment is with no restriction.It is envisioned that being considered based on energy etc. is saved, infrared emission The infrared emission function of module is not to be switched on (i.e. infrared transmission module is not to be constantly in working condition) always.Pass through Infrared transmission module periodical launch infrared ray, the mode of the first infrared receiving module receiving infrared-ray can detecte whether have screening Block material, when the test results is yes, electronic device just control the step of infrared proximity transducer enters infrared detection method, keep Infrared transmission module it is in running order.So detecting that external electronic device has shelter in the present embodiment, can be used as red Outer transmitting module starts to obtain a signal of the first infrared energy, one be arranged at the beginning of also can be used as acquisition time section A foundation.Optionally, when detecting that external electronic device has shelter (or shelter is close to electronic device), electronic device After can be set between current time and current time at the time of preset duration as acquisition time section at the beginning of, example When such as infrared transmission module periodical launch infrared ray, electronic device detects the infrared of reflection according to the first infrared receiving module The energy of line is gradually increasing, then judges that user is moving closer to electronic device, it is assumed that and current time is 15:33:00 on June 4, Then using after current time at the time of 1S as acquisition time section at the beginning of, June 4 15:33:01 start calculating first The energy (i.e. the first infrared energy) that the infrared ray that infrared receiving module senses in the 1S after start time has.
Step 202 obtains the second infrared energy, and the second infrared energy is the second infrared receiving module in acquisition time section Received infrared energy, wherein the second infrared receiving module at a distance from infrared transmission module not less than second distance threshold value and Not higher than third distance threshold, second distance threshold value is greater than first distance threshold value;
It is understood that the reason of because of the infrared ray having in environment, the first infrared receiving module is in acquisition time The first infrared energy obtained in section is not all the energy of the reflection light of the infrared ray of infrared transmission module transmitting, and there are also environment In the energy that has of infrared ray, so needing to reduce the influence of the first infrared energy of the infrared ray pair derived from environment.
The second infrared receiving module in the present embodiment is not less than second distance threshold value at a distance from infrared transmission module, is In order to avoid infrared ray the second infrared energy received to the second infrared receiving module of infrared transmission module transmitting generates big It influences, second distance threshold value can be arranged according to the coverage area for the infrared ray that infrared transmission module emits, so that second is red Energy in outer received second infrared energy of receiving module derived from the infrared ray of infrared transmission module transmitting is few as much as possible.The Two infrared receiving modules are not higher than third distance threshold at a distance from infrared transmission module, are in order to avoid first and second infrared connects The infrared ray difference in distribution received in module ambient enviroment is excessive, guarantees the accuracy of practical infrared energy.It is envisioned that In the present embodiment, in acquisition time section, only infrared transmission module emits infrared ray.
The infrared energy in environment that the second infrared receiving module and the first infrared receiving module are subject in the present embodiment is dry Disturb may be considered it is similar, so the second infrared energy received in acquisition time section based on the second infrared receiving module Amount, can relatively accurately estimate that the second infrared receiving module receives in acquisition time section derived from the red of external environment The energy that outside line has, and then estimate in received first infrared energy of the first infrared receiving module in acquisition time section by source Infrared ray bring energy (environment infrared energy i.e. hereinafter) in external environment.
In one example, the second above-mentioned infrared receiving module can be used as individual module and be arranged in infrared emission mould On electronic device where block and the first infrared receiving module, infrared transmission module and the first infrared receiving module can also be used as A part of affiliated infrared proximity transducer is arranged on the electronic device of the present embodiment, and in addition to this, above-mentioned second is red Auxiliary infrared sensor can also be arranged in outer receiving module, which has the function of infrared proximity transducer Can, it can also emit and receiving infrared-ray.Auxiliary infrared sensor can be set in the electronics where infrared proximity transducer On device, also it can be set on the other electronic equipments for establishing connection with the electronic device, the present embodiment is not limited in this respect.
In the present embodiment, the quantity of the second infrared receiving module can be one, be also possible at least two, the present embodiment To the quantity of the second infrared receiving module there is no limit.
Second infrared receiving module and infrared transmission module are arranged on identical electronic device, can pass through The relative position of second infrared receiving module and infrared transmission module is configured, the testing result of the second infrared energy is promoted Accuracy, but this set need an electronic device on have at least two infrared receiving modules, the present embodiment can be improved Implementation cost.And the second infrared receiving module and infrared transmission module are arranged on different devices, then can use existing Different device on infrared sensor realize the scheme of the present embodiment, without carrying out changing on any hardware to electronic device It makes, advantageously reduces the cost for realizing the scheme of the present embodiment.
Step 203, removed from the first infrared energy according to the second infrared energy environment infrared energy obtain it is practical infrared Energy, environment infrared energy are the first infrared receiving module received infrared ray in external environment in acquisition time section The infrared energy having;Wherein, practical infrared energy can be used for controlling the working condition of electronic device, can be also used for controlling The state (mobile phone to play music of electronic device is moved closer to as controlled) of other electronic equipments.
In the present embodiment, meet practical infrared energy=the first infrared energy-environment infrared energy, environment infrared energy Accuracy influence the accuracy of practical infrared energy.For the accuracy for promoting practical infrared energy, at one of the present embodiment In example, the quantity of the second infrared receiving module is at least two, and above-mentioned environment infrared energy can be by each second Corresponding second infrared energy of infrared receiving module averages to obtain.So optionally, if the quantity of the second infrared receiving module It is at least two, then environment infrared energy is removed from the first infrared energy according to the second infrared energy and obtain practical infrared energy Include:
The average value for the second infrared energy that at least two second infrared receiving modules receive is calculated, it is red to obtain environment Outer energy;
Environment infrared energy is removed from the first infrared energy obtains practical infrared energy.
Optionally, before the average value for calculating the second infrared energy that at least two second infrared receiving modules receive, Can also compare the second infrared energy that at least two second infrared receiving modules receive, delete wherein distort (with it is other Second infrared energy is excessive compared to difference) the second infrared energy, the average value conduct of remaining second infrared energy is then asked again Environment infrared energy.
In at least two second above-mentioned infrared receiving modules, there is no any limits for the position of the second infrared receiving module Determine, such as the second infrared receiving module can be provided entirely on electronic device belonging to infrared receiving module, can also be one Part is on electronic device belonging to infrared receiving module, another part on the associated other electronic equipments of electronic device.
In one example, the quantity of the second infrared receiving module can be with only one, in such cases, can be by second Received second infrared energy of infrared receiving module is used directly as environment infrared energy.So optionally, if second is infrared The quantity of receiving module is one, then using the second infrared energy as environment infrared energy, it is above-mentioned according to the second infrared energy from Environment infrared energy is removed in first infrared energy and obtains practical infrared energy are as follows: it is infrared that second is removed from the first infrared energy Energy obtains practical infrared energy.When the second infrared receiving module is arranged on electronic device belonging to infrared transmission module, The quantity of two infrared receiving modules is that 1 cost for helping avoid electronic device is substantially improved.
After obtaining practical infrared energy, terminal can use the practical infrared energy, accurately calculate electronic device and The distance between shelter, it is to be understood that the shelter is the object for blocking the infrared ray of infrared transmission module sending.It can Choosing, the infrared detection method of the present embodiment removes environment infrared energy according to the second infrared energy from the first infrared energy After obtaining practical infrared energy, further includes:
According to practical infrared energy, the distance between the first infrared receiving module and external shelter are determined.
Below with reference to Fig. 3 and Fig. 4, electronic device belonging to infrared transmission module is set to the second infrared receiving module In the case of, how the setting of the second infrared receiving module and electronic device carry out infrared distance measurement and are illustrated.
Assuming that the second infrared receiving module is set to auxiliary infrared sensor, infrared transmission module and the first infrared receiving Block is set to infrared proximity transducer, and Fig. 3 is to assist the schematic diagram of infrared sensor setting on the electronic device, the electricity in Fig. 3 The positive bottom of sub-device is provided with auxiliary infrared sensor 33, and the positive top of electronic device is provided with infrared proximity transducer 31 and earpiece 32, wherein auxiliary infrared sensor has the function of infrared proximity transducer.
The infrared ray of infrared proximity transducer transmitting belongs to area source in practice, with certain area coverage, institute To be appreciated that the infrared ray after reflection, reflected light also covers certain area, if auxiliary infrared sensor and infrared proximity Sensor distance is too close, undoubtedly will receive the interference of the infrared light of infrared proximity transducer transmitting.In order to avoid being connect by infrared The interference of nearly sensor, the distance between auxiliary proximity sensor and infrared proximity transducer in the present embodiment are not less than presetting Distance threshold (such as above-mentioned second distance threshold value), which can set according to the size of electronic device It sets.Optionally, auxiliary infrared sensor receive the end face face of infrared light (i.e. the second infrared receiving module reception) of infrared light with Infrared proximity transducer receives the end face (i.e. the face of the first infrared receiving module reception infrared light) of infrared light towards unanimously.Into one Step, auxiliary infrared sensor and infrared proximity transducer are arranged on the same face of electronic device, such as assist in Fig. 3 infrared The front of electronic device is arranged in sensor 33 and infrared proximity transducer 31.For the electronic device in Fig. 3, will assist infrared Sensor and infrared proximity transducer are separately positioned on the positive bottom of electronic device and positive top can satisfy two The distance of sensor receives the end face of infrared light towards identical, to guarantee in preset distance range and on two sensors Detection effect.
It is arranged in the case where infrared proximity transducer affiliated electronic device in auxiliary infrared sensor, in order to guarantee first Infrared energy and the second infrared energy are obtained in acquisition time section, can be to auxiliary infrared sensor and infrared proximity Sensor carries out clock using synchronization signal and synchronizes.So in the present embodiment, optionally, the is obtained in the first infrared receiving module Before one infrared energy, further includes: synchronous with auxiliary infrared sensor progress clock to infrared proximity transducer.Wherein, it is acquiring The infrared emission function of auxiliary infrared sensor is closed in period.
Fig. 4 is the flow diagram for the infrared detection method that the electronic device in Fig. 3 uses.
As shown in figure 4, the infrared detection method includes:
Step 401, to infrared proximity transducer with auxiliary infrared sensor carry out clock it is synchronous;
Step 402, the infrared emission function of opening infrared transmission module close the infrared emission function of auxiliary infrared sensor Energy;
Step 403 determines that the energy that the infrared ray that the first infrared receiving module receives in acquisition time section has is made For the first infrared energy, and determine the energy that the infrared ray that the second infrared receiving module receives in acquisition time section has As the second infrared energy;
Step 404 subtracts the second infrared energy from the first infrared energy and obtains practical infrared energy.
If the quantity of the second infrared receiving module is more than one, then step 404 are as follows: to all second infrared receiving modules The second infrared energy average as environment infrared energy, environment infrared energy is subtracted from the first infrared energy and obtains reality Border infrared energy.
Below with reference to Fig. 5 and Fig. 6, the case where electronic equipment associated with electronic device is located to the second infrared receiving module Under, how electronic device, which carries out infrared distance measurement, is illustrated.
In this example, the second infrared receiving module belongs to auxiliary infrared sensor, and auxiliary infrared sensor is arranged in electronics In equipment, Fig. 5 is the electronic device 52 at 521 place of electronic equipment 51 and infrared proximity transducer where aiding sensors 511 The schematic diagram of information exchange is carried out, communication connection has been established in the electronic device and electronic equipment in Fig. 5, and electronic equipment is in Fig. 5 Intelligent bracelet, electronic equipment can also be other types of intelligent wearable device in other examples.
Fig. 6 is the flow diagram for the infrared detection method that the electronic device in Fig. 5 uses.
As shown in fig. 6, the infrared detection method includes:
Step 601, electronic device open the emission function of infrared transmission module;
Second infrared energy acquisition condition is sent to electronic equipment by step 602, electronic device;
Wherein, it includes determining that the second infrared receiving module is received in acquisition time section that the second infrared energy, which obtains condition, At the beginning of the energy of infrared ray, acquisition time section and finish time and electronic equipment keep red in acquisition time section Outside line emission function is closed;
The light that step 603, electronic device determine that the first infrared receiving module receives in acquisition time section is had Infrared energy, which is denoted as the first infrared energy;
Step 604, electronic device receive the information of the second infrared energy from electronic equipment, which is second Energy possessed by the infrared light that infrared receiving module receives in acquisition time section;
Step 605 subtracts the second infrared energy from the first infrared energy and obtains practical infrared energy.
If the quantity of the second infrared receiving module is more than one, then in step 605 are as follows: to all second infrared receivings Second infrared energy of block is averaged as environment infrared energy, and environment infrared energy is subtracted from the first infrared energy and is obtained Practical infrared energy.
Using the infrared detection method of the present embodiment, it can be effectively reduced and infrared proximity is passed from the infrared ray in environment The interference of the testing result of sensor promotes infrared proximity transducer to the energy measuring accuracy of the infrared ray of reflection, and not The normal work for influencing infrared proximity transducer is conducive to promote user experience.
Further, in order to solve the above-mentioned technical problem, it the embodiment of the invention also provides a kind of infrared detecting device, asks It is the program module schematic diagram of the infrared detecting device in second embodiment of the invention refering to Fig. 7, Fig. 7, is provided on the device Infrared transmission module and the first infrared receiving module, the device include:
Detection module 71, for being obtained by the first infrared receiving module in the case where infrared transmission module is in running order First infrared energy, the first infrared energy are the first infrared receiving module received infrared energy in acquisition time section, wherein First infrared receiving module is no more than first distance threshold value at a distance from infrared transmission module;
Module 72 is obtained, for obtaining the second infrared energy, the second infrared energy is that the second infrared receiving module is acquiring Received infrared energy in period, wherein the second infrared receiving module at a distance from infrared transmission module not less than second away from From threshold value and it is not higher than third distance threshold, second distance threshold value is greater than first distance threshold value;
Module 73 is filtered out, obtains reality for removing environment infrared energy from the first infrared energy according to the second infrared energy Border infrared energy, environment infrared energy are that the first infrared receiving module is received derived from the red of external environment in acquisition time section The infrared energy that outside line has;Wherein, the state that practical infrared energy can be used for controlling electronic device (such as bright screen or is put out Screen), or state of the control as other electronic equipments of shelter.
In one example, the second above-mentioned infrared receiving module can be used as independent module and be arranged in infrared emission mould On electronic device where block and the first infrared receiving module, infrared transmission module and the first infrared receiving module can also be used as A part of affiliated infrared proximity transducer is arranged on the electronic device of the present embodiment, and in addition to this, above-mentioned second is red Auxiliary infrared sensor can also be arranged in outer receiving module, which has the function of infrared proximity transducer Can, it can also emit and receiving infrared-ray.Auxiliary infrared sensor may be provided at the electronic device where infrared proximity transducer On, it may also be arranged on and established on other electronic equipments of connection with the electronic device, the present embodiment is not limited in this respect.
Optionally, it is located at the same infrared proximity transducer in the first infrared receiving module and infrared transmission module, second Infrared receiving module is located at auxiliary infrared sensor, and assists infrared sensor when also being located at infrared detecting device, the present embodiment Infrared detecting device further include clock synchronization module, for detection module 71 determine the first infrared energy before, connect to infrared Nearly sensor is synchronous with auxiliary infrared sensor progress clock.
In another example, the first infrared receiving module is located at electronic device, and the second infrared receiving module is located at and electricity The associated electronic equipment of sub-device, optionally, the electronic equipment are specially intelligent wearable device, such as Intelligent bracelet.
Optionally, if the quantity of above-mentioned second infrared receiving module is one, the second infrared energy is red as environment Outer energy filters out module 73, for removing the second infrared energy from the first infrared energy, obtains practical infrared energy.
If the quantity of the second infrared receiving module be at least two, filter out module 73, for calculate this at least two second The average value for the second infrared energy that infrared receiving module receives, to obtain environment infrared energy;From the first infrared energy Remove environment infrared energy.
Optionally, in an example of the present embodiment, referring to Fig. 7, infrared detecting device further include: apart from determining module 74, for filter out module 73 according to the second infrared energy and removed from the first infrared energy environment infrared energy obtain it is practical red After outer energy, according to practical infrared energy, the distance between the first infrared receiving module and external shelter are determined.
The device of infrared detection provided by the embodiment of the present invention can effectively reduce in environment based on the second infrared energy The influence of the energy detection results for the corresponding reflection light of infrared ray that infrared ray emits the first infrared transmission module is promoted anti- The energy measuring accuracy of light is penetrated, to promote the accuracy detected at a distance from shelter to infrared detecting device.
The embodiment of the present invention also provides a kind of computer equipment, including infrared transmission module, the first infrared receiving module, place Manage device, memory and communication bus;Communication bus is infrared for realizing processor, memory, infrared transmission module and first Connection communication between receiving module;Memory is deposited for storing one or more programs, processor for executing in memory One or more program of storage, the step of to realize the infrared detection method in first embodiment.The computer equipment can be with It is realized using the electronic device in Fig. 1.
The embodiment of the present invention also provides a kind of storage medium, which is computer readable storage medium, deposits thereon Computer program is contained, when computer program is executed by processor, to realize the step of the infrared detection method in first embodiment Suddenly.
In several embodiments provided herein, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the module, only Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple module or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or logical of device or module Letter connection can be electrical property, mechanical or other forms.
The module as illustrated by the separation member may or may not be physically separated, aobvious as module The component shown may or may not be physical module, it can and it is in one place, or may be distributed over multiple On network module.Some or all of the modules therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
It, can also be in addition, each functional module in each embodiment of the present invention can integrate in a processing module It is that modules physically exist alone, can also be integrated in two or more modules in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.
If the integrated module is realized in the form of software function module and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because According to the present invention, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this hair Necessary to bright.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiments.
The above are to a kind of description of infrared detection method, device, electronic device and storage medium provided by the present invention, For those skilled in the art, thought according to an embodiment of the present invention, has in specific embodiments and applications Change place, to sum up, the contents of this specification are not to be construed as limiting the invention.

Claims (10)

1. a kind of infrared detection method is applied to electronic device, which is characterized in that the electronic device is provided with infrared emission mould Block and the first infrared receiving module, the infrared detection method include:
In the case where the infrared transmission module is in running order, the first infrared energy is obtained by first infrared receiving module Amount, first infrared energy are first infrared receiving module received infrared energy in acquisition time section, wherein institute It states the first infrared receiving module and is no more than first distance threshold value at a distance from the infrared transmission module;
The second infrared energy is obtained, second infrared energy is that the second infrared receiving module receives in the acquisition time section Infrared energy, wherein second infrared receiving module at a distance from the infrared transmission module be not less than second distance threshold It is worth and is not higher than third distance threshold, the second distance threshold value is greater than the first distance threshold value;
Environment infrared energy is removed from first infrared energy according to second infrared energy and obtains practical infrared energy, The environment infrared energy is that first infrared receiving module is received derived from external environment in the acquisition time section The infrared energy that infrared ray has.
2. infrared detection method as described in claim 1, which is characterized in that second infrared receiving module is arranged described Electronic device.
3. infrared detection method as claimed in claim 2, which is characterized in that first infrared receiving module and described infrared Transmitting module is located at the same infrared proximity transducer, and second infrared receiving module is located at auxiliary infrared sensor;Institute The infrared emission function of stating the auxiliary infrared sensor in acquisition time section is closed;
Before first infrared receiving module obtains the first infrared energy, further includes:
It is synchronous with auxiliary infrared sensor progress clock to the infrared proximity transducer.
4. infrared detection method as described in claim 1, which is characterized in that first infrared receiving module is located at electronics dress It sets, second infrared receiving module is located at and the associated electronic equipment of the electronic device.
5. infrared detection method as claimed in claim 4, which is characterized in that the electronic equipment is specially that intelligence wearing is set It is standby.
6. infrared detection method as described in any one in claim 1-5, which is characterized in that
If the quantity of second infrared receiving module is one, using second infrared energy as the infrared energy of the environment Amount, the environment infrared energy that removed from first infrared energy according to second infrared energy obtain practical infrared energy Amount are as follows: remove second infrared energy from first infrared energy and obtain practical infrared energy;
If the quantity of second infrared receiving module is at least two, it is described according to second infrared energy from described the Removing environment infrared energy in one infrared energy and obtaining practical infrared energy includes: to calculate at least two second infrared receiver The average value for the second infrared energy that module receives, to obtain environment infrared energy;It is removed from first infrared energy The environment infrared energy obtains practical infrared energy.
7. infrared detection method as described in any one in claim 1-5, which is characterized in that described infrared according to described second Energy is after removal environment infrared energy obtains practical infrared energy in first infrared energy, further includes:
According to the practical infrared energy, the distance between first infrared receiving module and external shelter are determined.
8. a kind of infrared detecting device is provided with infrared transmission module and the first infrared receiving module, which is characterized in that institute Stating infrared detecting device includes:
Detection module, for being obtained by first infrared receiving module in the case where the infrared transmission module is in running order The first infrared energy is taken, first infrared energy is that first infrared receiving module is received infrared in acquisition time section Energy, wherein first infrared receiving module is no more than first distance threshold value at a distance from the infrared transmission module;
Module is obtained, for obtaining the second infrared energy, second infrared energy is that the second infrared receiving module is adopted described Collect the period in received infrared energy, wherein second infrared receiving module at a distance from the infrared transmission module not Lower than second distance threshold value and it is not higher than third distance threshold, the second distance threshold value is greater than the first distance threshold value;
Module is filtered out, is obtained for removing environment infrared energy from first infrared energy according to second infrared energy Practical infrared energy, the environment infrared energy are first infrared receiving module received source in the acquisition time section In the infrared energy that the infrared ray of external environment has.
9. a kind of computer equipment characterized by comprising infrared transmission module, processor, is deposited the first infrared receiving module Reservoir and communication bus;
The communication bus is for realizing the processor, the memory, the infrared transmission module and described first infrared Connection communication between receiving module;
The memory is for storing one or more programs, and the processor is for executing one stored in the memory Or multiple programs, to realize such as the step of infrared detection method of any of claims 1-7.
10. a kind of storage medium, which is characterized in that the storage medium is stored with one or more program, it is one or The multiple programs of person can be executed by one or more processor, to realize such as infrared inspection of any of claims 1-7 The step of survey method.
CN201810704677.1A 2018-07-02 2018-07-02 Infrared detection method and device, computer equipment and storage medium Active CN109061662B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810704677.1A CN109061662B (en) 2018-07-02 2018-07-02 Infrared detection method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810704677.1A CN109061662B (en) 2018-07-02 2018-07-02 Infrared detection method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109061662A true CN109061662A (en) 2018-12-21
CN109061662B CN109061662B (en) 2021-01-15

Family

ID=64818160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810704677.1A Active CN109061662B (en) 2018-07-02 2018-07-02 Infrared detection method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109061662B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105193024A (en) * 2015-10-15 2015-12-30 广东欧珀移动通信有限公司 Movement monitoring device and method
CN106199616A (en) * 2014-08-28 2016-12-07 Lg电子株式会社 Proximity transducer and control method thereof
CN106873879A (en) * 2017-01-25 2017-06-20 维沃移动通信有限公司 A kind of electronic equipment and put out screen processing method, device
CN107450817A (en) * 2017-07-31 2017-12-08 广东欧珀移动通信有限公司 Proximity test method, apparatus, storage medium and electronic equipment
CN107942306A (en) * 2017-11-22 2018-04-20 广东欧珀移动通信有限公司 Calibration method, device, storage medium and the electronic equipment of proximity sensor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106199616A (en) * 2014-08-28 2016-12-07 Lg电子株式会社 Proximity transducer and control method thereof
CN105193024A (en) * 2015-10-15 2015-12-30 广东欧珀移动通信有限公司 Movement monitoring device and method
CN106873879A (en) * 2017-01-25 2017-06-20 维沃移动通信有限公司 A kind of electronic equipment and put out screen processing method, device
CN107450817A (en) * 2017-07-31 2017-12-08 广东欧珀移动通信有限公司 Proximity test method, apparatus, storage medium and electronic equipment
CN107942306A (en) * 2017-11-22 2018-04-20 广东欧珀移动通信有限公司 Calibration method, device, storage medium and the electronic equipment of proximity sensor

Also Published As

Publication number Publication date
CN109061662B (en) 2021-01-15

Similar Documents

Publication Publication Date Title
CN108701043B (en) Display processing method and device
CN108966067A (en) Control method for playing back and Related product
CN106912190A (en) Electronic equipment including shielding construction
CN108541080A (en) First electronic equipment and the second electronic equipment carry out the method and Related product of Hui Lian
CN110908513B (en) Data processing method and electronic equipment
CN108762472A (en) Wearable device control method, wearable device and computer readable storage medium
CN108769387A (en) Application control method and relevant device
CN108924417A (en) Filming control method and Related product
CN109150326A (en) Antenna impedance adjustment method, electronic device and computer readable storage medium
CN108924358A (en) proximity sensor control method, electronic device and computer readable storage medium
CN109067984A (en) Data transmission method, electronic device and computer readable storage medium
CN108391058A (en) Image capturing method, device, electronic device and storage medium
CN108983211A (en) Proximity sensor and its control method, electronic device and computer readable storage medium
CN107566604A (en) The control method and user terminal of a kind of prompting message
CN109144454A (en) double-sided screen display control method and related product
CN108777741A (en) antenna switching control method and related product
CN110210395A (en) Vein image acquisition method and Related product
CN108921541A (en) Method of payment and Related product
CN107426439A (en) Screen starts method, device and mobile terminal
CN110475020A (en) Apparatus control method and Related product
CN109150221A (en) A kind of wearable device master-slave switching method and Related product
CN109067978A (en) Button operation processing method, device, storage medium and electronic equipment
CN109085985A (en) Sounding control method, device, electronic device and storage medium
CN108769401A (en) Signal detecting method and related product
CN108989546B (en) Approach detection method of electronic device and related product

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