Method, device, electronic device and readable storage medium for preventing accidental touch

Using laser sensors to detect the reflectivity of electronic equipment and perform energy compensation solves the problem of low accuracy and low efficiency of the anti-accidental touch function of electronic equipment, achieving a more accurate anti-accidental touch mode and power saving.

CN116033068BActive Publication Date: 2024-08-27VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211717488.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-28
Publication Date
2024-08-27
Estimated Expiration
2042-12-28

AI Technical Summary

Technical Problem

The anti-accidental touch function of existing electronic devices has problems such as low detection accuracy and high failure rate. In particular, the infrared sensor is affected by the reflectivity of blocking objects, resulting in low accuracy, and the inertial sensor is not efficient when capturing the user's posture to wake up the screen, resulting in a waste of power. .

Method used

A laser sensor is used to detect the reflectivity of the target object, and the anti-accidental touch mode is enabled by compensating the energy value, which expands the detection range and breaks away from the infrared and inertial sensor solutions to avoid the impact of reflectivity and accidental wake-up of the screen.

Benefits of technology

It achieves more accurate activation of anti-accidental touch mode, saves the power of electronic devices, and improves detection accuracy and convenience of use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116033068B
    Figure CN116033068B
Patent Text Reader

Abstract

The present application discloses an anti-mistouch method and electronic device, belonging to the field of communication technology. The anti-mistouch method comprises: obtaining target parameters; the target parameters include a first reflectivity of a first object; when the laser sensor detects that there is a first object and the first object is within a first distance range, the crosstalk energy value detected by the laser sensor is compensated according to the first reflectivity of the target parameter to obtain a compensated energy value of the first object; the upper limit value of the first distance range is less than or equal to the lower limit value of the detectable range; when the compensated energy value meets a first preset condition, the anti-mistouch mode is enabled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication technology, and specifically relates to an anti-mistaken touch method, an anti-mistaken touch device, an electronic device and a readable storage medium. Background Art

[0002] With the continuous development of electronic equipment technology, electronic devices are becoming more and more abundant, such as various types of mobile phones. In order to prevent electronic devices from being accidentally touched in certain scenarios, such as when the electronic device is placed in a pocket or backpack, traditional technology generally locks the screen of the electronic device to limit the touch screen, thereby preventing the screen from being accidentally touched. However, this method requires manual unlocking by the user, sacrificing the convenience of the user during actual use. Therefore, the non-lock screen anti-mistouch function came into being. While improving convenience, it also reduces the probability of waking up due to accidental touches on the screen, thereby saving power for electronic devices.

[0003] Currently, the above non-lock screen anti-mistouch function usually has the following two methods:

[0004] Method 1: Use an infrared sensor to determine the distance between the target object and the electronic device to determine whether to activate the anti-mistouch function.

[0005] Method 2: First enable the anti-mistouch function, then use the inertial sensor (IMU, Inertial measurement unit) to capture the user's specific posture and then wake up the screen to exit the anti-mistouch function.

[0006] However, during the research process, the inventors found that in method one, since the infrared proximity sensor is affected by the reflectivity of the obstructing object, the distance judgment result fluctuates greatly and has low accuracy; in method two, the inertial sensor is used to capture the user's specific posture and then wake up the screen, but some user postures may cause the screen to wake up accidentally, and the failure rate is high. Summary of the invention

[0007] The purpose of the embodiments of the present application is to provide an anti-mistake touch method, device, electronic device and readable storage medium, which can solve the problems of low judgment accuracy and high failure rate of the anti-mistake touch function of the electronic device.

[0008] In a first aspect, an embodiment of the present application provides a method for preventing accidental touches, the method comprising: acquiring a target parameter; the target parameter comprising a first reflectivity of a first object;

[0009] When the laser sensor detects a first object and the first object is within a first distance range, the crosstalk energy value detected by the laser sensor is compensated according to the first reflectivity of the target parameter, the preset reference energy value, and the preset reference reflectivity of the reference object to obtain a compensated energy value of the first object; the upper limit value of the first distance range is less than or equal to the lower limit value of the detectable range;

[0010] When the compensation energy value meets the first preset condition, the false touch prevention mode is enabled.

[0011] In a second aspect, an embodiment of the present application provides an anti-mistaken touch device, the device comprising:

[0012] A target parameter acquisition module, used to acquire target parameters; the target parameters include a first reflectivity of a first object;

[0013] A compensation module, configured to compensate the crosstalk energy value detected by the laser sensor according to the first reflectivity of the target parameter, the preset reference energy value, and the preset reference reflectivity of the reference object, to obtain a compensated energy value of the first object when the laser sensor detects a first object and the first object is within a first distance range; the upper limit value of the first distance range is less than or equal to the lower limit value of the detectable range;

[0014] The enabling module is used to enable the anti-mistouch mode when the compensation energy value meets the first preset condition.

[0015] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0017] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0018] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.

[0019] In an embodiment of the present application, when the laser sensor detects a first object within the first distance range outside its detectable range, the second distance range can compensate for the crosstalk energy value detected by the laser sensor according to the first reflectivity to obtain a more accurate compensated energy value of the first object. In this way, a more accurate energy value is used to perform anti-mistouch judgment, which expands the detection range of the laser sensor and can be separated from the anti-mistouch scheme of the infrared sensor and inertial sensor, thereby avoiding the problem of low detection accuracy caused by the infrared sensor being affected by the reflectivity of the object, and avoiding the problem that the inertial sensor scheme may accidentally wake up the screen and waste power of the electronic device. The detection accuracy can be improved, so that the anti-mistouch mode can be enabled more accurately, saving power of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a schematic diagram of the division of detection distance of a laser sensor of the present application;

[0021] Figure 2 This is a flowchart of the steps of an anti-accidental touch method of the present application;

[0022] Figure 3 is a structural schematic diagram of a foldable electronic device in the present application in a folded state;

[0023] Figure 4 It is a structural schematic diagram of a foldable electronic device in the present application in an unfolded state;

[0024] Figure 5 It is a schematic diagram of the back structure of a foldable electronic device of the present application in the process of unfolding;

[0025] Figure 6 It is a front structural schematic diagram of a foldable electronic device of the present application in the process of unfolding;

[0026] Figure 7 It is a curve showing the relationship between energy value and time detected by a laser sensor in a long-distance mode of the present application;

[0027] Figure 8 It is a curve showing the relationship between energy value and time detected by a laser sensor in a short-distance mode of the present application;

[0028] Fig. 9 It is a curve showing the relationship between energy value and time detected by a laser sensor in a close-range mode of the present application;

[0029] Fig.10 It is a curve of the relationship between energy value and time of a laser sensor of the present application for energy calibration of a reference object at a distance of 200 mm;

[0030] Fig.11It is a curve showing the relationship between energy and time of a laser sensor of the present application for energy calibration of a reference object at a distance of 50 mm;

[0031] Fig.12 It is a reflectivity identification curve based on reference object fitting in the present application;

[0032] Fig.13 This is a curve of the relationship between distance and energy in a close-range mode of the present application;

[0033] Fig.14 It is a structural schematic diagram of a hyperbolic screen electronic device of the present application;

[0034] Fig.15 It is a schematic diagram of the structure of a conventional electronic device of the present application;

[0035] Fig.16 This is a flowchart of another method for preventing accidental touches of the present application;

[0036] Fig.17 It is a logic block diagram of an anti-mistouch device of the present application;

[0037] Fig.18 It is a structural block diagram of an electronic device of the present application;

[0038] Fig.19 It is a hardware structure diagram of an electronic device of the present application.

[0039] Explanation of the reference numerals: 101-laser sensor; 102-photosensitive sensor; 103-first screen; 104-second screen; 105-infrared proximity sensor; 106-first inertial sensor; 107-second inertial sensor; 108-Hall sensor; 109-functional magnet; 110-first body; 111-second body; 100-first object; d1-short distance; d2-short distance; d3-long distance; 201-energy value curve of the reflected signal inside the electronic device; 202-energy value curve of the reflected signal from the first object; 203-signal energy value curve detected by the laser sensor; T-time; C-energy value; 1410-first screen of the hyperbolic screen electronic device; 1420-second screen of the hyperbolic screen electronic device; 1411-laser sensor of the first screen of the hyperbolic screen electronic device; 1421-laser sensor of the second screen of the hyperbolic screen electronic device. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0041] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0042] In the following, in conjunction with the accompanying drawings, a method for preventing accidental touches and an electronic device provided by an embodiment of the present application are described in detail through specific embodiments and application scenarios.

[0043] Reference Figure 2 , Figure 2 A flowchart of a method for preventing accidental touches of the present application is shown. In an embodiment of the present application, a method for preventing accidental touches may include the following steps:

[0044] Step 110: Acquire target parameters; the target parameters include a first reflectivity of the first object.

[0045] In the embodiment of the present application, the first reflectivity of the first object can be obtained in a variety of ways. For example, relevant parameters of the first object are detected in real time for calculation, or the reflectivity based on the last calculation is obtained as the first reflectivity. For another example, based on the special application scenarios of the anti-mistaken touch method, such as the reflectivity parameters of pockets and bags, a default first reflectivity is set. For example, if the anti-mistaken touch mode is for a certain type of bag, the first reflectivity can be set by default to the reflectivity of the bag.

[0046] Optionally, in the embodiment of the present application, step 110 may include:

[0047] Sub-step S110: When the laser sensor 101 of the electronic device detects the presence of a first object 100 and the first object 100 is within a second distance range, the first reflectivity of the first object 100 in the target parameters is obtained according to the first energy value of the first object 100, the reference reflectivity of a preset reference object, the reference energy value of a preset reference object at a second distance from the first object 100, and the preset benchmark energy value.

[0048] The second distance range is within the detectable range of the laser sensor 101, and the upper limit value of the second distance range is less than or equal to the first preset threshold value; the reference energy value is the energy value detected by the laser sensor 101 when there is no object within the upper limit value of the detection range.

[0049] In the embodiment of the present application, the original function of the laser sensor 101 can be used to obtain the first reflectivity of the first object blocked in front of the laser sensor 101 within its detectable range, so that the reflectivity of the first object can be obtained more accurately.

[0050] It should be noted that the first object 100 may be an object that blocks the detection light path of the laser sensor 101, including but not limited to user's clothing, backpack, and fingers.

