Distance determination method, device and storage medium

CN116067284BActive Publication Date: 2026-08-14BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-02
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

但是在遮挡物离手机过近的场景下,会将其误判为油污给优化掉,导致红外距离传感器状态上报错误

Benefits of technology

[0051]本公开所提供的距离确定方法及装置,基于红外距离传感器所获取的数据、第一靠近门限值、远离门限值、光感数据以及油污算法,对遮挡物与电子设备的屏幕之间的位置状态进行多阶位的精准分辨,有效避免将遮挡物误认为油污进行优化而导致误报,提高电子设备的屏幕的响应精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116067284B_ABST
    Figure CN116067284B_ABST
Patent Text Reader

Abstract

This disclosure provides a distance determination method, apparatus, and storage medium. The method includes: determining whether data acquired by an infrared distance sensor of an electronic device is greater than a distance threshold and less than a first proximity threshold; if so, acquiring light-sensing data; determining whether the light-sensing data is greater than a preset light-sensing value; if so, determining a second proximity threshold; and determining the positional state between an obstruction and the screen of the electronic device based on the second proximity threshold and the data acquired by the infrared distance sensor. This disclosure, based on data acquired by the infrared distance sensor, the first proximity threshold, the distance threshold, the light-sensing data, and an oil stain algorithm, performs multi-level precise differentiation of the positional state between the obstruction and the screen of the electronic device, effectively avoiding false alarms caused by misinterpreting obstructions as oil stains for optimization, and improving the response accuracy of the electronic device's screen.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of electronic equipment technology, specifically to a distance determination method, apparatus, and storage medium. Background Technology

[0002] Normally, when there is oil or smudges on the screen of an electronic device, the noise floor value collected by the infrared proximity sensor will increase. To avoid problems caused by oil, an oil-smudge algorithm is used to raise the distance threshold and proximity threshold. However, in scenarios where the obstruction is too close to the phone, it may be mistakenly identified as oil and filtered out, leading to errors in the infrared proximity sensor's status reporting. Summary of the Invention

[0003] To overcome the problems existing in related technologies, this disclosure provides a distance determination method, apparatus and storage medium.

[0004] According to a first aspect of the present disclosure, a distance determination method is provided, applied to an electronic device, the method comprising:

[0005] Determine whether the data acquired by the infrared distance sensor of the electronic device is greater than the distance threshold and less than the proximity threshold;

[0006] If so, acquire light-sensing data;

[0007] Determine whether the light-sensing data is greater than a preset light-sensing value;

[0008] If so, determine the second proximity threshold;

[0009] Based on the second proximity threshold and the data obtained by the infrared distance sensor, the positional state between the obstruction and the screen of the electronic device is determined.

[0010] In one embodiment, determining the second proximity threshold includes:

[0011] Call the oil stain algorithm;

[0012] The second proximity threshold is determined based on the oil smudge algorithm and the first proximity threshold.

[0013] In one embodiment, determining the positional state between the obstruction and the screen of the electronic device based on the second proximity threshold and the data acquired by the infrared distance sensor includes:

[0014] If the data obtained by the infrared distance sensor is greater than the second proximity threshold, it is determined that the distance between the obstruction and the screen of the electronic device is less than the first preset distance;

[0015] If the data obtained by the infrared distance sensor is less than the second proximity threshold, it is determined that the distance between the obstruction and the screen of the electronic device is greater than the second preset distance.

[0016] In one embodiment, the method further includes:

[0017] If the light-sensing data is less than the preset light-sensing value, it is determined that the distance between the obstruction and the screen of the electronic device is less than the first preset distance.

[0018] In one embodiment, the method further includes:

[0019] If the data obtained by the infrared distance sensor of the electronic device is less than the distance threshold, it is determined that the distance between the obstruction and the screen of the electronic device is greater than the second preset distance.

[0020] In one embodiment, the method further includes:

[0021] If the data obtained by the infrared distance sensor of the electronic device is greater than the first proximity threshold, it is determined that the distance between the obstruction and the screen of the electronic device is less than the first preset distance.

[0022] According to a second aspect of the present disclosure, a distance determining device is provided, applied to an electronic device, the device comprising:

[0023] The acquisition module is configured to acquire light-sensing data when the data acquired by the infrared distance sensor of the electronic device is greater than a distance threshold and less than a first proximity threshold.

[0024] The first determining module is configured to determine a second proximity threshold value when the light-sensing data is greater than a preset light-sensing value.

[0025] The second determining module is configured to determine the positional state between the obstruction and the plane of the electronic device based on the second proximity threshold and the data acquired by the infrared distance sensor.

[0026] In one embodiment, the first determining module includes:

[0027] The algorithm calling unit is configured to call the oil stain algorithm when it is determined that the light-sensing data is greater than the preset light-sensing value.

[0028] The first determining unit is configured to determine the second proximity threshold value based on the oil stain algorithm and the first proximity threshold value.

[0029] In one embodiment, the second determining module includes: a second determining unit configured to determine that if the data acquired by the infrared distance sensor is greater than the second proximity threshold, the distance between the obstruction and the screen of the electronic device is less than a first preset distance;

[0030] The third determining unit is configured to determine that the distance between the obstruction and the screen of the electronic device is greater than a second preset distance if the data acquired by the infrared distance sensor is less than the second proximity threshold.

[0031] In one embodiment, the device further includes:

[0032] The third determining module is configured to determine that if the light-sensing data is less than the preset light-sensing value, the distance between the obstruction and the screen of the electronic device is less than the first preset distance.

[0033] In one embodiment, the device further includes:

[0034] The fourth determining module is configured to determine that the distance between the obstruction and the screen of the electronic device is greater than the second preset distance if the data obtained by the infrared distance sensor of the electronic device is less than the distance threshold.

[0035] In one embodiment, the device further includes:

[0036] The fifth determining module is configured to determine that if the data obtained by the infrared distance sensor of the electronic device is greater than the first proximity threshold, the distance between the obstruction and the screen of the electronic device is less than the first preset distance.

[0037] According to a third aspect of the present disclosure, a distance determining device is provided, comprising:

[0038] processor;

[0039] Memory used to store processor-executable instructions;

[0040] The processor is configured as follows:

[0041] Determine whether the data acquired by the infrared distance sensor of the electronic device is greater than the distance threshold and less than the proximity threshold;

[0042] If so, acquire light-sensing data;

[0043] Determine whether the light-sensing data is greater than a preset light-sensing value;

[0044] If so, determine the second proximity threshold;

[0045] Based on the second proximity threshold and the data obtained by the infrared distance sensor, the positional state between the obstruction and the screen of the electronic device is determined.

[0046] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to perform a distance determination method, the method comprising:

[0047] When it is determined whether the data obtained by the infrared distance sensor of the electronic device is greater than the distance threshold and less than the proximity threshold, light sensing data is acquired.

[0048] When it is determined whether the light-sensing data is greater than a preset light-sensing value, a second proximity threshold value is determined;

[0049] Based on the second proximity threshold and the data obtained by the infrared distance sensor, the positional state between the obstruction and the screen of the electronic device is determined.

[0050] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0051] The distance determination method and apparatus provided in this disclosure, based on data acquired by an infrared distance sensor, a first proximity threshold, a distance threshold, light sensing data, and an oil stain algorithm, accurately distinguishes the positional state between an obstruction and the screen of an electronic device at multiple levels. This effectively avoids mistaking an obstruction for oil stains and thus preventing false alarms, thereby improving the response accuracy of the electronic device's screen.

[0052] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0053] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0054] Figure 1 This is a flowchart illustrating a distance determination method according to an exemplary embodiment;

[0055] Figure 2 This is illustrated according to an exemplary embodiment. Figure 1 Flowchart of step S140;

[0056] Figure 3 This is illustrated according to an exemplary embodiment. Figure 1 Flowchart of step S150;

[0057] Figure 4This is illustrated according to an exemplary embodiment. Figure 1 Supplementary flowchart of the embodiment shown;

[0058] Figure 5 This is illustrated according to an exemplary embodiment. Figure 1 Supplementary flowchart of the embodiment shown;

[0059] Figure 6 This is illustrated according to an exemplary embodiment. Figure 1 Supplementary flowchart of the embodiment shown;

[0060] Figure 7 This is a schematic diagram of the structure of a distance determining device according to an exemplary embodiment;

[0061] Figure 8 A block diagram of a distance determination device according to an exemplary embodiment is shown. Detailed Implementation

[0062] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0063] In electronic devices, such as mobile phones, when an obstruction blocks the screen, the closer the obstruction is to the infrared proximity sensor, the higher the background noise value received by the sensor. When the background noise value received by the infrared proximity sensor exceeds a certain threshold, it is determined that an obstruction is approaching, and the electronic device reports a proximity status, thus performing operations such as waking up the screen. This threshold is the proximity threshold. Conversely, when the background noise value received by the infrared proximity sensor is less than another threshold, it is determined that no obstruction is approaching, and the electronic device reports a distance status, thus keeping the screen from being woken up. This threshold is the distance threshold.

[0064] However, when the obstruction gets close enough to the phone, the infrared energy path reflected to the infrared distance sensor is blocked, causing the noise floor value received by the infrared distance sensor to decrease. This can lead to the oil stain algorithm mistakenly identifying the obstruction as oil stain and optimizing it out, resulting in an error in the reported status and causing screen wake-up errors, such as the phone's anti-mistouch function failing, automatic brightness adjustment malfunctioning, or abnormal screen on / off during calls.

[0065] This disclosure provides a distance determination method that combines light-sensing data and data obtained from an infrared distance sensor, and uses an oil stain algorithm to solve the problem of misinterpreting an obstruction as oil stains and causing incorrect status reporting when the obstruction is too close to the screen of an electronic device. It accurately judges the distance between the obstruction and the screen and precisely determines whether it is an oil stain signal, thereby improving the accuracy of screen wake-up.

[0066] This disclosure provides a distance determination method applied to an electronic device, exemplarily used to determine the distance state between an obstruction and the screen of the electronic device. Figure 1 This is a flowchart of a distance determination method according to an exemplary embodiment of this disclosure, see reference. Figure 1 As shown, the distance determination method includes the following steps:

[0067] Step S110: Determine whether the data acquired by the infrared distance sensor of the electronic device is greater than the distance threshold and less than the first proximity threshold.

[0068] Step S120: If yes, acquire light sensing data;

[0069] Step S130: Determine whether the light sensing data is greater than the preset light sensing value;

[0070] Step S140: If yes, determine the second proximity threshold value;

[0071] Step S150: Determine the positional state between the obstruction and the screen of the electronic device based on the second proximity threshold and the data obtained by the infrared distance sensor.

[0072] The distance determination method provided in this disclosure is used to accurately determine the distance between an obstruction and the screen of an electronic device, so as to accurately determine whether the obstruction is oil or grease and avoid errors in the status reporting of the infrared distance sensor. First, a first proximity threshold and a distance threshold of the electronic device's screen are acquired, along with data acquired by the infrared distance sensor, such as the noise floor value. The data acquired by the infrared distance sensor is then compared with the first proximity threshold and the distance threshold. When it is determined that the data acquired by the infrared distance sensor is greater than the distance threshold and less than the first proximity threshold, the screen's light sensitivity is assessed. After acquiring the light sensitivity data, if it is determined that the currently acquired light sensitivity data is greater than a preset light sensitivity value, a second proximity threshold is determined. Then, based on the second proximity threshold and the data acquired by the infrared distance sensor, the positional status between the obstruction and the screen of the electronic device is accurately determined and reported.

[0073] The distance determination method provided in this disclosure not only compares the data acquired by the infrared distance sensor with a first proximity threshold and a distance threshold as the basis for judging the positional state between the obstruction and the screen of the electronic device, but also combines light sensing data to make a judgment and determine a second proximity threshold. Then, based on the second proximity threshold and the data acquired by the infrared distance sensor, the positional state between the obstruction and the screen of the electronic device is accurately judged, effectively preventing status reporting errors.

[0074] Figure 2 This is illustrated according to an exemplary embodiment. Figure 1 The implementation flowchart of step S140 in the illustrated embodiment is shown below. Figure 2 As shown, in this embodiment, when the light-sensing data is determined to be greater than a preset light-sensing value, a second proximity threshold value is determined, including the following steps:

[0075] Step S141: When the light sensing data is determined to be greater than the preset light sensing value, the oil stain algorithm is invoked;

[0076] Step S142: Determine the second proximity threshold based on the oil stain algorithm and the first proximity threshold.

[0077] In this scheme, the second proximity threshold is greater than the first proximity threshold. This can also be understood as using an oil stain algorithm to increase the first proximity threshold by one magnitude, thereby obtaining the second proximity threshold. The magnitude of this increase, i.e., the difference or multiple between the second and first proximity thresholds, can be determined based on the first proximity threshold and the oil stain algorithm.

[0078] When the data obtained by the infrared distance sensor of the electronic device is greater than the distance threshold but less than the first proximity threshold, and the current light sensing data is greater than the preset light sensing value, the oil stain algorithm is called to adjust the first proximity threshold to obtain the second proximity threshold. Then, based on the second proximity threshold and the data obtained by the infrared distance sensor, the positional state between the obstruction and the screen of the electronic device is accurately determined. This can effectively avoid mistaking the obstruction for oil stains for optimized reporting and ensure the screen's response accuracy.

[0079] Figure 3 This is illustrated according to an exemplary embodiment. Figure 1 The implementation flowchart of step S150 in the illustrated embodiment is shown below. Figure 3 As shown, in this embodiment, the positional state between the obstruction and the screen of the electronic device is determined based on the second proximity threshold and the data obtained by the infrared distance sensor, including the following steps:

[0080] Step S151: If the data obtained by the infrared distance sensor is greater than the second proximity threshold, it is determined that the distance between the obstruction and the screen of the electronic device is less than the first preset distance.

[0081] Step S152: If the data obtained by the infrared distance sensor is less than the second proximity threshold, it is determined that the distance between the obstruction and the screen of the electronic device is greater than the second preset distance.

[0082] The first preset distance is less than the second preset distance. When the distance between the obstruction and the screen of the electronic device is less than the first preset distance, it is determined that the obstruction is approaching the screen of the electronic device, and a proximity status is reported; when the distance between the obstruction and the screen of the electronic device is greater than the second preset distance, it is determined that the obstruction is moving away from the screen of the electronic device, and a moving-away status is reported. In other words, when the data obtained by the infrared distance sensor is greater than the second proximity threshold, it is determined that the obstruction is approaching the screen of the electronic device, a proximity status is reported, and the screen is woken up; when the data obtained by the infrared distance sensor is less than the second proximity threshold, it is determined that the obstruction is moving away from the screen of the electronic device, a moving-away status is reported, and the screen does not need to be woken up.

[0083] Figure 4 This is illustrated according to an exemplary embodiment. Figure 1 Supplementary flowcharts of the illustrated embodiments, such as Figure 4 As shown, the distance determination method provided in this embodiment further includes:

[0084] Step S160: If the light sensing data is less than the preset light sensing value, determine that the distance between the obstruction and the screen of the electronic device is less than the first preset distance.

[0085] When the data acquired by the infrared distance sensor of the electronic device is greater than the distance threshold but less than the first proximity threshold, and the current light sensing data is greater than a preset light sensing value, as described above, a second proximity threshold is determined, and the positional state between the obstruction and the screen of the electronic device is judged based on the second proximity threshold. Conversely, when the data acquired by the infrared distance sensor of the electronic device is greater than the distance threshold but less than the first proximity threshold, and the current light sensing data is less than a preset light sensing value, it can be directly determined that the distance between the obstruction and the screen of the electronic device is less than a first preset distance, i.e., it is determined that the obstruction is close to the screen of the electronic device, the proximity status is reported, and the screen is woken up.

[0086] Figure 5 This is illustrated according to an exemplary embodiment. Figure 1 Supplementary flowcharts of the illustrated embodiments, such as Figure 5 As shown in the embodiments of this disclosure, the distance determination method further includes:

[0087] Step S170: If the data obtained by the infrared distance sensor of the electronic device is less than the distance threshold, it is determined that the distance between the obstruction and the screen of the electronic device is greater than the second preset distance.

[0088] After acquiring the first proximity threshold and the distance threshold of the screen of the electronic device, as well as the data acquired by the infrared distance sensor, such as the noise floor value, when it is determined that the data acquired by the infrared distance sensor is less than the distance threshold, it is not necessary to acquire light sensing data again. It can be directly determined that the distance between the obstruction and the screen of the electronic device is greater than the second preset distance, that is, it is determined that the obstruction is far away from the screen of the electronic device, and the distance status is reported.

[0089] Figure 6 This is illustrated according to an exemplary embodiment. Figure 1 Supplementary flowcharts of the illustrated embodiments, such as Figure 6 As shown, the distance determination method provided in this embodiment further includes:

[0090] Step S180: If the data obtained by the infrared distance sensor of the electronic device is greater than the first proximity threshold, it is determined that the distance between the obstruction and the screen of the electronic device is less than the first preset distance.

[0091] After acquiring the first proximity threshold and the distance threshold of the screen of the electronic device, as well as the data acquired by the infrared distance sensor, such as the noise floor value, when it is determined that the data acquired by the infrared distance sensor is greater than the first proximity threshold, it is not necessary to acquire the light sensing data and the second proximity threshold. It can be directly determined that the distance between the obstruction and the screen of the electronic device is less than the first preset distance, that is, it is determined that the obstruction is close to the screen of the electronic device, and the proximity status is reported.

[0092] In one exemplary embodiment, the distance determination method proceeds as follows:

[0093] Acquire the first proximity threshold and distance threshold of the screen of the electronic device, as well as data acquired by the infrared distance sensor, such as the noise floor value;

[0094] If the data obtained by the infrared distance sensor of the electronic device is greater than the first proximity threshold, it is determined that the distance between the obstruction and the screen of the electronic device is less than the first preset distance, and the proximity status is reported.

[0095] If the data obtained by the infrared distance sensor of the electronic device is less than the distance threshold, it is determined that the distance between the obstruction and the screen of the electronic device is greater than the second preset distance, and the distance status is reported.

[0096] When the data acquired by the infrared distance sensor of the electronic device is greater than the distance threshold and less than the proximity threshold, light sensing data is acquired.

[0097] If the light sensor data is less than the preset light sensor value, it is determined that the distance between the obstruction and the screen of the electronic device is less than the first preset distance, and the proximity status is reported.

[0098] If the light sensor data is greater than the preset light sensor value, the oil stain algorithm is invoked;

[0099] The second proximity threshold is determined based on the oil contamination algorithm and the first proximity threshold.

[0100] If the data obtained by the infrared distance sensor is greater than the second proximity threshold, it is determined that the distance between the obstruction and the screen of the electronic device is less than the first preset distance, and the proximity status is reported.

[0101] If the data obtained by the infrared distance sensor is less than the second proximity threshold, it is determined that the distance between the obstruction and the screen of the electronic device is greater than the second preset distance, and the distance status is reported.

[0102] The distance determination method provided in this disclosure, based on data acquired by an infrared distance sensor, a first proximity threshold, a distance threshold, light sensing data, and an oil stain algorithm, accurately distinguishes the positional state between the obstruction and the screen of the electronic device at multiple levels. This effectively avoids mistaking the obstruction for oil stains and thus preventing false alarms, thereby improving the response accuracy of the electronic device's screen.

[0103] This disclosure also provides a distance determining device for use in an electronic device, exemplarily for determining the distance between an obstruction and the screen of the electronic device. Figure 7 This is a schematic diagram of the distance determining device according to an exemplary embodiment, with reference to... Figure 7 As shown, the distance determination device provided in this embodiment includes: an acquisition module 21, a first determination module 22, and a second determination module 23, wherein...

[0104] The acquisition module 21 is configured to acquire light-sensing data when it determines that the data acquired by the infrared distance sensor of the electronic device is greater than a distance threshold and less than a first proximity threshold.

[0105] The first determining module 22 is configured to determine a second proximity threshold value when it determines whether the light sensing data is greater than a preset light sensing value.

[0106] The second determining module 23 is configured to determine the positional state between the obstruction and the plane of the electronic device based on the second proximity threshold and the data obtained by the infrared distance sensor.

[0107] This disclosure provides a distance determining device, the distance determining device comprising: Figure 7 The apparatus shown, and:

[0108] The first determining module 22 includes:

[0109] Algorithm calling unit 221 is configured to call the oil stain algorithm when it is determined whether the light sensing data is greater than the preset light sensing value.

[0110] The first determining unit 222 is configured to determine the second proximity threshold based on the oil stain algorithm and the first proximity threshold.

[0111] This disclosure provides a distance determining device, the device comprising: Figure 7 The apparatus shown, and:

[0112] The second determining module 23 includes:

[0113] The second determining unit 231 is configured to determine that the distance between the obstruction and the screen of the electronic device is less than a first preset distance if the data obtained by the infrared distance sensor is greater than a second proximity threshold.

[0114] The third determining unit 232 is configured to determine that the distance between the obstruction and the screen of the electronic device is greater than a second preset distance if the data obtained by the infrared distance sensor is less than a second proximity threshold.

[0115] The present disclosure provides a distance determination device, such as... Figure 7 As shown, the processing device also includes:

[0116] The third determining module 24 is configured to determine that if the light sensing data is less than a preset light sensing value, the distance between the obstruction and the screen of the electronic device is less than a first preset distance.

[0117] The distance determination device provided in the embodiments of this disclosure, such as Figure 7 As shown, the processing device also includes:

[0118] The fourth determining module 25 is configured to determine that the distance between the obstruction and the screen of the electronic device is greater than a second preset distance if the data obtained by the infrared distance sensor of the electronic device is less than the distance threshold.

[0119] The distance determination device provided in the embodiments of this disclosure, such as Figure 7 As shown, the processing device also includes:

[0120] The fifth determining module 26 is configured to determine that if the data obtained by the infrared distance sensor of the electronic device is greater than the first proximity threshold, the distance between the obstruction and the screen of the electronic device is less than the first preset distance.

[0121] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0122] Figure 8A block diagram of a distance determination device 300 according to an exemplary embodiment is shown. For example, device 300 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0123] Reference Figure 8 The device 300 may include one or more of the following components: a processing component 302, a memory 304, a power component 306, a multimedia component 308, an audio component 310, an input / output (I / O) interface 312, a sensor component 314, and a communication component 316.

[0124] Processing component 302 typically controls the overall operation of device 300, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 302 may include one or more processors 320 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 302 may include one or more modules to facilitate interaction between processing component 302 and other components. For example, processing component 302 may include a multimedia module to facilitate interaction between multimedia component 308 and processing component 302.

[0125] Memory 304 is configured to store various types of data to support the operation of device 300. Examples of this data include instructions for any application or method operating on device 300, contact data, phonebook data, messages, pictures, videos, etc. Memory 304 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 storage, flash memory, magnetic disk, or optical disk.

[0126] The power supply component 306 provides power to the various components of the device 300. The power supply component 306 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 300.

[0127] Multimedia component 308 includes a screen that provides an output interface between the device 300 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 touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 308 includes a front-facing camera and / or a rear-facing camera. When the device 300 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0128] Audio component 310 is configured to output and / or input audio signals. For example, audio component 310 includes a microphone (MIC) configured to receive external audio signals when device 300 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 304 or transmitted via communication component 316. In some embodiments, audio component 310 also includes a speaker for outputting audio signals.

[0129] I / O interface 312 provides an interface between processing component 302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0130] Sensor assembly 314 includes one or more sensors for providing status assessments of various aspects of device 300. For example, sensor assembly 314 may detect the on / off state of device 300, the relative positioning of components such as the display and keypad of device 300, changes in the position of device 300 or a component of device 300, the presence or absence of user contact with device 300, the orientation or acceleration / deceleration of device 300, and temperature changes of device 300. Sensor assembly 314 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 314 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 314 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0131] Communication component 316 is configured to facilitate wired or wireless communication between device 300 and other devices. Device 300 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 316 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 316 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0132] In an exemplary embodiment, the apparatus 300 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 methods described above.

[0133] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, which can be executed by a processor 320 of the device 300 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0134] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform a distance determination method, the distance determination method comprising:

[0135] Determine whether the data acquired by the infrared distance sensor of the electronic device is greater than the distance threshold and less than the proximity threshold;

[0136] If so, acquire light-sensing data;

[0137] Determine if the light sensor data is greater than the preset light sensor value;

[0138] If so, determine the second proximity threshold;

[0139] Based on the second proximity threshold and data obtained from the infrared distance sensor, the positional state between the obstruction and the screen of the electronic device is determined.

[0140] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.

[0141] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A distance determination method, applied to electronic devices, characterized in that, The method includes: Determine whether the data acquired by the infrared distance sensor of the electronic device is greater than the distance threshold and less than the proximity threshold; If so, acquire light-sensing data; Determine whether the light-sensing data is greater than a preset light-sensing value; If so, determine the second proximity threshold; Based on the second proximity threshold and the data obtained by the infrared distance sensor, the positional state between the obstruction and the screen of the electronic device is determined; The data acquired by the infrared distance sensor includes the noise floor value.

2. The distance determination method according to claim 1, characterized in that, Determining the second proximity threshold includes: Call the oil stain algorithm; The second proximity threshold is determined based on the oil smudge algorithm and the first proximity threshold.

3. The distance determination method according to claim 1, characterized in that, Determining the positional state between the obstruction and the screen of the electronic device based on the second proximity threshold and the data obtained by the infrared distance sensor includes: If the data obtained by the infrared distance sensor is greater than the second proximity threshold, it is determined that the distance between the obstruction and the screen of the electronic device is less than the first preset distance; If the data obtained by the infrared distance sensor is less than the second proximity threshold, it is determined that the distance between the obstruction and the screen of the electronic device is greater than the second preset distance.

4. The distance determination method according to claim 3, characterized in that, The method further includes: If the light-sensing data is less than the preset light-sensing value, it is determined that the distance between the obstruction and the screen of the electronic device is less than the first preset distance.

5. The distance determination method according to claim 3, characterized in that, The method further includes: If the data obtained by the infrared distance sensor of the electronic device is less than the distance threshold, it is determined that the distance between the obstruction and the screen of the electronic device is greater than the second preset distance.

6. The distance determination method according to claim 3, characterized in that, The method further includes: If the data obtained by the infrared distance sensor of the electronic device is greater than the first proximity threshold, it is determined that the distance between the obstruction and the screen of the electronic device is less than the first preset distance.

7. A distance determining device, applied to electronic equipment, characterized in that, The device includes: The acquisition module is configured to acquire light-sensing data when it determines that the data acquired by the infrared distance sensor of the electronic device is greater than a distance threshold and less than a first proximity threshold. The data acquired by the infrared distance sensor includes a noise floor value. The first determining module is configured to determine a second proximity threshold value when the light-sensing data is greater than a preset light-sensing value. The second determining module is configured to determine the positional state between the obstruction and the plane of the electronic device based on the second proximity threshold and the data acquired by the infrared distance sensor.

8. The distance determining device according to claim 7, characterized in that, The first determining module includes: The algorithm calling unit is configured to call the oil stain algorithm when it is determined that the light-sensing data is greater than the preset light-sensing value. The first determining unit is configured to determine the second proximity threshold value based on the oil stain algorithm and the first proximity threshold value.

9. The distance determining device according to claim 7, characterized in that, The second determining module includes: a second determining unit, configured to determine that if the data acquired by the infrared distance sensor is greater than the second proximity threshold, the distance between the obstruction and the screen of the electronic device is less than a first preset distance; The third determining unit is configured to determine that the distance between the obstruction and the screen of the electronic device is greater than a second preset distance if the data acquired by the infrared distance sensor is less than the second proximity threshold.

10. The distance determining device according to claim 9, characterized in that, The device further includes: The third determining module is configured to determine that if the light-sensing data is less than the preset light-sensing value, the distance between the obstruction and the screen of the electronic device is less than the first preset distance.

11. The distance determining device according to claim 9, characterized in that, The device further includes: The fourth determining module is configured to determine that the distance between the obstruction and the screen of the electronic device is greater than the second preset distance if the data obtained by the infrared distance sensor of the electronic device is less than the distance threshold.

12. The distance determining device according to claim 9, characterized in that, The device further includes: The fifth determining module is configured to determine that if the data obtained by the infrared distance sensor of the electronic device is greater than the first proximity threshold, the distance between the obstruction and the screen of the electronic device is less than the first preset distance.

13. A device for determining distance, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured as follows: Determine whether the data acquired by the infrared distance sensor of the electronic device is greater than a distance threshold and less than a first proximity threshold, wherein the data acquired by the infrared distance sensor includes the noise floor value; If so, acquire light-sensing data; Determine whether the light-sensing data is greater than a preset light-sensing value; If so, determine the second proximity threshold; Based on the second proximity threshold and the data obtained by the infrared distance sensor, the positional state between the obstruction and the screen of the electronic device is determined.

14. A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of a mobile terminal, enable the mobile terminal to perform a distance determination method, the method comprising: When it is determined whether the data acquired by the infrared distance sensor of the electronic device is greater than a distance threshold and less than a first proximity threshold, light-sensing data is acquired. The data acquired by the infrared distance sensor includes the noise floor value. When it is determined whether the light-sensing data is greater than a preset light-sensing value, a second proximity threshold value is determined; Based on the second proximity threshold and the data obtained by the infrared distance sensor, the positional state between the obstruction and the screen of the electronic device is determined.

Citation Information

Patent Citations

  • Method and system for identifying distance between cellphone and shelter

    CN105704265A

  • Foreign matter detection method and device for mobile terminal and mobile terminal

    CN106791047A