CN112968985B - 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
CN112968985B
CN112968985B CN202110137019.0A CN202110137019A CN112968985B CN 112968985 B CN112968985 B CN 112968985B CN 202110137019 A CN202110137019 A CN 202110137019A CN 112968985 B CN112968985 B CN 112968985B
Authority
CN
China
Prior art keywords
infrared
value
infrared sensor
transmitting power
emission
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.)
Active
Application number
CN202110137019.0A
Other languages
Chinese (zh)
Other versions
CN112968985A (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

Abstract

The application discloses an infrared sensor compensation method, an infrared sensor compensation device and electronic equipment, which are applied to the 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 compensating the infrared sensor under the condition that the first infrared value is smaller than a preset infrared value. In the application, the first infrared value is acquired, and the infrared sensor is compensated under the condition that the first infrared value is smaller than a preset infrared value. Therefore, the difference between the collected infrared value and the real infrared value can be effectively compensated 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 sensors are increasingly used in electronic devices such as mobile phones and tablet computers to shield a screen at a short distance, for example, to effectively prevent a user from touching the screen by mistake during a call. 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, a problem that the call is far away from the non-bright screen or the anti-false touch distance becomes closer 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, which can solve the technical problem that the working performance of an infrared sensor is affected because the infrared value acquired by the electronic equipment is lower than the real infrared value of the infrared sensor in the prior art.
In order to solve the technical problems, the application is realized as follows:
in a first aspect, an embodiment of the present application provides an infrared sensor compensation method, applied to an electronic device provided with an infrared sensor, including:
acquiring a first infrared value;
and compensating the infrared sensor under the condition that the first infrared value is smaller than a preset infrared value.
In a second aspect, an embodiment of the present application provides an infrared sensor compensation apparatus applied to an electronic device provided with an infrared sensor, the apparatus including:
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, embodiments of the present application provide an electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, the program or instruction implementing the steps of the method according to the first aspect when executed by the processor.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, embodiments of the present application provide a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and where the processor is configured to execute a program or instructions to implement a method according to the first aspect.
In the embodiment of the application, the first infrared value is obtained, and the infrared sensor is compensated under the condition that the first infrared value is smaller than a preset infrared value. Therefore, the difference between the collected infrared value and the real infrared value can be effectively compensated 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 flow chart of an infrared sensor compensation method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a hole excitation process inside a PN junction of an infrared sensor;
FIG. 3 is a graph comparing infrared values of an infrared sensor in a normal operation scene and an abnormal operation scene;
fig. 4 is a schematic flow chart of another method for compensating an infrared sensor according to an embodiment of the present application;
fig. 5 is a diagram of a theoretical model of linear regression of the emission power of an infrared sensor and an environmental infrared value according to an embodiment of the present application;
fig. 6 is a schematic diagram of infrared sensor power compensation 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 application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 9 is a schematic hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type and not limited to the number of objects, e.g., the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/" generally means a relationship in which the associated object is an "or" before and after.
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 application can be a device, and also can be a component, an integrated circuit or a chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. By way of example, the mobile electronic device may be a cell phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, wearable device, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook or personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device may be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
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, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
The infrared sensor compensation method, the infrared sensor compensation device, the electronic equipment, the readable storage medium and the chip provided by the embodiment of the application are described in detail below through specific embodiments and application scenes thereof with reference to the accompanying drawings.
Fig. 1 is a flowchart of an infrared sensor compensation method according to an embodiment of the present application, as shown in fig. 1, the method includes the following steps:
step 101: acquiring a first infrared value;
step 102: and compensating the infrared sensor under the condition that the first infrared value is smaller than a preset infrared value.
The infrared sensor can be applied to electronic equipment, for example, the infrared sensor can be applied to a mobile phone, and the infrared sensor is used for shielding a screen at a short distance, so that the mobile phone can effectively prevent false touch in a call state.
The infrared sensor may include a transmitting end and a receiving end, the transmitting 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 is operated, the PN junction at the receiving end is in an unexcited state, and no electron is attached to the internal hole (trap), so that a certain time is required for filling the internal hole of the PN junction after the infrared LED is turned on. Under the state of hole saturation, the PN junction can reach the pre-charge state, and the response speed of the photocurrent can reach the stable state.
When the hole in the PN junction of the receiving end of the infrared sensor does not reach a saturated state, the infrared value acquired by the electronic equipment may be lower than the real infrared value of the infrared sensor, and the updating of the infrared dynamic reference may be caused to be lower than the real infrared value of the infrared sensor. For the user end, the problems that the call is far away from the non-bright screen or the anti-false touch distance is close can occur.
It should be noted that, because of a certain measurement error, the infrared value collected by the electronic device is generally not completely equal to the real infrared value of the infrared sensor, and the infrared value collected by the electronic device in the embodiment of the application is equal to the real infrared value of the infrared sensor, which can be understood that the absolute value of the difference between the collected infrared value and the real infrared value is smaller than the preset value.
In view of this, in the embodiment of the present application, during the operation 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 between the collected infrared value and the real infrared value can be effectively compensated by compensating the infrared sensor, so that the stability of the working performance of the infrared sensor can be improved.
The reasons why the hole in the PN junction of the receiving end of the infrared sensor does not reach the saturated state mainly comprise: firstly, the infrared components in the environment are less, so that holes in the 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, holes in the PN junction can be filled with the holes in a certain time.
For better understanding of the embodiments of the present application, the following concepts are defined and the operation scenario of the infrared sensor is divided into a normal operation scenario and an abnormal operation scenario.
Ambient infrared value: ADC values corresponding to infrared components in the environment collected by the receiving end.
Under-compensated infrared values: under the condition that no infrared component exists in the environment, the infrared value actually collected by the receiving end is lower than the real infrared value of the infrared sensor due to the problem of PN junction pre-charging time, 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 undershot infrared value.
Current infrared value: the receiving end actually collects the infrared value, and under a normal working scene, the current infrared value is equal to the real infrared value; under abnormal working scene, the current infrared value is equal to the undershot infrared value.
As shown in fig. 3, in the normal operation scenario (3-a), the emission frequency of the infrared sensor is 100ms, or an infrared component exists 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.
Since the environmental infrared value plays a key role in whether the current infrared value can reflect the real infrared value, the embodiment of the application may adopt the implementation shown in fig. 4 to determine whether the infrared sensor needs to be compensated. As shown in fig. 4, the infrared sensor compensation method includes the steps of:
step 101a: acquiring an environmental infrared value;
step 102a: and compensating the infrared sensor under the condition that the ambient infrared value is smaller than a PN junction saturation response threshold value of the infrared sensor.
In this embodiment, it may be determined whether the infrared sensor needs to be compensated 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 may be determined that the infrared sensor needs to be compensated, in which case the infrared sensor may be compensated. When the ambient infrared value is greater than or equal to the PN junction saturation response threshold of the infrared sensor, it may be determined that no compensation is required for the infrared sensor, in which case no compensation may be performed for the infrared sensor.
In the embodiment, whether the infrared sensor needs to be compensated is judged through the environmental infrared value, whether the infrared sensor needs to be compensated can be reasonably measured, and a reasonable infrared sensor compensation mechanism is provided.
In this embodiment of the present application, in the case where it is determined that the infrared sensor needs to be compensated, the following implementation may be adopted to compensate the infrared sensor.
As an optional implementation manner, the compensating the infrared sensor includes:
and adjusting the transmitting power of the infrared sensor from a first transmitting power to a second transmitting power according to the environmental infrared value, wherein the second transmitting power is larger than the first transmitting 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; or alternatively, the process may be performed,
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; or alternatively, the process may be performed,
and 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 transmitting power of the infrared sensor from the first transmitting power to the second transmitting power according to the environmental infrared value includes:
determining a power adjustment value corresponding to the environmental infrared value according to a pre-written configuration file;
and adjusting the transmitting power of the infrared sensor from the first transmitting power to the second transmitting power according to the power adjusting value.
The configuration file is written with power adjustment logic of the transmitting power of the infrared sensor, for example, a power adjustment value corresponding to the environmental infrared value. The configuration file may be pre-written to the inside of the infrared sensor and the adjustment logic of the infrared sensor transmit power is run by a state machine or MCU (Micro Control Unit ) inside the infrared sensor.
The configuration file may be generated by the following steps:
controlling the infrared sensor to work in an infrared-free environment at the first transmitting frequency and the third transmitting 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;
adjusting the fourth transmitting power until the difference between the second infrared value and the third infrared value is smaller than the preset value under the condition that the difference between the second infrared value and the third infrared value is larger than or equal to the preset value;
and linearly regressing the adjusted fourth transmitting power and the environmental infrared value to generate the configuration file.
As an example, a theoretical model of linear regression of the emitted power of the infrared sensor with the ambient infrared value can be seen in fig. 5.
In fig. 5, the function a is a normal operation mode curve of the infrared sensor, the function B is an existing abnormal operation mode curve, and the function C is an operation mode curve for dynamically adjusting the emission power of the infrared sensor according to the environmental infrared value. The point a can be understood as a threshold of an environmental infrared value under the condition of constant transmitting power through laboratory environmental measurement, the point b is the transmitting power under an abnormal working scene, and the points a and b can be obtained through debugging.
In the function C, the configuration gear of the transmitting power of the infrared sensor is related to the configuration supported by the actual infrared sensor, and a specific configuration method and the number of gears are not described in the embodiment of the application.
Because the infrared sensors have good consistency, a set of dynamic power configuration can be fitted to each infrared sensor, and configuration files can be generated aiming at different monomers.
In this embodiment, adjusting the emission power of the infrared sensor may be regarded as compensating at the hardware end, and may be regarded as integrating two new photosensitive sensors as the receiving end. As an example, as shown in fig. 6, in a normal operation scenario, 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 scenario, 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 collected by the electronic equipment is equal to the real infrared value of the infrared sensor, the difference between the collected 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.
As another optional embodiment, the compensating the infrared sensor includes:
calculating a compensation value according to the fourth infrared value and the environmental infrared value; the fourth infrared value is an infrared value of the infrared sensor in an on state;
and determining the sum of the fourth infrared value and the compensation value as the 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 collected by the electronic equipment can be equal to the real infrared value of the infrared sensor, the difference between the collected 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 this embodiment of the present application, by compensating for the infrared sensor, the obtained infrared value of the infrared sensor can be matched with the actual infrared value, regardless of whether the infrared sensor works in the normal working scene or the abnormal working scene shown in fig. 3.
To increase the screen duty cycle of electronic devices, an off-screen sensor technology, such as an off-screen infrared sensor technology, is applied. In the under-screen infrared sensor technology, the infrared emission is generally turned off when the screen is on, and the infrared emission is turned on when the screen is off. In order to reduce the damage of infrared emission to a screen, an emission interval of delayed infrared emission (i.e. an infrared emission frequency is reduced) is generally adopted in a screen-extinguishing state, so that a PN junction of a receiving end of the infrared sensor needs to be pre-charged for a certain time 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 infrared emission does not need to be delayed, at this time, the emission frequency of the infrared sensor may be, for example, once every 100 milliseconds, and in a screen-off state, for a use scenario (corresponding to an abnormal working scenario), the emission interval of infrared emission needs to be delayed, at this time, the emission frequency of the infrared sensor may be, for example, once every 5 seconds.
In view of this, the embodiment of the application can be used for solving, but is not limited to solving, the technical problem that the infrared value acquired by the electronic device due to the delay of the emission interval of the infrared emission of the infrared sensor under the screen is lower than the real infrared value of the infrared sensor, that is, the embodiment of the application can be applied to the abnormal working scene as described above, and also can be applied to the normal working scene as described above.
It should be noted that, the various optional implementations of the method for compensating the infrared sensor in the embodiments of the present application may be implemented in combination with each other or may be implemented separately, which is not limited to this application.
In the embodiment of the application, the first infrared value is obtained, and the infrared sensor is compensated under the condition that the first infrared value is smaller than a preset infrared value. Therefore, the difference between the collected infrared value and the real infrared value can be effectively compensated 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 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 application, an infrared sensor compensation device executes an infrared sensor compensation method as an example, and the infrared sensor compensation device provided in the embodiment of the application is described.
Fig. 7 is a flowchart of an infrared sensor compensation apparatus according to 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, and the infrared sensor compensation apparatus 700 includes:
an acquisition module 701, configured to acquire a first infrared value;
and the compensation module 702 is configured to compensate the infrared sensor if 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 the first transmitting power to the second transmitting power according to the environmental infrared value, and the second transmitting power is larger than the first transmitting power.
Optionally, the adjusting unit includes:
the determining subunit is used for determining a power adjustment value corresponding to the environmental infrared value according to a pre-written configuration file;
and the adjusting subunit is used for adjusting the transmitting power of the infrared sensor from the first transmitting power to the second transmitting power according to the power adjusting value.
Optionally, the infrared sensor compensation apparatus 700 further includes a generating module, where the generating module is configured to generate the configuration file, and the generating module is specifically configured to:
controlling the infrared sensor to work in an infrared-free environment at the first transmitting frequency and the third transmitting 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;
adjusting the fourth transmitting power until the difference between the second infrared value and the third infrared value is smaller than the preset value under the condition that the difference between the second infrared value and the third infrared value is larger than or equal to the preset value;
and linearly regressing the adjusted fourth transmitting power and the environmental 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; or alternatively, the process may be performed,
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; or alternatively, the process may be performed,
and 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 calculating unit is used for calculating a compensation value according to the fourth infrared value and the environment infrared value; the fourth infrared value is an infrared value of the infrared sensor in an on state;
and a determining unit for determining the sum of the fourth infrared value and the compensation value as the infrared value of the infrared sensor.
In the embodiment of the application, the first infrared value is obtained, and the infrared sensor is compensated under the condition that the first infrared value is smaller than a preset infrared value. Therefore, the difference between the collected infrared value and the real infrared value can be effectively compensated 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 application can be a device, and also can be a component, an integrated circuit or a chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. By way of example, the mobile electronic device may be a cell phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, wearable device, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook or personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device may be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
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, an iOS operating system, or other possible operating systems, which are 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 in order to avoid repetition, a detailed description is omitted here.
Optionally, as shown in fig. 8, the embodiment of the present application further provides an electronic device 800, including a processor 801, a memory 802, and a program or an instruction stored in the memory 802 and capable of running on the processor 801, where the program or the instruction implements each process of the above-mentioned embodiment of the method for compensating an infrared sensor when executed by the processor 801, and the process can achieve the same technical effect, and for avoiding repetition, a description is omitted herein.
The electronic device in the embodiment of the application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 9 is a schematic hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 1000 includes, but is not limited to: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, and processor 1010.
Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 1010 by a power management system to perform functions such as managing charge, discharge, and power consumption by 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 shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
Wherein the processor 1010 is configured to:
acquiring a first infrared value;
and compensating the infrared sensor under the condition that 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 processor 1010 is further configured to:
and adjusting the transmitting power of the infrared sensor from a first transmitting power to a second transmitting power according to the environmental infrared value, wherein the second transmitting power is larger than the first transmitting power.
Optionally, the processor 1010 is further configured to:
determining a power adjustment value corresponding to the environmental infrared value according to a pre-written configuration file;
and adjusting the transmitting power of the infrared sensor from the first transmitting power to the second transmitting power according to the power adjusting 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 transmitting frequency and the third transmitting 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;
adjusting the fourth transmitting power until the difference between the second infrared value and the third infrared value is smaller than the preset value under the condition that the difference between the second infrared value and the third infrared value is larger than or equal to the preset value;
and linearly regressing the adjusted fourth transmitting power and the environmental 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; or alternatively, the process may be performed,
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; or alternatively, the process may be performed,
and 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 environmental infrared value; the fourth infrared value is an infrared value of the infrared sensor in an on state;
and determining the sum of the fourth infrared value and the compensation value as the infrared value of the infrared sensor.
In the embodiment of the application, the first infrared value is obtained, and the infrared sensor is compensated under the condition that the first infrared value is smaller than a preset infrared value. Therefore, the difference between the collected infrared value and the real infrared value can be effectively compensated 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 processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 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 can include two portions, 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, a joystick, and so forth, which are not described in detail herein. Memory 1009 may be used to store software programs as well as various data including, but not limited to, application programs and an operating system. The processor 1010 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the 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 processes of the above-mentioned embodiments of the infrared sensor compensation method are implemented, and the same technical effects can be achieved, so that repetition is avoided, and no further description is given here.
Wherein the processor is a 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 (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
The embodiment of the application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running a program or an instruction, implementing each process of the above-mentioned infrared sensor compensation method embodiment, and can achieve the same technical effect, so as to avoid repetition, and no further description is provided here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), including several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.

Claims (14)

1. An infrared sensor compensation method applied to an electronic device provided with an infrared sensor, the method comprising:
acquiring a first infrared value;
compensating the infrared sensor under the condition that the first infrared value is smaller than a preset infrared value;
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.
2. The method of claim 1, wherein said compensating said infrared sensor comprises:
and adjusting the transmitting power of the infrared sensor from a first transmitting power to a second transmitting power according to the environmental infrared value, wherein the second transmitting power is larger than the first transmitting power.
3. The method of claim 2, wherein adjusting the transmit power of the infrared sensor from a first transmit power to a second transmit power based on the ambient infrared value comprises:
determining a power adjustment value corresponding to the environmental infrared value according to a pre-written configuration file;
and adjusting the transmitting power of the infrared sensor from the first transmitting power to the second transmitting power according to the power adjusting value.
4. A method according to claim 3, wherein the configuration file is generated by:
controlling the infrared sensor to work in an infrared-free environment at a first transmitting frequency and a third transmitting power, and acquiring a second infrared value of the infrared sensor;
controlling the infrared sensor to work in an infrared-free environment at a second transmitting frequency and a fourth transmitting power, and acquiring a third infrared value of the infrared sensor;
adjusting the fourth transmitting power until the difference between the second infrared value and the third infrared value is smaller than the preset value under the condition that the difference between the second infrared value and the third infrared value is larger than or equal to the preset value;
and linearly regressing the adjusted fourth transmitting power and the environmental infrared value to generate the configuration file.
5. The method of claim 2, wherein said adjusting the transmit power of the infrared sensor from a first transmit power to a second transmit 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; or alternatively, the process may be performed,
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; or alternatively, the process may be performed,
and 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.
6. The method of claim 1, wherein said compensating said infrared sensor comprises:
calculating a compensation value according to the fourth infrared value and the environmental infrared value; the fourth infrared value is an infrared value of the infrared sensor in an on state;
and determining the sum of the fourth infrared value and the compensation value as the infrared value of the infrared sensor.
7. An infrared sensor compensation apparatus applied to an electronic device provided with an infrared sensor, characterized in that the apparatus comprises:
the acquisition module is used for acquiring a first infrared value;
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;
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.
8. The apparatus of claim 7, wherein the compensation module comprises:
and the adjusting unit is used for adjusting the transmitting power of the infrared sensor from the first transmitting power to the second transmitting power according to the environmental infrared value, and the second transmitting power is larger than the first transmitting power.
9. The apparatus according to claim 8, wherein the adjusting unit comprises:
the determining subunit is used for determining a power adjustment value corresponding to the environmental infrared value according to a pre-written configuration file;
and the adjusting subunit is used for adjusting the transmitting power of the infrared sensor from the first transmitting power to the second transmitting power according to the power adjusting value.
10. The apparatus of claim 9, further comprising a generation module configured to generate the configuration file, the generation module being specifically configured to:
controlling the infrared sensor to work in an infrared-free environment at a first transmitting frequency and a third transmitting power, and acquiring a second infrared value of the infrared sensor;
controlling the infrared sensor to work in an infrared-free environment at a second transmitting frequency and a fourth transmitting power, and acquiring a third infrared value of the infrared sensor;
adjusting the fourth transmitting power until the difference between the second infrared value and the third infrared value is smaller than the preset value under the condition that the difference between the second infrared value and the third infrared value is larger than or equal to the preset value;
and linearly regressing the adjusted fourth transmitting power and the environmental infrared value to generate the configuration file.
11. The device according to claim 8, wherein the adjustment 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; or alternatively, the process may be performed,
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; or alternatively, the process may be performed,
and 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.
12. The apparatus of claim 7, wherein the compensation module comprises:
the calculating unit is used for calculating a compensation value according to the fourth infrared value and the environment infrared value; the fourth infrared value is an infrared value of the infrared sensor in an on state;
and a determining unit for determining the sum of the fourth infrared value and the compensation value as the infrared value of the infrared sensor.
13. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the method of compensating for an infrared sensor as claimed in any one of claims 1 to 6.
14. A readable storage medium, characterized in that it has stored 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 6.
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 CN112968985A (en) 2021-06-15
CN112968985B true 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)

Families Citing this family (2)

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

Citations (4)

* 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
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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9129548B2 (en) * 2012-11-15 2015-09-08 Apple Inc. Ambient light sensors with infrared compensation
CN106210227B (en) * 2016-07-06 2019-03-01 Oppo广东移动通信有限公司 A kind of calibration method of infrared proximity transducer, device and mobile terminal
CN108833695B (en) * 2018-06-06 2020-07-31 Oppo广东移动通信有限公司 Control method, control device, electronic device, computer storage medium, and apparatus
CN109840032B (en) * 2019-01-24 2022-04-12 Oppo广东移动通信有限公司 Method and device for calibrating proximity sensor, electronic equipment and storage medium

Patent Citations (4)

* 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
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

Also Published As

Publication number Publication date
CN112968985A (en) 2021-06-15

Similar Documents

Publication Publication Date Title
CN107943345B (en) Method and device for calibrating proximity sensor, storage medium and electronic equipment
CN112968985B (en) Infrared sensor compensation method and device and electronic equipment
CN107450817B (en) Proximity detection method, proximity detection device, storage medium, and electronic apparatus
CN107942306B (en) Method and device for calibrating proximity sensor, storage medium and electronic equipment
CN106502703B (en) Function calling method and device
CN107884764B (en) Proximity state detection method and device, storage medium and electronic device
CN103164322A (en) Signature method and signature device for program crashing
CN104166614A (en) Frame rate detecting method for mobile device and related device
CN114063675A (en) Temperature control method and device
WO2021129147A1 (en) Proximity sensor anomaly detection method and apparatus and mobile terminal
CN110705497A (en) Image frame processing method and device, terminal equipment and computer readable storage medium
CN112749074B (en) Test case recommending method and device
CN112929734B (en) Screen projection method and device and electronic equipment
CN112416172A (en) Electronic equipment control method and device and electronic equipment
CN111104180A (en) Application program optimization method and device, storage medium and electronic equipment
CN112924875B (en) Battery detection method and device and electronic equipment
CN111897726B (en) Abnormality positioning method, abnormality positioning device, storage medium and mobile terminal
CN111081198B (en) Data control method, data control device, storage medium and terminal equipment
CN113687942A (en) Detection method and device and electronic equipment
CN111355892A (en) Picture shooting method and device, storage medium and electronic terminal
CN111726741B (en) Microphone state detection method and device
CN112395185B (en) Program testing method and related device
CN112965756B (en) Page resource loading amount monitoring method and device, electronic equipment and storage medium
CN112001582B (en) Urban area action evaluation method, device, equipment and computer storage medium
CN110633192B (en) Test method, test device, terminal equipment and computer readable storage medium

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