Distance detection method and device, electronic device and storage medium
By detecting the posture of the electronic device and the type of the target screen, the startup time and detection duration of the distance sensor are optimized, which solves the problem of accidental touches in multi-display devices and improves detection accuracy and user experience.
Patent Information
- Application Number
- CN202010453441.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-26
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2040-05-26
AI Technical Summary
In electronic devices with multiple displays, how to effectively configure distance sensors to reduce accidental touches caused by the user's face and other parts approaching the display in different postures.
By detecting the device posture of the electronic device, the target screen in the interactive state is determined, and based on the type of the target screen and the relative position between the distance sensor and the target screen, the startup time and detection duration of the distance sensor are determined to optimize the use of the distance sensor , to reduce accidental touches.
It is possible to select the appropriate distance sensor for distance detection under different device postures and control whether the target screen is turned off, thereby reducing accidental touches, reducing device power consumption and improving user experience.
Smart Images

Figure CN113721825B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of electronic technology, and in particular to a distance detection method and device, an electronic device, and a storage medium. Background Art
[0002] With the development of electronic technology, full screens have been increasingly applied to electronic products such as mobile phones. In order to adapt to the application of full screens, distance sensors, light sensors, image acquisition devices, etc. are set inside the display screen to realize signal acquisition and other functions in the gaps between display pixels. For electronic devices with transformable postures such as folding screens, they may also have multiple display screens, so that the electronic devices have a variety of different usage scenarios. Therefore, how to configure the use of distance sensors is one of the urgent problems to be solved for electronic devices with multiple display screens. Summary of the invention
[0003] The present disclosure provides a distance detection method and device, an electronic device and a storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a distance detection method is provided, which is applied to an electronic device having multiple display screens, including:
[0005] Detecting a device posture of the electronic device;
[0006] According to the device posture, determining a target screen in an interactive state from the multiple display screens;
[0007] Activate a distance sensor facing the same direction as the target screen;
[0008] The distance sensor is activated to detect the distance of the detection object relative to the electronic device.
[0009] In some embodiments, the method further comprises:
[0010] Determining the type of the target screen;
[0011] Determining a start time of starting the distance sensor according to the type of the target screen and the relative position between the distance sensor and the target screen;
[0012] The starting of the distance sensor facing the same direction as the target screen includes:
[0013] At the start-up time, the distance sensor is started.
[0014] In some embodiments, determining the activation time of activating the distance sensor according to the type of the target screen and the relative position between the distance sensor and the target screen includes:
[0015] If the target screen is an OLED (Organic Light-Emitting Diode) screen, then determining the delay time of the distance sensor relative to the refresh start time of the OLED display screen according to the position of the distance sensor under the target screen;
[0016] The start time is determined according to the refresh start time of the target screen and the delay time.
[0017] In some embodiments, determining the activation time of activating the distance sensor according to the type of the target screen and the relative position between the distance sensor and the target screen includes:
[0018] If the target screen is an OLED screen, at least one detection frame is displayed within each preset time period of the target screen; wherein, when the detection frame is displayed, the display pixel of the target screen corresponding to the position of the distance sensor is turned off;
[0019] The start time is determined according to the time when the detection frame starts to be displayed.
[0020] In some embodiments, determining the activation time of activating the distance sensor according to the type of the target screen and the relative position between the distance sensor and the target screen includes:
[0021] If the target screen is a liquid crystal display screen, and the distance sensor is located outside the display area of the target screen, the preset start-up time is determined as the start-up time.
[0022] In some embodiments, the method further comprises:
[0023] Determining the duration of the distance detection according to the refresh cycle of the target screen;
[0024] Determine the number of pulses according to the duration and the pulse transmission frequency of the distance sensor;
[0025] The detecting of the distance of the detection object relative to the electronic device by starting the distance sensor includes:
[0026] By starting the distance sensor, the detection pulses of the number of pulses are emitted;
[0027] The distance between the detection object and the electronic device is determined according to the reflected pulse obtained by reflecting the received detection pulse.
[0028] In some embodiments, at least one display screen of the electronic device is a bendable flexible screen; the flexible screen is located in at least two relatively movable parts of the electronic device;
[0029] The method further comprises:
[0030] The device posture of the electronic device is determined according to the relative positions of the at least two relatively movable parts.
[0031] In some embodiments, the step of activating a distance sensor that faces the same direction as the target screen includes:
[0032] When the electronic device is in a call state, a distance sensor facing the same direction as the target screen is activated.
[0033] According to a second aspect of an embodiment of the present disclosure, there is provided a distance detection device, which is applied to an electronic device having multiple display screens, including:
[0034] A detection module, used to detect the device posture of the electronic device;
[0035] A first determining module, configured to determine a target screen in an interactive state from the plurality of display screens according to the device posture;
[0036] A starting module, used for starting a distance sensor facing the same direction as the target screen;
[0037] The detection module is used to detect the distance between the detection object and the electronic device by starting the distance sensor.
[0038] In some embodiments, the apparatus further comprises:
[0039] A second determining module, used to determine the type of the target screen;
[0040] A third determining module, configured to determine a start time of starting the distance sensor according to the type of the target screen and the relative position between the distance sensor and the target screen;
[0041] The startup module is specifically used for:
[0042] At the start-up time, the distance sensor is started.
[0043] In some embodiments, the third determination module includes:
[0044] The first determination submodule is used to determine the delay time of the distance sensor relative to the refresh start time of the OLED display screen according to the position of the distance sensor under the target screen if the target screen is an OLED screen;
[0045] The second determination submodule is used to determine the start time according to the refresh start time of the target screen and the delay time.
[0046] In some embodiments, the third determination module includes:
[0047] The third determination submodule is used to display at least one detection frame within each preset time period of the target screen if the target screen is an OLED screen; wherein, when the detection frame is displayed, the display pixel of the target screen corresponding to the position of the distance sensor is turned off;
[0048] The fourth determination submodule is used to determine the start time according to the time when the detection frame starts to be displayed.
[0049] In some embodiments, the third determination module includes:
[0050] The fifth determining submodule is configured to determine a preset start-up time as the start-up time if the target screen is a liquid crystal display screen and the distance sensor is located outside the display area of the target screen.
[0051] In some embodiments, the apparatus further comprises:
[0052] A fourth determination module, used to determine the duration of the distance detection according to the refresh cycle of the target screen;
[0053] A fifth determination module, used to determine the number of pulses according to the duration and the pulse transmission frequency of the distance sensor;
[0054] The detection module comprises:
[0055] A transmitting submodule, used for transmitting detection pulses of the number of pulses by starting the distance sensor;
[0056] The sixth determination submodule is used to determine the distance between the detection object and the electronic device according to the reflected pulse obtained by reflecting the received detection pulse.
[0057] In some embodiments, at least one display screen of the electronic device is a bendable flexible screen; the flexible screen is located in at least two relatively movable parts of the electronic device;
[0058] The device also includes:
[0059] The sixth determination module is used to start determining the device posture of the electronic device according to the relative positions of the at least two relatively movable parts.
[0060] In some embodiments, the startup module is specifically used to:
[0061] When the electronic device is in a call state, a distance sensor facing the same direction as the target screen is activated.
[0062] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising at least: a processor and a memory for storing executable instructions that can be run on the processor, wherein:
[0063] When the processor is used to run the executable instructions, the executable instructions execute the steps in any one of the above-mentioned distance detection methods.
[0064] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps in any one of the above-mentioned distance detection methods are implemented.
[0065] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: through the technical solution of the present disclosure, when an electronic device with multiple display screens has different device postures, it is possible to select a suitable distance sensor for distance detection, and further control whether the target screen is turned off, thereby reducing the situation of false touches caused by the user's face and other parts approaching the display screen in different postures.
[0066] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0068] Figure 1 A flow chart of a distance detection method according to an exemplary embodiment is shown as follows Figure 1 ;
[0069] Figure 2 A flow chart of a distance detection method according to an exemplary embodiment is shown as follows Figure 2 ;
[0070] Figure 3A is a flowchart 3 showing a distance detection method according to an exemplary embodiment;
[0071] Figure 3B A flow chart of a distance detection method according to an exemplary embodiment is shown as follows Figure 4 ;
[0072] Figure 3C A flow chart of a distance detection method according to an exemplary embodiment is shown as follows Figure 5 ;
[0073] Figure 4 is a schematic diagram showing module connection in an electronic device according to an exemplary embodiment;
[0074] Figure 5 is a structural block diagram of a distance detection device according to an exemplary embodiment;
[0075] Figure 6 It is a block diagram of a physical structure of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0076] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0077] Figure 1 is a flow chart of a distance detection method according to an exemplary embodiment, the method is applied to an electronic device with multiple display screens, such as Figure 1 As shown, the following steps are included:
[0078] Step S101, detecting the device posture of the electronic device;
[0079] Step S102: determining a target screen in an interactive state from multiple display screens according to the device posture;
[0080] Step S103, start the distance sensor facing the same direction as the target screen;
[0081] Step S104: Detect the distance between the detection object and the electronic device by using the activated distance sensor.
[0082] In the disclosed embodiment, the distance sensor is used to detect whether an object outside the display screen blocks the display screen. When the distance between the object and the distance sensor is less than a preset threshold, it is determined that there is an obstructing object. The distance sensor can detect the distance by means of the signal energy loss or time difference of the emitted light signal and the reflected signal. The detection signal emitted by the distance sensor may include: an infrared signal. The power of the infrared signal may be a pulse signal with a certain duty cycle (D), a certain frequency and a certain driving current generated by pulse width modulation (PWM). For example, the infrared signal emitted by the distance sensor may be an infrared light signal with a wavelength in the range of 850 nanometers to 1300 nanometers. Specifically, the wavelength of the infrared light signal may be 940nm.
[0083] In the disclosed embodiments, the electronic device may be an electronic device having a variable device posture composed of a plurality of relatively movable parts, for example, an electronic device having posture changes such as folding, opening and closing, bending or curling. The electronic device may have different device postures in different working states. In different device postures, the user may use different display screens, and the display screen that is in an interactive state is generally facing the user. In addition, multiple screens of the electronic device need to be provided with corresponding distance sensors, so that no matter which screen the user uses, when the screen is close to the face or other positions, the distance sensor can sense the approach of an object, thereby turning off the display screen and reducing the possibility of accidental touches.
[0084] Therefore, here, according to the device posture of the electronic device, the target screen in the interactive state among the multiple display screens is determined. Then the distance sensor corresponding to the target screen is started for detection. The detection surface of the distance sensor corresponding to the target screen is oriented in the same direction as the display surface of the target screen. In this way, by starting the target sensor, objects approaching the target screen can be detected accordingly, thereby reducing false touches. At the same time, there is no need to start the distance sensors corresponding to other display screens, thereby reducing unnecessary detection and reducing device power consumption.
[0085] In some embodiments, Figure 2 As shown, the method also includes:
[0086] Step S201, determining the type of the target screen;
[0087] Step S202: determining a start time of starting the distance sensor according to the type of the target screen and the relative position between the distance sensor and the target screen;
[0088] In the above step S103, starting the distance sensor facing the same direction as the target screen includes:
[0089] Step S203: At the start time, start the distance sensor.
[0090] Since the electronic device has multiple display screens, and the multiple display screens may be of different types, such as OLED display screens, LCD (Liquid Crystal Display), etc. For different display screens, the placement position of the distance sensor may be different. For example, the LCD display screen has a backlight module, so the distance sensor cannot be placed under the screen, but is set in the non-display area at the edge of the display screen; while the OLED display screen can place the distance sensor within the pixel area under the display screen.
[0091] For the distance sensor placed under the display screen, if the distance sensor is turned on and detected while the display screen is turned on, the detection pulse emitted by the distance sensor may produce a photoelectric effect on the pixel unit, stimulating the bright spot of the pixel, thereby generating a bright spot in the area where the distance sensor is located on the display screen. For LCD display screens, the distance sensor needs to be set in the non-display area of the display screen.
[0092] Therefore, the time to start the distance sensor for detection is determined according to the type of display screen and the relative position of the distance sensor and the display screen, so as to minimize the impact of the distance sensor detection on the display screen and ensure the effectiveness of the detection.
[0093] In some embodiments, Figure 3A As shown, in the above step S202, according to the type of the target screen and the relative position between the distance sensor and the target screen, determining the start time of starting the distance sensor includes:
[0094] Step S11: If the target screen is an OLED screen, determine the delay time of the distance sensor relative to the refresh start time of the OLED display screen according to the position of the distance sensor under the target screen;
[0095] Step S12: Determine the start time according to the refresh start time and delay duration of the target screen.
[0096] In the disclosed embodiment, the distance sensor is disposed under the OLED screen. When the distance sensor performs detection, the emitted infrared signal pulse will pass through the pixel unit of the display screen to the surface of the display screen, and after being reflected by an obstacle, it will return to the distance sensor through the display screen.
[0097] In a display screen, by controlling a transistor with a PN junction such as a MOS (Metal Oxide Semiconductor) tube in the display screen, the display of a pixel unit electrically connected to the transistor is controlled, so that a pixel array including multiple pixel units displays a corresponding image.
[0098] When the distance sensor is set under the display screen, the infrared signal for distance measurement emitted by the distance sensor will pass through the display screen. When the infrared signal emitted by the distance sensor irradiates the MOS tube in the off state, the photons in the infrared signal will collide with the electrons and other carriers in the MOS tube, causing the electrons to transition, and the MOS tube in the off state will be mistakenly turned on, causing the pixel unit connected to the mistakenly turned on MOS tube to emit light, interfering with the display of the pixel unit irradiated by the infrared signal, affecting the display effect. For example, it will stimulate the display screen to show bright spots.
[0099] In some embodiments, the delay duration is determined according to the position of the distance sensor under the target display screen, including: determining the start time of the pixel row corresponding to the position of the distance sensor to be turned off according to the refresh frequency of the target display screen and the number of rows of display pixels; wherein the period of time when the pixel row is turned off is used to clear the display data of the previous frame of the pixel row; and determining the delay duration according to the time difference between the start time of the pixel row being turned off and the time when a frame of the target display screen starts to be refreshed.
[0100] When the display array is displaying, each pixel unit has a light-emitting period and a display time slot. Exemplarily, a pixel unit in a light-emitting period generates a light signal according to a driving signal, and a pixel unit in a display time slot suspends generating a light signal. It is understandable that the display time slot is located between two adjacent light-emitting periods of a pixel unit. In the process of refreshing pixels on the display screen, the display data of the pixel row in the previous frame is cleared row by row in the display time slot, and a clear signal is transmitted to the pixel unit. Due to the phenomenon of visual persistence, in the display time slot between two adjacent light-emitting periods, the visual effect of the light signal generated by the pixel unit in the previous light-emitting period on the retina of the human eye will still remain in the human brain in the display time slot, that is, the user believes that the pixel unit is still displaying in the display time slot.
[0101] It can be understood that the projection of the distance sensor on the plane where the display screen is located overlaps with the plane where the display screen is located, and the overlapping area is the area covered by the projection of the distance sensor in the plane where the display array is located. The pixel units in the overlapping area are the pixel units that may be excited to produce bright spots. In practical applications, when the distance sensor emits a detection signal, a conical emission area can be formed. The area in the display array covered by the conical emission area can be regarded as the above-mentioned overlapping area.
[0102] Therefore, the above distance detection can be performed during the period when the distance sensor is turned off in the above overlapping area of the display screen. Since the reset signal is transmitted to the pixel unit during this period, that is, during the display time slot, even if the infrared signal pulse of the distance sensor excites the MOS tube to turn on, no electrical signal will be turned on to charge the pixel unit, so no bright spot will be generated.
[0103] In the disclosed embodiment, the pixel units in the overlapping area can be determined according to the relative position of the distance sensor and the display screen, and then the delay time can be determined according to the time when the pixel units in the area enter the display time slot in each refresh cycle, that is, the time when the period of clearing the pixel units starts. For example, the distance sensor is located at the position of the pixel units in the 100th row of the display screen, so the delay time should be the time to enter the display time slot of the 100th row after the display period and display time slot of the 1st to 99th rows end.
[0104] Since the position of the distance sensor is set differently for different display screens, when different display screens of the electronic device are used as the target screen, it is necessary to determine the position of the distance sensor corresponding to the target screen, and determine the delay time according to the position, and then determine the start time of the distance sensor.
[0105] In this way, the accuracy of the determined detection signal emission time can be improved, and the interference with the display effect of the display screen can be reduced.
[0106] In some embodiments, Figure 3B As shown, in the above step S202, determining the start time of starting the distance sensor according to the type of the target screen and the relative position between the distance sensor and the target screen includes:
[0107] Step S21: If the target screen is an OLED screen, at least one detection frame is displayed within each preset time period of the target screen; wherein, when the detection frame is displayed, the pixel unit of the target screen corresponding to the position of the distance sensor is turned off;
[0108] Step S22: Determine the start time according to the time when the detection frame starts to be displayed.
[0109] During the display process, the screen refreshes dozens or even hundreds of times per second. For example, a 60Hz screen refreshes 60 frames per second. Since the screen actually displays the image, it does not change quickly, so most of the 60 frames in one second are the same. When the image changes, the human eye cannot perceive the switching process due to the extremely fast switching speed, but instead perceives the smooth dynamic changes of the screen image.
[0110] Therefore, in the embodiment of the present disclosure, a detection frame can be displayed in each period of time. The detection frame can be a black screen frame, or the pixel unit where the distance sensor is located can be displayed as black under the original screen. In this way, during the entire display period of the detection frame, in the overlapping area of the pixel unit corresponding to the distance sensor, the data signal of the pixel unit is a cleared signal. Even if the distance sensor stimulates the MOS tube to turn on, there will be no signal to charge the pixel unit, so no bright spot will be generated. In addition, since the detection frame time is very short, it cannot be perceived by the human eye, so it will not affect the display effect of the picture.
[0111] In practical applications, one detection frame may be displayed within each preset time period, such as every second or every two seconds; two adjacent detection frames may also be displayed within each preset time period to increase the time for distance detection; of course, two or more non-adjacent detection frames may also be displayed to increase the frequency of detection.
[0112] In some embodiments, Figure 3C As shown, in the above step S202, determining the start time of starting the distance sensor according to the type of the target screen and the relative position between the distance sensor and the target screen includes:
[0113] Step S31: If the target screen is a liquid crystal display screen and the distance sensor is located outside the display area of the target screen, the preset start time is determined as the start time.
[0114] Since LCD has a backlight module, and the bottom layer of the backlight module is opaque, the distance sensor cannot be set under the display screen. Therefore, the distance sensor corresponding to the LCD screen can be set in the narrow slit of the display screen frame, or it can be set on the frame of the electronic device outside the display screen. In other words, the distance sensor is set outside the display area of the display screen, so it will not interfere with the image display of the display screen.
[0115] Therefore, any time can be set as the preset start time in advance, and the distance sensor can be started for detection at the preset start time. For example, it can be set that when the LCD screen is determined to be the target screen, the corresponding distance sensor is immediately started, and the detection is continued until the target screen is switched to another screen. For another example, it is set that during the display of the LCD screen, the distance sensor is started for detection at the beginning of each refresh cycle, that is, when the screen receives the frame synchronization signal.
[0116] In practical applications, it can be set according to actual needs and there is no restriction here.
[0117] In some embodiments, the method further comprises:
[0118] Determine the duration of distance detection based on the refresh cycle of the target screen;
[0119] Determine the number of pulses according to the duration and the pulse emission frequency of the distance sensor;
[0120] The above-mentioned distance detection of the detection object relative to the electronic device by the activated distance sensor includes:
[0121] By starting the distance sensor, a detection pulse of the number of pulses is emitted;
[0122] The distance between the detection object and the electronic device is determined according to the reflected pulse obtained by reflecting the received detection pulse.
[0123] For OLED displays, the duration of the distance sensor's distance detection can be determined based on the refresh cycle. Distance detection needs to be performed when the pixel units of the display are off, so the duration of the detection can be calculated based on the refresh cycle.
[0124] In the above embodiment, by determining the delay time, the detection is performed in the display time slot when the pixel unit clears the data. Then, the display occupied by each row of pixel units and the display time slot duration can be calculated according to the refresh cycle of the display screen, and then the duration of the distance sensor can be determined. In the above embodiment, by inserting the detection frame, the distance sensor can perform detection in the entire refresh cycle of the detection frame. Therefore, the duration of the entire refresh cycle can be determined as the duration of the detection.
[0125] During the duration of the distance detection, the distance sensor can emit infrared signal pulses for detection at a predetermined frequency and receive reflected infrared signal pulses at the same time. Based on the duration and the fixed pulse emission frequency of the distance sensor, the number of pulses that can be emitted during the duration can be determined. After the distance sensor is started, it emits detection pulses of the number of pulses and then stops emitting pulses, so as not to affect the continued display of subsequent pixel units.
[0126] In some embodiments, at least one display screen of the electronic device is a bendable flexible screen; the flexible screen is located in at least two relatively movable parts of the electronic device;
[0127] The method further includes:
[0128] The device posture of the electronic device is determined according to the relative positions of at least two relatively movable parts.
[0129] An electronic device with a foldable screen may have at least two parts that can move relative to each other, each carrying a display screen on one side, and the connection is foldable. Therefore, an electronic device with a foldable screen can have different usage postures, for example, unfolding the foldable screen so that the two parts of the electronic device are in a 180-degree state; closing the screen so that the two parts of the electronic device overlap; and opening the foldable screen to a certain angle, etc.
[0130] In addition to the above-mentioned flexible screen, the electronic device may also have other display screens located on other surfaces of the electronic device. Different display screens can be used for display and interaction in different device postures. For example, when the electronic device is in a folded state, the surface of the foldable screen is folded inside the electronic device and is not exposed, so the secondary display screen on the other side of the electronic device can be used at this time. The secondary display screen can be a flexible screen or a rigid display screen.
[0131] The device attitude of the electronic device can be determined by using magnetic or electrical sensors in the electronic device. For example, a gyroscope and a gravity sensor are respectively provided in two relatively movable parts of the electronic device, so that the angle relationship between the two parts and the ground can be sensed. The relative position relationship between the two parts can be calculated through the data of the two sets of sensors, and then the device attitude of the electronic device can be determined.
[0132] In some embodiments, the above-mentioned starting the distance sensor with the same direction as the target screen includes:
[0133] When the electronic device is in a call state, a distance sensor facing the same direction as the target screen is activated.
[0134] During the use of electronic devices, the user's face is usually at a certain distance from the display screen, and the user faces the display screen and views the displayed content. However, when the user uses the electronic device to make a call, the electronic device is placed next to the ear, and the display screen may contact the facial skin, making it easier to cause accidental touches. Here, the call status includes but is not limited to: telephone voice calls and network voice calls such as instant messaging software.
[0135] Therefore, in the disclosed embodiment, when the electronic device is in a call state, the method in the above embodiment can be used to determine the target screen and start the distance sensor corresponding to the target screen. In the non-call state, no detection is required, which saves power consumption and further reduces the impact of the detection on the display screen, thereby improving the user experience.
[0136] The present disclosure also provides the following examples:
[0137] Electronic devices such as mobile phones with foldable screens usually also have a secondary screen arranged on the back of the foldable screen. A distance sensor is arranged under the foldable screen, and a distance sensor is also arranged on the forehead outside the display screen of the secondary screen. Different distance sensors have different communication addresses and can be connected to the processor (AP) of the electronic device through the same communication circuit or different communication circuits, and connected to the display screen on the same surface at the same time. Figure 4 As shown, the display screen 41, the distance sensor 42 and the processor 43 are connected respectively, so that the processor can control the distance sensor to start and perform detection according to the display state of the display screen.
[0138] Different device postures of electronic devices can be determined based on electrical or magnetic sensors, such as gyroscopes, gravity sensors, and Hall sensors. The target screen in the interactive state can be determined based on the device posture, and then the distance sensor corresponding to the target screen can be called to detect the distance. After the device posture information detected by these sensors is transmitted to the processor, the processor determines the target screen for interaction and displays it. At the same time, the distance sensor corresponding to the display screen is determined to be started and detected.
[0139] If the activated distance sensor is located under the display screen, it will stimulate the pixel units of the display screen to produce bright spots during the display process. Therefore, during the display process, the frame synchronization signal of each frame is delayed to the time period when the pixel unit where the distance sensor is located clears data, and the distance sensor is activated and detected, thereby reducing the generation of bright spots.
[0140] Starting from the moment t0 when the frame synchronization signal is received, the delay is t2, and then the time t1 of a single pulse is determined according to the emission frequency f of the detection pulse emitted by the distance sensor. Then, according to the clearing time t of the pixel, the number of pulses sent n=t / t1 pulses can be determined.
[0141] When the posture sensor of the electronic device detects that the electronic device is in a folded state, the distance sensor corresponding to the folding screen is turned off, the display of the secondary display screen is activated, and the distance sensor corresponding to the secondary display screen is activated at the same time. When the posture sensor detects that the electronic device is in an unfolded state, for example, the unfolding angle of the folding screen is greater than 120 degrees, it is considered to be in an unfolded state. At this time, the display of the secondary display screen is turned off, the distance sensor corresponding to the secondary display screen is turned off, and the distance sensor corresponding to the folding screen is activated.
[0142] Since the distance sensors corresponding to different display screens are set at different locations, and the resolution and refresh rate of the display screens themselves are different, the corresponding delay time is also different, and the number of pulses n sent is also different. Therefore, when different distance sensors are called according to different device postures, detection can be performed according to the different detection times of different distance sensors.
[0143] In addition to the above delay method, blank black frames can also be inserted for the distance sensor to detect. For example, when the refresh rate of the display screen is high, such as 240Hz, several blank black frames can be inserted per second. The distance sensor can detect during the time when the black frames are displayed.
[0144] If the secondary display screen is a liquid crystal display screen, the distance sensor can be arranged outside the display area of the display screen, so that there is no need to consider the problem of bright spots and detection can be performed at any time.
[0145] The distance sensor can be used for detection during a telephone call or an Internet call using an Internet communication application such as WeChat or QQ.
[0146] Through the method in the embodiment of the present disclosure, when the electronic device is in various device postures, a suitable distance sensor can be called. In addition, according to the relative position relationship between the distance sensor and the display screen, the start time of the distance sensor is also set, so that when the display screen displays the picture normally, it can accurately detect whether there is an object approaching the display screen, so that when there is an approaching object, the display screen can be turned off to reduce the occurrence of false touches.
[0147] Figure 5 is a block diagram of a distance detection device according to an exemplary embodiment. Figure 5 , the device is applied to an electronic device having multiple display screens, including:
[0148] A detection module 510, configured to detect the device posture of the electronic device;
[0149] A first determining module 520, configured to determine a target screen in an interactive state from the plurality of display screens according to the device posture;
[0150] A starting module 530, used to start a distance sensor facing the same direction as the target screen;
[0151] The detection module 540 is used to detect the distance between the detection object and the electronic device by starting the distance sensor.
[0152] In some embodiments, the apparatus further comprises:
[0153] A second determining module, used to determine the type of the target screen;
[0154] A third determining module, configured to determine a start time of starting the distance sensor according to the type of the target screen and the relative position between the distance sensor and the target screen;
[0155] The startup module is specifically used for:
[0156] At the start-up time, the distance sensor is started.
[0157] In some embodiments, the third determination module includes:
[0158] The first determination submodule is used to determine the delay time of the distance sensor relative to the refresh start time of the OLED display screen according to the position of the distance sensor under the target screen if the target screen is an OLED screen;
[0159] The second determination submodule is used to determine the start time according to the refresh start time of the target screen and the delay time.
[0160] In some embodiments, the third determination module includes:
[0161] The third determination submodule is used to display at least one detection frame within each preset time period of the target screen if the target screen is an OLED screen; wherein, when the detection frame is displayed, the pixel unit of the target screen corresponding to the position of the distance sensor is turned off;
[0162] The fourth determination submodule is used to determine the start time according to the time when the detection frame starts to be displayed.
[0163] In some embodiments, the third determination module includes:
[0164] The fifth determining submodule is configured to determine a preset start-up time as the start-up time if the target screen is a liquid crystal display screen and the distance sensor is located outside the display area of the target screen.
[0165] In some embodiments, the apparatus further comprises:
[0166] A fourth determination module, used to determine the duration of the distance detection according to the refresh cycle of the target screen;
[0167] A fifth determination module, used to determine the number of pulses according to the duration and the pulse transmission frequency of the distance sensor;
[0168] The detection module comprises:
[0169] A transmitting submodule, used for transmitting detection pulses of the number of pulses by starting the distance sensor;
[0170] The sixth determination submodule is used to determine the distance between the detection object and the electronic device according to the reflected pulse obtained by reflecting the received detection pulse.
[0171] In some embodiments, at least one display screen of the electronic device is a bendable flexible screen; the flexible screen is located in at least two relatively movable parts of the electronic device;
[0172] The device also includes:
[0173] The sixth determination module is used to start determining the device posture of the electronic device according to the relative positions of the at least two relatively movable parts.
[0174] In some embodiments, the startup module is specifically used to:
[0175] When the electronic device is in a call state, a distance sensor facing the same direction as the target screen is activated.
[0176] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0177] Figure 6 1 is a block diagram of a physical structure of an electronic device 600 according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0178] Reference Figure 6 , the electronic device 600 may include one or more of the following components: a processing component 601 , a memory 602 , a power component 603 , a multimedia component 604 , an audio component 605 , an input / output (I / O) interface 606 , a sensor component 607 , and a communication component 608 .
[0179] The processing component 601 generally controls the overall operation of the electronic device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 601 may include one or more processors 610 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 601 may also include one or more modules to facilitate the interaction between the processing component 601 and other components. For example, the processing component 601 may include a multimedia module to facilitate the interaction between the multimedia component 604 and the processing component 601.
[0180] The memory 610 is configured to store various types of data to support operations on the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 602 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk, or an optical disk.
[0181] The power supply component 603 provides power to various components of the electronic device 600. The power supply component 603 may include: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 600.
[0182] The multimedia component 604 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 604 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and / or the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0183] The audio component 605 is configured to output and / or input audio signals. For example, the audio component 605 includes a microphone (MIC), and when the electronic device 600 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 610 or sent via the communication component 608. In some embodiments, the audio component 605 also includes a speaker for outputting audio signals.
[0184] I / O interface 606 provides an interface between processing component 601 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0185] The sensor assembly 607 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor assembly 607 can detect the open / closed state of the electronic device 600, the relative positioning of the components, such as the display and keypad of the electronic device 600, and the sensor assembly 607 can also detect the position change of the electronic device 600 or a component of the electronic device 600, the presence or absence of contact between the user and the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and the temperature change of the electronic device 600. The sensor assembly 607 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 607 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 607 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0186] The communication component 608 is configured to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic device 600 can 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 608 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 608 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology or other technologies.
[0187] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0188] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 602 including instructions, and the instructions can be executed by a processor 610 of an electronic device 600 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0189] 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 execute any one of the methods provided in the above embodiments.
[0190] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0191] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A distance detection method, characterized in that: Applicable to electronic devices with multiple displays, including: Detecting a device posture of the electronic device; According to the device posture, determining a target screen in an interactive state from the multiple display screens; Activate a distance sensor facing the same direction as the target screen; Detecting the distance of the detection object relative to the electronic device by starting the distance sensor; The method further comprises: Determining the type of the target screen; Determining a start time of starting the distance sensor according to the type of the target screen and the relative position between the distance sensor and the target screen; The starting of the distance sensor facing the same direction as the target screen includes: At the start-up time, start the distance sensor; Wherein, the electronic device has at least two relatively movable parts, and the at least two relatively movable parts respectively carry the display screens; The method further comprises: The device posture of the electronic device is determined according to the relative positions of the at least two relatively movable parts.
2. The method according to claim 1, characterized in that Determining the activation time of the distance sensor according to the type of the target screen and the relative position between the distance sensor and the target screen includes: If the target screen is an OLED screen, determining the delay time of the distance sensor relative to the refresh start time of the OLED display screen according to the position of the distance sensor under the target screen; The start time is determined according to the refresh start time of the target screen and the delay time.
3. The method according to claim 1, characterized in that Determining the activation time of the distance sensor according to the type of the target screen and the relative position between the distance sensor and the target screen includes: If the target screen is an OLED screen, at least one detection frame is displayed within each preset time period of the target screen; wherein, when the detection frame is displayed, the display pixel of the target screen corresponding to the position of the distance sensor is turned off; The start time is determined according to the time when the detection frame starts to be displayed.
4. The method according to claim 1, characterized in that: Determining the activation time of the distance sensor according to the type of the target screen and the relative position between the distance sensor and the target screen includes: If the target screen is a liquid crystal display screen, and the distance sensor is located outside the display area of the target screen, the preset start-up time is determined as the start-up time.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Determining the duration of the distance detection according to the refresh cycle of the target screen; Determine the number of pulses according to the duration and the pulse transmission frequency of the distance sensor; The detecting of the distance between the detection object and the electronic device by starting the distance sensor includes: By starting the distance sensor, the detection pulses of the number of pulses are emitted; The distance between the detection object and the electronic device is determined according to the reflected pulse obtained by reflecting the received detection pulse.
6. The method according to any one of claims 1 to 4, characterized in that: At least one display screen of the electronic device is a bendable flexible screen; the flexible screen is located in the at least two relatively movable parts.
7. The method according to any one of claims 1 to 4, characterized in that: The starting of the distance sensor facing the same direction as the target screen includes: When the electronic device is in a call state, a distance sensor facing the same direction as the target screen is activated.
8. A distance detection device, characterized in that: Applicable to electronic devices with multiple displays, including: A detection module, used to detect the device posture of the electronic device; A first determining module, configured to determine a target screen in an interactive state from the plurality of display screens according to the device posture; A starting module, used for starting a distance sensor facing the same direction as the target screen; A detection module, configured to detect the distance of a detection object relative to the electronic device by starting the distance sensor; The device also includes: A second determining module, used to determine the type of the target screen; A third determining module, configured to determine a start time of starting the distance sensor according to the type of the target screen and the relative position between the distance sensor and the target screen; The startup module is specifically used for: At the start-up time, start the distance sensor; The electronic device has at least two relatively movable parts, and at least the two relatively movable parts respectively carry the display screens; the device further includes: The sixth determination module is used to determine the device posture of the electronic device according to the relative positions of the at least two relatively movable parts.
9. The device according to claim 8, characterized in that The third determining module comprises: The first determination submodule is used to determine the delay time of the distance sensor relative to the refresh start time of the OLED display screen according to the position of the distance sensor under the target screen if the target screen is an OLED screen; The second determination submodule is used to determine the start time according to the refresh start time of the target screen and the delay time.
10. The device according to claim 8, characterized in that The third determining module comprises: The third determination submodule is configured to display at least one detection frame within each preset time period of the target screen if the target screen is an OLED screen; wherein, when the detection frame is displayed, the display pixel of the target screen corresponding to the position of the distance sensor is turned off; The fourth determination submodule is used to determine the start time according to the time when the detection frame starts to be displayed.
11. The device according to claim 8, characterized in that The third determining module comprises: The fifth determining submodule is configured to determine a preset start-up time as the start-up time if the target screen is a liquid crystal display screen and the distance sensor is located outside the display area of the target screen.
12. The device according to any one of claims 8 to 11, characterized in that The device also includes: A fourth determination module, used to determine the duration of the distance detection according to the refresh cycle of the target screen; A fifth determination module, used to determine the number of pulses according to the duration and the pulse transmission frequency of the distance sensor; The detection module comprises: A transmitting submodule, used for transmitting detection pulses of the number of pulses by starting the distance sensor; The sixth determination submodule is used to determine the distance between the detection object and the electronic device according to the reflected pulse obtained by reflecting the received detection pulse.
13. The device according to any one of claims 8 to 11, characterized in that At least one display screen of the electronic device is a bendable flexible screen; the flexible screen is located in the at least two relatively movable parts.
14. The device according to any one of claims 8 to 11, characterized in that The startup module is specifically used for: When the electronic device is in a call state, a distance sensor facing the same direction as the target screen is activated.
15. An electronic device, characterized in that: At least comprising: a processor and a memory for storing executable instructions that can be run on the processor, wherein: When the processor is used to run the executable instructions, the executable instructions execute the steps in the distance detection method provided in any one of claims 1 to 7 above.
16. A non-transitory computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the steps of the distance detection method provided in any one of claims 1 to 7.
