[go: up one dir, main page]

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
emission
transmitting 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.)
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

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, 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, device and electronic equipment

技术领域technical field

本申请属于电子设备技术领域,具体涉及一种红外传感器补偿方法、装置和电子设备。The application belongs to the technical field of electronic equipment, and in particular relates to an infrared sensor compensation method, device and electronic equipment.

背景技术Background technique

红外传感器越来越广泛地应用于手机、平板等电子设备,用来实现近距离遮挡息屏,例如,通话时有效防止误触屏幕。然而,在某些工作场景下,电子设备采集的红外值可能会低于红外传感器的真实红外值,这会导致红外传感器的工作性能受到影响,例如,可能产生通话远离不亮屏或防误触距离变近等问题。Infrared sensors are more and more widely used in mobile phones, tablets and other electronic devices to realize close-range shielding of the screen, for example, to effectively prevent accidental touch on the screen 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 will affect the performance of the infrared sensor. issues such as proximity.

发明内容Contents of the invention

本申请实施例的目的是提供一种红外传感器补偿方法、装置和电子设备,能够解决现有技术中因电子设备采集的红外值低于红外传感器的真实红外值而导致红外传感器工作性能受到影响的技术问题。The purpose of the embodiments of the present application is to provide an infrared sensor compensation method, device and electronic equipment, which can solve the problem in the prior art that the infrared sensor’s working performance is affected because the infrared value collected by the electronic equipment is lower than the real infrared value of the infrared sensor. technical problem.

为了解决上述技术问题,本申请是这样实现的:In order to solve the above-mentioned technical problems, the application is implemented as follows:

第一方面,本申请实施例提供了一种红外传感器补偿方法,应用于设置有红外传感器的电子设备,该方法包括:In the first aspect, an embodiment of the present application provides an infrared sensor compensation method, which is applied to an electronic device equipped with an infrared sensor, and the method includes:

获取第一红外值;Obtain the first infrared value;

在所述第一红外值小于预设红外值的情况下,对所述红外传感器进行补偿。When the first infrared value is less than a preset infrared value, compensation is performed on the infrared sensor.

第二方面,本申请实施例提供了一种红外传感器补偿装置,应用于设置有红外传感器的电子设备,所述装置包括:In the second aspect, the embodiment of the present application provides an infrared sensor compensation device, which is applied to an electronic device equipped with an infrared sensor, and the device includes:

获取模块,用于获取第一红外值;An acquisition module, configured to acquire the first infrared value;

补偿模块,用于在所述第一红外值小于预设红外值的情况下,对所述红外传感器进行补偿。A compensation module, configured to compensate the infrared sensor when the first infrared value is less than a preset infrared value.

第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, an embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and operable on the processor, and the program or instruction is The processor implements the steps of the method described in the first aspect when executed.

第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or an instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented .

第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In the fifth aspect, the embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions, so as to implement the first aspect the method described.

在本申请实施例中,通过获取第一红外值,在第一红外值小于预设红外值的情况下,对红外传感器进行补偿。这样,通过对红外传感器进行补偿能够有效弥补采集的红外值与真实红外值之间的差值,从而能够提高红外传感器工作性能的稳定性。In the embodiment of the present application, by acquiring the first infrared value, the infrared sensor is compensated when the first infrared value is smaller than the preset infrared value. In this way, by compensating the infrared sensor, the difference between the collected infrared value and the real infrared value can be effectively compensated, thereby improving the stability of the working performance of the infrared sensor.

附图说明Description of drawings

图1是本申请实施例提供的一种红外传感器补偿方法的流程示意图;Fig. 1 is a schematic flow chart of an infrared sensor compensation method provided by an embodiment of the present application;

图2是红外传感器PN结内部电洞激发过程的示意图;Fig. 2 is a schematic diagram of the hole excitation process inside the PN junction of the infrared sensor;

图3是红外传感器在正常工作场景和异常工作场景下的红外值对比图;Figure 3 is a comparison chart of the infrared value of the infrared sensor in the normal working scene and the abnormal working scene;

图4是本申请实施例提供的另一种红外传感器补偿方法的流程示意图;Fig. 4 is a schematic flowchart of another infrared sensor compensation method provided by the embodiment of the present application;

图5是本申请实施例提供的红外传感器的发射功率与环境红外值进行线性回归的理论模型图;5 is a theoretical model diagram of linear regression between the emission power of the infrared sensor provided in the embodiment of the present application and the ambient infrared value;

图6是本申请实施例提供的红外传感器功率补偿的示意图;Fig. 6 is a schematic diagram of infrared sensor power compensation provided by the embodiment of the present application;

图7是本申请实施例提供的一种红外传感器补偿装置的结构示意图;Fig. 7 is a schematic structural diagram of an infrared sensor compensation device provided by an embodiment of the present application;

图8是本申请实施例提供的一种电子设备的结构示意图;FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;

图9是本申请实施例提供的一种电子设备的硬件结构示意图。FIG. 9 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this application.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific sequence or sequence. It should be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application can be practiced in sequences other than those illustrated or described herein, and that references to "first," "second," etc. distinguish Objects are generally of one type, and the number of objects is not limited. For example, there may be one or more first objects. In addition, "and/or" in the description and claims means at least one of the connected objects, and the character "/" generally means that the related objects are an "or" relationship.

本申请实施例提供的红外传感器补偿方法,执行主体可以为红外传感器补偿装置,或者该红外传感器补偿装置中的用于执行红外传感器补偿方法的控制模块。The infrared sensor compensation method provided in the embodiment of the present application may be executed by an infrared sensor compensation device, or a control module in the infrared sensor compensation device for executing the infrared sensor compensation method.

本申请实施例中的红外传感器补偿装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The infrared sensor compensation device in the embodiment of the present application may be a device, or 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. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., non-mobile electronic equipment can be server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.

本申请实施例中的红外传感器补偿装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为iOS操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The infrared sensor compensation device in the embodiment of the present application may be a device with 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 this embodiment of the present application.

下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的红外传感器补偿方法、红外传感器补偿装置、电子设备、可读存储介质和芯片进行详细地说明。The infrared sensor compensation method, infrared sensor compensation device, electronic equipment, readable storage medium, and chip provided by the embodiments of the present application will be described in detail below through specific embodiments and application scenarios with reference to the accompanying drawings.

图1是本申请实施例提供的一种红外传感器补偿方法的流程图,如图1所示,该方法包括以下步骤:Fig. 1 is a flow chart of an infrared sensor compensation method provided in the embodiment of the present application. As shown in Fig. 1, the method includes the following steps:

步骤101:获取第一红外值;Step 101: Obtain the first infrared value;

步骤102:在所述第一红外值小于预设红外值的情况下,对所述红外传感器进行补偿。Step 102: Compensate the infrared sensor when the first infrared value is smaller than a preset infrared value.

红外传感器可应用于电子设备中,例如,红外传感器可应用于手机,用来实现近距离遮挡息屏,使得手机在通话状态下能够有效防止误触。Infrared sensors can be applied to electronic devices. For example, infrared sensors can be applied to mobile phones to realize close-range shielding of the screen, so that the mobile phone can effectively prevent accidental touches during a call.

红外传感器可包括发射端和接收端,发射端为红外发光器件(或称“红外LED”)、接收端为感光传感器(sensor)。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 photosensitive sensor (sensor).

如图2所示,当红外LED工作前,接收端的PN结处于未激发状态,内部电洞(trap)无电子附着,因此,在红外LED开启工作后,PN结的内部电洞需要一定的时间充满。在电洞饱和的状态下,PN结才能到达预充完毕状态,光电流的响应速度才能达到稳定状态。As shown in Figure 2, before the infrared LED works, the PN junction at the receiving end is in an unexcited state, and the internal trap has no electrons attached. Therefore, after the infrared LED is turned on, the internal trap of the PN junction needs a certain amount of time. full. In the state of hole saturation, the PN junction can reach the pre-charged state, and the response speed of the photocurrent can reach a stable state.

当红外传感器的接收端的PN结内部电洞未达到饱和状态时,电子设备采集的红外值可能会低于红外传感器的真实红外值,这会导致红外动态基准的更新低于红外传感器的真实红外值。对于用户端来说,可能产生通话远离不亮屏或防误触距离变近等问题。When the hole inside the PN junction of the receiving end of the infrared sensor is not saturated, the infrared value collected by the electronic device may be lower than the real infrared value of the infrared sensor, which will cause the update of the infrared dynamic reference to be lower than the real infrared value of the infrared sensor . For the user end, there may be problems such as the screen is not bright when the call is far away, or the anti-mistouch distance becomes closer.

需要说明的是,由于存在一定的测量误差,电子设备采集的红外值一般不会完全等于红外传感器的真实红外值,本申请实施例中所涉及的电子设备采集的红外值等于红外传感器的真实红外值,可以理解为采集的红外值与真实红外值之间的差值的绝对值小于预设值。It should be noted that due to certain measurement errors, the infrared value collected by the electronic device is generally not completely equal to the real infrared value of the infrared sensor. The infrared value collected by the electronic device involved in the embodiment of this application is equal to the real infrared value of the infrared sensor. value, which can be understood as 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 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. In this way, by compensating the infrared sensor, the difference between the collected infrared value and the real infrared value can be effectively compensated, thereby improving the stability of the working performance of the infrared sensor.

红外传感器的接收端的PN结内部电洞未达到饱和状态的原因主要包括:其一,环境中的红外成分较少,导致PN结内部电洞需要一定的时间才能充满;其二,红外传感器的发射频率较低,导致红外传感器开启工作后,PN结内部电洞需要一定的时间才能充满。The reasons why the internal holes of the PN junction at the receiving end of the infrared sensor are not saturated mainly include: first, the infrared components in the environment are less, so it takes a certain time for the internal holes of the PN junction to be filled; second, the emission of the infrared sensor The frequency is low, so after the infrared sensor is turned on, it takes a certain amount of time for the holes inside the PN junction to be filled.

为了更好地理解本申请实施例,定义如下概念,并将红外传感器的工作场景分为正常工作场景和异常工作场景。In order to better understand the embodiments of the present application, the following concepts are defined, and working scenarios of infrared sensors are divided into normal working scenarios and abnormal working scenarios.

环境红外值:接收端采集的环境中的红外成分对应的ADC值。Environmental infrared value: the ADC value corresponding to the infrared component in the environment collected by the receiving end.

欠补的红外值:在环境中没有红外成分的情况下,接收端实际采集的红外值,由于存在PN结预充时间的问题,欠补的红外值低于红外传感器的真实红外值,红外传感器的真实红外值又称红外LED的真实反射能量,为红外LED实际的反射能量所对应的ADC值。Under-compensated infrared value: When there is no infrared component in the environment, the infrared value actually collected by the receiving end. Due to the problem of PN junction pre-charge time, the under-compensated infrared value is lower than the real infrared value of the infrared sensor. The infrared sensor The real infrared value of the infrared LED is also called the real reflected energy of the infrared LED, which is the ADC value corresponding to the actual reflected energy of the infrared LED.

补偿值:真实红外值与欠补的红外值之间的差值。Offset Value: The difference between the true IR value and the underfilled IR value.

当前红外值:接收端实际采集的红外值,在正常工作场景下,当前红外值等于真实红外值;在异常工作场景下,当前红外值等于欠补的红外值。Current infrared value: the actual infrared value collected by the receiving end. In normal working scenarios, the current infrared value is equal to the real infrared value; in abnormal working scenarios, the current infrared value is equal to the under-compensated infrared value.

如图3所示,在正常工作场景下(3-a),红外传感器的发射频率为100ms,或者,环境中存在红外成分,当前红外值等于真实红外值。在异常工作场景下(3-b),红外传感器的发射频率为5s,且环境中没有红外成分,当前红外值低于真实红外值。As shown in Figure 3, in a normal working scenario (3-a), the emission frequency of the infrared sensor is 100 ms, or there is an infrared component in the environment, and the current infrared value is equal to the real infrared value. In the abnormal working scenario (3-b), the emission frequency of the infrared sensor is 5s, and there is no infrared component in the environment, and the current infrared value is lower than the real infrared value.

由于环境红外值对当前红外值是否能够反映真实红外值起着关键的作用,因此,本申请实施例可采取图4所示的实施方式来判断是否需要对红外传感器进行补偿。如图4所示,红外传感器补偿方法包括以下步骤:Since the ambient infrared value plays a key role in whether the current infrared value can reflect the real infrared value, the embodiment of the present application may adopt the implementation manner shown in FIG. 4 to determine whether the infrared sensor needs to be compensated. As shown in Figure 4, the infrared sensor compensation method includes the following steps:

步骤101a:获取环境红外值;Step 101a: Obtain the ambient infrared value;

步骤102a:在所述环境红外值小于所述红外传感器的PN结饱和响应阈值的情况下,对所述红外传感器进行补偿。Step 102a: Compensate the infrared sensor when the ambient infrared value is less than the PN junction saturation response threshold of the infrared sensor.

该实施方式中,可以通过环境红外值来判断是否需要对红外传感器进行补偿。具体的,当环境红外值小于红外传感器的PN结饱和响应阈值,可判定需要对红外传感器进行补偿,在该情况下,可以对红外传感器进行补偿。当环境红外值大于或等于红外传感器的PN结饱和响应阈值,可判定不需要对红外传感器进行补偿,在该情况下,可以不对红外传感器进行补偿。In this embodiment, it can be judged whether the infrared sensor needs to be compensated according to the ambient infrared value. Specifically, when the ambient infrared value is less 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 the infrared sensor does not need to be compensated. In this case, the infrared sensor may not be compensated.

该实施方式中,通过环境红外值来判断是否需要对红外传感器进行补偿,能够合理地衡量红外传感器是否需要进行补偿,提供了合理的红外传感器补偿机制。In this implementation manner, whether the infrared sensor needs to be compensated is judged by the ambient infrared value, which can reasonably measure whether the infrared sensor needs to be compensated, and provides a reasonable infrared sensor compensation mechanism.

本申请实施例中,在判定需要对红外传感器进行补偿的情况下,可以采取如下的实施方式对红外传感器进行补偿。In the embodiment of the present application, when it is determined that the infrared sensor needs to be compensated, the following implementation manners may be adopted to compensate the infrared sensor.

作为其中一可选的实施方式,所述对所述红外传感器进行补偿,包括:As one of the optional implementation manners, the compensating the infrared sensor includes:

根据所述环境红外值,将所述红外传感器的发射功率由第一发射功率调整至第二发射功率,所述第二发射功率大于所述第一发射功率。According to the ambient infrared value, the transmission power of the infrared sensor is adjusted from a first transmission power to a second transmission power, and the second transmission power is greater than the first transmission power.

该实施方式中,所述将所述红外传感器的发射功率由第一发射功率调整至第二发射功率,包括:In this embodiment, the adjusting the transmission power of the infrared sensor from the first transmission power to the second transmission power includes:

将所述红外传感器的发射电流由第一发射电流调整至第二发射电流,所述第二发射电流大于所述第一发射电流;或者,adjusting the emission current of the infrared sensor from the first emission current to a second emission current, the second emission current being greater than the first emission current; or,

将所述红外传感器的发射脉宽由第一发射脉宽调整至第二发射脉宽,所述第二发射脉宽大于所述第一发射脉宽;或者,adjusting the emission pulse width of the infrared sensor from the first emission pulse width to a second emission pulse width, the second emission pulse width being greater than the first emission pulse width; or,

