CN111835912B - Terminal, distance judgment method and distance judgment device - Google Patents
Terminal, distance judgment method and distance judgment device Download PDFInfo
- Publication number
- CN111835912B CN111835912B CN202010544463.XA CN202010544463A CN111835912B CN 111835912 B CN111835912 B CN 111835912B CN 202010544463 A CN202010544463 A CN 202010544463A CN 111835912 B CN111835912 B CN 111835912B
- Authority
- CN
- China
- Prior art keywords
- signal
- value
- signal value
- standard
- distance
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M2250/00—Details of telephonic subscriber devices
- H04M2250/12—Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
Landscapes
- Optical Radar Systems And Details Thereof (AREA)
Abstract
The disclosure relates to a terminal, a distance judgment method and a distance judgment device, wherein the distance judgment method is applied to the terminal and comprises the following steps: acquiring initial parameters of the optical sensor, wherein the initial parameters comprise a standard background noise signal value and a standard distance signal threshold value, and determining a first background noise signal value, wherein the first background noise signal value is determined based on the optical signal value received by the optical sensor in real time; determining an actual distance signal threshold value based on the standard bottom noise signal value, the standard distance signal threshold value and the first bottom noise signal value; and determining the distance between the terminal and the obstacle based on the actual distance signal threshold value. According to the method and the device, the actual distance signal threshold value is determined through the optical signal value received in real time, and the distance between the terminal and the barrier is accurately determined.
Description
Technical Field
The present disclosure relates to the field of mobile terminal technologies, and in particular, to a terminal, a distance determination method, and a distance determination apparatus.
Background
With the development of science and technology, the functions of the mobile terminal are more and more abundant. The full screen technology becomes one of the inevitable directions for the development of future mobile terminals.
When a user makes a call, in order to prevent the face from touching the screen of the mobile terminal to cause an erroneous operation, or when the call is ended, the user needs to operate the touch screen, which is usually implemented based on a Proximity sensor (P-sensor) on the mobile terminal. The light sensor controls the screen to be on or off by detecting the energy of the received light signal. However, in the case of full-screen technology, the opening space of the optical sensor based on narrow slit optical path design reaches the physical limit. When the signal-to-noise ratio of the mobile terminal is poor and the bottom noise is large, the optical sensor is easily interfered, so that wrong judgment of screen on and screen off of the screen is caused, and the use of the mobile terminal is influenced.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a terminal, a distance determination method, and a distance determination apparatus.
According to a first aspect of the embodiments of the present disclosure, there is provided a terminal, including: the touch screen comprises a narrow gap area, the narrow gap area is positioned at the edge of the touch screen, and the narrow gap area is provided with a hole; a light sensor including a light emitting end and a light receiving end, and emitting and receiving a light signal via the hole; and the application processor is used for determining the distance between the obstacle and the terminal according to the optical signal received by the optical sensor.
In one embodiment, the light sensor is disposed inside the terminal and below the slit region.
In one embodiment, the application processor comprises: the acquisition unit is used for acquiring initial parameters of the optical sensor, wherein the initial parameters comprise a standard background noise signal value and a standard distance signal threshold value; the determining unit is configured to determine a first background noise signal value, where the first background noise signal value is determined based on the optical signal value received by the optical sensor in real time, determine an actual distance signal threshold value based on the standard background noise signal value, the standard distance signal threshold value, and the first background noise signal value, and determine a distance between the obstacle and the terminal based on the actual distance signal threshold value.
In an embodiment, the determining unit is configured to determine the actual distance signal threshold value based on the standard noise floor signal value, the standard distance signal threshold value, and the first noise floor signal value as follows: determining a signal threshold offset based on the standard background noise signal value and the standard distance signal threshold; determining the actual distance signal threshold based on the first background noise signal value and the signal threshold offset.
In an embodiment, the determining unit is configured to determine the signal threshold offset based on the standard noise floor signal value and the standard distance signal threshold in the following manner: and determining the difference between the standard distance signal threshold value and the standard background noise signal value as the signal threshold value offset.
In an embodiment, the determining unit is configured to determine the actual distance signal threshold based on the first noise floor signal value and the signal threshold offset in the following manner: and determining the sum of the first background noise signal value and the signal threshold value offset as the actual distance signal threshold value.
In an embodiment, the determining unit is configured to determine the first noise floor signal value as follows: and determining the optical signal value received by the optical sensor in real time as the first background noise signal value, or calibrating the optical signal value received by the optical sensor in real time, and determining the calibrated optical signal value as the first background noise signal value.
In an embodiment, the determining unit is configured to calibrate the light signal value received by the light sensor in real time by: and calibrating the optical signal value received by the optical sensor in real time based on the standard bottom noise signal value, so that the calibrated optical signal value is the standard bottom noise signal value.
In an embodiment, the determining unit is further configured to: before calibrating the optical signal value received by the optical sensor in real time, determining that the optical signal value received by the optical sensor in real time changes within a specified signal value range; or determining that the light signal value received by the light sensor in real time is increased within a specified time range, and the increased signal value is greater than a specified signal threshold value.
In an embodiment, the terminal further includes a bezel, and the slit region is located at a position of the touch screen close to the bezel.
According to a second aspect of the embodiments of the present disclosure, there is provided a distance determining method applied to a terminal in the first aspect or any one of the embodiments of the first aspect, the distance determining method including: acquiring initial parameters of the optical sensor, wherein the initial parameters comprise a standard background noise signal value and a standard distance signal threshold value; determining a first background noise signal value, wherein the first background noise signal value is determined based on the optical signal value received by the optical sensor in real time; determining an actual distance signal threshold value based on the standard bottom noise signal value, the standard distance signal threshold value, and the first bottom noise signal value; and determining the distance between the terminal and the obstacle based on the actual distance signal threshold value.
In one embodiment, the determining an actual distance signal threshold value based on the standard noise floor signal value, the standard distance signal threshold value, and the first noise floor signal value includes: determining a signal threshold offset based on the standard background noise signal value and the standard distance signal threshold; determining the actual distance signal threshold based on the first background noise signal value and the signal threshold offset.
In one embodiment, the determining a signal threshold offset based on the standard noise floor signal value and a standard distance signal threshold comprises: and determining the difference between the standard distance signal threshold value and the standard background noise signal value as the signal threshold value offset.
In an embodiment, the determining the actual distance signal threshold based on the first noise floor signal value and the signal threshold offset includes: and determining the sum of the first background noise signal value and the signal threshold value offset as the actual distance signal threshold value.
In one embodiment, the determining the first noise floor signal value includes: and determining the optical signal value received by the optical sensor in real time as a first background noise signal value, or calibrating the optical signal value received by the optical sensor in real time, and determining the calibrated optical signal value as the first background noise signal value.
In an embodiment, the calibrating the light signal value received by the light sensor in real time includes: and calibrating the optical signal value received by the optical sensor in real time based on the standard bottom noise signal value, so that the calibrated optical signal value is the standard bottom noise signal value.
In an embodiment, before calibrating the light signal value received by the light sensor in real time, the method further includes: determining that the light signal value received by the light sensor in real time changes within a specified signal value range; or determining that the light signal value received by the light sensor in real time is increased within a specified time range, and the increased signal value is greater than a specified signal threshold value.
According to a third aspect of the present disclosure, there is provided an apparatus for distance determination, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the distance determining method according to the second aspect or any embodiment of the second aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: based on the real-time received light signal value of light sensor, confirm actual distance signal threshold value, carry out dynamic update to the threshold value, simultaneously, calibrate the light signal value that receives, distance between definite terminal that can be more accurate and the barrier, the accurate bright screen of realization is shielded and is shielded with putting out, promotes the use at terminal and experiences.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic diagram illustrating the operating principle of a light sensor according to an exemplary embodiment.
Fig. 2 is a flow chart illustrating a method of distance determination according to an example embodiment.
Fig. 3 is a flow chart illustrating a determination of an actual distance signal threshold value in accordance with an exemplary embodiment.
Fig. 4 is a block diagram illustrating a distance determination device according to an exemplary embodiment.
Fig. 5 is a block diagram illustrating an apparatus for distance determination according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The distance judgment method provided by the embodiment of the disclosure is applied to a terminal, and the terminal is provided with an optical sensor used for determining the distance between the terminal and an obstacle. The distance between the terminal and the barrier is judged through the optical sensor, and the control of the screen on and off of the terminal is realized. For example, when the terminal is a mobile phone, in the process of answering or hanging up the phone, the distance between the face of the user and the terminal is judged through the optical sensor, and the screen on and off of the terminal are controlled.
The disclosed embodiment provides a terminal, and fig. 1 exemplarily shows a schematic diagram of an operating principle of an optical sensor, where the terminal includes a Touch screen 10 (TP), and the Touch screen 10 may include a narrow slit region, and the narrow slit region may be located at an edge of the Touch screen 10 to reduce an influence on the Touch screen 10, and in some embodiments, the narrow slit region may be a non-display region of the Touch screen. The narrow slit region of the touch screen 10 is provided with the hole 11, and the width W of the hole 11 is small in size, thereby reducing the influence on the touch screen 10, and particularly improving the screen occupation ratio in the full-screen terminal. The terminal also includes an Application Processor 40 (AP) that may include a light sensor 30. The optical sensor 30 includes an optical transmitting end Tx that transmits an optical signal through the hole 11, which is reflected when an obstacle approaches, and an optical receiving end Rx that receives the optical signal through the hole 11. The received optical signal is processed by the application processor 40, and the distance between the obstacle and the terminal is determined based on the optical signal received by the optical sensor 30.
In the embodiment of the present disclosure, the light signal emitted and received by the light sensor 30 may be an infrared light signal, and may also be a laser light signal or other light signal.
In one embodiment, the terminal may further include a frame disposed outside the touch screen, and the narrow slit region is located at a position of the touch screen close to the frame. The frame can also be including setting up frame, lower frame, left side frame and right frame on the touch-sensitive screen all around, and in one example, the hole can set up in the position that the touch-sensitive screen is close to the frame, is convenient for under the circumstances such as the user answers the call, conveniently judges the distance between and the human body. The optical sensor 30 may be disposed below the narrow slit region of the touch screen 10, and may be aligned with the hole 11 directly or obliquely, so as to ensure that the emitted optical signal can be emitted through the hole 11 and the reflected optical signal can be received.
The working principle of a light sensor according to fig. 1 is schematically illustrated. Taking the infrared light signal as an example, the optical sensor 30 receives an external infrared light signal to determine the distance. As shown in fig. 1, the terminal includes a Touch screen 10 (TP), a hole 11 is formed on the Touch screen 10, and an optical sensor 30 is installed below the Touch screen. The optical sensor 30 includes a light emitting end Tx and a light receiving end Rx, which transmit and receive infrared light through the hole 11 via a propagation path x, a propagation path y, and the like, forming a transmission area a and a reception area b. The light sensor 30 transmits the received infrared light value to the application processor 40, and the application processor 40 determines the distance between the obstacle and the touch screen 10 according to the received value. If the light sensor 30 receives infrared light as n-bit binary sampling, the received energy variation range is an nth power range of 0 to 2. Based on the optical path structure shown in fig. 1, a certain background noise (CT) is usually formed, for example, the optical sensor 30 transmits an infrared light signal to the lower surface of the touch screen 10 at the optical transmitting end Tx, reflects the infrared light signal to the lower surface of the touch screen 10 after refracting through the lower surface of the touch screen 10, reflects the infrared light signal to the upper surface of the touch screen 10 again and then refracts the infrared light signal, and reflects a large amount of infrared light signals by oil stains and the like on the upper surface of the touch screen 10, and these reflected infrared light signals are superimposed to form the CT. When the light sensor 30 has an obstacle 20 in the overlapping area z of space in the emitting area a and the receiving area b, the reflected light forms a useful signal. The light sensor 30 receives a useful signal at the light receiving end Rx, converts the useful signal into a corresponding photocurrent, and then amplifies and samples the photocurrent to form a binary bit value. The binary bit value is transmitted to the application processor 40 based on a communication protocol to be internally converted into a decimal value (signal energy value). The signal energy value corresponds to a distance between the obstacle and the terminal. And when the signal energy value is greater than the approach threshold value set by the terminal, the screen is turned off. When the barrier is far away, the signal energy value is smaller than the far threshold value set by the terminal, and then the screen is lightened.
In the related art, the threshold value used for comparing with the signal energy value is a standard distance threshold value set by the terminal from the factory, and the standard distance threshold value is a fixed value and is written in the terminal as a factory setting value. However, if the structure of the optical sensor 30 changes, the crosstalk of external ambient light will also cause poor signal-to-noise ratio of the terminal, resulting in large noise floor. At this time, interference is easily caused to the optical sensor 30, so that the originally written standard distance signal threshold value is invalid, which causes misjudgment of screen on and off of the screen, and affects the use of the terminal.
Fig. 2 is a flowchart illustrating a distance determination method according to an exemplary embodiment, and as shown in fig. 2, the distance determination method may be applied to the terminal of any of the foregoing embodiments, on which the optical sensor 30 for determining the distance between the terminal and the obstacle is mounted, and the distance determination method includes steps S11 to S14.
In step S11, initial parameters of the light sensor are acquired, the initial parameters including a standard background noise signal value and a standard distance signal threshold value.
In this embodiment, the initial parameters of the optical sensor 30 include a standard noise floor signal value and a standard distance signal threshold value, the standard noise floor signal value is a noise floor value of the terminal in an ideal environment without any interference of external ambient light, and the optical sensor 30 emits an optical signal, such as infrared light, to generate a reflected noise floor value via the inside of the touch screen. The standard distance signal threshold value is a standard distance between an obstacle and a terminal when the obstacle is close to or far away from the ideal environment and the screen of the terminal is turned off or on. The initial parameter may be a fixed value and is written when the terminal leaves the factory.
In step S12, a first noise floor signal value is determined, which is determined based on the light signal value received by the light sensor in real time.
The optical signal may be an infrared light signal, a laser signal, or other light signals. In the following embodiments of the present disclosure, an optical signal is taken as an example for explanation.
In this embodiment, the first background noise signal value is an external infrared light signal value received in real time when the optical sensor 30 is triggered and enabled, and the infrared light signal value is a signal value obtained after an infrared analog signal received by the optical sensor 30 is amplified by an amplifier and is subjected to analog-to-digital conversion.
In step S13, an actual distance signal threshold value is determined based on the standard noise floor signal value, the standard distance signal threshold value, and the first noise floor signal value.
In this embodiment, the standard background noise signal value is an infrared light signal value received by the optical sensor 30 when there is no obstruction and no strong light stimulation, and the signal value is an infrared signal value received by the optical sensor 30 when infrared light is reflected or refracted inside the touch screen of the mobile terminal. And setting a standard distance signal threshold value including a standard approaching threshold value and a standard departing threshold value when the mobile terminal leaves a factory. When the sensor is triggered to enable, according to the standard bottom noise signal value, the standard approaching threshold value, the standard departing threshold value and the first bottom noise signal value, the actual distance signal threshold value can be obtained, and comprises the actual approaching threshold value and the actual departing threshold value.
For example, when the mobile terminal is not shielded by an object and is not stimulated by strong light, the standard background noise signal value received by the light sensor 30 is 300, the factory-set standard approach threshold value is 450, and the standard distance threshold value is 400, and according to the first background noise signal value 700 in step S11, the actual approach threshold value 850 and the actual distance threshold value 800 may be obtained.
The standard distance signal threshold value is a factory-set value obtained by the mobile terminal based on an ideal external environment, and when the mobile terminal is actually used, the distance between the obstacle and the mobile terminal is determined based on the change possibly generated by the structure of the mobile terminal and the crosstalk of external environment light, for example, oil stain is generated on the surface of a TP due to the fact that a user answers a call, or infrared light components contained in the external environment light are large, so that the actual use requirement of the mobile terminal is met.
In step S14, the distance between the terminal and the obstacle is determined based on the actual distance signal threshold value.
According to the step S13, the actual approaching threshold value and the actual departing threshold value are obtained, and when there is an obstacle approaching to and departing from the terminal, the useful signal value received by the receiving end of the optical sensor 30 is compared with the actual approaching threshold value and the actual departing threshold value, so as to determine the distance between the terminal and the obstacle.
In this embodiment, when the terminal has obstacles close to and far from, since the infrared signal of the solar spectrum in the external environment interferes, since the emitted infrared light of the light sensor 30 is pulse width modulation controlled, the reception of the light sensor 30 can be time-division multiplexed. When the pulse is high, there is emission, and when the pulse is low, there is no reception, and the difference between the two signal sets results in the reception signal actually formed due to the fact that the emission of the light sensor 30 is blocked by an obstacle, i.e. the useful signal. The useful signal is amplified and sampled to form a binary number value, the binary number value is transmitted to the inside of the processor through a communication protocol and converted into a decimal number value, the decimal number value is the useful signal value, when the useful signal value is larger than an actual approaching threshold value, screen extinguishing is achieved, and when the useful signal value is smaller than an actual far threshold value, screen brightening is achieved.
For example, according to the actual approaching threshold value 850 and the actual departing threshold value 800 obtained in step S13, when an obstacle approaches and departs from the terminal, the plurality of useful signal values received by the optical sensor 30 are compared with the actual approaching threshold value and the actual departing threshold value, for example, when an object approaches, the received useful signal value is 900, when the received useful signal value is greater than the actual approaching threshold value 850, the screen is turned off, and when the received useful signal value is less than the actual departing threshold value 800, the screen is turned on.
By the pulse width modulation control of the optical sensor 30, an accurate useful signal can be obtained, and the situation that a large error exists in the obtained useful signal due to the fact that an infrared light signal in ambient sunlight is large and the difference of a receiving end of the optical sensor 30 is not ideal is avoided. Through the comparison of the obtained accurate useful signal with the actual distance signal threshold value, the distance between the barrier and the terminal can be accurately determined, accurate screen turn-off and screen turn-on control is achieved, and user experience is improved.
Fig. 3 is a flowchart illustrating a method for determining an actual distance signal threshold value according to an exemplary embodiment, where fig. 3 includes a step S131 of determining a signal threshold value offset based on a standard noise floor signal value and a standard distance signal threshold value; step S132 determines an actual distance signal threshold based on the first background noise signal value and the signal threshold offset.
In this embodiment, the step S131 determines the offset of the signal threshold value based on the standard noise floor signal value and the standard distance signal threshold value, and includes: and determining the difference between the standard distance signal threshold value and the standard background noise signal value as the signal threshold value offset. The difference between the standard background noise signal value and the standard approach threshold value is determined as the approach threshold offset, and the difference between the standard background noise signal value and the standard departure threshold value is determined as the departure threshold offset.
For example, according to the above example, the standard noise floor value is 300, the standard approach threshold value is 450, the standard departure threshold value is 400, the difference 150 between the standard noise floor value and the standard approach threshold value is the approaching threshold offset, and the difference 100 between the standard noise floor value and the standard departure threshold value is the departing threshold offset.
In this embodiment, step S132 determines the actual distance signal threshold based on the first background noise signal value and the signal threshold offset, including determining the sum of the first background noise signal value and the signal threshold offset as the actual distance signal threshold.
The sum of the first background noise signal value and the approach threshold offset is determined as an actual approach threshold value; the sum of the first background noise signal value and the departure threshold offset is determined as the actual departure threshold value. The approach threshold offset and the approach distance threshold offset are fixed values, and based on the change of the first background noise signal value, the corresponding actual approach threshold value and the actual distance threshold value also generate dynamic changes, so that the dynamic calibration logic of the threshold is realized.
For example, according to the above example, the first noise floor value is 700, the approach threshold offset is 150, and the distance threshold offset is 100, and according to the above calculation method, the actual approach threshold value is 850 and the actual distance threshold value is 800.
In this embodiment, the optical signal value received by the optical sensor 30 in real time may be determined as the first background noise signal value, or the optical signal value received by the optical sensor 30 in real time may be calibrated, and the calibrated optical signal value may be determined as the first background noise signal value.
In one embodiment, the calibration is performed on the infrared light signal value received in real time, and may be performed based on hardware circuit closed-loop control, the light sensor 30 receives the infrared light signal reflected by the obstacle, the infrared light signal is processed and collected to the processor, and the collected infrared light signal is fed back to the input end of the amplifier through digital-to-analog conversion to form a closed-loop control loop. The mobile terminal is calibrated once when leaving the factory, the register stores the calibrated value, and when the optical sensor 30 is enabled to work, the obtained useful signal is compared with the actual distance signal threshold. And when the real-time background noise signal value received at a certain moment changes, starting calibration, and calibrating the real-time received infrared light signal value to a factory setting level.
In another embodiment, the calibration of the infrared light signal value received in real time may also be based on hardware-free loop calibration, when an obstacle approaches the mobile terminal, the infrared light signal value received in real time is increased due to the obstacle approaching the terminal, and the increased standard approaches the threshold value and the standard departs from the threshold value, so that when the obstacle departs from the mobile terminal, the increased standard departs from the threshold value, that is, the increased standard departs from the threshold value is smaller than the actually departed threshold value, and the screen is lightened. When the infrared light signal value received in real time is in a stable state and the signal value is still larger, starting calibration, and reducing the actual distance signal threshold value until the actual distance signal threshold value is calibrated to the standard distance signal threshold value set by a factory
In another embodiment, the infrared light signal value received in real time may be calibrated by using other sensors to determine a change of the gesture, so as to turn on or off the screen, for example, by using gesture determination, when the other sensors receive a model corresponding to the gesture of taking off the face, calibration is started at the moment of taking off the face or under a stable condition, and the infrared light signal value received in real time by the light sensor 30 is calibrated to a standard background noise signal value set by the factory.
Based on the calibration mode, the optical signal value received by the optical sensor 30 in real time is calibrated, so that the calibrated optical signal value is a standard background noise signal value, and is calibrated to a standard distance signal threshold value set by a factory.
In this embodiment, before calibrating the infrared light signal value received by the optical sensor 30 in real time, the method further includes: determining that the infrared light signal value received by the light sensor 30 in real time changes within a specified signal value range; or determining that the infrared light signal value received by the light sensor 30 in real time increases within a specified time range, and the increased signal value is greater than a specified signal threshold.
When the infrared light signal value received by the light sensor 30 in real time changes within the range of the specified signal value, that is, the oil stain state is judged, and the infrared light signal value received in real time is calibrated through an oil stain algorithm to reduce the signal value. Or when the infrared light signal value received by the optical sensor 30 in real time is increased within a specified time range, the increased signal value is greater than a specified signal threshold value, and the background noise is judged to be changed violently, the oil stain-free state is judged, and the infrared light signal value received in real time is calibrated to the standard background noise signal value by triggering one-time calibration.
Based on the above determination of the status of the infrared light signal values received in real time to the light sensor 30 prior to calibration, it is possible to prevent background noise saturation and prevent an excessively high actual distance signal threshold value from exceeding the energy range received by the light sensor 30.
Through the embodiment, the first background noise signal value is determined based on the infrared light signal value received by the light sensor 30 in real time, and then the actual distance signal threshold value is obtained, so that the distance between the terminal and the obstacle is accurately determined
Based on the same conception, the embodiment of the disclosure also provides a distance judgment device.
It is to be understood that, in order to implement the above functions, the distance determining apparatus provided in the embodiments of the present disclosure includes a hardware structure and/or a software module corresponding to the above functions. The disclosed embodiments can be implemented in hardware or a combination of hardware and computer software, in combination with the exemplary elements and algorithm steps disclosed in the disclosed embodiments. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
Fig. 4 is a block diagram illustrating a distance determining apparatus 100 according to an exemplary embodiment, which may be the application processor 40 in the terminal of any of the foregoing embodiments. Referring to fig. 4, the apparatus 100 may include an acquisition unit 101 and a determination unit 102. The obtaining unit 101 is configured to obtain initial parameters of the optical sensor 30, where the initial parameters include a standard background noise signal value and a standard distance signal threshold value. The determining unit 102 is configured to determine a first background noise signal value, where the first background noise signal value is determined based on the light signal value received by the light sensor 30 in real time, determine an actual distance signal threshold value based on the standard background noise signal value, the standard distance signal threshold value, and the first background noise signal value, and determine a distance between the terminal and the obstacle based on the actual distance signal threshold value.
In an embodiment, the determining unit 102 is configured to determine the actual distance signal threshold value based on the standard noise floor signal value, the standard distance signal threshold value and the first noise floor signal value in the following manner: determining a signal threshold offset based on the standard background noise signal value and the standard distance signal threshold; an actual distance signal threshold is determined based on the first background noise signal value and the signal threshold offset.
In an embodiment, the determining unit 102 is configured to determine the signal threshold offset based on the standard noise floor signal value and the standard distance signal threshold value as follows: and determining the difference between the standard distance signal threshold value and the standard background noise signal value as the signal threshold value offset.
In an embodiment, the determining unit 102 is configured to determine the actual distance signal threshold based on the first noise floor signal value and the signal threshold offset in the following manner: and determining the sum of the first background noise signal value and the signal threshold value offset as an actual distance signal threshold value.
In an embodiment, the determining unit 102 is configured to determine the first noise floor signal value as follows: the optical signal value received by the optical sensor 30 in real time is determined as the first background noise signal value, or the optical signal value received by the optical sensor 30 in real time is calibrated, and the calibrated optical signal value is determined as the first background noise signal value. .
In an embodiment, the determining unit 102 is configured to calibrate the light signal value received by the light sensor 30 in real time as follows: based on the standard background noise signal value, the optical signal value received by the optical sensor 30 in real time is calibrated, so that the calibrated optical signal value is the standard background noise signal value.
In an embodiment, the determining unit 102 is further configured to determine that the light signal value received by the light sensor 30 in real time changes within a specified signal value range before calibrating the light signal value received by the light sensor 30 in real time. Or determining that the light signal value received by the light sensor 30 in real time increases within a specified time range, and the increased signal value is greater than a specified signal threshold.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 5 is a block diagram illustrating an apparatus 200 for distance determination according to an example embodiment. For example, the apparatus 200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 5, the apparatus 200 may include one or more of the following components: a processing component 202, a memory 204, a power component 206, a multimedia component 208, an audio component 210, an input/output (I/O) interface 212, a sensor component 214, and a communication component 216.
The processing component 202 generally controls overall operation of the device 200, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 202 may include one or more processors 220 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 202 can include one or more modules that facilitate interaction between the processing component 202 and other components. For example, the processing component 202 can include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.
The multimedia component 208 includes a screen that provides an output interface between the device 200 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 an input signal from a 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 boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 200 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 210 is configured to output and/or input audio signals. For example, audio component 210 includes a Microphone (MIC) configured to receive external audio signals when apparatus 200 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 204 or transmitted via the communication component 216. In some embodiments, audio component 210 also includes a speaker for outputting audio signals.
The I/O interface 212 provides an interface between the processing component 202 and peripheral interface modules, which may be 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.
The sensor component 214 includes one or more sensors for providing various aspects of status assessment for the device 200. For example, the sensor component 214 may detect an open/closed state of the device 200, the relative positioning of components, such as a display and keypad of the apparatus 200, the sensor component 214 may also detect a change in position of the apparatus 200 or a component of the apparatus 200, the presence or absence of user contact with the apparatus 200, orientation or acceleration/deceleration of the apparatus 200, and a change in temperature of the apparatus 200. The sensor assembly 214 may include a presence sensor configured to detect nearby objects without any physical contact. The sensor assembly 214 may also include, for example, a CMOS or CCD image sensor for use in imaging applications. In some embodiments, the sensor assembly 214 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 216 is configured to facilitate wired or wireless communication between the apparatus 200 and other devices. The device 200 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 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 216 further includes a Near Field Communication (NFC) module to facilitate short-range communications. 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.
In an exemplary embodiment, the apparatus 200 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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as memory 204, comprising instructions executable by processor 220 of device 200 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood that the present disclosure is not limited to the precise arrangements 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.
It is understood that "a plurality" in this disclosure means two or more, and other words are analogous. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. The singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It will be further understood that the terms "first," "second," and the like are used to describe various information and that such information should not be limited by these terms. These terms are only used to distinguish one type of information from another and do not denote a particular order or importance. Indeed, the terms "first," "second," and the like are fully interchangeable. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure.
It is further to be understood that while operations are depicted in the drawings in a particular order, this is not to be understood as requiring that such operations be performed in the particular order shown or in serial order, or that all illustrated operations be performed, to achieve desirable results. In certain environments, multitasking and parallel processing may be advantageous.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements 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.
Claims (17)
1. A terminal, characterized in that the terminal comprises:
the touch screen comprises a narrow gap area, the narrow gap area is positioned at the edge of the touch screen, and the narrow gap area is provided with a hole;
a light sensor including a light emitting end and a light receiving end, and emitting and receiving a light signal via the hole;
the application processor is used for determining the distance between an obstacle and the terminal according to the optical signal received by the optical sensor;
wherein the application processor comprises: the acquisition unit is used for acquiring initial parameters of the optical sensor, wherein the initial parameters comprise a standard background noise signal value and a standard distance signal threshold value; a determining unit, configured to determine a distance between an obstacle and the terminal based on an actual distance signal threshold, where the actual distance signal threshold is determined according to the standard bottom noise signal value, the standard distance signal threshold, and a first bottom noise signal value, the standard distance signal threshold includes a standard approach threshold and a standard departure threshold, the actual distance signal threshold includes an actual approach threshold and an actual departure threshold, and the first bottom noise signal value is an optical signal value received in real time when the optical sensor is triggered to be enabled.
2. A terminal as claimed in claim 1, wherein the light sensor is disposed within the terminal below the slot region.
3. The terminal of claim 1, wherein the determining unit is configured to determine an actual distance signal threshold value based on the standard noise floor signal value, the standard distance signal threshold value, and the first noise floor signal value as follows:
determining a signal threshold offset based on the standard background noise signal value and the standard distance signal threshold;
determining the actual distance signal threshold based on the first background noise signal value and the signal threshold offset.
4. A terminal according to claim 3, wherein the determining unit is configured to determine a signal threshold offset based on the standard background noise signal value and the standard distance signal threshold value as follows:
and determining the difference between the standard distance signal threshold value and the standard background noise signal value as the signal threshold value offset.
5. A terminal according to claim 3 or 4, characterised in that the determining unit is adapted to determine the actual distance signal threshold value based on the first noise floor signal value and the signal threshold value offset in the following manner:
and determining the sum of the first background noise signal value and the signal threshold value offset as the actual distance signal threshold value.
6. A terminal according to claim 1, characterized in that the determining unit is adapted to determine the first noise floor signal value by:
determining the light signal value received by the light sensor in real time as the first background noise signal value, or
And calibrating the optical signal value received by the optical sensor in real time, and determining the calibrated optical signal value as the first background noise signal value.
7. The terminal according to claim 6, wherein the determining unit is configured to calibrate the light signal value received by the light sensor in real time by:
and calibrating the optical signal value received by the optical sensor in real time based on the standard bottom noise signal value, so that the calibrated optical signal value is the standard bottom noise signal value.
8. The terminal according to claim 6 or 7, wherein the determining unit is further configured to:
before calibrating the optical signal value received by the optical sensor in real time, determining that the optical signal value received by the optical sensor in real time changes within a specified signal value range; or determining that the light signal value received by the light sensor in real time is increased within a specified time range, and the increased signal value is greater than a specified signal threshold value.
9. The terminal of claim 1, further comprising a bezel disposed outside the touch screen, wherein the slot region is located on the touch screen near the bezel.
10. A distance determination method applied to the terminal according to any one of claims 1 to 9, the distance determination method comprising:
acquiring initial parameters of the optical sensor, wherein the initial parameters comprise a standard background noise signal value and a standard distance signal threshold value, and determining a first background noise signal value, wherein the first background noise signal value is an optical signal value received in real time when the optical sensor is triggered to be enabled;
determining an actual distance signal threshold value based on the standard bottom noise signal value, the standard distance signal threshold value and the first bottom noise signal value, wherein the standard distance signal threshold value comprises a standard approach threshold value and a standard departure threshold value, and the actual distance signal threshold value comprises an actual approach threshold value and an actual departure threshold value;
and determining the distance between the terminal and the obstacle based on the actual distance signal threshold value.
11. The method of claim 10, wherein determining an actual distance signal threshold value based on the standard noise floor signal value, the standard distance signal threshold value, and the first noise floor signal value comprises:
determining a signal threshold offset based on the standard background noise signal value and the standard distance signal threshold;
determining the actual distance signal threshold based on the first background noise signal value and the signal threshold offset.
12. The method of claim 11, wherein determining a signal threshold offset based on the standard noise floor signal value and the standard distance signal threshold comprises:
and determining the difference between the standard distance signal threshold value and the standard background noise signal value as the signal threshold value offset.
13. The distance determination method according to claim 11 or 12, wherein the determining the actual distance signal threshold value based on the first background noise signal value and the signal threshold value offset comprises:
and determining the sum of the first background noise signal value and the signal threshold value offset as the actual distance signal threshold value.
14. The distance determination method according to claim 10, wherein the determining the first noise floor signal value comprises:
determining the light signal value received by the light sensor in real time as the first background noise signal value, or
And calibrating the optical signal value received by the optical sensor in real time, and determining the calibrated optical signal value as the first background noise signal value.
15. The method according to claim 14, wherein the calibrating the value of the optical signal received by the optical sensor in real time includes:
and calibrating the optical signal value received by the optical sensor in real time based on the standard bottom noise signal value, so that the calibrated optical signal value is the standard bottom noise signal value.
16. The distance determination method according to claim 14 or 15, wherein before calibrating the optical signal value received by the optical sensor in real time, the method further comprises:
determining that the light signal value received by the light sensor in real time changes within a specified signal value range; or
And determining that the light signal value received by the light sensor in real time is increased within a specified time range, and the increased signal value is greater than a specified signal threshold value.
17. An apparatus for distance determination, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: the distance determination method according to any one of claims 10 to 16 is performed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010544463.XA CN111835912B (en) | 2020-06-15 | 2020-06-15 | Terminal, distance judgment method and distance judgment device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010544463.XA CN111835912B (en) | 2020-06-15 | 2020-06-15 | Terminal, distance judgment method and distance judgment device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111835912A CN111835912A (en) | 2020-10-27 |
CN111835912B true CN111835912B (en) | 2021-09-21 |
Family
ID=72897675
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010544463.XA Active CN111835912B (en) | 2020-06-15 | 2020-06-15 | Terminal, distance judgment method and distance judgment device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111835912B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105700679A (en) * | 2015-12-31 | 2016-06-22 | 华勤通讯技术有限公司 | Distance detection method, display screen control method and electronic equipment |
CN106443639A (en) * | 2016-09-26 | 2017-02-22 | 深圳市金立通信设备有限公司 | Distance calibration method and terminal |
CN108267728A (en) * | 2018-01-23 | 2018-07-10 | 北京小米移动软件有限公司 | Calibration method, device, equipment and the storage medium of range sensor |
CN108534891A (en) * | 2018-03-09 | 2018-09-14 | 广东欧珀移动通信有限公司 | Optical sensor, electronic device and its manufacturing method |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102833419B (en) * | 2012-08-31 | 2014-11-05 | 华为终端有限公司 | Method and terminal for controlling screen state |
CN108600419A (en) * | 2018-03-09 | 2018-09-28 | 广东欧珀移动通信有限公司 | Electronic device and its manufacturing method |
CN108965594B (en) * | 2018-07-09 | 2020-12-15 | 珠海市魅族科技有限公司 | Terminal equipment adjusting method, system and storage medium |
-
2020
- 2020-06-15 CN CN202010544463.XA patent/CN111835912B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105700679A (en) * | 2015-12-31 | 2016-06-22 | 华勤通讯技术有限公司 | Distance detection method, display screen control method and electronic equipment |
CN106443639A (en) * | 2016-09-26 | 2017-02-22 | 深圳市金立通信设备有限公司 | Distance calibration method and terminal |
CN108267728A (en) * | 2018-01-23 | 2018-07-10 | 北京小米移动软件有限公司 | Calibration method, device, equipment and the storage medium of range sensor |
CN108534891A (en) * | 2018-03-09 | 2018-09-14 | 广东欧珀移动通信有限公司 | Optical sensor, electronic device and its manufacturing method |
Also Published As
Publication number | Publication date |
---|---|
CN111835912A (en) | 2020-10-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3316074B1 (en) | Screen control method, apparatus, and non-transitory tangible computer readable storage medium | |
US10521055B2 (en) | Terminal, method, apparatus and electronic device for identifying touch | |
CN109656317B (en) | Apparatus having distance sensing function and distance sensing method | |
CN106413060B (en) | Screen state control method and device | |
US11178501B2 (en) | Methods, devices, and computer-readable medium for microphone selection | |
CN108989494B (en) | Electronic equipment | |
US10885298B2 (en) | Method and device for optical fingerprint recognition, and computer-readable storage medium | |
US10930217B2 (en) | Method and apparatus for compensating operating parameter of display circuit | |
CN112905103A (en) | False touch processing method and device and storage medium | |
CN112135035B (en) | Control method and device of image acquisition assembly and storage medium | |
CN113267785B (en) | Distance detection method and device and electronic equipment | |
CN111212157B (en) | Mobile terminal and screen control method thereof | |
CN111835912B (en) | Terminal, distance judgment method and distance judgment device | |
CN112540377A (en) | Distance detection assembly, method, electronic device and storage medium | |
CN111212159A (en) | Terminal device | |
CN107682101B (en) | Noise detection method and device and electronic equipment | |
CN115575930A (en) | Distance sensor calibration method and device, electronic equipment and readable storage medium | |
CN111246009B (en) | Sliding cover type terminal, distance detection method and device and storage medium | |
CN111405115B (en) | Display brightness adjusting method and device, mobile terminal and storage medium | |
CN111398970B (en) | Event detection method, distance sensor and terminal | |
CN115113752A (en) | Screen control method and device, electronic equipment and storage medium | |
CN112511693B (en) | Screen turning method and device | |
CN111651114A (en) | Screen control method and device and storage medium | |
CN112019677B (en) | Electronic equipment control method and device | |
CN113739912B (en) | Optical signal detection module and light intensity detection method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |