Distance detection method and device, electronic equipment and storage medium

文档序号:1904096 发布日期:2021-11-30 浏览:6次 中文

阅读说明:本技术 距离检测方法及装置、电子设备及存储介质 (Distance detection method and device, electronic equipment and storage medium ) 是由 陈朝喜 于 2020-05-26 设计创作,主要内容包括:本公开是关于一种距离检测方法及装置、电子设备和存储介质。该方法应用于具有多个显示屏的电子设备,包括:检测所述电子设备的设备姿态;根据所述设备姿态,从多个所述显示屏中确定出处于交互状态的目标屏;启动与所述目标屏朝向相同的距离传感器;通过启动的所述距离传感器,进行检测对象相对于所述电子设备的距离检测。通过本公开实施例的方法,通过确定电子设备的设备姿态,来确定目标屏,并启动相应的距离传感器进行检测。如此,在具有多显示屏的电子设备具有不同设备姿态的情况下,都能够选择合适的距离传感器进行距离检测,并进一步控制目标屏是否熄灭,从而减少由于不同姿态下用户脸部等部位接近显示屏造成误触的情况。(The disclosure relates to a distance detection method and apparatus, an electronic device, and a storage medium. The method is applied to the electronic equipment with a plurality of display screens, and comprises the following steps: detecting a device pose of the electronic device; according to the equipment posture, determining a target screen in an interactive state from the plurality of display screens; starting a distance sensor with the same orientation as the target screen; and detecting the distance of the detection object relative to the electronic equipment by the activated distance sensor. By the method of the embodiment of the disclosure, the target screen is determined by determining the equipment posture of the electronic equipment, and the corresponding distance sensor is started to detect. Therefore, under the condition that the electronic equipment with the multiple display screens has different equipment postures, the appropriate distance sensor can be selected to carry out distance detection, and whether the target screen is extinguished or not is further controlled, so that the situation that the face and other parts of a user approach the display screens to cause mistaken touch under different postures is reduced.)

1. A distance detection method is applied to electronic equipment with a plurality of display screens, and comprises the following steps:

detecting a device pose of the electronic device;

according to the equipment posture, determining a target screen in an interactive state from the plurality of display screens;

starting a distance sensor with the same orientation as the target screen;

and detecting the distance of the detection object relative to the electronic equipment by the activated distance sensor.

2. The method of claim 1, further comprising:

determining the type of the target screen;

determining starting time for 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 activating a distance sensor oriented the same as the target screen, comprising:

and starting the distance sensor at the starting moment.

3. The method of claim 2, wherein determining the activation time for activating the distance sensor based on the type of the target screen and the relative position between the distance sensor and the target screen comprises:

if the target screen is an OLED screen, determining the delay time of the distance sensor relative to the refreshing starting moment of the OLED display screen according to the position of the distance sensor under the target screen;

and determining the starting time according to the refreshing starting time and the delay time of the target screen.

4. The method of claim 2, wherein determining the activation time for activating the distance sensor based on the type of the target screen and the relative position between the distance sensor and the target screen comprises:

if the target screen is an OLED screen, displaying at least one detection frame in each preset time length of the target screen; when the detection frame is displayed, the display pixel of the target screen corresponding to the position of the distance sensor is turned off;

and determining the starting time according to the time when the detection frame starts to be displayed.

5. The method of claim 2, wherein determining the activation time for activating the distance sensor based on the type of the target screen and the relative position between the distance sensor and the target screen comprises:

and if the target screen is a liquid crystal display screen and the distance sensor is positioned outside the display area of the target screen, determining the preset starting time as the starting time.

6. The method of any of claims 1 to 5, further comprising:

determining the duration of the distance detection according to the refresh period of the target screen;

determining the number of pulses according to the duration and the pulse emission frequency of the distance sensor;

the detecting the distance of the detected object relative to the electronic device by the activated distance sensor includes:

emitting detection pulses of the number of pulses by starting the distance sensor;

and determining the distance between the detection object and the electronic equipment according to the received reflected pulse obtained by reflecting the detection pulse.

7. The method according to any one of claims 1 to 5, wherein at least one display screen of the electronic device is a flexible screen that is bendable; the flexible screen is positioned on at least two relatively movable parts of the electronic equipment;

the method further comprises the following steps:

determining a device pose of the electronic device from the relative positions of the at least two relatively movable portions.

8. The method of any of claims 1 to 5, wherein activating a distance sensor oriented in the same direction as the target screen comprises:

and starting a distance sensor with the same direction as the target screen when the electronic equipment is in a call state.

9. A distance detection device, applied to an electronic apparatus having a plurality of display screens, includes:

the detection module is used for detecting the equipment posture of the electronic equipment;

the first determining module is used for determining a target screen in an interactive state from the plurality of display screens according to the equipment posture;

the starting module is used for starting the distance sensor with the same direction as the target screen;

and the detection module is used for detecting the distance of the detection object relative to the electronic equipment through the started distance sensor.

10. The apparatus of claim 9, further comprising:

the second determination module is used for determining the type of the target screen;

the third determining module is used for determining starting time for 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 module is specifically configured to:

and starting the distance sensor at the starting moment.

11. The apparatus of claim 10, wherein the third determining module comprises:

the first determining submodule is used for determining the delay time of the distance sensor relative to the refreshing starting moment of the OLED display screen according to the position of the distance sensor under the target screen if the target screen is the OLED screen;

and the second determining submodule is used for determining the starting time according to the refreshing starting time of the target screen and the delay time.

12. The apparatus of claim 10, wherein the third determining module comprises:

a third determining submodule, 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; when the detection frame is displayed, the display pixel of the target screen corresponding to the position of the distance sensor is turned off;

and the fourth determining submodule is used for determining the starting time according to the time when the detection frame starts to be displayed.

13. The apparatus of claim 10, wherein the third determining module comprises:

and a fifth determining submodule, configured to determine a preset starting time as the starting time if the target screen is a liquid crystal display screen and the distance sensor is located outside a display area of the target screen.

14. The apparatus of any of claims 9 to 13, further comprising:

a fourth determining module, configured to determine a duration of the distance detection according to a refresh period of the target screen;

the fifth determining module is used for determining the number of pulses according to the duration and the pulse transmitting frequency of the distance sensor;

the detection module comprises:

the transmitting submodule is used for transmitting the detection pulses of the number of the pulses by starting the distance sensor;

and the sixth determining submodule is used for determining the distance between the detection object and the electronic equipment according to the received reflected pulse obtained by reflecting the detection pulse.

15. The apparatus according to any one of claims 9 to 13, wherein at least one display screen of the electronic device is a flexible screen that is bendable; the flexible screen is positioned on at least two relatively movable parts of the electronic equipment;

the device further comprises:

a sixth determining module, configured to initiate determining a device pose of the electronic device according to the relative positions of the at least two relatively movable portions.

16. The apparatus according to any one of claims 9 to 13, wherein the start module is specifically configured to:

and starting a distance sensor with the same direction as the target screen when the electronic equipment is in a call state.

17. An electronic device, characterized in that it comprises at least: a processor and a memory for storing executable instructions operable on the processor, wherein:

the processor is configured to execute the executable instructions, and the executable instructions perform the steps of the distance detection method as claimed in any one of the preceding claims 1 to 8.

18. A non-transitory computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a processor, perform the steps of the distance detection method provided in any one of claims 1 to 8.

Technical Field

The present disclosure relates to the field of electronic technologies, and in particular, to a distance detection method and apparatus, an electronic device, and a storage medium.

Background

With the development of electronic technology, a full-screen has been increasingly applied to electronic products such as mobile phones. In order to adapt to the application of a full-face screen, a distance sensor, a light sensor, an image acquisition device and the like are arranged inside a display screen, and the functions of signal acquisition and the like are realized at the gap of display pixels. For the electronic equipment with a folding screen and the like capable of changing postures, multiple display screens can be provided, so that the electronic equipment has multiple different use scenes. Therefore, how to configure the distance sensor is one of the problems to be solved for the multi-display electronic device.

Disclosure of Invention

The disclosure provides a distance detection method and device, an electronic device and a storage medium.

According to a first aspect of the embodiments of the present disclosure, there is provided a distance detection method applied to an electronic device having a plurality of display screens, including:

detecting a device pose of the electronic device;

according to the equipment posture, determining a target screen in an interactive state from the plurality of display screens;

starting a distance sensor with the same orientation as the target screen;

and detecting the distance of the detection object relative to the electronic equipment by the activated distance sensor.

In some embodiments, the method further comprises:

determining the type of the target screen;

determining starting time for 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 activating a distance sensor oriented the same as the target screen, comprising:

and starting the distance sensor at the starting moment.

In some embodiments, the determining an activation time for 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:

if the target screen is an OLED (organic light-Emitting Diode) screen, determining the delay time of the distance sensor relative to the refreshing starting moment of the OLED display screen according to the position of the distance sensor under the target screen;

and determining the starting time according to the refreshing starting time and the delay time of the target screen.

In some embodiments, the determining an activation time for 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:

if the target screen is an OLED screen, displaying at least one detection frame in each preset time length of the target screen; when the detection frame is displayed, the display pixel of the target screen corresponding to the position of the distance sensor is turned off;

and determining the starting time according to the time when the detection frame starts to be displayed.

In some embodiments, the determining an activation time for 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:

and if the target screen is a liquid crystal display screen and the distance sensor is positioned outside the display area of the target screen, determining the preset starting time as the starting time.

In some embodiments, the method further comprises:

determining the duration of the distance detection according to the refresh period of the target screen;

determining the number of pulses according to the duration and the pulse emission frequency of the distance sensor;

the detecting the distance of the detected object relative to the electronic device by the activated distance sensor comprises:

emitting detection pulses of the number of pulses by starting the distance sensor;

and determining the distance between the detection object and the electronic equipment according to the received reflected pulse obtained by reflecting the detection pulse.

In some embodiments, at least one display screen of the electronic device is a flexible screen that is bendable; the flexible screen is positioned on at least two relatively movable parts of the electronic equipment;

the method further comprises the following steps:

determining a device pose of the electronic device from the relative positions of the at least two relatively movable portions.

In some embodiments, said activating a distance sensor oriented the same as said target screen comprises:

and starting a distance sensor with the same direction as the target screen when the electronic equipment is in a call state.

According to a second aspect of the embodiments of the present disclosure, there is provided a distance detecting device applied to an electronic apparatus having a plurality of display screens, including:

the detection module is used for detecting the equipment posture of the electronic equipment;

the first determining module is used for determining a target screen in an interactive state from the plurality of display screens according to the equipment posture;

the starting module is used for starting the distance sensor with the same direction as the target screen;

and the detection module is used for detecting the distance of the detection object relative to the electronic equipment through the started distance sensor.

In some embodiments, the apparatus further comprises:

the second determination module is used for determining the type of the target screen;

the third determining module is used for determining starting time for 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 module is specifically configured to:

and starting the distance sensor at the starting moment.

In some embodiments, the third determining module comprises:

the first determining submodule is used for determining the delay time of the distance sensor relative to the refreshing starting moment of the OLED display screen according to the position of the distance sensor under the target screen if the target screen is the OLED screen;

and the second determining submodule is used for determining the starting time according to the refreshing starting time of the target screen and the delay time.

In some embodiments, the third determining module comprises:

a third determining submodule, 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; when the detection frame is displayed, the display pixel of the target screen corresponding to the position of the distance sensor is turned off;

and the fourth determining submodule is used for determining the starting time according to the time when the detection frame starts to be displayed.

In some embodiments, the third determining module comprises:

and a fifth determining submodule, configured to determine a preset starting time as the starting time if the target screen is a liquid crystal display screen and the distance sensor is located outside a display area of the target screen.

In some embodiments, the apparatus further comprises:

a fourth determining module, configured to determine a duration of the distance detection according to a refresh period of the target screen;

the fifth determining module is used for determining the number of pulses according to the duration and the pulse transmitting frequency of the distance sensor;

the detection module comprises:

the transmitting submodule is used for transmitting the detection pulses of the number of the pulses by starting the distance sensor;

and the sixth determining submodule is used for determining the distance between the detection object and the electronic equipment according to the received reflected pulse obtained by reflecting the detection pulse.

In some embodiments, at least one display screen of the electronic device is a flexible screen that is bendable; the flexible screen is positioned on at least two relatively movable parts of the electronic equipment;

the device further comprises:

a sixth determining module, configured to initiate determining a device pose of the electronic device according to the relative positions of the at least two relatively movable portions.

In some embodiments, the starting module is specifically configured to:

and starting a distance sensor with the same direction as the target screen when the electronic equipment is in a call state.

According to a third aspect of embodiments of the present disclosure, there is provided an electronic device including at least: a processor and a memory for storing executable instructions operable on the processor, wherein:

the processor is configured to execute the executable instructions, and the executable instructions perform any of the steps of the distance detection method.

According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, implement the steps in the distance detection method of any one of the above.

The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: through the technical scheme, under the condition that the electronic equipment with the multiple display screens has different equipment postures, the appropriate distance sensor can be selected to carry out distance detection, and whether the target screen is extinguished or not is further controlled, so that the condition that the face and other parts of a user approach the display screens to cause mistaken touch under different postures is reduced.

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 invention and together with the description, serve to explain the principles of the invention.

FIG. 1 is a flow chart one illustrating a distance detection method according to an exemplary embodiment;

FIG. 2 is a flow chart diagram two illustrating a distance detection method in accordance with an exemplary embodiment;

FIG. 3A is a flow chart diagram three illustrating a distance detection method in accordance with an exemplary embodiment;

FIG. 3B is a flow chart diagram four illustrating a distance detection method in accordance with an exemplary embodiment;

FIG. 3C is a flow chart diagram five illustrating a distance detection method in accordance with an exemplary embodiment;

FIG. 4 is a schematic diagram illustrating module connections in an electronic device, according to an example embodiment;

FIG. 5 is a block diagram illustrating a distance detection device according to an exemplary embodiment;

FIG. 6 is a block diagram illustrating a physical structure of an electronic device in accordance with an exemplary 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 embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.

Fig. 1 is a flowchart illustrating a distance detection method applied to an electronic device having a plurality of display screens according to an exemplary embodiment, as shown in fig. 1, including the steps of:

s101, detecting the equipment posture of the electronic equipment;

s102, determining a target screen in an interactive state from a plurality of display screens according to the equipment posture;

step S103, starting a distance sensor with the same direction as the target screen;

step S104 is to detect the distance of the detection object from the electronic device by the activated distance sensor.

In the embodiment of the disclosure, the distance sensor is used for detecting whether an object outside the display screen blocks the display screen, and when the distance between the object and the distance sensor is smaller than a preset threshold value, it is determined that a blocked object exists. The distance sensor can detect the distance by means of 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 ratio (D), a certain frequency, and a certain driving current, which is generated by Pulse Width Modulation (PWM). For example, the infrared signal emitted by the distance sensor may be an infrared light signal having a wavelength in the range of 850 nanometers to 1300 nanometers. Specifically, the wavelength of the infrared light signal may be 940 nm.

In the embodiment of the present disclosure, the electronic device may be an electronic device having a variable device posture configured by a plurality of portions that are relatively movable, for example, an electronic device having a posture change such as folding, opening, closing, bending, or curling. The electronic device may have different device gestures in different operating states. In different device poses, the user may use different display screens, while the display screen that is in the interactive state is generally oriented towards the user. In addition, a plurality of screens of electronic equipment all need set up corresponding distance sensor, like this, no matter which screen is used to the user, when pressing close to face class position with this screen, all can have the proximity of object through distance sensor response to close the display screen, reduce the condition that the mistake touched.

Therefore, the target screen in the interactive state in the plurality of display screens is determined according to the equipment posture of the electronic equipment. And then starting a distance sensor corresponding to the target screen for detection. The orientation of the detection surface of the distance sensor corresponding to the target screen is the same as the orientation of the display surface of the target screen, so that the object close to the target screen can be correspondingly detected by starting the target sensor, and the false touch is reduced. Meanwhile, distance sensors corresponding to other display screens are not required to be started, so that unnecessary detection is reduced, and the power consumption of equipment is reduced.

In some embodiments, as shown in fig. 2, the method further comprises:

step S201, determining the type of a target screen;

step S202, determining the starting 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;

in step S103, the step of activating the distance sensor having the same orientation as the target screen includes:

step S203 is to activate the distance sensor at the activation time.

Since the electronic device has a plurality of Display screens, the plurality of Display screens may be different types of Display screens, such as OLED Display screens, LCD (Liquid Crystal Display) screens, and the like. The placement of the distance sensors may be different for different display screens, for example: the LCD display screen is provided with a backlight module, so that the distance sensor cannot be placed under the screen but is arranged in a non-display area at the edge of the display screen; the OLED display screen can place the distance sensor in the range of the pixel area under the display screen.

For the distance sensor placed under the display screen, if the distance sensor is started and detected in the process of starting the display screen, the detection pulse emitted by the distance sensor may generate a photoelectric effect on the pixel unit to excite a bright spot of the pixel, so that a bright spot is generated in the area of the distance sensor of the display screen. For the LCD display screen, the distance sensor is required to be disposed in the non-display area of the display screen.

Therefore, the time for starting the distance sensor to detect is determined according to the type of the display screen and the relative position of the distance sensor and the display screen, so that the influence on the display screen when the distance sensor detects is reduced as much as possible. Meanwhile, the effectiveness of detection is also ensured.

In some embodiments, as shown in fig. 3A, the determining, in step S202, an activation time for 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:

step S11, if the target screen is an OLED screen, determining the delay time of the distance sensor relative to the refreshing starting time of the OLED display screen according to the position of the distance sensor under the target screen;

and step S12, determining the starting time according to the refreshing starting time and the delay time of the target screen.

In the embodiment of the disclosure, the distance sensor is arranged below the screen of the OLED screen, and when the distance sensor detects, the emitted infrared signal pulse is transmitted out of the surface of the display screen through the pixel unit of the display screen, and is reflected by the obstacle and then returns to the distance sensor through the display screen.

In the display panel, by controlling a transistor having a PN junction such as a MOS (Metal Oxide Semiconductor) transistor in the display panel, display of a pixel unit electrically connected to the transistor is controlled so that a pixel array including a plurality of pixel units displays a corresponding image.

When the distance sensor is arranged below the display screen, an infrared signal which is emitted by the distance sensor and used for distance measurement can penetrate through the display screen. When an infrared signal emitted by the distance sensor irradiates on the MOS tube in the turn-off state, photons in the infrared signal collide with carriers such as electrons in the MOS tube, so that the electrons jump, the MOS tube in the turn-off state is switched on erroneously, a pixel unit connected with the MOS tube switched on erroneously emits light, the display of the pixel unit irradiated by the infrared signal is interfered, and the display effect is influenced. For example, the display screen may be excited to display a bright spot.

In some embodiments, determining the delay period based on the position of the distance sensor under the target display screen comprises: determining the starting moment of pixel line extinction corresponding to the position of the distance sensor according to the refreshing frequency of the target display screen and the line number of the display pixels; the period of time that the pixel row is extinguished is used for emptying the display data of one frame on the pixel row; and determining the delay time according to the time difference between the starting moment of pixel line extinction and the moment of starting refreshing one frame of picture of the target display screen.

When the display array displays, each pixel unit has a light-emitting period and a display time slot. Illustratively, the pixel unit in the light emitting period generates a light signal according to the driving signal, and the pixel unit in the display time slot suspends generating the light signal. It is understood that the display time slot is located between two adjacent light emitting periods of the pixel unit. In the process of refreshing the pixels of the display screen, the display data of the previous frame of the pixel row can be cleared in the display time slot row by row, and a clear signal is transmitted to the pixel unit. Due to the persistence of vision, in the display time slot between two adjacent light-emitting periods, the visual effect of the optical signal generated by the pixel unit in the previous light-emitting period on the retina of the human eye still persists in the brain of the human eye in the display time slot, that is, the user thinks that the pixel unit still displays in the display time slot.

It will be appreciated that the projection of the distance sensor onto the plane of the display screen has an overlapping region with the plane of the display screen, i.e. the region covered by the projection of the distance sensor onto the plane of the display array. The pixel cells within the overlap region may be excited to produce bright spots. In practical application, when the distance sensor emits a detection signal, a conical emission area can be formed. The area within the display array covered by the conical emission area may be considered as the overlap area.

Therefore, the distance detection can be performed during a period when the pixel unit of the distance sensor in the overlapping area of the display screen is turned off. Because the zero clearing signal is transmitted to the pixel unit in the period, namely the display time slot, even if the infrared signal pulse of the distance sensor excites the MOS tube to be opened, no electric signal is conducted to charge the pixel unit, and therefore bright spots are not generated.

In this embodiment of the present disclosure, the pixel unit in the overlap region may be determined according to a relative position between the distance sensor and the display screen, and then the delay duration may be determined according to a time when the pixel unit in the overlap region enters a display time slot in each refresh cycle, that is, the time when the period for emptying the pixel unit starts. For example, the distance sensor is at the position of the pixel unit in the 100 th row of the display screen, and therefore, the delay duration should be the display time interval in the 1 st to 99 th rows and the time for entering the display time slot in the 100 th row after the display time slot is finished.

The position of the distance sensor is set differently for different display screens. Therefore, when different display screens of the electronic device are used as the target screen, the position of the distance sensor corresponding to the target screen needs to be determined, and the delay time length is determined according to the position, so as to determine the starting time of the distance sensor.

Therefore, the accuracy of the determined emission time of the detection signal can be improved, and the interference on the display effect of the display screen is reduced.

In some embodiments, as shown in fig. 3B, the determining, in step S202, an activation time for 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:

step S21, if the target screen is an OLED screen, displaying at least one detection frame in each preset time length of the target screen; when the detection frame is displayed, pixel units of a target screen corresponding to the position of the distance sensor are turned off;

step S22 specifies the start time based on the time at which the display of the detection frame is started.

During the display of the display screen, tens or even hundreds of pictures are refreshed every second, for example, a 60Hz (hertz) display screen refreshes 60 frames of pictures every second. Since the actual displayed frame of the display screen does not change rapidly, the 60 frames in one second are mostly the same frame. When the picture changes, human eyes cannot perceive the switching process due to the extremely high switching speed, but feel the smooth dynamic change of the picture of the display screen.

Therefore, in the embodiment of the present disclosure, a detection frame may be displayed in each period of time, and the detection frame may be a black frame, or a pixel unit at a position where the distance sensor is located may be displayed as black in an original frame. In this way, in the whole display period of the detection frame, the data signals of the pixel units are the zero clearing signals in the overlapping area of the pixel units corresponding to the distance sensor, and even if the distance sensor excites the MOS tube to be conducted, the pixel units are not charged by the signals, so that bright spots are not generated. In addition, the time for detecting the frame is short, so that the frame cannot be perceived by human eyes, and the display effect of the picture cannot be influenced.

In practical application, a detection frame can be displayed within each preset time period, such as every second or every two seconds; two adjacent detection frames can be displayed within each preset time length so as to increase the time for distance detection; of course, two or more detection frames that are not adjacent to each other may be displayed to increase the frequency of detection.

In some embodiments, as shown in fig. 3C, the determining, in step S202, an activation time for 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:

and step S31, if the target screen is a liquid crystal display screen and the distance sensor is positioned outside the display area of the target screen, determining the preset starting time as the starting time.

Because the LCD has a backlight module, and the bottom layer of the backlight module is opaque, the distance sensor can not be arranged below the display screen. Therefore, the distance sensor corresponding to the liquid crystal display screen can be arranged in a narrow slit of the frame of the display screen, and can also be arranged on a frame body of electronic equipment except the display screen. That is, the distance sensor is disposed outside the display area of the display panel, and therefore, the screen display of the display panel is not disturbed.

Therefore, any time can be taken as the preset starting time in advance, and the distance sensor is started at the preset starting time to detect. For example, when the liquid crystal display screen is determined to be the target screen, the corresponding distance sensor can be immediately started, and the detection is continuously carried out until the target screen is switched to other display screens. For another example, in the process of displaying on the liquid crystal display, the distance sensor is started to detect at the beginning of each refresh period, that is, at the time when the display receives the frame synchronization signal.

In practical applications, the setting may be performed according to actual requirements, and is not limited herein.

In some embodiments, the method further comprises:

determining the duration of distance detection according to the refresh period of the target screen;

determining the number of pulses according to the duration and the pulse transmitting frequency of the distance sensor;

the above-mentioned distance sensor that starts, carry on the distance detection of the detection object relative to electronic device, include:

emitting detection pulses of the number of pulses by starting a distance sensor;

and determining the distance between the detection object and the electronic equipment according to the reflected pulse obtained by reflecting the received detection pulse.

For an OLED display screen, the duration of distance detection by the distance sensor can be determined according to the refresh period. The distance detection needs to be performed in a state that the pixel unit of the display screen is turned off, so that the detection duration can be calculated according to the refresh period.

For the above embodiment, the delay duration is determined, and the display time slot of the pixel unit empty data is detected, so that the duration of the display time slot and the display occupied by each row of pixel units can be calculated according to the refresh period of the display screen, and the duration of the detection performed by the distance sensor can be further determined. In the above embodiment, the detection frame is inserted, so that the distance sensor can detect the distance in the whole refresh period of the detection frame, and therefore, the duration of the whole refresh period can be determined as the duration of the detection.

The distance sensor may transmit infrared signal pulses for detection at a predetermined frequency while receiving reflected infrared signal pulses for the duration of the distance detection. Based on the duration, and the fixed pulse transmission frequency of the range sensor, the number of pulses that can be transmitted within the duration can be determined. After the distance sensor is started, the detection pulses of the number of the emitted pulses are stopped, so that the continuous display of the subsequent pixel units is not influenced.

In some embodiments, at least one display screen of the electronic device is a flexible screen that is bendable; the flexible screen is positioned on at least two relatively movable parts of the electronic equipment;

the method further comprises the following steps:

determining a device pose of the electronic device based on the relative positions of the at least two relatively movable portions.

The electronic device with the foldable screen can have at least two parts which can move relatively, and respectively bear the display screen on one side, and the joint can be folded. Therefore, an electronic device having a foldable screen may have different use postures, for example, unfolding the foldable screen so that two portions of the electronic device take a 180-degree state; closing the screen to enable two parts of the electronic equipment to be overlapped; and opening the foldable screen to a certain angle, etc.

The electronic device may have other display screens on other surfaces of the electronic device in addition to the flexible screen described above. Under different device gestures, different display screens can be used for display and interaction. For example, when the electronic device is in a folded state, the surface of the foldable screen is folded inside the electronic device without being exposed, and therefore, a sub-display screen on the other side of the electronic device can be used at this time. The auxiliary display screen can be a flexible display screen or a rigid display screen.

The device attitude of the electronic device may be determined by using magnetic or electrical sensors in the electronic device, for example, a gyroscope and a gravity sensor are respectively disposed in two relatively movable portions of the electronic device, so that the angular relationship between the two portions and the ground can be sensed. Through the data of the two groups of sensors, the relative position relation of the two parts can be calculated, and the equipment posture of the electronic equipment can be further determined.

In some embodiments, the activating a distance sensor oriented in the same direction as the target screen includes:

and starting the distance sensor with the same orientation as the target screen when the electronic equipment is in a call state.

Since the face of the user is usually at a certain distance from the display screen during the use of the electronic device, the user faces the display screen and views the display content. However, when the user uses the electronic device to make a call, the electronic device is placed beside the ear, and at this time, the display screen may touch the skin of the face, so that the user is more likely to make a wrong touch. Here, the call state includes, but is not limited to: telephone voice calls, instant messaging software, and the like.

Therefore, in the embodiment of the present disclosure, when the electronic device is in a call state, the method in the above embodiment may be used to determine the target screen, and start the distance sensor corresponding to the target screen. And under the non-conversation state, detection is not needed, so that the power consumption is saved, meanwhile, the influence of detection on a display picture is further reduced, and the use experience of a user is improved.

Embodiments of the present disclosure also provide the following examples:

electronic devices such as mobile phones having a folding screen generally have a sub-screen provided on the back of the folding screen. A distance sensor is arranged under the folding screen, and a distance sensor is also arranged at the forehead outside the display screen of the auxiliary screen. Different distance sensors have different communication addresses and can be connected with A Processor (AP) of the electronic device through the same communication circuit or different communication circuits and simultaneously connected with a display screen on the same surface. As shown in fig. 4, the display screen 41 and the distance sensor 42 are connected to the processor 43, so that the processor can control the distance sensor to start and detect according to the display state of the display screen.

The different device gestures of the electronic device can be determined from electrical or magnetic sensors, such as gyroscopes, gravity sensors, hall sensors, etc. The target screen in the interactive state can be determined according to the equipment posture, and then the distance sensor corresponding to the target screen can be called to carry out distance detection. After the equipment posture information detected by the sensors is transmitted to the processor, the processor determines a target screen for interaction and displays the target screen. And meanwhile, determining that the distance sensor corresponding to the display screen is started and detecting.

If the started distance sensor is positioned below the display screen, bright spots are generated on pixel units of the display screen in the display process, therefore, in the display process, the timing of a frame synchronization signal of each frame is started and delayed to a time period for clearing data of the pixel unit at the position of the distance sensor, the distance sensor is started and the detection is carried out, and therefore the generation of the bright spots is reduced.

Starting at the moment t0 when the frame synchronization signal is received, delaying for a time period of t2, determining the time t1 of a single pulse according to the emission frequency f of the distance sensor for emitting the detection pulse, and determining the number n of the transmitted pulses to be t/t1 pulses according to the emptying time t of the pixel.

When the attitude sensor of the electronic equipment detects that the electronic equipment is in a folded state, the distance sensor corresponding to the folding screen is closed, the display of the auxiliary display screen is started, and meanwhile, the distance sensor corresponding to the auxiliary display screen is started. And when the gesture sensor detects that the electronic device is in the unfolded state, for example, the unfolded angle of the folding screen is greater than 120 degrees, the electronic device is considered to be in the unfolded state, at this time, the display of the secondary display screen is closed, the distance sensor corresponding to the secondary display screen is closed, and the distance sensor corresponding to the folding screen is started.

Because the setting positions of the distance sensors corresponding to different display screens are different, and the resolution and the refresh rate of the display screens are different, the delay time lengths are different correspondingly, and the number n of sent pulses is also different. Therefore, when different distance sensors are called according to different equipment postures, detection can be performed according to different detection time of the different distance sensors.

Besides the above-mentioned delay method, a blank black frame may be inserted for detection by the distance sensor. For example, at high refresh rates of the display screen, such as a refresh rate of 240Hz, several blank black frames may be inserted per second. The distance sensor can then detect during the period of time that the black frame is displayed.

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 the problem of bright spots does not need to be considered, and detection can be carried out at any time.

The distance sensor can detect in the process of telephone call or network call by adopting application programs of network communication such as WeChat, qq and the like.

Through the method in the embodiment of the disclosure, when the electronic equipment is in various equipment postures, a proper distance sensor can be called. And, according to the relative position relation of distance sensor and display screen, still set for distance sensor's opening time to can be when the normal display screen of display screen, whether can accurate detection has the object of being close to the display screen, thereby be convenient for when having the object of being close, close the display screen, reduce the emergence that the mistake touched.

Fig. 5 is a block diagram illustrating a distance detection apparatus according to an exemplary embodiment. Referring to fig. 5, the apparatus is applied to an electronic device having a plurality of display screens, and includes:

a detection module 510, configured to detect a device pose of the electronic device;

a first determining module 520, configured to determine, according to the device gesture, a target screen in an interactive state from the multiple display screens;

an activation module 530 configured to activate a distance sensor oriented in the same direction as the target screen;

a detecting module 540, configured to perform distance detection of a detection object with respect to the electronic device through the activated distance sensor.

In some embodiments, the apparatus further comprises:

the second determination module is used for determining the type of the target screen;

the third determining module is used for determining starting time for 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 module is specifically configured to:

and starting the distance sensor at the starting moment.

In some embodiments, the third determining module comprises:

the first determining submodule is used for determining the delay time of the distance sensor relative to the refreshing starting moment of the OLED display screen according to the position of the distance sensor under the target screen if the target screen is the OLED screen;

and the second determining submodule is used for determining the starting time according to the refreshing starting time of the target screen and the delay time.

In some embodiments, the third determining module comprises:

a third determining submodule, 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; when the detection frame is displayed, pixel units of the target screen corresponding to the position of the distance sensor are turned off;

and the fourth determining submodule is used for determining the starting time according to the time when the detection frame starts to be displayed.

In some embodiments, the third determining module comprises:

and a fifth determining submodule, configured to determine a preset starting time as the starting time if the target screen is a liquid crystal display screen and the distance sensor is located outside a display area of the target screen.

In some embodiments, the apparatus further comprises:

a fourth determining module, configured to determine a duration of the distance detection according to a refresh period of the target screen;

the fifth determining module is used for determining the number of pulses according to the duration and the pulse transmitting frequency of the distance sensor;

the detection module comprises:

the transmitting submodule is used for transmitting the detection pulses of the number of the pulses by starting the distance sensor;

and the sixth determining submodule is used for determining the distance between the detection object and the electronic equipment according to the received reflected pulse obtained by reflecting the detection pulse.

In some embodiments, at least one display screen of the electronic device is a flexible screen that is bendable; the flexible screen is positioned on at least two relatively movable parts of the electronic equipment;

the device further comprises:

a sixth determining module, configured to initiate determining a device pose of the electronic device according to the relative positions of the at least two relatively movable portions.

In some embodiments, the starting module is specifically configured to:

and starting a distance sensor with the same direction as the target screen when the electronic equipment is in a call state.

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. 6 is a block diagram illustrating a physical structure of an electronic device 600 according to an example embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, a fitness device, a personal digital assistant, and so forth.

Referring to fig. 6, 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.

The processing component 601 generally controls overall operation of the electronic device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 601 may include one or more processors 610 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 601 may also include one or more modules that facilitate interaction between the processing component 601 and other components. For example, the processing component 601 may include a multimedia module to facilitate interaction between the multimedia component 604 and the processing component 601.

The memory 610 is configured to store various types of data to support operations at the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 602 may be implemented by any type or combination of volatile or non-volatile storage devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.

The power supply component 603 provides power to the various components of the electronic device 600. The power supply component 603 may include: a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for electronic device 600.

The multimedia component 604 comprises a screen providing an output interface between the electronic device 600 and a 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 604 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 electronic device 600 is in an operation mode, such as a shooting mode or a video mode. Each front camera and/or rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

Audio component 605 is configured to output and/or input audio signals. For example, the audio component 605 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 600 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 610 or transmitted via the communication component 608. In some embodiments, audio component 605 also includes a speaker for outputting audio signals.

The I/O interface 606 provides an interface between the processing component 601 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 607 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor component 607 may detect an open/closed state of the electronic device 600, the relative positioning of components, such as a display and keypad of the electronic device 600, the sensor component 607 may also detect a change in the position of the electronic device 600 or a component of the electronic device 600, the presence or absence of user contact with the electronic device 600, orientation or acceleration/deceleration of the electronic device 600, and a change in the temperature of the electronic device 600. The sensor component 607 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor component 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 component 607 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

The communication component 608 is configured to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic device 600 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 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 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, or other technologies.

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, 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 the memory 602 comprising instructions, executable by the processor 610 of the electronic device 600 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.

A non-transitory computer readable storage medium having instructions therein, which when executed by a processor of a mobile terminal, enable the mobile terminal to perform any of the methods provided in the above embodiments.

Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.

It will be understood that the invention 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 invention is limited only by the appended claims.

23页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种息屏显示方法及电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类