将所述红外传感器的发射周期由第一发射周期调整至第二发射周期,所述第二发射周期小于所述第一发射周期。The emission period of the infrared sensor is adjusted from the first emission period to a second emission period, and the second emission period is shorter than the first emission period.

进一步的,所述根据所述环境红外值,将所述红外传感器的发射功率由第一发射功率调整至第二发射功率,包括:Further, according to the ambient infrared value, adjusting the transmission power of the infrared sensor from the first transmission power to the second transmission power includes:

根据预先写入的配置文件,确定所述环境红外值对应的功率调整值;Determine the power adjustment value corresponding to the ambient infrared value according to the pre-written configuration file;

根据所述功率调整值,将所述红外传感器的发射功率由第一发射功率调整至第二发射功率。According to the power adjustment value, the transmission power of the infrared sensor is adjusted from the first transmission power to the second transmission power.

其中,配置文件中写入有红外传感器发射功率的调整逻辑,例如,环境红外值对应的功率调整值。可以将配置文件预先写入到红外传感器内部,并通过红外传感器内部的状态机或MCU(Micro Control Unit,微控制单元)来运行红外传感器发射功率的调整逻辑。Among them, the adjustment logic of the infrared sensor transmission power is written in the configuration file, for example, the power adjustment value corresponding to the ambient infrared value. The configuration file can be pre-written into the infrared sensor, and the adjustment logic of the infrared sensor transmission power can be run through a state machine or an MCU (Micro Control Unit, micro control unit) inside the infrared sensor.

其中,上述配置文件可通过以下步骤生成:Among them, the above configuration file can be generated through the following steps:

控制所述红外传感器以所述第一发射频率和第三发射功率工作于无红外环境中,并获取所述红外传感器的第二红外值;controlling the infrared sensor to work in an infrared-free environment with the first transmission frequency and the third transmission power, and acquiring a second infrared value of the infrared sensor;

控制所述红外传感器以所述第二发射频率和第四发射功率工作于无红外环境中,并获取所述红外传感器的第三红外值;controlling the infrared sensor to work in a non-infrared environment with the second transmission frequency and the fourth transmission power, and acquiring a third infrared value of the infrared sensor;

在所述第二红外值和所述第三红外值的差值大于或等于预设值的情况下,调整所述第四发射功率,直至所述第二红外值和所述第三红外值的差值小于所述预设值;When the difference between the second infrared value and the third infrared value is greater than or equal to a preset value, adjust the fourth transmission power until the difference between the second infrared value and the third infrared value The difference is less than the preset value;

对调整后的所述第四发射功率与所述环境红外值进行线性回归,生成所述配置文件。performing a linear regression on the adjusted fourth transmit power and the ambient infrared value to generate the configuration file.

作为示例,对红外传感器的发射功率与环境红外值进行线性回归的理论模型可参见图5。As an example, the theoretical model for linear regression between the emission power of the infrared sensor and the ambient infrared value can be seen in FIG. 5 .

图5中,A函数为红外传感器正常工作模式曲线,B函数为现有异常工作模式曲线,C函数为根据环境红外值动态调节红外传感器的发射功率的工作模式曲线。其中,a点可以理解为通过实验室环境测量在发射功率恒定的条件下,环境红外值的门限,b点为异常工作场景下的发射功率,a、b两点可以通过调试获取。In Fig. 5, function A is the curve of the normal working mode of the infrared sensor, function B is the curve of the existing abnormal working mode, and function C is the curve of the working mode of dynamically adjusting the emission power of the infrared sensor according to the ambient infrared value. Among them, point a can be understood as the threshold of the ambient infrared value under the condition of constant transmission power measured in the laboratory environment, point b is the transmission power under abnormal working scenarios, and two points a and b can be obtained through debugging.

C函数中,红外传感器的发射功率的配置档位与实际红外传感器支持的配置相关,具体配置方法和档位数量本申请实施例不作描述。In the C function, 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 gears are not described in this embodiment of the application.

由于红外传感器的一致性较好,可以拟合一套动态功率配置应用到各红外传感器,也可以针对不同的单体进行配置文件的生成。Due to the good consistency of infrared sensors, a set of dynamic power configurations can be fitted and applied to each infrared sensor, and configuration files can also be generated for different monomers.

该实施方式中,调整红外传感器的发射功率可以视为在硬件端作出补偿,可以视为集成了两种新感光sensor作为接收端。作为示例,如图6所示,在正常工作场景下,不需要对红外LED的发射功率进行调整,MCU和感光sensor可集成为一新的感光sensor,在异常工作场景下,需要对红外LED的发射功率进行调整,MCU、感光sensor和红外LED可集成为另一新的感光sensor。In this embodiment, adjusting the transmitting power of the infrared sensor can be regarded as making compensation at the hardware end, and it can be regarded as integrating two new photosensitive sensors as the receiving end. As an example, as shown in Figure 6, in normal working scenarios, the emission power of the infrared LED does not need to be adjusted, and the MCU and photosensitive sensor can be integrated into a new photosensitive sensor. The transmission power is adjusted, and the MCU, photosensitive sensor and infrared LED can be integrated into another new photosensitive sensor.