[0051] Among them, laser sensor 101: a sensor that uses laser technology for measurement. In the embodiment of the present application, the laser sensor can be used in conjunction with a camera, and can be used in conjunction with a camera for laser focusing. The laser sensor supports a detection range of 50mm (length unit, millimeters) to 2500mm, and can accurately detect the distance between an object and an electronic device within 50mm to 2500mm. When it is less than 50mm, the laser sensor cannot distinguish between the main body signal and the external reflection signal due to the inability to extract signal characteristics, and cannot accurately detect the distance between the object and the electronic device.

[0052] Reference Figure 1 , Figure 1 A schematic diagram of the laser sensor detection distance division of the present application is shown.

[0053] The detection range of the laser sensor 101 can be divided into long distance d3, short distance d2 and close distance d1, wherein the coverage range of the long distance d3 is 200mm-2500mm, the coverage range of the short distance d2 is 50mm-200mm, and the coverage range of the close distance d1 is 0mm-50mm. The laser sensor 101 can automatically switch between the long distance d3 mode, the short distance d2 mode and the close distance d1 mode according to the state and usage scenario of the foldable electronic device. Specifically, the coverage range of the long distance d3 mode is 200mm-2500mm, which is used to realize the auxiliary focus function in the focus ranging working mode; the coverage range of the short distance d2 mode is 50mm-200mm, which is used to realize the auxiliary focus function in the focus ranging working mode and the proximity sensing anti-false touch function and reflectivity measurement function in the anti-false touch working mode; the coverage range of the close distance d1 mode is 0mm-50mm, which is used to realize the proximity sensing and anti-false touch functions in the anti-false touch working mode.

[0054] It should be noted that the detectable range of the laser sensor 101 is the range in which the laser sensor 101 can detect the specific distance between the first object 100 and the laser sensor 101. The detectable range of the laser sensor 101 can specifically be the range covered by the long distance d3 and the short distance d2, 50mm-2500mm.

[0055] In the embodiment of the present application, the short distance d2 mode may include a special scene mode, the coverage range of which is 50mm-100mm, for realizing the proximity sensing anti-false touch function and reflectivity measurement function in the anti-false touch working mode. The special scene may be a scene in which the user puts the folded electronic device into a backpack.

[0056] It should be noted that, in the embodiment of the present application, the second distance range may be a range of short distance d2, and the specific range may be 50 mm-200 mm, the upper limit value of the second distance range may be 200 mm, the upper limit value of the short distance d2 range, and the first preset threshold value may be the upper limit value of the short distance d2 range of the laser sensor 101. Of course, the second distance range may also be 50 to 100 mm, and the corresponding first preset threshold value may be 100 mm.

[0057] It should be noted that, combined with Figure 1 According to the description, the upper limit value of the detection range of the laser sensor 101 can be 2500mm. Of course, the upper limit value of the laser sensor can be adjusted accordingly depending on the power of the laser sensor.

[0058] In the embodiment of the present application, a preset reference object can be used in advance to calibrate within the second distance range of the laser sensor 101, and the reference energy value of the reference object at each first distance from the electronic device within the second distance range is calculated. Then, in the subsequent use process, whenever the laser sensor 101 detects a first object 100 at a certain distance within the second distance range, the energy value of the first object 100 is obtained, and then the first reflectivity of the first object 100 is calculated in combination with the reference reflectivity of the reference object, the reference energy value of the reference object at the first distance of the first object 100, and the preset reference energy value.

[0059] The preset reference object is any object with known reflectivity, and the laser sensor 101 can detect the reference energy value of the reference object at any distance in the short distance d2 mode. It should be noted that the reference energy value is the energy value detected by the laser sensor 101 in the short distance d2 mode when there is no object within the upper limit of the detection range. In the embodiment of the present application, an object with a reflectivity of 18% @ 940nm can be selected as a reference object.

[0060] Among them, the reference energy value can be understood as the energy value reflected inside the device and the entire device when the laser sensor 101 is not blocked, that is, the energy value detected by the aforementioned laser sensor 101 when there is no object within the upper limit of the detection range.

[0061] In the embodiment of the present application, the electronic device may be a foldable electronic device. Figure 3-Figure 6 The foldable electronic device may include: a back outer screen part and a front inner screen part, wherein the back outer screen part may specifically include a laser sensor 101, and when the foldable electronic device is in a folded state, the laser sensor 101 is used to realize the proximity sensing and anti-mistouch function, and when the foldable electronic device is in an unfolded state, the laser focus sensor 101 is used to realize the auxiliary focus function when taking pictures; a photosensitive sensor 102, and the photosensitive sensor is used to assist the anti-mistouch mode to realize the anti-mistouch function in different application scenarios; a first screen 103, and the first screen 103 is used to display content to the user when the foldable electronic device is in a folded state, and is also the executor of the anti-mistouch mode. When it is judged that the anti-mistouch mode is entered, the first screen 103 is extinguished to enter the anti-mistouch mode. When it is judged that the anti-mistouch mode is not enabled, the first screen 103 displays the relevant content normally. The front inner screen part may specifically include a second screen 104, which is used to display content to the user when the foldable electronic device is in the unfolded state, and is also the executor of the anti-false touch mode. When it is determined that the anti-false touch mode is enabled, the second screen 104 is turned off to enter the anti-false touch mode. When it is determined that the anti-false touch mode is not enabled, the second screen 104 displays the relevant content normally; an infrared proximity sensor 105, which is used to realize the anti-false touch function of the whole machine call screen and the inner display screen when the foldable electronic device is in the unfolded state; a first inertial sensor 106 and a second inertial sensor 107, which are arranged in combination to detect the angle between the first body 110 and the second body 111 of the foldable electronic device during the unfolding and / or folding process, so as to assist in judging the unfolding state and / or folding state of the foldable electronic device; a Hall sensor 108 and a functional magnet 109, which are arranged in combination with the functional magnet 109 to realize the unfolding and / or folding state detection function of the foldable electronic device.

[0062] In the embodiment of the present application, the unfolded and / or folded state of the foldable electronic device can be determined by the coordinated arrangement of the Hall sensor 108 and the functional magnet 109, and the unfolded and / or folded state of the foldable electronic device can be auxiliary determined by the coordinated arrangement of the first inertial sensor 106 and the second inertial sensor 107. Thus, the state of the foldable electronic device can be accurately determined.

[0063] In an embodiment of the present invention, the functional mode of the laser sensor 101 can be determined based on the unfolded and / or folded state of the foldable electronic device. Specifically, the working mode of the laser sensor 101 can be divided into a focus ranging mode and an anti-mistake touch mode. Among them, when the foldable electronic device is in an unfolded state, the laser sensor 101 automatically enters the focus ranging mode, which is used to implement the auxiliary focus function when the user takes a photo; when the foldable electronic device is in a folded state, the laser sensor 101 automatically enters the anti-mistake touch mode, which is used to implement proximity sensing and anti-mistake touch functions.

[0064] It should be noted that, combined with Figure 3-Figure 6 For a foldable electronic device, before executing step S110, the present application further includes: determining whether the foldable electronic device is in a folded state, and if so, configuring the laser sensor 101 to an anti-mistouch system working mode, and entering step S110. If in an unfolded state, configuring the laser sensor 101 to a focus system working mode.

[0065] In the embodiment of the present application, the above-mentioned anti-mistouch function can be set for the back outer screen part of the foldable electronic device by using the laser sensor 101 set at the back outer screen part corresponding to the camera. It can be understood that in this way, the data obtained in sub-step S110 is the data detected by the laser sensor 101.

[0066] Optionally, sub-step S110 may further include sub-steps S1101 to S1103:

[0067] Sub-step S1101 , when the laser sensor 101 detects a first object 100 and the first object 100 is within a second distance range, acquiring a first energy value of the first object 100 and a first distance of the first object 100 detected by the laser sensor 101 .

[0068] In the present application, refer to Figure 7 , Figure 7 The figure shows the relationship between the energy value and time detected by a laser sensor in the long-distance mode of the present application. Figure 8 , Figure 8The figure shows the relationship between the energy value and time detected by a laser sensor in the short-distance mode of the present application. Fig. 9 , Fig. 9 The graph shows the relationship between energy value and time detected by a laser sensor of the present application in a short-distance mode.

[0069] In the embodiment of the present application, the laser sensor 101 calculates the data time difference ΔT between the internal reflection signal of the electronic device and the reflection signal of the first object 100 in the long-distance d3 mode to obtain the distance information. In the short-distance d2 mode, when the internal reflection signal of the electronic device and the reflection signal of the first object 100 overlap, the laser sensor 101 records the initial time position of the internal reflection signal of the electronic device and the reflection signal of the first object 100 when calibrating with the electronic device, and analyzes the data time difference ΔT between the internal reflection signal of the electronic device and the reflection signal of the first object 100 by comparing the waveform distribution of the energy value curve of the internal reflection signal of the electronic device and the energy value curve of the reflection signal of the first object 100 in the short-distance mode, thereby obtaining the distance information. In particular, during the detection, the laser sensor 101 can detect the peak of the energy value curve 201 of the internal reflection signal of the electronic device and the peak of the energy value curve 202 of the reflection signal of the first object 100, and there is an energy difference ΔC between the two peaks. Then, the time of the two detected peaks is subtracted to obtain the data time difference ΔT, and then the aforementioned distance information can be obtained by multiplying the data time difference ΔT by the speed of light c.

[0070] It should be noted that if Fig. 9 As shown, when the laser sensor 101 is in the close-range d1 mode, since the data time difference ΔT between the internal reflection signal of the electronic device and the reflection signal of the first object 100 is too small, the reflection signals of the two cannot be accurately distinguished. The laser sensor detects the crosstalk energy value after the reflection signals of the two are superimposed. Therefore, it is impossible to accurately parse the data time difference ΔT between the internal reflection signal of the electronic device and the reflection signal of the first object 100 to obtain the distance information between the focusing sensor 101 and the first object. There is a risk that the system reports that the first object is not detected. Therefore, it is necessary to make a judgment based on the crosstalk energy value of the superimposed reflection signal.

[0071] In the embodiment of the present application, the first energy value of the first object 100 detected by the laser sensor 101 and the second distance of the first object 100 can be obtained when the laser sensor 101 is in the short distance d2 mode, and of course, it can also be performed within 50 to 100 mm. That is to say, the second distance between the first object 100 and the laser sensor 101 is within the short distance d2 range or 50 to 100 mm. The laser sensor 101 records the initial time position of the internal reflection signal of the electronic device and the reflection signal of the first object 100, and compares the waveform distribution of the energy value curve of the internal reflection signal of the electronic device and the energy value curve of the reflection signal of the first object 100 in the short distance d2 mode or within 50 to 100 mm, and parses the data time difference ΔT between the internal reflection signal of the electronic device and the reflection signal of the first object 100, and then obtains the second distance of the first object 100 according to the data time difference ΔT.

[0072] Sub-step S1102, obtaining a reference energy value of the reference object at the second distance according to a preset reflectivity identification curve, wherein the reflectivity identification curve is fitted based on multiple sets of data detected by the laser sensor 101 for the reference object, each set of data including a calibrated distance between the reference object and the electronic device, and a calibrated energy value of the reference object at the calibrated distance.

[0073] In the embodiment of the present application, the reflectivity identification curve is fitted based on multiple sets of data detected by the laser sensor 101 for the reference object, each set of data includes a calibrated distance between the reference object and the electronic device, and a calibrated energy value of the reference object at the calibrated distance. Fig.10 , Fig.10 The figure shows the relationship between the energy value and time of a laser sensor of the present application for energy calibration of a reference object at a distance of 200 mm. Fig.11 , Fig.11The energy-time relationship curve of a laser sensor of the present application for energy calibration of a reference object at a distance of 50mm is shown. For example, the reflectivity of the reference object is 18%@940nm, and when the calibration distance between the reference object and the electronic device is 200mm, the energy value of the reference object obtained by the laser sensor 101 is C_200_Base, and when the calibration distance between the reference object and the electronic device is 50mm, the energy value of the reference object obtained by the laser sensor 101 is C_50_Base, so that the laser sensor 101 fits multiple sets of data detected by the reference object to obtain multiple sets of calibration distances and calibration energy values ​​of the reference object at the calibration distance. By fitting the data of a reference object with known reflectivity at different calibration distances, the relationship between the calibration distance and the calibration energy value in the environment of a reference object with known reflectivity can be obtained, and then a reflectivity identification curve based on reference object fitting of the present application as shown in 12 is obtained. Specifically, the calibration distance in the reflectivity representation curve can be selected within the short distance d2 range.

[0074] In practical applications, for a laser sensor 101 with a detectable range of 50mm to 2500mm, the relationship between the distance and energy within 50mm is not accurate, while the relationship between the distance and energy above 50mm is accurate. In order to make the detection more accurate when the electronic device is placed in a pocket or bag, a curve within the range of d2 can be selected. Among them, the above fitting can be fitted in any way, and the embodiments of the present application are not limited thereto. In addition, since a reflectivity identification curve is set, in the subsequent calculation of the first reflectivity, the laser sensor 101 can calculate the first reflectivity when the first object 100 enters any position within the aforementioned range of d2, and the calculation method is simpler.

[0075] In an embodiment of the present application, another method for calibrating the reference energy value of a reference object at different calibration distances is also provided. Specifically, a discrete set can be constructed within a short distance d2, and the data in the set includes a calibration distance and a reference energy value of the reference object corresponding to the calibration distance. For example, any data in the discrete set is A (calibration distance dn, reference energy value Cn), where n is any integer in the range of 50-200. In order to establish a more comprehensive discrete set, within the range of 50mm-200mm, each 1mm can be set as a calibration distance, and the reference energy value of the reference object at the calibration distance can be obtained by the laser sensor 101. At this time, the discrete set can have a total of 200-50+1 groups of data, namely (50mm, C1), (51mm, C2), ..., (dn, Cn), ..., (200mm, C151). The number of data in the set is not limited by the embodiment of the present application.

[0076] Sub-step S1103, acquiring the first reflectivity according to the first energy value, the reference energy value, the benchmark energy value, and the reference reflectivity.

[0077] In the embodiment of the present application, the reference energy value can be obtained according to a preset reflectivity identification curve, or the reference energy value of the reference object corresponding to the first distance can be determined in the discrete set according to the first distance. After obtaining the reference energy value based on the above method, the first reflectivity is obtained according to the first energy value, the reference energy value, the benchmark energy value, and the reference reflectivity. In this way, the first reflectivity of any other object can be calculated during the detection process based on the calibration results of the existing reference object.

[0078] Optionally, sub-step S1103 may also include the following steps: calculating the difference between the first energy value and the benchmark energy value to obtain a first difference; calculating the difference between the reference energy value and the benchmark energy value to obtain a second difference; dividing the first difference by the second difference to obtain a first ratio; calculating the product of the first ratio and the reference reflectivity to obtain the first reflectivity.

[0079] In the embodiment of the present application, for example, the first distance is 50 mm, and through the reflectivity recognition curve or discrete set search, it can be known that the reference energy value of the reference object at 50 mm is C 50_Target , the first reflectivity of the first object 100 can be calculated by formula (1), and the formula (1) is as follows:

[0080]

[0081] Among them, R Target is the first reflectivity of the first object; C 50_Target is the first energy value of the first object at 50 mm; C_Base is the preset reference energy value; C 50_Base is the reference energy value of the reference object at 50mm; R Base is the reference reflectivity of the reference object.

[0082] It should be noted that for the curve obtained by the above fitting, when the first object is at any position within the second distance range, the laser sensor 101 can substitute the value into the curve to calculate a first reflectivity. The calculation method is simple and the application is flexible.

[0083] As for the aforementioned discrete set method, the laser sensor 101 can detect the first object 100 that appears at the corresponding calibration distance, and then substitute the reference energy value based on the calibration distance into the aforementioned formula for calculation to obtain the first reflectivity. This discrete set method does not require fitting, but can only detect objects that appear at the calibration distance. Compared with the aforementioned reflectivity identification curve, there are more calibration points and the application is not flexible enough.

[0084] In the embodiment of the present application, since there are two objects with different reflectivities, the ratio of their reflectivities is positively correlated with the ratio of the difference between their energy values ​​at the same position and the reference energy values. Therefore, the first reflectivity of the first object can be conveniently calculated by the above method.

[0085] Optionally, in the embodiment of the present application, step 110 may further include: when the laser sensor 101 does not detect an object in the second distance range, using a default reflectivity or a last recorded reflectivity as the first reflectivity of the target parameter.

[0086] If the laser sensor 101 does not detect an object within the aforementioned second distance range, the default reflectivity can be used as the first reflectivity. This method can be targeted at a specific type of pocket or bag, because the reflectivity of the pocket or bag of this type can be measured in advance.

[0087] Or, each time the reflectivity is calculated according to the aforementioned step S110, it is recorded once, and then the reflectivity recorded last time can be used as the first reflectivity. Of course, when recording, multiple values ​​can be recorded in chronological order, or only the most recently calculated reflectivity can be recorded each time. This situation can be used for, for example, the first object 100 has entered the d2 range but has not continued to enter the d1 range. In a pocket or bag, the detection is most likely for the same very small area in the pocket or bag. Then, the next time the first object enters the d1 range, the reflectivity recorded last time is most likely the reflectivity of the measured position of the first object. Then, using this reflectivity for calculation can also more accurately calculate the compensation energy value.

[0088] Step 120: When the laser sensor 101 detects a first object 100 and the first object 100 is within a first distance range, the crosstalk energy value detected by the laser sensor is compensated according to the first reflectivity of the target parameter to obtain a compensated energy value of the first object 100; the upper limit value of the first distance range is less than or equal to the lower limit value of the detectable range.

[0089] In the embodiment of the present application, after the first reflectivity is acquired in step 110, for objects entering the range d1, the crosstalk energy value detected by the laser sensor 101 can be compensated based on the first reflectivity, so as to obtain a more accurate energy value, making the anti-mistouch judgment more precise.

[0090] Optionally, step 120 may include:

[0091] Sub-step S120: Compensating the crosstalk energy value detected by the laser sensor according to the first reflectivity, a preset benchmark energy value, and a preset reference reflectivity of a reference object to obtain a compensated energy value of the first object.

[0092] It should be noted that the target parameters also include: a preset reference energy value and a preset reference reflectivity of a reference object.

[0093] In an embodiment of the present application, for a first object 100 with different reflectivities, when the first object 100 approaches the electronic device from far to near, such as when entering the first distance range from the second distance range, the crosstalk energy value detected by the laser sensor 101 can be compensated based on the aforementioned first reflectivity, the reference reflectivity of the reference object, and the preset reference energy value, thereby converting the crosstalk energy value to a compensated energy value under the reference reflectivity condition, eliminating the influence of the reflectivity on the distance, and obtaining a more accurate energy value with the same reference reflectivity scale. In an embodiment of the present application, the first distance range can be a range of close distance d1, specifically a range of 0mm-50mm, and the upper limit value of the first distance range can be the upper limit value of the close distance d1 range. The lower limit value of the detectable range can be the lower limit value of the short distance d2 coverage range, specifically 50mm.

[0094] In the embodiment of the present application, the electronic device can determine whether the first object 100 is within the first distance range by determining whether there is an energy value exceeding the reference energy value and whether a distance greater than or equal to 50 mm can be identified. For example, if there is an energy value exceeding the reference energy value and a distance greater than or equal to 50 mm cannot be identified, the first object 100 is within the first distance range. If the current energy value is the reference energy value or a distance greater than or equal to 50 mm can be identified, the first object 100 is not within the first distance range.

[0095] In the embodiment of the present application, the crosstalk energy value is the energy value of the superposition of the reflection signal of the first object 100 detected by the laser sensor 101 in the close-range mode and the reflection signal inside the electronic device. Then, according to the first reflectivity, the preset reference energy value, and the reference reflectivity of the preset reference object, the crosstalk energy value detected by the laser sensor 101 is compensated to obtain the compensated energy value of the first object 100. Specifically, according to the first reflectivity, the preset reference energy value, and the reference reflectivity of the preset reference object, the energy value of the reflection signal of the first object 100 detected by the laser sensor 101 is normalized by the reflectivity, and the reflected energy value is summed with the preset reference energy value to obtain the compensated energy value of the first object 100. That is, the compensated energy value of the first object 100 is the sum of the reflected energy value of the first object 100 after the first reflectivity is normalized and the preset reference energy value.

[0096] Optionally, the step S120 may include the following steps: calculating the difference between the crosstalk energy value and the reference energy value to obtain a third difference; calculating the ratio of the reference reflectivity and the first reflectivity to obtain a second ratio; multiplying the product of the third difference and the second ratio, and adding the reference energy value to obtain the compensation energy value.

[0097] In the embodiment of the present application, when the first object 100 is in the second range, the laser sensor 101 switches to the short-distance d1 mode. Since the data time difference ΔT between the internal reflection signal of the electronic device and the reflection signal of the first object 100 is too small, the reflection signals of the two cannot be accurately distinguished. Therefore, the approach operation of the first object 100 needs to be judged by the energy value.

[0098] Specifically, when the first object 100 is within the second range, the crosstalk energy value of the first object detected by the laser sensor 101 is C currectvalue , the crosstalk energy value detected by the laser sensor 101 is compensated, and the compensated energy value of the first object 100 can be calculated by formula (2), and the formula (2) is as follows:

[0099]

[0100] Among them, C currectvalue is the compensation energy value of the first object; C currectvalue is the crosstalk energy value of the first object; R Target is the first reflectivity of the first object; C_Base is the preset reference energy value; R Base is the reference reflectivity of the reference object.

[0101] In the embodiment of the present application, the laser sensor 101 first calculates the first reflectivity of the first object 100 within the second distance range, i.e., the short distance d2. When the first object 100 enters the close distance d1, energy compensation is performed by normalizing the crosstalk energy value of the first object 100. The influence of the reflectivity of different objects within the close distance d1 on the approach distance is eliminated, and accurate detection and judgment of the anti-mistouch function of the electronic device display screen in different application scenarios is achieved.

[0102] Optionally, after obtaining the first reflectivity of the first object 100, the following steps may also be included: recording a first moment of calculating the first reflectivity;

[0103] Optionally, before compensating the crosstalk energy value detected by the laser sensor 101 according to the first reflectivity, the preset benchmark energy value, and the preset reference reflectivity of the reference object to obtain the compensated energy value of the first object 100, the method further includes the following:

[0104] Recording a second moment when the laser sensor 101 detects the first object 100 and the first object is within the first distance range;

[0105] When the interval between the second moment and the first moment is less than a preset time length, the step of compensating the crosstalk energy value detected by the laser sensor 101 according to the first reflectivity, the preset benchmark energy value, and the preset reference reflectivity of the reference object is performed to obtain the compensated energy value of the first object 100.

[0106] In the embodiment of the present application, the first moment is the moment when the first reflectivity of the first object 100 is obtained based on the first energy value of the first object 100, the reference reflectivity of a preset reference object, the reference energy value of a preset reference object at a first distance from the first object 100, and the preset benchmark energy value; the second moment is the second moment when the laser sensor 101 detects the presence of the first object 100 and the first object 100 is within the first distance range.

[0107] In the embodiment of the present application, considering the scenario that the user puts the electronic device in the electronic folding state into a pocket or bag, the first moment of calculating the first reflectivity of the first object 100 and the second moment when the laser sensor 101 detects the first object 100 and the first object 100 is within the first distance range are relatively short. In this scenario, the pocket or bag is used as the first object 100, and the action of the first object 100 entering the close distance d1 range from the short distance d2 range is usually performed continuously. Therefore, the interval distance between the first moment and the second moment is usually relatively short. By setting a preset time length, and when the interval between the second moment and the first moment is less than the preset time length, the step of compensating the crosstalk energy value detected by the laser sensor according to the first reflectivity, the preset reference energy value, and the preset reference reflectivity of the reference object is performed to obtain the compensation energy value of the first object, thereby ensuring the accuracy of the calculated compensation energy value. Specifically, the preset time length is the time interval when the first object enters the close distance d1 range from the short distance d2 range in reality. The preset time length can be set according to the specific scenario to ensure the accuracy of the calculated compensation energy value, and the embodiment of the present application does not limit this.

[0108] Of course, if the difference between the first moment and the second moment is greater than or equal to the preset time length, the compensation energy value may not be calculated this time, and the process returns to step S110 and starts again.

[0109] Step 130: When the compensation energy value meets a first preset condition, enable the false touch prevention mode.

[0110] In the embodiment of the present application, the anti-false touch mode may be that the laser sensor 101 enters the anti-false touch mode to realize the sensing and anti-false touch judgment functions of the approach operation of the first object 100. Specifically, the sensing and anti-false touch judgment functions of the approach operation of the first object 100 may be that when the laser sensor 101 detects the presence of the first object 100 and the first object 100 is within the second distance range, the first reflectivity of the first object 100 is obtained according to the first energy value of the first object 100, the preset reference reflectivity of the reference object, the preset reference energy value of the reference object at the first distance from the first object 100, and the preset reference energy value; and when the laser sensor 101 detects the presence of the first object 100 and the first object 100 is within the first distance range, the crosstalk energy value detected by the laser sensor 101 is compensated according to the first reflectivity, the preset reference energy value, and the preset reference reflectivity of the reference object to obtain the compensated energy value of the first object 100; finally, when the compensated energy value meets the first preset condition, the anti-false touch mode is enabled.

[0111] In an embodiment of the present application, a first preset condition for enabling the anti-false touch mode can be pre-set. When the compensation energy value meets the condition, the anti-false touch mode is enabled. In this way, the anti-false touch mode can be enabled more accurately, thereby improving the accuracy of enabling the anti-false touch mode and saving power of the electronic device.

[0112] Optionally, in the embodiment of the present application, after enabling the anti-false touch mode when the compensation energy value meets the first preset condition, the method may further include: disabling the anti-false touch mode when the compensation energy value meets the second preset condition.

[0113] In the embodiment of the present application, a second preset condition for turning off the false touch prevention mode can also be set, and the false touch prevention mode is turned off when the compensation energy value meets the second preset condition. In this way, the false touch prevention mode can last for a more accurate time, avoiding the false touch prevention mode from lasting too long, causing the user to be in the false touch prevention mode when he wants to use other functions.

[0114] In the embodiment of the present application, Figure 3-Figure 6 In the foldable electronic device, the anti-mistouch mode can also be the display screen of the electronic device, which can include the first screen 103, entering the anti-mistouch mode. Specifically, when the anti-mistouch mode is enabled, the display screen of the electronic device is turned off to enter the anti-mistouch mode. When the anti-mistouch mode is turned off, the first screen of the electronic device displays the relevant content normally.

[0115] Optionally, the compensation energy value meets the first preset condition, which may include: the difference between the compensation energy value and the reference energy value is greater than or equal to a first preset energy threshold;

[0116] The compensation energy value meets the second preset condition, which may include: a difference between the compensation energy value and the reference energy value is less than or equal to a second preset energy threshold.

[0117] Optionally, enabling the anti-false touch mode when the compensation energy value meets a first preset condition may include: enabling the anti-false touch mode when the difference between the compensation energy value and the baseline energy value is greater than or equal to a first preset energy threshold.

[0118] When the compensation energy value meets the first preset condition, after enabling the false touch prevention mode, it may also include: when the difference between the compensation energy value and the reference energy value is less than or equal to the second preset energy threshold, turning off the false touch prevention mode.

[0119] It should be noted that the first preset energy threshold is greater than the second preset energy threshold, and the second preset energy threshold is less than the difference between the energy value detected by the laser sensor and the reference energy value when the distance between the first object and the electronic device is 0.

[0120] In an embodiment of the present application, when the difference between the compensation energy value and the preset benchmark energy value is greater than or equal to a first preset energy threshold, it indicates that the first object 100 is close to the electronic device, and it is necessary to enable an anti-mistouch mode to prevent a false touch; when the difference between the compensation energy value and the preset benchmark energy value is less than or equal to a second preset energy threshold, it indicates that the first object 100 is far away from the electronic device, and it is possible to turn off the anti-mistouch mode so that the display screen of the electronic device can display relevant content normally according to user operations.

[0121] In the embodiment of the present application, within the close distance d1, the compensation energy value C of the first object 100 is currectvalue By judging the approaching state of the first object 100, the influence of the first reflectivity of the first object 100 itself on the approaching distance can be eliminated. The judging of the approaching state of the first object 100 by the compensation energy value of the first object 100 can be judging the approaching state and / or the moving away state of the first object 100 by comparing the difference between the compensation energy value and the reference energy value with the first preset energy value and / or the second preset energy value.

[0122] Specifically, the difference between the compensation energy value and the reference energy value is defined as the real-time energy increment ΔC, and the real-time energy increment ΔC can be calculated by the following formula (3):

[0123]

[0124] Among them, C currectvalue is the compensation energy value of the first object; C currectvalue is the crosstalk energy value of the first object; R Target is the first reflectivity of the first object; C_Base is the preset reference energy value; R Base is the reference reflectivity of the reference object.

[0125] Specifically, the first preset energy threshold and the second preset energy threshold may be set according to the actual usage scenario. Fig.13 , Fig.13The relationship curve between distance and energy in a close distance mode of the present application is shown. For example, when the distance between the first object 100 and the electronic device is within 20 mm, the false touch prevention mode is enabled, and the first preset energy threshold can be recorded as ΔC 20mm , when the difference between the compensation energy value of the first object 100 and the reference energy value is greater than or equal to ΔC 20mm Similarly, when the distance between the first object 100 and the electronic device is beyond 40 mm, the anti-false touch mode is turned off. At this time, the second preset energy threshold can be recorded as ΔC 40mm , when the difference between the compensation energy value of the first object 100 and the reference energy value is less than or equal to ΔC 40mm , turn off the accidental touch prevention mode.

[0126] like Fig.13 The relationship curve between distance and energy in a close distance mode of the present application is shown. It can be seen that ΔC 20mm , ΔC 40mm The specific relationship between C_Base and C_Base. C_Base+ΔC 20mm >C_Base+ΔC 40mm >C_Base, so ΔC 20mm >ΔC 40mm Therefore, the first preset energy threshold is greater than the second preset energy threshold, and the second preset energy threshold is less than the difference between the energy value detected by the laser sensor 101 and the reference energy value when the distance between the first object 100 and the electronic device is 0, that is, Fig.13 The second preset energy threshold obtained by subtracting C_Base from the energy value corresponding to 40 mm is smaller than the first preset energy threshold obtained by subtracting C_Base from the energy value corresponding to the intersection of the curve and the energy axis.

[0127] In this scheme, if Fig.13 The curve shown has points with the same energy at different distances on both sides of the peak. In practical applications, when the distance is less than 20 mm, it means that the pocket or bag side wall itself or the object in the pocket or bag is very close to the electronic device, and the false touch prevention mode can be activated. When the distance is greater than 40 mm, it means that the pocket or bag side wall itself or the object in the pocket or bag is far away from the electronic device, and the false touch prevention mode can be turned off.

[0128] Since there is no point N with the same energy as point M within 20 mm on the curve for a point M at a distance greater than 40 mm, setting the second energy threshold can avoid the situation where points with the same energy may correspond to different distances, thereby more accurately identifying whether to start the anti-false touch mode. In addition, since in actual situations, the first object 100 approaches or moves away from the electronic device, which is basically a continuous process, as long as the difference between the compensation energy value and the reference energy value is greater than or equal to ΔC 20mm , which means that they have entered the distance range where accidental touch operations may occur at any time. For the case where two different points have the same energy, that is, the points between 0 and 20 mm, the anti-accidental touch mode can be continuously saved, and for the points between 20 mm and 40 mm, it can be used as a buffer to release the anti-accidental touch mode. As long as the anti-accidental touch mode is activated, the difference between the compensation energy value and the reference energy value is not less than ΔC 40mm , the false touch prevention mode is always activated as long as the difference between the compensation energy value and the reference energy value is lower than ΔC 40mm Only then can the anti-accidental touch mode be released, which can avoid releasing the anti-accidental touch mode too early.

[0129] Optionally, the compensation energy value meets the first preset condition, and may further include: the compensation energy value is greater than or equal to a third preset energy threshold;

[0130] The compensation energy value meets the second preset condition, including: the compensation energy value is less than or equal to a fourth preset energy threshold.

[0131] Optionally, enabling the false touch prevention mode when the compensation energy value meets a first preset condition may include: enabling the false touch prevention mode when the compensation energy value is greater than or equal to a third preset energy threshold.

[0132] When the compensation energy value meets the first preset condition, after enabling the false touch prevention mode, the method may further include: when the compensation energy value is less than or equal to a fourth preset energy threshold, disabling the false touch prevention mode.

[0133] It should be noted that the third preset energy threshold is greater than the fourth preset energy threshold, and the fourth energy threshold is less than the energy value detected by the laser sensor when the distance between the first object and the electronic device is 0.

[0134] In the embodiment of the present application, when the compensation energy value is greater than or equal to the third preset energy threshold, it means that the first object 100 is close to the electronic device, and the anti-mistouch mode needs to be enabled to prevent the occurrence of accidental touches; when the compensation energy value is less than or equal to the fourth preset energy threshold, it means that the first object 100 is far away from the electronic device, and the anti-mistouch mode can be turned off so that the display screen of the electronic device can display relevant content normally according to user operations.

[0135] In the embodiment of the present application, the principle is similar to the first preset energy threshold and the second preset energy threshold. Fig.13 The third preset energy threshold and the fourth preset energy threshold can be set according to the actual usage scenario. For example, when the distance between the first object 100 and the electronic device is within 20 mm, the false touch prevention mode is enabled, and the third preset energy threshold can be recorded as C_Base+ΔC 20mm , when the compensation energy value of the first object 100 is greater than or equal to C_Base+ΔC 20mm Similarly, when the distance between the first object 100 and the electronic device is beyond 40 mm, the anti-false touch mode is turned off. At this time, the fourth preset energy threshold can be recorded as C_Base+ΔC 40mm , when the compensation energy value of the first object 100 is less than or equal to C_Base+ΔC 40mm , turn off the accidental touch prevention mode.

[0136] Relative to the first energy threshold ΔC 20mm and the second energy threshold ΔC 40mm The algorithm directly calculates the energy threshold ΔC 20mm and the second energy threshold ΔC 40mm C_Base is added on each of them. The principles are similar and will not be described in detail here.

[0137] Optionally, the embodiments of the present application may also be applied to non-foldable electronic devices, such as Figure 14-15 The electronic device with a double-sided screen shown in FIG. 1 has a first screen 1410 and a second screen 1420. A laser sensor 1421 is arranged on the second screen 1420 corresponding to the position of the camera. The first screen 1410 displays Fig.15 In the style of the front camera, a laser sensor 1411 is also provided at the position corresponding to the front camera, and the laser sensor 1411 in the first screen 1410 is hidden behind the display screen. A laser sensor 1421 is provided on the second screen 1420 corresponding to the camera.

[0138] In the case of an electronic device applied to such a double-sided screen, before step S110, it may include: judging the state of the electronic device, if the electronic device is in a first state, configuring the electronic device to enter an anti-mistouch system working mode, and entering step S110; if the electronic device is in a second state, configuring the electronic device to enter a focusing system working mode, and using a laser sensor for focusing.

[0139] Of course, since both the first screen 1410 and the second screen 1420 can be provided with laser focus sensors, the anti-mistaken touch system working mode of the laser focus sensor of each screen can work for the corresponding screen. For example, the data of the laser focus sensor 1421 is used to implement the anti-mistaken touch function of the second screen 1420, and the data of the laser focus sensor 1411 is used to implement the anti-mistaken touch function of the first screen 1410.

[0140] Optionally, the laser sensor is a laser sensor in a camera.

[0141] In the embodiment of the present invention, the laser sensor may be an existing laser focus sensor in the focus system of the electronic device camera, and the method for preventing accidental touches proposed in the embodiment of the present invention can be implemented without adding components to the electronic device. The camera of the electronic device may be a front camera or a rear camera, which is not limited in the embodiment of the present invention.

[0142] It should be noted that the anti-mistouch method described in the embodiments of the present application can be used for electronic devices of any type and form, including but not limited to dual-curved screen electronic devices, non-folding electronic devices, and conventional mobile phone models with high requirements for detection distance accuracy.

[0143] It should be noted that for Figure 3-Figure 6 In a foldable electronic device, the first screen 103 of the outer screen part on the back has fewer functions, such as only supporting basic functions such as screen-off clock and calendar. If the electronic device is placed in a pocket or a backpack and other accidental touch scenarios, it is set to unlock the outer screen to prevent accidental touches. The user needs to unlock it again each time to view the clock, calendar and other information, which is not convenient enough. Therefore, the embodiment of the present application can execute the anti-accidental touch method of the present application for this type of outer screen, which not only improves convenience but also realizes the anti-accidental touch function more accurately.

[0144] In an embodiment of the present application, when the laser sensor 101 detects the first object 100 within a first distance range outside its detectable range, the crosstalk energy value detected by the laser sensor 101 can be compensated according to the first reflectivity to obtain a more accurate compensated energy value of the first object 100. In this way, a more accurate energy value is used to perform anti-mistouch judgment, which expands the detection range of the laser sensor 101, and can be separated from the anti-mistouch scheme of the infrared proximity sensor 105 and the inertial sensors 106 & 107, thereby avoiding the problem of low detection accuracy caused by the infrared proximity sensor 105 being affected by the reflectivity of the first object 100, and also avoiding the problem that the scheme of the inertial sensors 106 & 107 may accidentally wake up the screen and waste power of the electronic device. The detection accuracy can be improved, so that the anti-mistouch mode can be enabled more accurately, saving power of the electronic device.

[0145] Reference Fig.16 , taking a foldable electronic device as an example, a flowchart of another method for preventing accidental touches of the present application is shown. The method for preventing accidental touches may include the following steps:

[0146] Step 1602: Register the sensor.

[0147] After starting, for example, after the foldable electronic device is turned on, the electronic device registers the sensor into the operating system. In the embodiment of the present application, the sensor may include a laser sensor 101, a first inertial sensor 106, a second inertial sensor 107, a photosensitive sensor 102, and a Hall sensor 108. Among them, when the foldable electronic device is in a folded state, the laser sensor 101 is used to realize the proximity sensing and anti-mistouch function, and when the foldable electronic device is in an unfolded state, the laser focus sensor 101 is used to realize the auxiliary focus function when taking pictures; the photosensitive sensor 102, the photosensitive sensor is used to assist the anti-mistouch mode to realize the anti-mistouch function in different application scenarios; the first inertial sensor 106 and the second inertial sensor 107, the first inertial sensor 106 and the second inertial sensor 107 are arranged in combination to detect the angle between the first body 110 and the second body 111 of the foldable electronic device during the unfolding and / or folding process, so as to assist in judging the unfolding state and / or folding state of the foldable screen electronic device; the Hall sensor 108 and the functional magnet 109, the Hall sensor 108 and the functional magnet 109 are arranged in combination to realize the unfolding and / or folding state detection function of the foldable electronic device.

[0148] In the embodiment of the present application, when the user puts the electronic device into the backpack, it is necessary to call the light sensing data of the light sensor 102 in the electronic device, the mobile phone time data and the inertial sensor data to determine whether the electronic device is in the backpack. If it is confirmed that the electronic device is in the backpack, the laser sensor 101 is used in the short distance d1 mode to cover the detection of the distance of 50mm-100mm. Further covering complex and changeable user usage scenarios and improving user experience.

[0149] Step 1603: Determine the state of the foldable electronic device. If the foldable electronic device is in the unfolded state, proceed to step 1604; if the foldable electronic device is in the folded state, proceed to step 1606.

[0150] In the embodiment of the present application, the electronic device may be a foldable electronic device, and the state of the foldable electronic device may include an unfolded state and a folded state.

[0151] In the embodiment of the present application, the unfolded and / or folded state of the foldable electronic device can be determined by the coordinated arrangement of the Hall sensor 108 and the functional magnet 109, and the unfolded and / or folded state of the foldable electronic device can be auxiliary determined by the coordinated arrangement of the first inertial sensor 106 and the second inertial sensor 107. Thus, the state of the foldable electronic device can be accurately determined, and the specific determination method is not limited in the embodiment of the present application.

[0152] In the embodiment of the present application, the folded state may further be a state in which multiple screens of the stackable electronic device are buckled together.

[0153] Step 1604: Configure the laser sensor 101 to a focus ranging mode.

[0154] In the embodiment of the present application, when it is confirmed that the foldable electronic device is in the unfolded state, the laser sensor 101 is configured in the focus ranging mode to realize the auxiliary focus function when taking pictures.

[0155] Step 1605: The laser sensor measures distance in the long-distance mode or the short-distance mode.

[0156] In the embodiment of the present application, when it is confirmed that the foldable electronic device is in the unfolded state, the laser sensor 101 is configured in the focus and ranging mode. The working range of the focus and ranging mode of the laser sensor 101 can include the long-distance d3 mode and the short-distance d2 mode. The specific long-distance mode or short-distance mode ranging is not limited in the embodiment of the present application.

[0157] Specifically, the coverage range of the long-distance d3 mode is 200mm-2500mm, and the coverage range of the short-distance d2 mode is 50mm-200mm. Therefore, when the foldable electronic device is confirmed to be in the unfolded state, the working range of the focus ranging mode of the laser sensor 101 is 50mm-2500mm. Of course, if the detectable range of the laser sensor 101 changes, the working range of the focus ranging mode can change accordingly. For example, when the detectable range of the laser sensor 101 reaches 40mm~2800mm, the working range of the focus ranging mode is 40mm-2800mm. The same applies to other situations, and the embodiments of the present application do not limit them.

[0158] Then proceed to step 1616.

[0159] Step 1606: The laser sensor 101 is configured to be in an anti-mistouch mode.

[0160] In the embodiment of the present application, when it is confirmed that the foldable electronic device is in a folded state, the laser sensor 101 is configured in an anti-mistake touch mode to implement proximity sensing and anti-mistake touch functions.

[0161] Step 1607: The laser sensor measures distance in short-range mode.

[0162] In an embodiment of the present application, when it is confirmed that the foldable electronic device is in a folded state, the laser sensor 101 is configured in an anti-mistouch mode, and the working range of the laser sensor 101 configured in the anti-mistouch mode may include a short-distance d2 mode and a close-distance d1 mode.

[0163] Specifically, the coverage range of the short distance d2 mode is 50mm-200mm, and the coverage range of the close distance d1 mode is 0mm-50mm. Therefore, when the foldable electronic device is confirmed to be in the folded state, the working range of the anti-mistouch mode of the laser sensor 101 is 0mm-200mm.

[0164] Among them, the short-distance d2 mode may include a special scene mode, and the coverage range of the special scene mode is 50mm-100mm. The laser sensor 101 is used to realize the proximity sensing anti-false touch function and reflectivity measurement function in the anti-false touch working mode. The special scene can be a scene where the user puts the folded electronic device into a backpack. Therefore, the working range of the anti-false touch mode can be the coverage range of the special scene and the short-distance d1 mode. In the embodiment of the present application, the laser sensor 101 performs ranging in the short-distance d2 mode. Specifically, when the internal reflection signal of the electronic device and the reflection signal of the first object 100 overlap, the initial time position of the internal reflection signal of the electronic device and the reflection signal of the first object 100 is recorded when the electronic device is calibrated, and in the short-distance mode, the waveform distribution of the energy value curve of the internal reflection signal of the electronic device and the energy value curve of the reflection signal of the first object 100 is compared, and the data time difference ΔT between the internal reflection signal of the electronic device and the reflection signal of the first object 100 is analyzed, thereby obtaining distance information.

[0165] Step 1608: Determine whether there is an object within the range of 50 mm-100 mm. If there is an object, proceed to step 1609. If there is no object, proceed to step 1612.

[0166] In the embodiment of the present application, the range of 50mm-100mm is the coverage range of special scenarios in the short-distance d2 mode coverage range. The special scenario may be a scenario in which a user puts a folded electronic device into a backpack, or a scenario in which a user puts the folded electronic device into a pocket.

[0167] In the embodiment of the present application, confirming that there is no object within the range of 50mm-100mm can be a scene in which the user quickly puts the folded electronic device into a pocket, and the laser sensor 101 of the folded electronic device immediately comes into close contact with the clothing in the pocket.

[0168] Step 1609: Measure a first reflectivity of the first object.

[0169] In an embodiment of the present application, when it is confirmed that there is a first object within the range of 50mm-100mm, the first reflectivity of the first object can be measured by the laser sensor 101. When it is confirmed that there is a first object 100 within the range of 50mm-100mm, the first reflectivity of the first object 100 can be measured by the laser sensor 101.

[0170] The execution process of this step may refer to the aforementioned step S110, and the principle thereof is similar and will not be described in detail here.

[0171] Step 1610: Control the laser sensor to execute the short-distance mode.

[0172] If a false touch is to occur, the object approaches the electronic device from far to near. Therefore, after detecting the reflectivity of the object, the laser sensor can be controlled to execute the close-range mode, that is, the laser sensor is controlled to emit light and enter the process of obtaining the crosstalk energy value.

[0173] Step 1611: Perform energy compensation based on a first reflectivity of the first object.

[0174] In an embodiment of the present application, when the laser sensor 101 detects a first object 100 and the first object 100 is within a close distance d1, the crosstalk energy value detected by the laser sensor 101 is compensated according to the first reflectivity, a preset benchmark energy value, and a preset reference reflectivity of a reference object to obtain a compensated energy value of the first object 100.

[0175] Optionally, the difference between the crosstalk energy value and the reference energy value can be calculated to obtain a third difference; the ratio of the reference reflectivity and the first reflectivity can be calculated to obtain a second ratio; the product of the third difference and the second ratio can be added to the reference energy value to obtain the compensation energy value.

[0176] In this step, the process of performing energy compensation based on the first reflectivity of the first object can refer to the aforementioned step 120 and its sub-steps, which will not be described in detail here.

[0177] Step 1612: Perform energy compensation based on default data or reflectivity from the last test.

[0178] In the embodiment of the present application, when it is confirmed that there is no object within the range of 50mm-100mm, energy compensation can be performed based on default data or the reflectivity of the last test. Specifically, the default data can be preset reflectivity data. When it is confirmed that there is no object within the range of 50mm-100mm, energy compensation can be performed on the first object within the close distance d1 based on the preset reflectivity data or the first reflectivity of the last test. The preset reflectivity data can be set based on the average reflectivity of various pockets or bags. Because the reflectivity difference of pockets or bags is not particularly large, for the convenience of calculation, the preset reflectivity can be used for calculation. Then enter 1613.

[0179] Of course, the energy compensation principle is similar to the aforementioned step 120 and will not be described in detail here.

[0180] Step 1613: Determine whether it is in the approaching state.

[0181] In the embodiment of the present application, when it is confirmed that the compensation energy value meets the first preset condition, it is confirmed as the approaching state. When it is confirmed that the compensation energy value meets the second preset condition, it is confirmed as the moving away state.

[0182] Optionally, in the embodiment of the present application, the compensation energy value meets the first preset condition, which may include: the difference between the compensation energy value and the reference energy value is greater than or equal to a first preset energy threshold;

[0183] The compensation energy value meets the second preset condition, which may include: the difference between the compensation energy value and the reference energy value is less than or equal to a second preset energy threshold;

[0184] The first preset energy threshold is greater than the second preset energy threshold, and the second preset energy threshold is less than the difference between the energy value detected by the laser sensor and the reference energy value when the distance between the first object and the electronic device is 0.

[0185] Optionally, the compensation energy value meets the first preset condition, and may further include: the compensation energy value is greater than or equal to a third preset energy threshold;

[0186] The compensation energy value meets the second preset condition, and may further include: the compensation energy value is less than or equal to a fourth preset energy threshold;

[0187] The third preset energy threshold is greater than the fourth preset energy threshold, and the fourth energy threshold is less than an energy value detected by the laser sensor when the distance between the first object and the electronic device is 0.

[0188] Step 1614: Turn off the external screen and enter the anti-mistouch mode.

[0189] In the embodiment of the present application, when it is confirmed that the compensation energy value meets the first preset condition, it is confirmed to be in the approaching state, the first screen 103 in the outer part of the back is turned off, and the anti-mistouch mode is enabled. Then, the process proceeds to S1616.

[0190] Step 1615: Maintain the external screen state.

[0191] In the embodiment of the present application, when it is confirmed that the compensation energy value meets the second preset condition, it is confirmed to be in the away state, and when it is confirmed that the false touch prevention mode is in the on state, the false touch prevention mode is turned off, and when it is confirmed that the false touch prevention mode is in the off state, no processing is performed to keep the first screen 103 of the folded electronic device in the normal display state. Then, step 1616 is entered.

[0192] Step 1616: Determine whether it is necessary to continue monitoring the folding state. If it is necessary to continue monitoring the folding state, proceed to step 1603. If it is not necessary to continue monitoring the folding state, end.

[0193] In the embodiment of the present application, if it is confirmed that the folding state of the foldable electronic device continues to be monitored, step 1603 is continued to be executed; if it is confirmed that the folding state of the foldable electronic device does not need to be monitored, the process ends. The need to continue to monitor the folding state may be that the electronic device is in a folded state from an unfolded state, or that the electronic device is currently in a folded state. The state that does not require monitoring may be that the electronic device is in a state where the user is using an application, such as in a video, in a game application, taking a photo, recording a video, etc., or in a certain time period, such as the time period when the user is sleeping.

[0194] It should be noted that the data collected in this application are collected after authorization by the data owner. In the embodiment of the present application, when the laser sensor 101 of the electronic device detects the presence of a first object 100 and the first object 100 is within the second distance range, the first reflectivity of the first object 100 is obtained according to the first energy value of the first object 100, the preset reference reflectivity of the reference object, the preset reference energy value of the reference object at the first distance of the first object 100, and the preset benchmark energy value, and when the laser sensor 101 detects the presence of a first object and the first object 100 is within the first distance range, the crosstalk energy value detected by the laser sensor 101 is compensated according to the first reflectivity, the preset benchmark energy value, and the preset reference reflectivity of the reference object, and the compensated energy value of the first object 100 is obtained. When the compensated energy value meets the first preset condition, the anti-false touch mode is enabled. In this way, by adjusting the detection range and working mode of the laser sensor 101 in the electronic device that originally only supports the auxiliary photography autofocus function, the laser sensor 101 can have the auxiliary photography function while also realizing the anti-mistouch function. By measuring the reflectivity of the first object 100 and energy compensation by the laser sensor 101, accurate detection and judgment of the anti-mistouch function of the electronic device display screen in different application scenarios is achieved.

[0195] The embodiment of the present application provides a method for preventing accidental touch, and the execution subject may be an anti-accidental touch device. The embodiment of the present application takes a method for preventing accidental touch by an anti-accidental touch device as an example to illustrate an anti-accidental touch device provided by the embodiment of the present application.

[0196] Reference Fig.17 , Fig.17 The following is a logic block diagram of an anti-accidental touch device of the present application. In an embodiment of the present application, an anti-accidental touch device may include:

[0197] The target parameter acquisition module 1710 is used to acquire target parameters; the target parameters include a first reflectivity of a first object.

[0198] A compensation module 1720 is used to compensate the crosstalk energy value detected by the laser sensor according to the first reflectivity of the target parameter to obtain a compensated energy value of the first object when the laser sensor detects a first object and the first object is within a first distance range; the upper limit value of the first distance range is less than or equal to the lower limit value of the detectable range;

[0199] The enabling module 1730 is used to enable the false touch prevention mode when the compensation energy value meets the first preset condition.

[0200] Optionally, the target parameter acquisition module 1710 includes:

[0201] A reflectivity acquisition submodule is used to acquire the first reflectivity of the first object 100 in the target parameters according to the first energy value of the first object 100, the preset reference reflectivity of the reference object, the preset reference energy value of the reference object at the first distance from the first object 100, and the preset reference energy value when the laser sensor 101 of the electronic device detects a first object and the first object 100 is within a second distance range; the second distance range is within the detectable range of the laser sensor 101, and the upper limit value of the second distance range is less than or equal to the first preset threshold value; the reference energy value is the energy value detected by the laser sensor 101 when there is no object within the upper limit value of the detection range.

[0202] Optionally, the reflectivity acquisition submodule may include:

[0203] A first acquisition submodule, configured to acquire a first energy value of the first object 100 and a first distance of the first object 100 detected by the laser sensor 101 when the laser sensor detects the first object 100 and the first object 100 is within a second distance range;

[0204] A second acquisition submodule is used to acquire a reference energy value of the reference object at the first distance according to a preset reflectivity identification curve; the reflectivity identification curve is fitted based on multiple sets of data detected by the laser sensor 101 for the reference object, each set of data including a calibrated distance between the reference object and the electronic device, and a calibrated energy value of the reference object at the calibrated distance;

[0205] The third acquisition submodule is used to acquire the first reflectivity according to the first energy value, the reference energy value, the benchmark energy value, and the reference reflectivity.

[0206] Optionally, the third acquisition submodule may include:

[0207] A first calculation unit, configured to calculate a difference between the first energy value and the reference energy value to obtain a first difference value;

[0208] A second calculation unit, used for calculating the difference between the reference energy value and the benchmark energy value to obtain a second difference value;

[0209] a third calculation unit, configured to divide the first difference by the second difference to obtain a first ratio;

[0210] The fourth calculation unit is used to calculate the product of the first ratio and the reference reflectivity to obtain the first reflectivity.

[0211] Optionally, the compensation module 1720 may include:

[0212] A first calculation submodule, used for calculating the difference between the crosstalk energy value and the reference energy value to obtain a third difference value;

[0213] A second calculation submodule, used for calculating the ratio of the reference reflectivity to the first reflectivity to obtain a second ratio;

[0214] The third calculation submodule is used to add the product of the third difference and the second ratio to the reference energy value to obtain the compensation energy value.

[0215] Optionally, the enabling module 1730 may include:

[0216] The closing submodule is used to close the anti-mistouch mode when the compensation energy value meets the second preset condition.

[0217] Optionally, the accidental touch prevention device may further include:

[0218] A first recording module, used for recording a first moment of calculating the first reflectivity;

[0219] A second recording module, used for recording a second moment when the laser sensor 101 detects the first object 100 and the first object 100 is within the first distance range;

[0220] An execution module is used to enter the compensation module 1720 when the interval between the second moment and the first moment is less than a preset time length.

[0221] Optionally, the target parameter acquisition module is further used to:

[0222] When the laser sensor does not detect an object in the second distance range, a default reflectivity or a last recorded reflectivity is used as the first reflectivity.

[0223] Optionally, the compensation module 1720 is further used to compensate the crosstalk energy value detected by the laser sensor according to the first reflectivity, a preset benchmark energy value, and a preset reference reflectivity of a reference object to obtain a compensated energy value of the first object.

[0224] In an embodiment of the present application, when the laser sensor detects a first object within a first distance range outside its detectable range, the crosstalk energy value detected by the laser sensor can be compensated according to the first reflectivity to obtain a more accurate compensated energy value of the first object. In this way, a more accurate energy value is used to perform anti-mistouch judgment, which expands the detection range of the laser sensor and can be separated from the anti-mistouch scheme of the infrared proximity sensor and the inertial sensor, thereby avoiding the problem of low detection accuracy caused by the infrared proximity sensor being affected by the reflectivity of the object, and avoiding the problem that the inertial sensor scheme may accidentally wake up the screen and waste power of the electronic device. The detection accuracy can be improved, so that the anti-mistouch mode can be enabled more accurately, saving power of the electronic device.

[0225] The anti-mistouch device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than the terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0226] The anti-mistouch device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0227] The anti-mistouch device provided in the embodiment of the present application can achieve Figure 2 and Fig.16 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0228] Alternatively, if Fig.18 As shown, an embodiment of the present application also provides an electronic device 1800, including a processor 1801 and a memory 1802, wherein the memory 1802 stores programs or instructions that can be executed on the processor 1801, and when the program or instructions are executed by the processor 1801, the various steps of the above-mentioned anti-mistouch method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.

[0229] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0230] Fig.19 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0231] The electronic device 1900 includes but is not limited to components such as a radio frequency unit 1901, a network module 1902, an audio output unit 1903, an input unit 1904, a sensor 1905, a display unit 1906, a user input unit 1907, an interface unit 1908, a memory 1909, and a processor 1910.

[0232] Those skilled in the art will appreciate that the electronic device 1900 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1910 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.19 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0233] Processor 110 is used to obtain target parameters; the target parameters include a first reflectivity of a first object; when the laser sensor detects a first object and the first object is within a first distance range, the crosstalk energy value detected by the laser sensor is compensated according to the first reflectivity of the target parameter to obtain a compensated energy value of the first object; the upper limit value of the first distance range is less than or equal to the lower limit value of the detectable range; when the compensated energy value meets a first preset condition, an anti-false touch mode is enabled.

[0234] Optionally, the processor is also used to obtain the first reflectivity of the first object in the target parameters according to the first energy value of the first object, the preset reference reflectivity of the reference object, the preset reference energy value of the reference object at the first distance from the first object, and the preset reference energy value when the laser sensor of the electronic device detects a first object and the first object is within a second distance range; the second distance range is within the detectable range of the laser sensor, and the upper limit value of the second distance range is less than or equal to a first preset threshold value; the reference energy value is the energy value detected by the laser sensor when there is no object within the upper limit value of the detection range.

[0235] Optionally, the processor is also used to obtain a first energy value of the first object detected by the laser sensor and a first distance of the first object when the laser sensor detects a first object and the first object is within a second distance range; obtain a reference energy value of the reference object at the first distance according to a preset reflectivity identification curve; the reflectivity identification curve is fitted based on multiple sets of data detected by the laser sensor for the reference object, each set of data including a calibrated distance between the reference object and the electronic device, and a calibrated energy value of the reference object at the calibrated distance; obtain the first reflectivity according to the first energy value, the reference energy value, the benchmark energy value, and the reference reflectivity.

[0236] Optionally, the processor is also used to calculate the difference between the first energy value and the benchmark energy value to obtain a first difference; calculate the difference between the reference energy value and the benchmark energy value to obtain a second difference; divide the first difference by the second difference to obtain a first ratio; calculate the product of the first ratio and the reference reflectivity to obtain the first reflectivity.

[0237] Optionally, the processor is also used to record the first moment of calculating the first reflectivity of the first object after acquiring the first reflectivity of the first object; to compensate for the crosstalk energy value detected by the laser sensor based on the first reflectivity, a preset benchmark energy value, and a preset reference reflectivity of a reference object, and before obtaining the compensated energy value of the first object, to record the second moment when the laser sensor detects the presence of the first object and the first object is within a first distance range; and to perform the step of compensating for the crosstalk energy value detected by the laser sensor based on the first reflectivity, the preset benchmark energy value, and the preset reference reflectivity of a reference object to obtain the compensated energy value of the first object when the interval between the second moment and the first moment is less than a preset time length.

[0238] Optionally, the processor is further configured to use a default reflectivity or a last recorded reflectivity as the first reflectivity of the target parameter when the laser sensor does not detect an object in the second distance range.

[0239] Optionally, the processor is further used to compensate the crosstalk energy value detected by the laser sensor according to the first reflectivity, a preset benchmark energy value, and a preset reference reflectivity of a reference object to obtain a compensated energy value of the first object.

[0240] Optionally, the processor is also used to calculate the difference between the crosstalk energy value and the reference energy value to obtain a third difference; calculate the ratio of the reference reflectivity and the first reflectivity to obtain a second ratio; multiply the product of the third difference and the second ratio, and add the reference energy value to obtain the compensation energy value.

[0241] Optionally, the processor is further configured to turn off the false touch prevention mode when the compensation energy value meets a second preset condition.

[0242] Optionally, the processing is also used to enable the anti-mistouch mode when the difference between the compensation energy value and the baseline energy value is greater than or equal to a first preset energy threshold; to turn off the anti-mistouch mode when the difference between the compensation energy value and the baseline energy value is less than or equal to a second preset energy threshold; and when the first preset energy threshold is greater than the second preset energy threshold, and the second preset energy threshold is less than the difference between the energy value detected by the laser sensor and the baseline energy value when the distance between the first object and the electronic device is 0.

[0243] Optionally, the processor is also used to enable the anti-mistouch mode when the compensation energy value is greater than or equal to a third preset energy threshold; turn off the anti-mistouch mode when the compensation energy value is less than or equal to a fourth preset energy threshold; the third preset energy threshold is greater than the fourth preset energy threshold, and the fourth energy threshold is less than the energy value detected by the laser sensor when the distance between the first object and the electronic device is 0.

[0244] In an embodiment of the present application, when the laser sensor detects a first object within a first distance range outside its detectable range, the crosstalk energy value detected by the laser sensor can be compensated according to the first reflectivity to obtain a more accurate compensated energy value of the first object. In this way, a more accurate energy value is used to perform anti-mistouch judgment, which expands the detection range of the laser sensor and can be separated from the anti-mistouch scheme of the infrared proximity sensor and the inertial sensor, thereby avoiding the problem of low detection accuracy caused by the infrared proximity sensor being affected by the reflectivity of the object, and avoiding the problem that the inertial sensor scheme may accidentally wake up the screen and waste power of the electronic device. The detection accuracy can be improved, so that the anti-mistouch mode can be enabled more accurately, saving power of the electronic device.

[0245] It should be understood that in the embodiment of the present application, the input unit 1904 may include a graphics processor (GPU) 19041 and a microphone 19042, and the graphics processor 19041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 1906 may include a display panel 19061, and the display panel 19061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1907 includes a touch panel 19071 and at least one of other input devices 19072. The touch panel 19071 is also called a touch screen. The touch panel 19071 may include two parts: a touch detection device and a touch controller. Other input devices 19072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0246] The memory 1909 can be used to store software programs and various data. The memory 1909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1909 may include a volatile memory or a non-volatile memory, or the memory x09 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0247] The processor 1910 may include one or more processing units; optionally, the processor 1910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1910.

[0248] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned anti-mistouch method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0249] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0250] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned anti-mistouch method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0251] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0252] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned anti-mistouch method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0253] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0254] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0255] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for preventing accidental touch, It is characterized in that include: Get target parameters; The target parameters include a first reflectivity of the first object, a preset reference energy value, and a preset reference reflectivity of a reference object; When the laser sensor detects a first object and the first object is within a first distance range, the crosstalk energy value detected by the laser sensor is compensated according to the first reflectivity of the target parameter to obtain a compensated energy value of the first object; the upper limit value of the first distance range is less than or equal to the lower limit value of the detectable range; When the compensation energy value meets the first preset condition, enabling the false touch prevention mode; The first preset condition is a pre-set condition for enabling the accidental touch prevention mode; Wherein, the acquiring of the target parameters comprises: when a laser sensor of the electronic device detects a first object and the first object is within a second distance range, acquiring the first reflectivity of the first object in the target parameters according to a first energy value of the first object, a preset reference reflectivity of a reference object, a preset reference energy value of the reference object at a second distance from the first object, and a preset reference energy value; the second distance range is within a detectable range of the laser sensor, and an upper limit value of the second distance range is less than or equal to a first preset threshold value; the reference energy value is an energy value detected by the laser sensor when there is no object within the upper limit value of the detection range; Alternatively, according to an application scenario, a target parameter corresponding to the application scenario is acquired; the first reflectivity is a reflectivity of a first object that is preset and corresponds one-to-one to the application scenario; The compensating the crosstalk energy value detected by the laser sensor according to the first reflectivity of the target parameter includes: compensating the crosstalk energy value detected by the laser sensor according to the first reflectivity, a preset benchmark energy value, and a preset reference reflectivity of a reference object to obtain a compensated energy value of the first object.

2. The method according to claim 1, It is characterized in that The step of obtaining the first reflectivity of the first object in the target parameter according to the first energy value of the first object, the preset reference reflectivity of the reference object, the preset reference energy value of the reference object at a second distance from the first object, and the preset benchmark energy value includes: When the laser sensor detects a first object and the first object is within a second distance range, acquiring a first energy value of the first object and a second distance of the first object detected by the laser sensor; According to a preset reflectivity identification curve, a reference energy value of the reference object at the second distance is obtained; the reflectivity identification curve is fitted based on multiple sets of data detected by the laser sensor for the reference object, each set of data including a calibrated distance between the reference object and the electronic device, and a calibrated energy value of the reference object at the calibrated distance; The first reflectivity is acquired according to the first energy value, the reference energy value, the benchmark energy value, and the reference reflectivity.

3. The method according to claim 2, It is characterized in that The acquiring the first reflectivity according to the first energy value, the reference energy value, the benchmark energy value, and the reference reflectivity includes: Calculating a difference between the first energy value and the reference energy value to obtain a first difference value; Calculating a difference between the reference energy value and the benchmark energy value to obtain a second difference value; Dividing the first difference by the second difference to obtain a first ratio; The product of the first ratio and the reference reflectivity is calculated to obtain the first reflectivity.

4. The method according to claim 1, It is characterized in that After obtaining the target parameters, the method further includes: Recording a first moment of calculating the first reflectivity; Before compensating the crosstalk energy value detected by the laser sensor according to the first reflectivity, the preset reference energy value, and the preset reference reflectivity of the reference object to obtain the compensated energy value of the first object, the method further includes: Recording a second moment when the laser sensor detects a first object and the first object is within a first distance range; When the interval between the second moment and the first moment is less than a preset time length, the step of compensating the crosstalk energy value detected by the laser sensor according to the first reflectivity, the preset benchmark energy value, and the preset reference reflectivity of the reference object is performed to obtain the compensated energy value of the first object.

5. The method according to claim 1, It is characterized in that The obtaining of target parameters includes: When the laser sensor does not detect an object in the second distance range, a default reflectivity or a last recorded reflectivity is used as the first reflectivity of the target parameter.

6. The method according to claim 1, It is characterized in that The compensating the crosstalk energy value detected by the laser sensor according to the first reflectivity, the preset reference energy value, and the preset reference reflectivity of the reference object to obtain the compensated energy value of the first object includes: Calculating a difference between the crosstalk energy value and the reference energy value to obtain a third difference value; Calculating a ratio of the reference reflectivity to the first reflectivity to obtain a second ratio; The compensated energy value is obtained by adding the product of the third difference and the second ratio to the reference energy value.

7. The method according to claim 1, It is characterized in that When the compensation energy value meets the first preset condition, enabling the false touch prevention mode includes: When the difference between the compensation energy value and the reference energy value is greater than or equal to a first preset energy threshold, enabling the false touch prevention mode; When the compensation energy value meets the first preset condition, after enabling the false touch prevention mode, the method further includes: When the difference between the compensation energy value and the reference energy value is less than or equal to a second preset energy threshold, turning off the false touch prevention mode; The first preset energy threshold is greater than the second preset energy threshold, and the second preset energy threshold is less than the difference between the energy value detected by the laser sensor and the reference energy value when the distance between the first object and the electronic device is 0.

8. The method according to claim 1, It is characterized in that When the compensation energy value meets the first preset condition, enabling the false touch prevention mode includes: When the compensation energy value is greater than or equal to a third preset energy threshold, enabling the false touch prevention mode; When the compensation energy value meets the first preset condition, after enabling the false touch prevention mode, the method further includes: When the compensation energy value is less than or equal to a fourth preset energy threshold, turning off the false touch prevention mode; The third preset energy threshold is greater than the fourth preset energy threshold, and the fourth preset energy threshold is less than an energy value detected by the laser sensor when the distance between the first object and the electronic device is 0.

9. The method according to claim 1, It is characterized in that The laser sensor is a laser sensor in a camera.

10. An anti-accidental touch device, It is characterized in that include: A target parameter acquisition module is used to obtain target parameters; The target parameters include a first reflectivity of the first object, a preset reference energy value, and a preset reference reflectivity of a reference object; A compensation module, configured to compensate the crosstalk energy value detected by the laser sensor according to the first reflectivity of the target parameter to obtain a compensated energy value of the first object when the laser sensor detects a first object and the first object is within a first distance range; the upper limit value of the first distance range is less than or equal to the lower limit value of the detectable range; An enabling module, configured to enable an anti-mistouch mode when the compensation energy value meets a first preset condition; The first preset condition is a pre-set condition for enabling the accidental touch prevention mode; Wherein, the target parameter acquisition module includes: A reflectivity acquisition submodule, used for acquiring the first reflectivity of the first object in the target parameter according to the first energy value of the first object, the preset reference reflectivity of the reference object, the preset reference energy value of the reference object at the second distance from the first object, and the preset reference energy value, when the laser sensor of the electronic device detects the presence of a first object and the first object is within the second distance range; the second distance range is within the detectable range of the laser sensor, and the upper limit value of the second distance range is less than or equal to the first preset threshold value; the reference energy value is the energy value detected by the laser sensor when there is no object within the upper limit value of the detection range; or, for acquiring the target parameter corresponding to the application scenario according to the application scenario; the first reflectivity is the reflectivity of the first object that is preset and corresponds one-to-one to the application scenario; The compensation module is also used to compensate the crosstalk energy value detected by the laser sensor according to the first reflectivity, a preset benchmark energy value, and a preset reference reflectivity of a reference object to obtain a compensated energy value of the first object.

11. The device according to claim 10, It is characterized in that The reflectivity acquisition submodule includes: A first acquisition submodule, configured to acquire, when the laser sensor detects a first object and the first object is within a second distance range, a first energy value of the first object detected by the laser sensor and a second distance of the first object; A second acquisition submodule is used to acquire a reference energy value of the reference object at the second distance according to a preset reflectivity identification curve; the reflectivity identification curve is fitted based on multiple sets of data detected by the laser sensor for the reference object, each set of data includes a calibrated distance between the reference object and the electronic device, and a calibrated energy value of the reference object at the calibrated distance; The third acquisition submodule is used to acquire the first reflectivity according to the first energy value, the reference energy value, the benchmark energy value, and the reference reflectivity.

12. The device according to claim 11, It is characterized in that The third acquisition submodule includes: A first calculation unit, configured to calculate a difference between the first energy value and the reference energy value to obtain a first difference value; A second calculation unit, used for calculating the difference between the reference energy value and the benchmark energy value to obtain a second difference value; a third calculation unit, configured to divide the first difference by the second difference to obtain a first ratio; The fourth calculation unit is used to calculate the product of the first ratio and the reference reflectivity to obtain the first reflectivity.

13. The device according to claim 10, It is characterized in that Also includes: A first recording module, used for recording a first moment of calculating the first reflectivity; A second recording module, used for recording a second moment when the laser sensor detects that there is a first object and the first object is within a first distance range; The execution module is used to enter the compensation module when the interval between the second moment and the first moment is less than a preset time length.

14. The device according to claim 10, It is characterized in that The target parameter acquisition module is also used for: When the laser sensor does not detect an object in the second distance range, a default reflectivity or a last recorded reflectivity is used as the first reflectivity of the target parameter.

15. The device according to claim 10, It is characterized in that The compensation module comprises: A first calculation submodule, used for calculating the difference between the crosstalk energy value and the reference energy value to obtain a third difference value; A second calculation submodule, used for calculating the ratio of the reference reflectivity to the first reflectivity to obtain a second ratio; The third calculation submodule is used to add the product of the third difference and the second ratio to the reference energy value to obtain the compensation energy value.

16. The device according to claim 10, It is characterized in that The enabling module also includes: A first enabling submodule, configured to enable an anti-false touch mode when the difference between the compensation energy value and the reference energy value is greater than or equal to a first preset energy threshold; The anti-mistaken touch device also includes: A first closing module, configured to close the false touch prevention mode when the difference between the compensation energy value and the reference energy value is less than or equal to a second preset energy threshold; The first preset energy threshold is greater than the second preset energy threshold, and the second preset energy threshold is less than the difference between the energy value detected by the laser sensor and the reference energy value when the distance between the first object and the electronic device is 0.

17. The device according to claim 10, It is characterized in that The enabling module also includes: A second enabling submodule, configured to enable the false touch prevention mode when the compensation energy value is greater than or equal to a third preset energy threshold; The anti-mistaken touch device also includes: A second closing device, used to close the anti-mistouch mode when the compensation energy value is less than or equal to a fourth preset energy threshold; The third preset energy threshold is greater than the fourth preset energy threshold, and the fourth preset energy threshold is less than an energy value detected by the laser sensor when the distance between the first object and the electronic device is 0.

18. The device according to claim 10, It is characterized in that The laser sensor is a laser sensor in a camera.

19. An electronic device, It is characterized in that It comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method for preventing accidental touch as described in any one of claims 1 to 9 are implemented.

20. A readable storage medium, It is characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the method for preventing accidental touch as described in any one of claims 1 to 9 are implemented.