Threshold adjustment method and device, equipment and medium

By measuring the temperature of the light-emitting element of the photoelectric proximity sensor and adjusting the sensing threshold value, the problem that temperature changes affect the accuracy of object distance judgment is solved, and the sensor is stable and accurate object distance detection is achieved.

CN119199802APending Publication Date: 2024-12-27BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310755515.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-25
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The light emitting elements of the photoelectric proximity sensor are sensitive to temperature changes, resulting in noise floor changes, which in turn affects the accuracy of the induction threshold value and affects the accuracy of object distance judgment.

Method used

By measuring the temperature of the light emitting element, determining its corresponding noise floor, and adjusting the induction threshold value in real time according to the mapping relationship between the noise floor and the induction threshold value to adapt to temperature changes and ensure the accuracy of object distance judgment.

Benefits of technology

Real-time adjustment of induction threshold value is achieved, judgment failure caused by temperature changes is avoided, and accuracy of object distance judgment and sensor stability are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119199802A_ABST
    Figure CN119199802A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, in particular to a threshold adjustment method and device, equipment and a computer readable storage medium. The threshold adjustment method is executed by the terminal, the terminal is provided with a photoelectric proximity sensor, and the method comprises the following steps: determining a first temperature of a light-emitting element in the sensor; determining first ground noise corresponding to the first temperature according to a first mapping relation between the temperature of the light-emitting element and the ground noise; and determining an induction threshold value of the sensor corresponding to the first temperature according to a second mapping relation between the ground noise and the induction threshold value of the sensor. The sensing threshold value is adjusted by determining the temperature of the light-emitting element and determining the corresponding ground noise according to the mapping relation, so that the situation that the ground noise is changed due to the temperature, the intensity of received light is changed along with the ground noise at the same distance, the sensing threshold value is not changed, and the sensor fails is avoided; and corresponding control cannot be realized at the preset position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a threshold adjustment method, a threshold adjustment device, an electronic device, and a computer-readable storage medium. Background Art

[0002] like Figure 1 As shown, the photoelectric proximity sensor includes a light-emitting element and a photosensitive element. The light-emitting element emits light, which is reflected after encountering an external object and received by the photosensitive element. The closer the external object is to the sensor, the stronger the reflected light is, and the stronger the signal received by the photosensitive element is. Therefore, a sensing threshold value can be set. When the signal strength received by the photosensitive element reaches the sensing threshold value, the corresponding operation is performed to achieve corresponding control.

[0003] However, the emission power of the light-emitting element is sensitive to temperature. When the temperature changes greatly, it will cause a large change in the emission power of the light-emitting element, causing the background noise of the sensor to change, and then causing the actual sensing threshold value to change, affecting the accuracy of the sensor in judging whether an object is approaching. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a threshold adjustment method, a threshold adjustment device, an electronic device and a computer-readable storage medium, which can solve the above problems.

[0005] According to a first aspect of an embodiment of the present disclosure, a threshold adjustment method is provided, which is executed by a terminal, wherein a photoelectric proximity sensor is provided on the terminal, and the method includes:

[0006] determining a first temperature of a light emitting element in the sensor;

[0007] Determine a first background noise corresponding to the first temperature according to a first mapping relationship between the light emitting element temperature and the background noise;

[0008] The sensing threshold value of the sensor corresponding to the first temperature is determined according to a second mapping relationship between background noise and the sensing threshold value of the sensor.

[0009] According to a second aspect of an embodiment of the present disclosure, a threshold adjustment device is provided, which is executed by a terminal, and the device includes:

[0010] a temperature measuring unit configured to determine a first temperature of a light emitting element in the sensor;

[0011] a determining unit configured to determine a first background noise corresponding to the first temperature according to a first mapping relationship between the temperature of the light-emitting element and the background noise;

[0012] The adjustment unit is configured to determine the sensing threshold value of the sensor corresponding to the first temperature according to a second mapping relationship between the background noise and the sensing threshold value of the sensor.

[0013] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including: a processor and a memory;

[0014] The memory is used to store computer programs;

[0015] The processor is used to execute the threshold adjustment method as described in the first aspect by calling the computer program.

[0016] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the threshold adjustment method as described in the first aspect is implemented.

[0017] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0018] The present disclosure determines a first temperature of a light-emitting element, and through a first mapping relationship, can determine a first background noise corresponding to the first temperature, and adjusts the sensing threshold value according to a second mapping relationship between the background noise and the sensing threshold value, so that the sensing threshold value can change with the change of temperature, and the sensing threshold value is adjusted in real time to avoid the scenario in which the first sensing threshold value does not match the first temperature due to different background noises, thereby causing the sensor to fail, and being unable to accurately judge the position of an external object, so that automatic control cannot be achieved when the external object is at a preset position.

[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0021] Figure 1 is a schematic diagram of a photoelectric proximity sensor according to an exemplary embodiment of the present disclosure.

[0022] Figure 2 is a schematic flow chart of a threshold adjustment method according to an exemplary embodiment of the present disclosure.

[0023] Figure 3 It is a schematic diagram showing a photosensitive element receiving light according to an exemplary embodiment of the present disclosure.

[0024] Figure 4It is a schematic diagram of the structure of a photoelectric proximity sensor according to an exemplary embodiment of the present disclosure.

[0025] Figure 5 is a schematic flow chart of another threshold adjustment method according to an exemplary embodiment of the present disclosure.

[0026] Figure 6 It is a block diagram of a threshold adjustment device according to an exemplary embodiment of the present disclosure.

[0027] Figure 7 It is a schematic block diagram of a threshold adjustment device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0029] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0030] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0031] Figure 2 The present invention is a schematic flow chart of a threshold adjustment method according to an embodiment of the present invention, and the threshold adjustment method can be executed by a terminal. A photoelectric proximity sensor is provided on the terminal, and the terminal includes but is not limited to a communication device such as a mobile phone, a tablet computer, a wearable device, a sensor, and an Internet of Things device.

[0032] like Figure 2 As shown, the threshold adjustment method includes:

[0033] In step S201, a first temperature of a light emitting element in a sensor is determined;

[0034] In step S202, a first background noise corresponding to a first temperature is determined according to a first mapping relationship between the light emitting element temperature and the background noise;

[0035] In step S203, the sensing threshold value of the sensor corresponding to the first temperature is determined according to the second mapping relationship between the background noise and the sensing threshold value of the sensor.

[0036] It should be noted that Figure 2 The illustrated embodiments may be implemented independently or in combination with at least one other embodiment of the present disclosure, and the present disclosure is not limited thereto.

[0037] In one embodiment, a photoelectric proximity sensor is provided on the terminal.

[0038] like Figure 1 As shown, the photoelectric proximity sensor includes a light emitting element and a photosensitive element. The light emitted by the light emitting element is reflected by an external object and then received by the photosensitive element.

[0039] In one embodiment, the light emitting element comprises a semiconductor laser, and a substrate is disposed under the light emitting element and the light sensing element.

[0040] In one embodiment, the light emitting element can emit infrared light, and the photosensitive element can receive the infrared light after being reflected by an external object.

[0041] The photoelectric proximity sensor can judge the distance of external objects by comparing the set sensing threshold value with the intensity of light received by the photosensitive element. Since the closer the external object is to the sensor, the greater the intensity of light received by the photosensitive element, when the intensity of light received by the photosensitive element is greater than or equal to the sensing threshold value, it can be determined that the external object is close to the sensor; when the intensity of light received by the photosensitive element is less than the sensing threshold value, it can be determined that the external object is far away from the sensor.

[0042] After receiving the reflected light, the photosensitive element can convert it into an electrical signal through an analog-to-digital converter, and input the electrical signal into the processor to calculate the intensity of the light received by the photosensitive element, and based on the intensity of the light, determine the proximity of the external object to the sensor, that is, determine whether the external object is close or far away from the sensor.

[0043] It should be noted that the embodiments of the present disclosure can determine whether an external object is close to the sensor by comparing the intensity of light received by the photosensitive element with the sensing threshold value, or can determine whether an external object is close to the sensor by comparing other values ​​with the sensing threshold value.

[0044] For example, the ratio of the intensity of the light received by the photosensitive element to the intensity of the light emitted by the light-emitting element can be compared with the sensing threshold value, and whether the distance between the external object and the sensor is close or far can be determined based on the comparison result. When the ratio is greater than or equal to the sensing threshold value, it can be determined that the external object is close to the sensor; when the ratio is less than the sensing threshold value, it can be determined that the external object is far from the sensor.

[0045] It should be noted that the sensing threshold value used for comparison with the intensity of light received by the photosensitive element and the sensing threshold value used for comparison with the above ratio may be different and can be determined according to needs, which will not be elaborated in this disclosure.

[0046] The subsequent embodiments mainly compare the intensity of light received by the photosensitive element with the sensing threshold value and the sensing threshold value to determine whether the external object is close to the sensor, and exemplify the technical solution of the present disclosure.

[0047] In one embodiment, a first background noise corresponding to the first temperature is determined according to a first mapping relationship between the temperature of the light emitting element and the background noise.

[0048] Figure 3 It is a schematic diagram showing a photosensitive element receiving light according to an embodiment of the present disclosure.

[0049] It should be noted that Figure 3 The illustrated embodiments may be implemented independently or in combination with at least one other embodiment of the present disclosure, and the present disclosure is not limited thereto.

[0050] like Figure 3 As shown, due to the influence of the environment, the light received by the photosensitive element will have background noise. Then, when receiving light reflected by an external object, the light received by the photosensitive element includes: the background noise and the light emitted by the light-emitting element reflected by the external object.

[0051] However, since the light-emitting element in the sensor is sensitive to temperature, changes in temperature will cause changes in the emission power of the light-emitting element, which in turn affects the background noise. The sensing threshold of the photoelectric proximity sensor is determined based on the background noise, so changes in the background noise due to temperature will also cause changes in the sensor's sensing threshold. If you still judge whether an object is approaching based on the sensing threshold before the change, there will be problems with the judgment result.

[0052] Since it is determined that there is a first mapping relationship between the background noise and the temperature of the light-emitting element, and the first background noise corresponding to the first temperature can be determined based on the first mapping relationship, the change in the intensity of the light received by the photosensitive element caused by the background noise can be determined, and then the sensing threshold value can be adjusted so that the adjusted sensing threshold value can be suitable for comparison with the intensity of the light received by the photosensitive element under the background noise to determine whether the object is close to the sensor, thereby ensuring that the distance of the external object from the sensor can be accurately determined based on the intensity of the light received by the photosensitive element and the adjusted sensing threshold value.

[0053] In one embodiment, the sensing threshold value of the photoelectric proximity sensor may be determined according to the background noise and the light reflected by the gray card.

[0054] For example, a gray card is placed at a preset distance from the sensor, such as 3 cm from the sensor, and the intensity of the light reflected by the gray card received by the photosensitive element in this case is used as the sensing threshold value before the change (also called the test receiving intensity). If the intensity of the light received by the photosensitive element is greater than the sensing threshold value when the background noise does not change, it indicates that the external object is within 3 cm from the sensor, that is, it can be determined that the external object is close to the sensor.

[0055] As mentioned above, the influence of temperature causes the background noise to change, which in turn causes the actual sensing threshold value of the sensor to change.

[0056] For example, as the temperature changes, the background noise increases. Place the gray card 3 cm away from the sensor. In this case, the intensity of light received by the photosensitive element is the actual sensing threshold value after the change.

[0057] Since the background noise has increased, there will be problems if we still use the sensing threshold value before the change to determine whether the object is relatively far or relatively close to the terminal. For example, if the sensing threshold value after the change is larger than the threshold value before the change, then when the light intensity sensed by the photosensitive element is between the sensing threshold value before the change and the sensing threshold value after the change, that is, the light intensity sensed by the photosensitive element is greater than the sensing threshold value before the change but less than the sensing threshold value after the change, if the distance from the external object to the terminal is judged to be less than 3 cm based on the sensing threshold value before the change, but in fact the distance from the object to the terminal is greater than 3 cm. It can be seen that there is a problem with the judgment result. Therefore, after the temperature changes, it is based on the sensing threshold value after the change to accurately judge whether the external object is relatively close to the terminal or relatively far away.

[0058] To address the above issues, although algorithms can be used to recalibrate the noise floor, the relevant algorithms need to consider multiple impact scenarios of the terminal. The more scenarios there are, the more complex the algorithm is, and the higher the computational complexity is. Moreover, when calibrating the noise floor through algorithms, the algorithm needs to compensate for the entire process, and the real-time performance is relatively poor.

[0059] According to the embodiments of the present disclosure, the first background noise corresponding to the first temperature can be determined according to the first mapping relationship between the temperature and the background noise, and then the sensing threshold value of the sensor corresponding to the first temperature can be determined according to the second mapping relationship between the background noise and the sensing threshold value of the sensor. Based on this, the sensing threshold value of the sensor at each temperature can be determined, and based on the threshold value, it can be accurately determined whether the external object is relatively far or relatively close to the terminal at the corresponding temperature, thereby ensuring the accuracy of the judgment result.

[0060] Moreover, compared with the method of using an algorithm to recalibrate the background noise, the present invention only needs to be based on the first mapping relationship and the second mapping relationship to determine the sensing threshold value corresponding to the temperature, without having to consider a variety of influencing scenarios. Only the temperature needs to be considered. The calculation process is relatively simple and has better real-time performance.

[0061] In one embodiment, the sensing threshold value includes at least one of the following: a proximity threshold value; a distance threshold value. The proximity threshold value and the distance threshold value may be the same value or different values. When the proximity threshold value and the distance threshold value are different values, the proximity threshold value may be greater than the distance threshold value.

[0062] The closer the external object is to the sensor, the stronger the intensity of the light reflected by the external object received by the photosensitive element. Therefore, when the intensity of the light received by the photosensitive element is greater than the approach threshold value, it can be determined that the distance between the external object and the sensor is relatively close; when the intensity of the light received by the photosensitive element is less than the distance threshold value, it can be determined that the distance between the external object and the sensor is relatively far.

[0063] In one embodiment, the intensity of the reflected light received by the photosensitive element when there is no external object blocking it can be determined as the test background noise. Then, the proximity sensitivity of the external object can be determined based on the test reception intensity and the test background noise, and the second mapping relationship is determined based on the proximity sensitivity and the first background noise. Among them, the proximity sensitivity is only related to the distance of the external object from the sensor and the power of the light emitted by the light-emitting element, and is not related to the temperature.

[0064] In one embodiment, the difference between the test reception intensity and the test background noise may be determined as the proximity sensitivity.

[0065] Furthermore, a plurality of second mapping relationships may be set according to the determined proximity sensitivity, thereby determining a plurality of corresponding sensing threshold values.

[0066] For example, the sensing threshold value may include a proximity threshold value and a distance threshold value. The proximity threshold value and the distance threshold value may be determined by different second mapping relationships. A specific embodiment of determining the second mapping relationship between the proximity threshold value and the distance threshold value is given below.

[0067] In the absence of external objects blocking the light, the intensity of the light received by the photosensitive element is the test background noise CT0;

[0068] Place the test object at the preset proximity threshold distance of the sensor, for example, place the gray card at 3 cm. The intensity of light received by the photosensitive element at this time is the test receiving intensity THD. H0 ;

[0069] Proximity sensitivity ΔTHD=THD H0 -CT0;

[0070] It should be noted that THD H0 and CT0 may vary with temperature, but THD H0 The changes in CT0 and CT0 with temperature can offset each other in the above formula, making ΔTHD independent of temperature.

[0071] The second mapping relationship is:

[0072] THD(T P )=CT(T P )+xΔTHD

[0073] Among them, T P is the first temperature, CT(T P ) is the background noise corresponding to the first temperature, THD(T P ) is the sensing threshold value corresponding to the first temperature, and x is a preset constant (for example, it can be called a factory coefficient); different second mapping relationships, set x It can be different;

[0074] For example, to approach the threshold value, the value of x can be set to a constant greater than or equal to 1, such as setting x The value of is 1, then the corresponding second mapping relationship is:

[0075] THD H (T P )=CT(T P )+ Δ THD

[0076] The sensing threshold value corresponding to the second mapping relationship is close to the threshold value, THD H (T P) is the proximity threshold value corresponding to the first temperature. When the intensity of the light received by the photosensitive element is greater than the proximity threshold value, it indicates that the external object is relatively close to the sensor.

[0077] For example, for the distance from the threshold value, the value of x can be set to a constant less than 1, for example, the value of x is set to 0.3, and the corresponding second mapping relationship is:

[0078] THD L (T P )=CT(T P )+0.3ΔTHD

[0079] The sensing threshold value corresponding to the second mapping relationship is far from the threshold value, THD L (T P ) is the distance threshold value corresponding to the first temperature. When the intensity of the light received by the photosensitive element is less than the distance threshold value, it indicates that the external object is far away from the sensor.

[0080] In another embodiment, corresponding to the above embodiment, the method for determining the second mapping relationship also includes: by placing the external object at a preset away threshold distance, the intensity of light received by the photosensitive element in this case is determined as the away threshold photosensitivity intensity value; the difference between the away threshold value and the background noise during the test is the away sensitivity, and the second mapping relationship is determined based on the away sensitivity.

[0081] Among them, the away threshold distance, the away threshold light intensity value, and the away sensitivity all correspond to the away threshold value.

[0082] In one embodiment, it is also possible to determine whether the external object is approaching or moving away from the sensor based on the change in the intensity of the light received by the sensor during the first time period. If the external object is approaching the sensor, the intensity of the light received by the sensor increases, and if the external object is moving away from the sensor, the intensity of the light received by the sensor decreases.

[0083] In one embodiment, the sensing threshold value may further include: a speed threshold value. If the intensity of the light received by the sensor increases within the first time period, and the speed of change reaches the speed threshold value, it is determined that the external object is rapidly approaching the sensor; if the intensity of the light received by the sensor decreases within the first time period, and the speed of change reaches the speed threshold value, it is determined that the external object is rapidly moving away from the sensor.

[0084] In one embodiment, the first mapping relationship includes:

[0085] CT(T P )=AB*exp(γ*T P );

[0086] Among them, T p Indicates temperature;

[0087] CT(T P ) indicates that the sensor is at T P Noise floor under temperature;

[0088] A, B, and γ are predetermined constants.

[0089] The formula of the first mapping relationship will be explained and derived in detail below.

[0090] The output power of the light emitting element is affected by temperature, and the output power affects the background noise, wherein the background noise and the output power satisfy the functional relationship (1):

[0091] CT(T P )=k1*P0(T P )

[0092] Among them, P0(T P ) is the light emitting element at T P The output power at the temperature; and for any terminal equipped with a photoelectric proximity sensor, k1 is a fixed constant.

[0093] The light-emitting element is at T P Output power P0(T P ) satisfies the functional relationship (2):

[0094]

[0095] Among them, γ D is the external micro-molecular efficiency, h is Planck's constant, v is the frequency of light, e0 is the charge of a single electron, I is the injected current, I th (T r ) is the temperature T r T0 is the threshold current when , T0 is the characteristic temperature of the light-emitting element, and exp() is the exponential function of the natural constant e.

[0096] It should be noted that the characteristic temperature T0 is related to the light-emitting element and can be considered as a constant value for each light-emitting element. th (T r ) is at temperature T r When the threshold current, the temperature T r is a specific temperature, such as 0 Kelvin.

[0097] In the embodiment of the present disclosure, the injection current I is controlled to be a constant, and the functional relationship (2) can be derived and simplified to the functional relationship (3):

[0098] P0(T P )=α-β*exp(γ*T P )

[0099] Among them, α, β, and γ do not change significantly with the change of temperature and can be regarded as constants; in fact, α, β, and γ are the calculation results corresponding to other related values ​​in the functional relationship (2).

[0100] At this point, combining the functional relationship (1) with the functional relationship (3), we can get the temperature T P and the corresponding background noise CT(T P ) is the functional relationship (4):

[0101] CT(T P )=k1*α-k1*β*exp(γ*T P )

[0102] Since k1 is a constant, the functional relationship (4) can be simplified to the functional relationship (5):

[0103] CT(T P )=AB*exp(γ*T P )

[0104] Therefore, if the values ​​of constants A, B, and γ can be determined, the first mapping relationship can be determined.

[0105] In one embodiment, the threshold adjustment method further includes: testing the background noise of the sensor at multiple temperatures to determine multiple background noises corresponding to the multiple temperatures; and determining at least one of A, B, and γ based on the multiple temperatures, the multiple background noises, and the first mapping relationship.

[0106] Based on the simplified relationship of the above function, it would be very complicated to determine at least one of the constants A, B, and γ by calculating the quantities in the derivation of the formula. Therefore, the sensor can be tested at multiple temperatures to determine the corresponding multiple background noises, thereby determining at least one of the constants A, B, and γ.

[0107] Since there are three constants to be determined in the functional relationship (5), namely A, B, and γ, in the minimum case, only three sets of [T P , CT(T P For example, a terminal equipped with a photoelectric proximity sensor is placed in an environment of -25°C, 0°C, and 25°C, and the corresponding background noise CT (-25°C), CT (0°C), and CT (25°C) are measured to determine the constants A, B, and γ.

[0108] By simplifying the functional relationship, the need to measure multiple parameters in the functional relationship (1) and the functional relationship (2) during factory calibration is avoided, thereby simplifying the factory's testing process and accelerating the factory's production progress.

[0109] And due to assembly or processing errors, the background noise of the photoelectric proximity sensor on different terminals will be different, that is, the constants A, B, and γ on different terminals are also different. Therefore, it is necessary to test each terminal equipped with a photoelectric proximity sensor to determine the constants A, B, and γ corresponding to the terminal.

[0110] In one embodiment, the first mapping relationship determined by the test is written into the terminal. For example, when the terminal is a mobile phone, it can be written into the non-volatile memory (NV partition) of the mobile phone.

[0111] Figure 4 1 is a schematic diagram of a photoelectric proximity sensor according to an embodiment of the present disclosure. The photoelectric proximity sensor may include a thermistor.

[0112] In one embodiment, determining a first temperature of a light emitting element in a sensor includes: determining the first temperature of the light emitting element by sensing a current of a thermistor in a terminal.

[0113] The thermistor is sensitive to temperature, and has different resistance values ​​at different temperatures, resulting in different induced currents. Therefore, the first temperature corresponding to the resistance value is determined through the mapping relationship between the resistance value and the temperature.

[0114] In one embodiment, determining a first temperature of a light emitting element in a sensor includes: determining the first temperature of the light emitting element by a temperature sensor

[0115] In one embodiment, the distance between the thermistor and the light emitting element is less than a preset distance.

[0116] The smaller the distance between the thermistor and the light-emitting element, the more accurate the thermistor's temperature readings.

[0117] In one embodiment, the preset distance is 0.5 mm.

[0118] like Figure 4 As shown, in one embodiment, a thermistor may be packaged in a photoelectric proximity sensor, and the thermistor may be disposed at a position less than a preset distance from the light emitting element, so that the temperature of the thermistor is closer to the actual temperature of the light emitting element.

[0119] In one embodiment, the threshold adjustment method further includes: sampling the induced current of the thermistor by a multiplexing analog-to-digital converter, and sampling the induced current of the photosensitive element in the sensor.

[0120] Since the thermistor is close to the light-emitting element and not far from the photosensitive element, the thermistor can be encapsulated in the sensor and connected to the analog-to-digital converter of the photosensitive element, which simplifies the wiring. By multiplexing the analog-to-digital converter, hardware costs can be saved and the complexity of the system can be reduced.

[0121] Figure 5 is a schematic flow chart of another threshold adjustment method according to an embodiment of the present disclosure.

[0122] like Figure 5 As shown, the threshold adjustment method also includes:

[0123] In step S501, the intensity of the light emitted by the light emitting element and reflected by the light sensing element in the sensor is determined;

[0124] In step S502, the terminal is controlled according to the comparison result between the intensity and the sensing threshold value.

[0125] In one embodiment, different controls may be implemented on the terminal according to different usage scenarios and usage requirements.

[0126] For example, if the intensity of the light emitted by the light-emitting element and reflected by the light-sensing element received by the photosensitive element is greater than or equal to the sensing threshold value, the control terminal issues a prompt.

[0127] For example, in the scenario of making or receiving a call, if the intensity is greater than or equal to the approach threshold, the terminal screen is controlled to turn off to avoid accidental touches. If the intensity is less than or equal to the distance threshold, the terminal screen is controlled to light up for normal use by the user.

[0128] For example, if the intensity increases to be greater than or equal to the approach threshold, it is determined that the terminal screen is placed on the desktop with the screen facing down, and the terminal is controlled to turn off the screen to save power. If the intensity decreases to be less than or equal to the away threshold, it is determined that the terminal is flipped from the desktop to the screen facing up, and the terminal is controlled to turn on the screen for user use.

[0129] In one embodiment, the terminal may be configured with control logic corresponding to multiple sensing threshold values, so as to perform different controls on the terminal in response to different scenarios. Correspondingly, the multiple sensing threshold values ​​may also correspond to multiple different mapping relationships.

[0130] Corresponding to the embodiment of the threshold adjustment method of the present disclosure, the present disclosure also provides an embodiment of a corresponding threshold adjustment device.

[0131] See also Figure 6 , Figure 6 FIG. 1 is a block diagram of a threshold adjustment device in one embodiment of the present disclosure. Figure 6As shown, the threshold adjustment device is configured at a terminal, and a photoelectric proximity sensor is provided on the terminal. The device includes:

[0132] A temperature measuring unit 610 is configured to determine a first temperature of a light emitting element in the sensor;

[0133] A determination unit 620 is configured to determine a first background noise corresponding to the first temperature according to a first mapping relationship between the light emitting element temperature and the background noise;

[0134] The adjustment unit 630 is configured to determine the sensing threshold value of the sensor corresponding to the first temperature according to a second mapping relationship between the background noise and the sensing threshold value of the sensor.

[0135] In one embodiment, the sensing threshold value includes at least one of the following: a proximity threshold value; and a distance threshold value.

[0136] In one embodiment, the first mapping relationship in the determining unit includes:

[0137] CT(T P )=AB*exp(γ*T P );

[0138] Among them, T P Indicates temperature; CT(T P ) indicates that the sensor is at T P Noise floor at temperature; A, B, and γ are predetermined constants.

[0139] In one embodiment, the apparatus further comprises:

[0140] The testing unit is configured to test the background noise of the sensor at multiple temperatures to determine multiple background noises corresponding to the multiple temperatures; and determine at least one of A, B, and γ according to the multiple temperatures, the multiple background noises, and the first mapping relationship.

[0141] In one embodiment, the temperature measuring unit is configured to determine the first temperature of the light emitting element by means of an induced current of a thermistor in the terminal.

[0142] In one embodiment, the distance between the thermistor and the light emitting element is less than a preset distance.

[0143] In one embodiment, the preset distance is 0.5 mm.

[0144] In one embodiment, the temperature measurement unit is further configured to: use a multiplexed analog-to-digital converter to sample the induced current of the thermistor, and to sample the induced current of the photosensitive element in the sensor.

[0145] In one embodiment, the apparatus further comprises:

[0146] The control unit is configured to determine the intensity of the light emitted by the light-emitting element and reflected by the light-sensitive element in the sensor; and control the terminal according to the comparison result between the intensity and the sensing threshold value.

[0147] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0148] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the delay mitigation method as described in any of the above embodiments by calling the computer program.

[0149] An embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for alleviating delay as described in any of the above embodiments is implemented.

[0150] Figure 7 700 is a schematic block diagram of a threshold adjustment device 700 according to an embodiment of the present disclosure. For example, the device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0151] Reference Figure 7 , the device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .

[0152] The processing component 702 generally controls the overall operation of the device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned information receiving method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.

[0153] The memory 704 is configured to store various types of data to support operations on the device 700. Examples of such data include instructions for any application or method operating on the device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0154] The power supply component 706 provides power to the various components of the device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 700.

[0155] The multimedia component 708 includes a screen that provides an output interface between the device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0156] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the device 700 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.

[0157] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.

[0158] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the device 700. For example, the sensor assembly 714 can detect the open / closed state of the device 700, the relative positioning of components, such as the display and keypad of the device 700, and the sensor assembly 714 can also detect the position change of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, the orientation or acceleration / deceleration of the device 700, and the temperature change of the device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0159] The communication component 716 is configured to facilitate wired or wireless communication between the device 700 and other devices. The device 700 can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G LTE, 5G NR, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0160] In an exemplary embodiment, the apparatus 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned information receiving method.

[0161] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by the processor 720 of the device 700 to complete the above-mentioned information receiving method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0162] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0163] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

[0164] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprises a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0165] The method and device provided in the embodiments of the present disclosure are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method of the present disclosure and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present disclosure, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present disclosure.

Claims

1. A threshold adjustment method, characterized in that: The method is executed by a terminal, wherein a photoelectric proximity sensor is provided on the terminal, and comprises: determining a first temperature of a light emitting element in the sensor; Determine a first background noise corresponding to the first temperature according to a first mapping relationship between the light emitting element temperature and the background noise; The sensing threshold value of the sensor corresponding to the first temperature is determined according to a second mapping relationship between background noise and the sensing threshold value of the sensor.

2. The method according to claim 1, characterized in that The sensing threshold value includes at least one of the following: Approaching threshold value; Stay away from the threshold.

3. The method according to claim 1, characterized in that The first mapping relationship includes: CT(T P )=A-B*exp(γ*T P ); Among them, T P Indicates temperature; CT(T P ) indicates that the sensor is at T P Noise floor under temperature; A, B, and γ are predetermined constants.

4. The method according to claim 3, characterized in that: The method further comprises: Testing the background noise of the sensor at multiple temperatures to determine multiple background noises corresponding to the multiple temperatures; At least one of A, B, and γ is determined according to the multiple temperatures, the multiple background noises, and the first mapping relationship.

5. The method according to claim 1, characterized in that The determining a first temperature of a light emitting element in the sensor comprises: A first temperature of the light emitting element is determined according to an induced current of a thermistor in the terminal.

6. The method according to claim 5, characterized in that The distance between the thermistor and the light emitting element is less than a preset distance.

7. The method according to claim 6, characterized in that The preset distance is 0.5 mm.

8. The method according to claim 5, characterized in that The method further comprises: The multiplexed analog-to-digital converter samples the induced current of the thermistor and samples the induced current of the photosensitive element in the sensor.

9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: Determining the intensity of the light emitted by the light emitting element and reflected by the light sensing element in the sensor; The terminal is controlled according to a comparison result between the intensity and the sensing threshold value.

10. A threshold adjustment device, characterized in that: The device is configured on a terminal, wherein a photoelectric proximity sensor is provided on the terminal, and the device comprises: a temperature measuring unit configured to determine a first temperature of a light emitting element in the sensor; a determining unit configured to determine a first background noise corresponding to the first temperature according to a first mapping relationship between the temperature of the light-emitting element and the background noise; The adjustment unit is configured to determine the sensing threshold value of the sensor corresponding to the first temperature according to a second mapping relationship between the background noise and the sensing threshold value of the sensor.

11. An electronic device, characterized in that: include: Processor, memory; The memory is used to store computer programs; The processor is configured to execute the threshold adjustment method according to any one of claims 1 to 9 by calling the computer program.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the threshold adjustment method described in any one of claims 1 to 9 is implemented.