该实施方式中,通过当前环境红外值动态调整红外传感器的发射功率,能够使电子设备采集的红外值等于红外传感器的真实红外值,从而能够有效弥补采集的红外值与真实红外值之间的差值,能够提高红外传感器工作性能的稳定性。In this 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 device can be equal to the real infrared value of the infrared sensor, so that the difference between the collected infrared value and the real infrared value can be effectively compensated. value, which can improve the stability of the infrared sensor’s working performance.

作为其中另一可选的实施方式,所述对所述红外传感器进行补偿,包括:As another optional implementation manner, the compensating the infrared sensor includes:

根据第四红外值和所述环境红外值,计算补偿值;所述第四红外值为所述红外传感器处于开启状态的红外值;Calculate a compensation value according to the fourth infrared value and the ambient infrared value; the fourth infrared value is an infrared value at which the infrared sensor is turned on;

将所述第四红外值与所述补偿值的和确定为所述红外传感器的红外值。The sum of the fourth infrared value and the compensation value is determined as the infrared value of the infrared sensor.

该实施方式中,通过当前环境红外值计算补偿值,在软件算法层面即可实现对红外传感器的补偿,能够使电子设备采集的红外值等于红外传感器的真实红外值,从而能够有效弥补采集的红外值与真实红外值之间的差值,能够提高红外传感器工作性能的稳定性。In this embodiment, the compensation value is calculated by the infrared value of the current environment, and the compensation for the infrared sensor can be realized at the software algorithm level, which can make the infrared value collected by the electronic device equal to the real infrared value of the infrared sensor, thereby effectively compensating the collected infrared value The difference between the value and the real infrared value can improve the stability of the infrared sensor's working performance.

本申请实施例中,通过对红外传感器进行补偿,红外传感器不管工作于图3所示出的正常工作场景,还是异常工作场景,都能够使得到的红外传感器的红外值与真实红外值相匹配。In the embodiment of the present application, by compensating the infrared sensor, no matter whether the infrared sensor works in the normal working scene shown in FIG. 3 or in the abnormal working scene, the obtained infrared value of the infrared sensor can match the real infrared value.

为了提高电子设备的屏占比,屏下传感器技术,例如屏下红外传感器技术得到应用。屏下红外传感器技术中,一般在亮屏时关闭红外发射,在息屏时开启红外发射。为了降低红外发射对屏幕的损伤,在息屏状态下通常采用延迟红外发射的发射间隔(即降低红外发射频率),这样,红外传感器的接收端的PN结需要一定时间预充才能达到稳定工作状态。In order to increase the screen-to-body ratio of electronic devices, under-screen sensor technology, such as under-screen infrared sensor technology, is applied. In the infrared sensor technology under the screen, 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 the screen, the emission interval of infrared emission is usually delayed (that is, the frequency of infrared emission is reduced) in the off-screen state. In this way, the PN junction of the receiving end of the infrared sensor needs a certain period of pre-charging to reach a stable working state.

可以根据红外传感器的使用场景,将红外传感器的发射频率进行区别。其中,在普通的使用场景(对应正常工作场景)下,不需要延迟红外发射的发射间隔,此时红外传感器的发射频率例如可以是每100毫秒发射一次,而对于屏下的使用场景(对应异常工作场景),在息屏状态下需要延迟红外发射的发射间隔,此时红外传感器的发射频率例如可以是每5秒发射一次。The emission frequency of the infrared sensor can be distinguished according to the usage scenario of the infrared sensor. Among them, in the normal usage scenario (corresponding to the normal working scenario), there is no need to delay the emission interval of the infrared emission. At this time, the emission frequency of the infrared sensor can be, for example, once every 100 milliseconds, and for the usage scenario under the screen (corresponding to the abnormal In the working scene), the emission interval of the infrared emission needs to be delayed in the off-screen state. At this time, the emission frequency of the infrared sensor can be, for example, once every 5 seconds.

鉴于此,本申请实施例能够用于解决但不限于解决屏下红外传感器因延迟红外发射的发射间隔而导致的电子设备采集的红外值低于红外传感器的真实红外值的技术问题,也就是说,本申请实施例能够适用于上述的异常工作场景,也可以适用于上述的正常工作场景。In view of this, the embodiments of the present application can be used to solve but not limited to solve the technical problem that the infrared value collected by the electronic device is lower than the real infrared value of the infrared sensor due to the delay of the infrared emission interval of the infrared sensor under the screen, that is to say , the embodiment of the present application can be applied to the above-mentioned abnormal working scenarios, and can also be applied to the above-mentioned normal working scenarios.

需要说明的是,本申请实施例中的红外传感器补偿方法中的多种可选的实施方式,彼此可以相互结合实现,也可以单独实现,对此本申请不作限定。It should be noted that various optional implementation manners of the infrared sensor compensation method in the embodiment of the present application may be implemented in combination with each other or implemented separately, which is not limited in this application.

在本申请实施例中,通过获取第一红外值,在第一红外值小于预设红外值的情况下,对红外传感器进行补偿。这样,通过对红外传感器进行补偿能够有效弥补采集的红外值与真实红外值之间的差值,从而能够提高红外传感器工作性能的稳定性。In the embodiment of the present application, by acquiring the first infrared value, the infrared sensor is compensated when the first infrared value is smaller than the preset infrared value. In this way, by compensating the infrared sensor, the difference between the collected infrared value and the real infrared value can be effectively compensated, thereby improving the stability of the working performance of the infrared sensor.

需要说明的是,本申请实施例提供的红外传感器补偿方法,执行主体可以为红外传感器补偿装置,或者该红外传感器补偿装置中的用于执行红外传感器补偿方法的控制模块。本申请实施例中以红外传感器补偿装置执行红外传感器补偿方法为例,说明本申请实施例提供的红外传感器补偿装置。It should be noted that, the infrared sensor compensation method provided in the embodiment of the present application may be executed by 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, the infrared sensor compensation device implemented by the infrared sensor compensation device is taken as an example to describe the infrared sensor compensation device provided in the embodiment of the present application.

图7是本申请实施例提供的一种红外传感器补偿装置的流程图,如图7所示,红外传感器补偿装置700可应用于设置有红外传感器的电子设备,红外传感器补偿装置700包括:FIG. 7 is a flow chart of an infrared sensor compensation device provided in an embodiment of the present application. As shown in FIG. 7, the infrared sensor compensation device 700 can be applied to electronic equipment provided with an infrared sensor. The infrared sensor compensation device 700 includes:

获取模块701,用于获取第一红外值;An acquisition module 701, configured to acquire a first infrared value;

补偿模块702,用于在所述第一红外值小于预设红外值的情况下,对所述红外传感器进行补偿。The compensation module 702 is configured to compensate the infrared sensor when the first infrared value is less than a preset infrared value.

可选的,所述第一红外值为环境红外值,所述预设红外值为所述红外传感器的PN结饱和响应阈值。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.

可选的,补偿模块702包括:Optionally, the compensation module 702 includes:

调整单元,用于根据所述环境红外值,将所述红外传感器的发射功率由第一发射功率调整至第二发射功率,所述第二发射功率大于所述第一发射功率。An adjustment unit, configured to adjust the transmission power of the infrared sensor from a first transmission power to a second transmission power according to the ambient infrared value, and the second transmission power is greater than the first transmission power.

可选的,所述调整单元包括:Optionally, the adjustment unit includes:

确定子单元,用于根据预先写入的配置文件,确定所述环境红外值对应的功率调整值;A determination subunit is configured to determine a power adjustment value corresponding to the ambient infrared value according to a pre-written configuration file;

调整子单元,用于根据所述功率调整值,将所述红外传感器的发射功率由第一发射功率调整至第二发射功率。The adjustment subunit is configured to adjust the transmission power of the infrared sensor from the first transmission power to the second transmission power according to the power adjustment value.

可选的,红外传感器补偿装置700还包括生成模块,所述生成模块用于生成所述配置文件,所述生成模块具体用于:Optionally, the infrared sensor compensation device 700 also includes a generation module, the generation module is used to generate the configuration file, and the generation module is specifically used for:

控制所述红外传感器以所述第一发射频率和第三发射功率工作于无红外环境中,并获取所述红外传感器的第二红外值;controlling the infrared sensor to work in an infrared-free environment with the first transmission frequency and the third transmission power, and acquiring a second infrared value of the infrared sensor;

控制所述红外传感器以所述第二发射频率和第四发射功率工作于无红外环境中,并获取所述红外传感器的第三红外值;controlling the infrared sensor to work in a non-infrared environment with the second transmission frequency and the fourth transmission power, and acquiring a third infrared value of the infrared sensor;

在所述第二红外值和所述第三红外值的差值大于或等于预设值的情况下,调整所述第四发射功率,直至所述第二红外值和所述第三红外值的差值小于所述预设值;When the difference between the second infrared value and the third infrared value is greater than or equal to a preset value, adjust the fourth transmission power until the difference between the second infrared value and the third infrared value The difference is less than the preset value;

对调整后的所述第四发射功率与所述环境红外值进行线性回归,生成所述配置文件。performing a linear regression on the adjusted fourth transmit power and the ambient infrared value to generate the configuration file.

可选的,所述调整单元具体用于:Optionally, the adjustment unit is specifically used for:

将所述红外传感器的发射电流由第一发射电流调整至第二发射电流,所述第二发射电流大于所述第一发射电流;或者,adjusting the emission current of the infrared sensor from the first emission current to a second emission current, the second emission current being greater than the first emission current; or,

将所述红外传感器的发射脉宽由第一发射脉宽调整至第二发射脉宽,所述第二发射脉宽大于所述第一发射脉宽;或者,adjusting the emission pulse width of the infrared sensor from the first emission pulse width to a second emission pulse width, the second emission pulse width being greater than the first emission pulse width; or,

将所述红外传感器的发射周期由第一发射周期调整至第二发射周期,所述第二发射周期小于所述第一发射周期。The emission period of the infrared sensor is adjusted from the first emission period to a second emission period, and the second emission period is shorter than the first emission period.

可选的,补偿模块702包括:Optionally, the compensation module 702 includes:

计算单元,用于根据第四红外值和所述环境红外值,计算补偿值;所述第四红外值为所述红外传感器处于开启状态的红外值;a calculation unit, configured to calculate a compensation value according to a fourth infrared value and the ambient infrared value; the fourth infrared value is an infrared value at which the infrared sensor is turned on;

确定单元,用于将所述第四红外值与所述补偿值的和确定为所述红外传感器的红外值。A determining unit, configured to determine the sum of the fourth infrared value and the compensation value as the infrared value of the infrared sensor.

在本申请实施例中,通过获取第一红外值,在第一红外值小于预设红外值的情况下,对红外传感器进行补偿。这样,通过对红外传感器进行补偿能够有效弥补采集的红外值与真实红外值之间的差值,从而能够提高红外传感器工作性能的稳定性。In the embodiment of the present application, by acquiring the first infrared value, the infrared sensor is compensated when the first infrared value is smaller than the preset infrared value. In this way, by compensating the infrared sensor, the difference between the collected infrared value and the real infrared value can be effectively compensated, thereby improving the stability of the working performance of the infrared sensor.

本申请实施例中的红外传感器补偿装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The infrared sensor compensation device in the embodiment of the present application may be a device, or 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. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., non-mobile electronic equipment can be server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.

本申请实施例中的红外传感器补偿装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为iOS操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The infrared sensor compensation device in the embodiment of the present application may be a device with an operating system. The operating system may be an Android (Android) operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in this embodiment of the present application.

本申请实施例提供的红外传感器补偿装置能够实现图1至图6的方法实施例实现的各个过程,为避免重复,这里不再赘述。The infrared sensor compensating device provided in the embodiment of the present application can realize various processes realized by the method embodiments in FIG. 1 to FIG. 6 , and details are not repeated here to avoid repetition.

可选的,如图8所示,本申请实施例还提供一种电子设备800,包括处理器801,存储器802,存储在存储器802上并可在所述处理器801上运行的程序或指令,该程序或指令被处理器801执行时实现上述红外传感器补偿方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。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 programs or instructions stored in the memory 802 and operable on the processor 801, When the program or instruction is executed by the processor 801, the various processes of the above-mentioned infrared sensor compensation method embodiment can be achieved, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.

需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

图9为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 9 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.

该电子设备1000包括但不限于:射频单元1001、网络模块1002、音频输出单元1003、输入单元1004、传感器1005、显示单元1006、用户输入单元1007、接口单元1008、存储器1009、以及处理器1010等部件。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, etc. part.

本领域技术人员可以理解,电子设备1000还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1010逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图8中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 1000 can also include a power supply (such as a battery) for supplying power to various components, and the power supply can be logically connected to the processor 1010 through the power management system, so that the management of charging, discharging, and function can be realized through the power management system. Consumption management and other functions. The structure of the electronic device shown in FIG. 8 does not constitute a limitation to the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine some components, or arrange different components, and details will not be repeated here. .

其中,处理器1010用于:Wherein, the processor 1010 is used for:

获取第一红外值;Obtain the first infrared value;

在所述第一红外值小于预设红外值的情况下,对所述红外传感器进行补偿。When the first infrared value is less than a preset infrared value, compensation is performed on the infrared sensor.

可选的,所述第一红外值为环境红外值,所述预设红外值为所述红外传感器的PN结饱和响应阈值。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.

可选的,处理器1010还用于:Optionally, the processor 1010 is also used for:

根据所述环境红外值,将所述红外传感器的发射功率由第一发射功率调整至第二发射功率,所述第二发射功率大于所述第一发射功率。According to the ambient infrared value, the transmission power of the infrared sensor is adjusted from a first transmission power to a second transmission power, and the second transmission power is greater than the first transmission power.

可选的,处理器1010还用于:Optionally, the processor 1010 is also used for:

根据预先写入的配置文件,确定所述环境红外值对应的功率调整值;Determine the power adjustment value corresponding to the ambient infrared value according to the pre-written configuration file;

根据所述功率调整值,将所述红外传感器的发射功率由第一发射功率调整至第二发射功率。According to the power adjustment value, the transmission power of the infrared sensor is adjusted from the first transmission power to the second transmission power.

可选的,处理器1010还用于生成所述配置文件,所述配置文件通过以下步骤生成:Optionally, the processor 1010 is also configured to generate the configuration file, and the configuration file is generated through the following steps:

控制所述红外传感器以所述第一发射频率和第三发射功率工作于无红外环境中,并获取所述红外传感器的第二红外值;controlling the infrared sensor to work in an infrared-free environment with the first transmission frequency and the third transmission power, and acquiring a second infrared value of the infrared sensor;

控制所述红外传感器以所述第二发射频率和第四发射功率工作于无红外环境中,并获取所述红外传感器的第三红外值;controlling the infrared sensor to work in a non-infrared environment with the second transmission frequency and the fourth transmission power, and acquiring a third infrared value of the infrared sensor;

在所述第二红外值和所述第三红外值的差值大于或等于预设值的情况下,调整所述第四发射功率,直至所述第二红外值和所述第三红外值的差值小于所述预设值;When the difference between the second infrared value and the third infrared value is greater than or equal to a preset value, adjust the fourth transmission power until the difference between the second infrared value and the third infrared value The difference is less than the preset value;

对调整后的所述第四发射功率与所述环境红外值进行线性回归,生成所述配置文件。performing a linear regression on the adjusted fourth transmit power and the ambient infrared value to generate the configuration file.

可选的,处理器1010还用于:Optionally, the processor 1010 is also used for:

将所述红外传感器的发射电流由第一发射电流调整至第二发射电流,所述第二发射电流大于所述第一发射电流;或者,adjusting the emission current of the infrared sensor from the first emission current to a second emission current, the second emission current being greater than the first emission current; or,

