CN112968985A - Infrared sensor compensation method and device and electronic equipment - Google Patents

Infrared sensor compensation method and device and electronic equipment Download PDF

Info

Publication number
CN112968985A
CN112968985A CN202110137019.0A CN202110137019A CN112968985A CN 112968985 A CN112968985 A CN 112968985A CN 202110137019 A CN202110137019 A CN 202110137019A CN 112968985 A CN112968985 A CN 112968985A
Authority
CN
China
Prior art keywords
infrared
value
emission
infrared sensor
power
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
CN202110137019.0A
Other languages
Chinese (zh)
Other versions
CN112968985B (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202110137019.0A priority Critical patent/CN112968985B/en
Publication of CN112968985A publication Critical patent/CN112968985A/en
Application granted granted Critical
Publication of CN112968985B publication Critical patent/CN112968985B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/026Details of the structure or mounting of specific components
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Photometry And Measurement Of Optical Pulse Characteristics (AREA)

Abstract

The application discloses an infrared sensor compensation method and device and electronic equipment, which are applied to electronic equipment provided with an infrared sensor and belong to the technical field of electronic equipment. The infrared sensor compensation method comprises the following steps: acquiring a first infrared value; and under the condition that the first infrared value is smaller than a preset infrared value, compensating the infrared sensor. In the application, by acquiring the first infrared value, the infrared sensor is compensated when the first infrared value is smaller than the preset infrared value. Therefore, the difference value between the acquired infrared value and the real infrared value can be effectively made up by compensating the infrared sensor, so that the stability of the working performance of the infrared sensor can be improved.

Description

Infrared sensor compensation method and device and electronic equipment
Technical Field
The application belongs to the technical field of electronic equipment, and particularly relates to an infrared sensor compensation method and device and electronic equipment.
Background
Infrared sensor is more and more extensively applied to electronic equipment such as cell-phone, flat board, is used for realizing sheltering from closely and has a screen, for example, effectively prevents to miss when the conversation and touches the screen. However, in some working scenarios, the infrared value collected by the electronic device may be lower than the real infrared value of the infrared sensor, which may cause the working performance of the infrared sensor to be affected, for example, problems such as the call being far from the unlit screen or the distance being short due to false touch may occur.
Disclosure of Invention
The embodiment of the application aims to provide an infrared sensor compensation method, an infrared sensor compensation device and electronic equipment, and the technical problem that in the prior art, the working performance of an infrared sensor is affected because an infrared value acquired by the electronic equipment is lower than a real infrared value of the infrared sensor can be solved.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides an infrared sensor compensation method, which is applied to an electronic device provided with an infrared sensor, and the method includes:
acquiring a first infrared value;
and under the condition that the first infrared value is smaller than a preset infrared value, compensating the infrared sensor.
In a second aspect, an embodiment of the present application provides an infrared sensor compensation apparatus, which is applied to an electronic device provided with an infrared sensor, the apparatus includes:
the acquisition module is used for acquiring a first infrared value;
and the compensation module is used for compensating the infrared sensor under the condition that the first infrared value is smaller than a preset infrared value.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the application, by acquiring the first infrared value, the infrared sensor is compensated when the first infrared value is smaller than the preset infrared value. Therefore, the difference value between the acquired infrared value and the real infrared value can be effectively made up by compensating the infrared sensor, so that the stability of the working performance of the infrared sensor can be improved.
Drawings
Fig. 1 is a schematic flowchart of an infrared sensor compensation method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a process of exciting holes inside a PN junction of an infrared sensor;
FIG. 3 is a diagram showing the comparison of infrared values of the infrared sensor in a normal working scene and an abnormal working scene;
FIG. 4 is a schematic flow chart illustrating another method for compensating an infrared sensor according to an embodiment of the present disclosure;
FIG. 5 is a diagram of a theoretical model for linear regression of the emission power of the infrared sensor with the ambient infrared value according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of power compensation of an infrared sensor provided by an embodiment of the present application;
fig. 7 is a schematic structural diagram of an infrared sensor compensation device according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 9 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and the claims means at least one of connected objects, and a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
According to the infrared sensor compensation method provided by the embodiment of the application, the execution main body can be an infrared sensor compensation device, or a control module used for executing the infrared sensor compensation method in the infrared sensor compensation device.
The infrared sensor compensation device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The infrared sensor compensation device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system (Android), an iOS operating system, or other possible operating systems, which is not specifically limited in the embodiments of the present application.
The infrared sensor compensation method, the infrared sensor compensation device, the electronic apparatus, the readable storage medium, and the chip provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart of an infrared sensor compensation method provided in an embodiment of the present application, and as shown in fig. 1, the method includes the following steps:
step 101: acquiring a first infrared value;
step 102: and under the condition that the first infrared value is smaller than a preset infrared value, compensating the infrared sensor.
The infrared sensor can be applied to electronic equipment, for example, the infrared sensor can be applied to a mobile phone and used for shielding a screen in a close range, so that the mobile phone can be effectively prevented from being touched by mistake in a call state.
The infrared sensor may include an emitting end and a receiving end, where the emitting end is an infrared light emitting device (or "infrared LED"), and the receiving end is a light sensing sensor (sensor).
As shown in fig. 2, before the infrared LED operates, the PN junction of the receiving terminal is in an unexcited state, and no electron is attached to the internal hole (trap), so that after the infrared LED operates, it takes a certain time for the internal hole of the PN junction to be filled. Under the state of hole saturation, the PN junction can reach the state of complete pre-charging, and the response speed of the photocurrent can reach the stable state.
When the internal hole of the PN junction of the receiving end of the infrared sensor does not reach the saturation state, the infrared value acquired by the electronic device may be lower than the true infrared value of the infrared sensor, which may cause the update of the infrared dynamic reference to be lower than the true infrared value of the infrared sensor. For the user side, the problem that the call is far away from the non-bright screen or the distance of preventing the false touch is short may occur.
It should be noted that, because a certain measurement error exists, the infrared value acquired by the electronic device generally cannot be completely equal to the real infrared value of the infrared sensor, and the infrared value acquired by the electronic device in the embodiment of the present application is equal to the real infrared value of the infrared sensor, which can be understood as that the absolute value of the difference between the acquired infrared value and the real infrared value is smaller than the preset value.
In view of this, in the embodiment of the present application, in the working process of the infrared sensor, by acquiring the first infrared value, the infrared sensor is compensated when the first infrared value is smaller than the preset infrared value. Therefore, the difference value between the acquired infrared value and the real infrared value can be effectively made up by compensating the infrared sensor, so that the stability of the working performance of the infrared sensor can be improved.
The reason why the internal hole of the PN junction of the receiving end of the infrared sensor does not reach the saturation state mainly comprises the following steps: firstly, infrared components in the environment are less, so that holes in a PN junction can be filled in a certain time; secondly, the emission frequency of the infrared sensor is low, so that after the infrared sensor is started to work, the holes in the PN junction can be filled in within a certain time.
For better understanding of the embodiments of the present application, the following concept is defined and the operation scene of the infrared sensor is divided into a normal operation scene and an abnormal operation scene.
Ambient infrared value: and ADC value corresponding to infrared component in environment collected by the receiving end.
Under-compensated infrared value: under the condition that no infrared component exists in the environment, the infrared value actually acquired by the receiving end is lower than the real infrared value of the infrared sensor due to the problem of the pre-charging time of the PN junction, and the real infrared value of the infrared sensor is also called as the real reflection energy of the infrared LED and is an ADC value corresponding to the real reflection energy of the infrared LED.
Compensation value: the difference between the true infrared value and the under-compensated infrared value.
The current infrared value is: the current infrared value is equal to the real infrared value under the normal working scene of the infrared value actually collected by the receiving end; and under the abnormal working scene, the current infrared value is equal to the under-compensated infrared value.
As shown in fig. 3, in a normal working scenario (3-a), the emission frequency of the infrared sensor is 100ms, or there is an infrared component in the environment, and the current infrared value is equal to the real infrared value. In an abnormal working scene (3-b), the emission frequency of the infrared sensor is 5s, no infrared component exists in the environment, and the current infrared value is lower than the real infrared value.
Because the environment infrared value plays a key role in whether the current infrared value can reflect the real infrared value, the embodiment shown in fig. 4 can be adopted to judge whether the infrared sensor needs to be compensated. As shown in fig. 4, the infrared sensor compensation method includes the following steps:
step 101 a: acquiring an ambient infrared value;
step 102 a: and under the condition that the environment infrared value is smaller than the PN junction saturation response threshold value of the infrared sensor, compensating the infrared sensor.
In this embodiment, whether compensation for the infrared sensor is needed can be determined by the ambient infrared value. Specifically, when the ambient infrared value is smaller than the PN junction saturation response threshold of the infrared sensor, it can be determined that the infrared sensor needs to be compensated, and in this case, the infrared sensor can be compensated. When the ambient infrared value is greater than or equal to the PN junction saturation response threshold of the infrared sensor, it can be determined that compensation for the infrared sensor is not required, and in this case, compensation for the infrared sensor may not be performed.
In the embodiment, whether the infrared sensor needs to be compensated is judged through the environment infrared value, whether the infrared sensor needs to be compensated can be reasonably measured, and a reasonable infrared sensor compensation mechanism is provided.
In the embodiment of the present application, when it is determined that compensation needs to be performed on the infrared sensor, the following embodiment may be performed to compensate the infrared sensor.
As an optional implementation manner, the compensating the infrared sensor includes:
and adjusting the emission power of the infrared sensor from a first emission power to a second emission power according to the environment infrared value, wherein the second emission power is larger than the first emission power.
In this embodiment, the adjusting the emission power of the infrared sensor from the first emission power to the second emission power includes:
adjusting an emission current of the infrared sensor from a first emission current to a second emission current, the second emission current being greater than the first emission current; alternatively, the first and second electrodes may be,
adjusting the emission pulse width of the infrared sensor from a first emission pulse width to a second emission pulse width, wherein the second emission pulse width is larger than the first emission pulse width; alternatively, the first and second electrodes may be,
adjusting the emission period of the infrared sensor from a first emission period to a second emission period, wherein the second emission period is smaller than the first emission period.
Further, the adjusting the transmission power of the infrared sensor from the first transmission power to the second transmission power according to the ambient infrared value includes:
determining a power adjustment value corresponding to the environment infrared value according to a pre-written configuration file;
and adjusting the emission power of the infrared sensor from a first emission power to a second emission power according to the power adjustment value.
The configuration file is written with adjustment logic of the infrared sensor emission power, for example, a power adjustment value corresponding to the ambient infrared value. The configuration file may be written into the infrared sensor in advance, and the adjustment logic of the transmission power of the infrared sensor may be run by a state machine or an MCU (Micro Control Unit) inside the infrared sensor.
The configuration file can be generated through the following steps:
controlling the infrared sensor to work in an infrared-free environment at the first emission frequency and the third emission power, and acquiring a second infrared value of the infrared sensor;
controlling the infrared sensor to work in an infrared-free environment at the second emission frequency and the fourth emission power, and acquiring a third infrared value of the infrared sensor;
under the condition that the difference value of the second infrared value and the third infrared value is larger than or equal to a preset value, adjusting the fourth transmitting power until the difference value of the second infrared value and the third infrared value is smaller than the preset value;
and performing linear regression on the adjusted fourth transmitting power and the environment infrared value to generate the configuration file.
As an example, a theoretical model for linear regression of the emitted power of an infrared sensor with ambient infrared values can be seen in fig. 5.
In fig. 5, a function a is a normal operating mode curve of the infrared sensor, a function B is an existing abnormal operating mode curve, and a function C is an operating mode curve for dynamically adjusting the transmission power of the infrared sensor according to the ambient infrared value. The point a can be understood as a threshold of an ambient infrared value measured by a laboratory environment under the condition of constant transmission power, the point b is the transmission power in an abnormal working scene, and the point a and the point b can be obtained by debugging.
In the function C, the configuration gear of the transmission power of the infrared sensor is related to the configuration supported by the actual infrared sensor, and the specific configuration method and the number of the gear are not described in the embodiment of the present application.
Due to the fact that the infrared sensors are good in consistency, a set of dynamic power configuration can be fitted and applied to each infrared sensor, and configuration files can be generated for different monomers.
In this embodiment, adjusting the emission power of the infrared sensor may be considered as compensating at a hardware end, and may be considered as integrating two new photosensitive sensors as a receiving end. As an example, as shown in fig. 6, in a normal operation scene, the emission power of the infrared LED does not need to be adjusted, the MCU and the photosensitive sensor may be integrated into a new photosensitive sensor, and in an abnormal operation scene, the emission power of the infrared LED needs to be adjusted, and the MCU, the photosensitive sensor and the infrared LED may be integrated into another new photosensitive sensor.
In the embodiment, the emission power of the infrared sensor is dynamically adjusted through the infrared value of the current environment, so that the infrared value acquired by the electronic equipment is equal to the real infrared value of the infrared sensor, the difference between the acquired infrared value and the real infrared value can be effectively made up, and the stability of the working performance of the infrared sensor can be improved.
As another optional embodiment, the compensating the infrared sensor includes:
calculating a compensation value according to the fourth infrared value and the environment infrared value; the fourth infrared value is the infrared value of the infrared sensor in the on state;
determining a sum of the fourth infrared value and the compensation value as an infrared value of the infrared sensor.
In the embodiment, the compensation value is calculated through the infrared value of the current environment, the compensation of the infrared sensor can be realized on the software algorithm level, the infrared value acquired by the electronic equipment can be equal to the real infrared value of the infrared sensor, so that the difference between the acquired infrared value and the real infrared value can be effectively compensated, and the stability of the working performance of the infrared sensor can be improved.
In the embodiment of the application, by compensating the infrared sensor, the infrared sensor can be enabled to obtain the infrared value matched with the real infrared value no matter the infrared sensor works in the normal working scene or the abnormal working scene shown in fig. 3.
In order to increase the screen occupation ratio of electronic devices, under-screen sensor technology, such as under-screen infrared sensor technology, is used. In the technology of the infrared sensor under the screen, the infrared emission is generally closed when the screen is on, and the infrared emission is opened when the screen is off. In order to reduce the damage of infrared emission to the screen, the emission interval of delayed infrared emission (i.e. the infrared emission frequency is reduced) is usually adopted in the breath screen state, so that the PN junction at the receiving end of the infrared sensor needs a certain time to be precharged to reach a stable working state.
The emission frequencies of the infrared sensors can be distinguished according to the use scene of the infrared sensors. In a normal use scenario (corresponding to a normal working scenario), the emission interval of the infrared emission does not need to be delayed, and at this time, the emission frequency of the infrared sensor may be emitted once every 100 milliseconds, for example, while for a use scenario (corresponding to an abnormal working scenario) under the screen, the emission interval of the infrared emission needs to be delayed in the screen resting state, and at this time, the emission frequency of the infrared sensor may be emitted once every 5 seconds, for example.
In view of this, the embodiment of the present application can be used to solve, but not limited to, the technical problem that the infrared value acquired by the electronic device is lower than the real infrared value of the infrared sensor due to the delayed emission interval of the infrared emission of the off-screen infrared sensor, that is, the embodiment of the present application can be applied to the above abnormal working scenario and also applied to the above normal working scenario.
It should be noted that, in the embodiment of the present application, various optional implementations of the infrared sensor compensation method may be implemented in combination with each other, or may be implemented separately, and the present application is not limited thereto.
In the embodiment of the application, by acquiring the first infrared value, the infrared sensor is compensated when the first infrared value is smaller than the preset infrared value. Therefore, the difference value between the acquired infrared value and the real infrared value can be effectively made up by compensating the infrared sensor, so that the stability of the working performance of the infrared sensor can be improved.
It should be noted that, in the infrared sensor compensation method provided in the embodiment of the present application, the execution main body may be an infrared sensor compensation device, or a control module in the infrared sensor compensation device for executing the infrared sensor compensation method. In the embodiment of the present application, an infrared sensor compensation method executed by an infrared sensor compensation device is taken as an example, and the infrared sensor compensation device provided in the embodiment of the present application is described.
Fig. 7 is a flowchart of an infrared sensor compensation apparatus provided in an embodiment of the present application, and as shown in fig. 7, an infrared sensor compensation apparatus 700 may be applied to an electronic device provided with an infrared sensor, where the infrared sensor compensation apparatus 700 includes:
an obtaining module 701, configured to obtain a first infrared value;
a compensation module 702, configured to compensate the infrared sensor when the first infrared value is smaller than a preset infrared value.
Optionally, the first infrared value is an ambient infrared value, and the preset infrared value is a PN junction saturation response threshold of the infrared sensor.
Optionally, the compensation module 702 includes:
and the adjusting unit is used for adjusting the transmitting power of the infrared sensor from a first transmitting power to a second transmitting power according to the environment infrared value, wherein the second transmitting power is greater than the first transmitting power.
Optionally, the adjusting unit includes:
the determining subunit is used for determining a power adjustment value corresponding to the environment infrared value according to a pre-written configuration file;
and the adjusting subunit is used for adjusting the emission power of the infrared sensor from the first emission power to a second emission power according to the power adjusting value.
Optionally, the infrared sensor compensation apparatus 700 further includes a generation module, where the generation module is configured to generate the configuration file, and the generation module is specifically configured to:
controlling the infrared sensor to work in an infrared-free environment at the first emission frequency and the third emission power, and acquiring a second infrared value of the infrared sensor;
controlling the infrared sensor to work in an infrared-free environment at the second emission frequency and the fourth emission power, and acquiring a third infrared value of the infrared sensor;
under the condition that the difference value of the second infrared value and the third infrared value is larger than or equal to a preset value, adjusting the fourth transmitting power until the difference value of the second infrared value and the third infrared value is smaller than the preset value;
and performing linear regression on the adjusted fourth transmitting power and the environment infrared value to generate the configuration file.
Optionally, the adjusting unit is specifically configured to:
adjusting an emission current of the infrared sensor from a first emission current to a second emission current, the second emission current being greater than the first emission current; alternatively, the first and second electrodes may be,
adjusting the emission pulse width of the infrared sensor from a first emission pulse width to a second emission pulse width, wherein the second emission pulse width is larger than the first emission pulse width; alternatively, the first and second electrodes may be,
adjusting the emission period of the infrared sensor from a first emission period to a second emission period, wherein the second emission period is smaller than the first emission period.
Optionally, the compensation module 702 includes:
the computing unit is used for computing a compensation value according to a fourth infrared value and the environment infrared value; the fourth infrared value is the infrared value of the infrared sensor in the on state;
a determination unit configured to determine a sum of the fourth infrared value and the compensation value as an infrared value of the infrared sensor.
In the embodiment of the application, by acquiring the first infrared value, the infrared sensor is compensated when the first infrared value is smaller than the preset infrared value. Therefore, the difference value between the acquired infrared value and the real infrared value can be effectively made up by compensating the infrared sensor, so that the stability of the working performance of the infrared sensor can be improved.
The infrared sensor compensation device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The infrared sensor compensation device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system (Android), an iOS operating system, or other possible operating systems, which is not specifically limited in the embodiments of the present application.
The infrared sensor compensation device provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to 6, and is not described here again to avoid repetition.
Optionally, as shown in fig. 8, an electronic device 800 is further provided in this embodiment of the present application, and includes a processor 801, a memory 802, and a program or an instruction stored in the memory 802 and executable on the processor 801, where the program or the instruction is executed by the processor 801 to implement each process of the above-mentioned infrared sensor compensation method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 9 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 1000 includes, but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010.
Those skilled in the art will appreciate that the electronic device 1000 may further comprise a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 1010 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
Wherein the processor 1010 is configured to:
acquiring a first infrared value;
and under the condition that the first infrared value is smaller than a preset infrared value, compensating the infrared sensor.
Optionally, the first infrared value is an ambient infrared value, and the preset infrared value is a PN junction saturation response threshold of the infrared sensor.
Optionally, the processor 1010 is further configured to:
and adjusting the emission power of the infrared sensor from a first emission power to a second emission power according to the environment infrared value, wherein the second emission power is larger than the first emission power.
Optionally, the processor 1010 is further configured to:
determining a power adjustment value corresponding to the environment infrared value according to a pre-written configuration file;
and adjusting the emission power of the infrared sensor from a first emission power to a second emission power according to the power adjustment value.
Optionally, the processor 1010 is further configured to generate the configuration file, where the configuration file is generated by:
controlling the infrared sensor to work in an infrared-free environment at the first emission frequency and the third emission power, and acquiring a second infrared value of the infrared sensor;
controlling the infrared sensor to work in an infrared-free environment at the second emission frequency and the fourth emission power, and acquiring a third infrared value of the infrared sensor;
under the condition that the difference value of the second infrared value and the third infrared value is larger than or equal to a preset value, adjusting the fourth transmitting power until the difference value of the second infrared value and the third infrared value is smaller than the preset value;
and performing linear regression on the adjusted fourth transmitting power and the environment infrared value to generate the configuration file.
Optionally, the processor 1010 is further configured to:
adjusting an emission current of the infrared sensor from a first emission current to a second emission current, the second emission current being greater than the first emission current; alternatively, the first and second electrodes may be,
adjusting the emission pulse width of the infrared sensor from a first emission pulse width to a second emission pulse width, wherein the second emission pulse width is larger than the first emission pulse width; alternatively, the first and second electrodes may be,
adjusting the emission period of the infrared sensor from a first emission period to a second emission period, wherein the second emission period is smaller than the first emission period.
Optionally, the processor 1010 is further configured to:
calculating a compensation value according to the fourth infrared value and the environment infrared value; the fourth infrared value is the infrared value of the infrared sensor in the on state;
determining a sum of the fourth infrared value and the compensation value as an infrared value of the infrared sensor.
In the embodiment of the application, by acquiring the first infrared value, the infrared sensor is compensated when the first infrared value is smaller than the preset infrared value. Therefore, the difference value between the acquired infrared value and the real infrared value can be effectively made up by compensating the infrared sensor, so that the stability of the working performance of the infrared sensor can be improved.
It should be understood that in the embodiment of the present application, the input Unit 1004 may include a Graphics Processing Unit (GPU) 10041 and a microphone 10042, and the Graphics Processing Unit 10041 processes image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 1007 includes a touch panel 10071 and other input devices 10072. The touch panel 10071 is also referred to as a touch screen. The touch panel 10071 may include two parts, a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 1009 may be used to store software programs as well as various data, including but not limited to application programs and operating systems. Processor 1010 may integrate an application processor that handles primarily operating systems, user interfaces, applications, etc. and a modem processor that handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 1010.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned infrared sensor compensation method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above-mentioned infrared sensor compensation method embodiment, and can achieve the same technical effect, and for avoiding repetition, the details are not repeated here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (16)

1. An infrared sensor compensation method is applied to an electronic device provided with an infrared sensor, and is characterized by comprising the following steps:
acquiring a first infrared value;
and under the condition that the first infrared value is smaller than a preset infrared value, compensating the infrared sensor.
2. The method of claim 1, wherein the first infrared value is an ambient infrared value and the predetermined infrared value is a PN junction saturation response threshold of the infrared sensor.
3. The method of claim 2, wherein said compensating the infrared sensor comprises:
and adjusting the emission power of the infrared sensor from a first emission power to a second emission power according to the environment infrared value, wherein the second emission power is larger than the first emission power.
4. The method of claim 3, wherein the adjusting the transmission power of the infrared sensor from a first transmission power to a second transmission power based on the ambient infrared value comprises:
determining a power adjustment value corresponding to the environment infrared value according to a pre-written configuration file;
and adjusting the emission power of the infrared sensor from a first emission power to a second emission power according to the power adjustment value.
5. The method of claim 4, wherein the configuration file is generated by:
controlling the infrared sensor to work in an infrared-free environment at the first emission frequency and the third emission power, and acquiring a second infrared value of the infrared sensor;
controlling the infrared sensor to work in an infrared-free environment at the second emission frequency and the fourth emission power, and acquiring a third infrared value of the infrared sensor;
under the condition that the difference value of the second infrared value and the third infrared value is larger than or equal to a preset value, adjusting the fourth transmitting power until the difference value of the second infrared value and the third infrared value is smaller than the preset value;
and performing linear regression on the adjusted fourth transmitting power and the environment infrared value to generate the configuration file.
6. The method of claim 3, wherein adjusting the transmission power of the infrared sensor from a first transmission power to a second transmission power comprises:
adjusting an emission current of the infrared sensor from a first emission current to a second emission current, the second emission current being greater than the first emission current; alternatively, the first and second electrodes may be,
adjusting the emission pulse width of the infrared sensor from a first emission pulse width to a second emission pulse width, wherein the second emission pulse width is larger than the first emission pulse width; alternatively, the first and second electrodes may be,
adjusting the emission period of the infrared sensor from a first emission period to a second emission period, wherein the second emission period is smaller than the first emission period.
7. The method of claim 2, wherein said compensating the infrared sensor comprises:
calculating a compensation value according to the fourth infrared value and the environment infrared value; the fourth infrared value is the infrared value of the infrared sensor in the on state;
determining a sum of the fourth infrared value and the compensation value as an infrared value of the infrared sensor.
8. The utility model provides an infrared sensor compensation arrangement, is applied to the electronic equipment who is provided with infrared sensor, its characterized in that, the device includes:
the acquisition module is used for acquiring a first infrared value;
and the compensation module is used for compensating the infrared sensor under the condition that the first infrared value is smaller than a preset infrared value.
9. The apparatus of claim 8, wherein the first infrared value is an ambient infrared value and the predetermined infrared value is a PN junction saturation response threshold of the infrared sensor.
10. The apparatus of claim 9, wherein the compensation module comprises:
and the adjusting unit is used for adjusting the transmitting power of the infrared sensor from a first transmitting power to a second transmitting power according to the environment infrared value, wherein the second transmitting power is greater than the first transmitting power.
11. The apparatus of claim 10, wherein the adjusting unit comprises:
the determining subunit is used for determining a power adjustment value corresponding to the environment infrared value according to a pre-written configuration file;
and the adjusting subunit is used for adjusting the emission power of the infrared sensor from the first emission power to a second emission power according to the power adjusting value.
12. The apparatus of claim 11, further comprising a generation module, the generation module configured to generate the configuration file, the generation module specifically configured to:
controlling the infrared sensor to work in an infrared-free environment at the first emission frequency and the third emission power, and acquiring a second infrared value of the infrared sensor;
controlling the infrared sensor to work in an infrared-free environment at the second emission frequency and the fourth emission power, and acquiring a third infrared value of the infrared sensor;
under the condition that the difference value of the second infrared value and the third infrared value is larger than or equal to a preset value, adjusting the fourth transmitting power until the difference value of the second infrared value and the third infrared value is smaller than the preset value;
and performing linear regression on the adjusted fourth transmitting power and the environment infrared value to generate the configuration file.
13. The apparatus according to claim 10, wherein the adjusting unit is specifically configured to:
adjusting an emission current of the infrared sensor from a first emission current to a second emission current, the second emission current being greater than the first emission current; alternatively, the first and second electrodes may be,
adjusting the emission pulse width of the infrared sensor from a first emission pulse width to a second emission pulse width, wherein the second emission pulse width is larger than the first emission pulse width; alternatively, the first and second electrodes may be,
adjusting the emission period of the infrared sensor from a first emission period to a second emission period, wherein the second emission period is smaller than the first emission period.
14. The apparatus of claim 9, wherein the compensation module comprises:
the computing unit is used for computing a compensation value according to a fourth infrared value and the environment infrared value; the fourth infrared value is the infrared value of the infrared sensor in the on state;
a determination unit configured to determine a sum of the fourth infrared value and the compensation value as an infrared value of the infrared sensor.
15. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the infrared sensor compensation method of any one of claims 1 to 7.
16. A readable storage medium, characterized in that it stores thereon a program or instructions which, when executed by a processor, implement the steps of the infrared sensor compensation method of any one of claims 1 to 7.
CN202110137019.0A 2021-02-01 2021-02-01 Infrared sensor compensation method and device and electronic equipment Active CN112968985B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110137019.0A CN112968985B (en) 2021-02-01 2021-02-01 Infrared sensor compensation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110137019.0A CN112968985B (en) 2021-02-01 2021-02-01 Infrared sensor compensation method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112968985A true CN112968985A (en) 2021-06-15
CN112968985B CN112968985B (en) 2023-07-04

Family

ID=76272775

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110137019.0A Active CN112968985B (en) 2021-02-01 2021-02-01 Infrared sensor compensation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112968985B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113514903A (en) * 2021-06-29 2021-10-19 昆山亚伯兰软件科技有限公司 Infrared correlation tube power compensation method and system
CN113804220A (en) * 2021-09-16 2021-12-17 维沃移动通信有限公司 Sensor interference filtering method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05332823A (en) * 1992-05-28 1993-12-17 Nippon Avionics Co Ltd Cooling temperature changing method and device of infrared ray sensor
CN101855512A (en) * 2007-11-14 2010-10-06 英特赛尔美国股份有限公司 Proximity sensors and methods for sensing proximity
US20140132578A1 (en) * 2012-11-15 2014-05-15 Apple Inc. Ambient Light Sensors with Infrared Compensation
CN106210227A (en) * 2016-07-06 2016-12-07 广东欧珀移动通信有限公司 The calibration steps of a kind of infrared proximity transducer, device and mobile terminal
CN106441586A (en) * 2016-08-23 2017-02-22 上海华乘智能设备有限公司 Infrared live line detector based on temperature and humidity automatic compensation, and compensation method thereof
CN107290637A (en) * 2017-06-09 2017-10-24 西北核技术研究所 Single PN kink type device laser-induced damage analysis method
CN109840032A (en) * 2019-01-24 2019-06-04 Oppo广东移动通信有限公司 The calibration method and device, electronic equipment and storage medium of proximity sensor
EP3579092A1 (en) * 2018-06-06 2019-12-11 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Control method for electronic device, electronic device, computer-readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05332823A (en) * 1992-05-28 1993-12-17 Nippon Avionics Co Ltd Cooling temperature changing method and device of infrared ray sensor
CN101855512A (en) * 2007-11-14 2010-10-06 英特赛尔美国股份有限公司 Proximity sensors and methods for sensing proximity
US20140132578A1 (en) * 2012-11-15 2014-05-15 Apple Inc. Ambient Light Sensors with Infrared Compensation
CN106210227A (en) * 2016-07-06 2016-12-07 广东欧珀移动通信有限公司 The calibration steps of a kind of infrared proximity transducer, device and mobile terminal
CN106441586A (en) * 2016-08-23 2017-02-22 上海华乘智能设备有限公司 Infrared live line detector based on temperature and humidity automatic compensation, and compensation method thereof
CN107290637A (en) * 2017-06-09 2017-10-24 西北核技术研究所 Single PN kink type device laser-induced damage analysis method
EP3579092A1 (en) * 2018-06-06 2019-12-11 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Control method for electronic device, electronic device, computer-readable storage medium
CN109840032A (en) * 2019-01-24 2019-06-04 Oppo广东移动通信有限公司 The calibration method and device, electronic equipment and storage medium of proximity sensor

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
吴天强等: "红外反射式光电传感器分时补偿检测电路设计", 《科技风》 *
吴天强等: "红外反射式光电传感器分时补偿检测电路设计", 《科技风》, no. 09, 30 March 2018 (2018-03-30) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113514903A (en) * 2021-06-29 2021-10-19 昆山亚伯兰软件科技有限公司 Infrared correlation tube power compensation method and system
CN113804220A (en) * 2021-09-16 2021-12-17 维沃移动通信有限公司 Sensor interference filtering method and device, electronic equipment and storage medium
CN113804220B (en) * 2021-09-16 2024-02-27 维沃移动通信有限公司 Sensor interference filtering method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112968985B (en) 2023-07-04

Similar Documents

Publication Publication Date Title
CN107943345B (en) Method and device for calibrating proximity sensor, storage medium and electronic equipment
CN107942306B (en) Method and device for calibrating proximity sensor, storage medium and electronic equipment
CN107450817B (en) Proximity detection method, proximity detection device, storage medium, and electronic apparatus
CN109062464B (en) Touch operation method and device, storage medium and electronic equipment
CN112968985B (en) Infrared sensor compensation method and device and electronic equipment
CN114063675B (en) Temperature control method and device
CN110705497A (en) Image frame processing method and device, terminal equipment and computer readable storage medium
CN112749074B (en) Test case recommending method and device
CN111104180A (en) Application program optimization method and device, storage medium and electronic equipment
CN112929734B (en) Screen projection method and device and electronic equipment
CN112416172A (en) Electronic equipment control method and device and electronic equipment
CN113687942B (en) Detection method and device and electronic equipment
CN111081198B (en) Data control method, data control device, storage medium and terminal equipment
CN110286420B (en) Method and device for calibrating proximity sensor, storage medium and electronic equipment
CN111143580A (en) Multimedia data storage method and device, storage medium and electronic equipment
CN111163223A (en) Flash lamp control method and device, storage medium and terminal equipment
CN111026488B (en) Communication data saving method, device, terminal equipment and storage medium
CN113676271B (en) Method and device for switching antennas
CN110633192B (en) Test method, test device, terminal equipment and computer readable storage medium
CN114064447B (en) Interface testing method and device, storage medium and terminal
CN109656438B (en) Desktop wallpaper preview method and device, mobile terminal and storage medium
CN113837021A (en) Fingerprint calibration method and device and electronic equipment
CN109660664B (en) Event processing method, device and storage medium
CN116361099A (en) Screen state determining method and vehicle-mounted interaction system
CN114913882A (en) Recording method and recording device

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