将所述红外传感器的发射脉宽由第一发射脉宽调整至第二发射脉宽,所述第二发射脉宽大于所述第一发射脉宽;或者,adjusting the emission pulse width of the infrared sensor from the first emission pulse width to a second emission pulse width, the second emission pulse width being greater than the first emission pulse width; or,

将所述红外传感器的发射周期由第一发射周期调整至第二发射周期,所述第二发射周期小于所述第一发射周期。The emission period of the infrared sensor is adjusted from the first emission period to a second emission period, and the second emission period is shorter than the first emission period.

可选的,处理器1010还用于:Optionally, the processor 1010 is also used for:

根据第四红外值和所述环境红外值,计算补偿值;所述第四红外值为所述红外传感器处于开启状态的红外值;Calculate a compensation value according to the fourth infrared value and the ambient infrared value; the fourth infrared value is an infrared value at which the infrared sensor is turned on;

将所述第四红外值与所述补偿值的和确定为所述红外传感器的红外值。The sum of the fourth infrared value and the compensation value is determined as the infrared value of the infrared sensor.

在本申请实施例中,通过获取第一红外值,在第一红外值小于预设红外值的情况下,对红外传感器进行补偿。这样,通过对红外传感器进行补偿能够有效弥补采集的红外值与真实红外值之间的差值,从而能够提高红外传感器工作性能的稳定性。In the embodiment of the present application, by acquiring the first infrared value, the infrared sensor is compensated when the first infrared value is smaller than the preset infrared value. In this way, by compensating the infrared sensor, the difference between the collected infrared value and the real infrared value can be effectively compensated, thereby improving the stability of the working performance of the infrared sensor.

应理解的是,本申请实施例中,输入单元1004可以包括图形处理器(GraphicsProcessing Unit,GPU)10041和麦克风10042,图形处理器10041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1006可包括显示面板10061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板10061。用户输入单元1007包括触控面板10071以及其他输入设备10072。触控面板10071,也称为触摸屏。触控面板10071可包括触摸检测装置和触摸控制器两个部分。其他输入设备10072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器1009可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器1010可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1010中。It should be understood that, in this 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 is used for an image capture device (such as Camera) to process the image data of still pictures or videos. 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 called 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, physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, and joysticks, which will not be repeated here. The memory 1009 can 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 and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, and the modem processor mainly processes wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 1010 .

本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述红外传感器补偿方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application also provides a readable storage medium, the readable storage medium stores a program or an instruction, and when the program or instruction is executed by the processor, each process of the above-mentioned infrared sensor compensation method embodiment is realized, and can achieve The same technical effects are not repeated here to avoid repetition.

其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (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 present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the above-mentioned embodiment of the infrared sensor compensation method Each process, and can achieve the same technical effect, in order to avoid repetition, will not repeat them here.

应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of the present application may also be called system-on-chip, system-on-chip, system-on-a-chip, or system-on-a-chip.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions are performed, for example, 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.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to enable a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in various embodiments of the present application.

上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Under the inspiration of this application, without departing from the purpose of this application and the scope of protection of the claims, many forms can also be made, all of which belong to the protection of this 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,
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,
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,
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,
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 (3)

* 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
CN114204929A (en) * 2021-11-29 2022-03-18 华帝股份有限公司 Control circuit for automatically adjusting infrared emission power and control method thereof

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广东移动通信有限公司 Calibration method and device of infrared proximity sensor and mobile terminal
CN108833695B (en) * 2018-06-06 2020-07-31 Oppo广东移动通信有限公司 Control method, control device, electronic device, computer storage medium and equipment
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
CN112968985B (en) Infrared sensor compensation method and device and electronic equipment
CN107102936B (en) Fluency evaluation method, mobile terminal and storage medium
WO2018210145A1 (en) Screen-off control method and apparatus, storage medium, and electronic device
CN109271014B (en) Method and equipment for adjusting screen brightness
CN107450817B (en) Proximity detection method, device, storage medium and electronic device
WO2022063166A1 (en) Parameter adjustment method and apparatus, and electronic device
US20180262610A1 (en) Method and device for determining status of terminal, and terminal
US20230092801A1 (en) Power display method and apparatus, and electronic device
CN109729280A (en) An image processing method and mobile terminal
CN112783406B (en) Operation execution method and device and electronic equipment
CN111651030B (en) Sensor detection method and device, storage medium and mobile terminal
CN111049701A (en) Data traffic monitoring method and electronic equipment
CN113834974A (en) Temperature compensation method, temperature compensation device, electronic equipment and storage medium
CN110851014B (en) Touch recognition method and device, storage medium and terminal equipment
CN113676271B (en) Method and device for switching antenna
CN112433694B (en) Light intensity adjusting method and device, storage medium and mobile terminal
CN111091777B (en) Charging time debugging method and device
EP3239825B1 (en) Multimedia information presentation method and terminal
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
CN112199050A (en) Storage method, device, storage medium and terminal equipment
CN112950691B (en) Control method and device for measuring depth information, electronic equipment and storage medium
CN113328998B (en) Image data transmission method and electronic device
CN111026488B (en) Communication data saving method, device, terminal equipment and storage medium
CN112885281B (en) Display drive circuit, display drive chip and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant