A mistaken touch prevention method, electronic device and readable storage medium
By comprehensively considering changes in the electronic device's posture, screen status, and grip, and using capacitive sensors to detect changes in grip, the problem of low accuracy of proximity sensors is solved, enabling precise control of the anti-mistouch mode, improving user experience and energy efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-01-06
- Publication Date
- 2026-07-07
AI Technical Summary
In existing technologies, the accuracy of determining the timing of the anti-mistouch mode based on proximity light sensors is low, which may cause electronic devices to accidentally activate the anti-mistouch mode, affecting normal user operation.
By combining changes in the electronic device's posture, screen status, and grip, a comprehensive judgment is made as to whether to enter the anti-mistouch mode. Capacitive sensors, such as SAR sensors, are used to detect changes in grip, thereby improving the accuracy of the judgment.
It effectively improves the accuracy of the anti-accidental touch mode, reduces accidental triggering, enhances user experience, and saves power consumption of electronic devices.
Smart Images

Figure CN122348985A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal equipment technology, and in particular to a method for preventing accidental touches, an electronic device, and a readable storage medium. Background Technology
[0002] When users are not using electronic devices (such as mobile phones), they usually put them in their pockets or bags. If the screen of the electronic device touches the pocket or bag, it may be accidentally triggered, causing the screen to wake up (from a screen-off state to a screen-on state). This leads to an increase in the power consumption of the electronic device.
[0003] In some implementations, a proximity sensor is added to the electronic device to prevent accidental touches. For example, the electronic device can determine whether there is an obstruction in front of the screen based on whether the light emitted by the proximity sensor is blocked. If an obstruction is present, it can be determined that the electronic device is in a pocket or backpack. At this time, the accidental touch prevention mode is activated, controlling the electronic device to enter a screen-off state and not responding to screen touch wake-up operations to prevent the screen from being accidentally triggered.
[0004] However, relying solely on proximity sensors to determine when to activate the accidental touch prevention mode has low accuracy. In some cases, this may cause the mode to be activated unintentionally, preventing users from using their phones normally and affecting the user experience. Summary of the Invention
[0005] This application provides a method for preventing accidental touches, an electronic device, and a readable storage medium.
[0006] In a first aspect, embodiments of this application provide a method for preventing accidental touches, used in an electronic device. The electronic device includes a first sensor. The method includes: when the screen of the electronic device is in a first screen state, detecting that the electronic device is in a first posture and that the capacitance data detected by the first sensor meets a first condition, and activating an anti-accidental touch mode; wherein the first screen state includes a locked screen state or an always-on display (AOD) state.
[0007] The accidental touch prevention method provided in this application can comprehensively determine whether an electronic device needs to enter the accidental touch prevention mode based on changes in the device's posture, screen state, and grip state. For example, when the screen of the electronic device is in a first screen state (e.g., locked screen state, always-on display state), and the posture of the electronic device conforms to a first posture (e.g., inverted vertical posture, inverted tilted posture, etc.), and the capacitance data detected by the first sensor meets a first condition (e.g., data conditions when the electronic device changes from a gripped state to a non-gripped state), it can be inferred that the user has placed the electronic device in a backpack or pocket, etc., and the electronic device can activate the accidental touch prevention mode. This method, by combining changes in the electronic device's posture, screen state, and grip state, comprehensively determines the timing for the electronic device to enter the accidental touch prevention mode, which can effectively improve the accuracy of entering the accidental touch prevention mode, avoid accidental triggering of the accidental touch prevention mode, and improve the user experience.
[0008] In some embodiments, when the electronic device detects that its screen is in a first screen state, it can further determine whether the electronic device's posture conforms to a first posture and whether the capacitance data of the first sensor meets a first condition. That is, when the screen is not in the first screen state, there is no need to determine whether the electronic device's posture conforms to the first posture or whether the capacitance data of the first sensor meets the first condition. It can be understood that when the screen of the electronic device is on, it is generally in use by the user, so there is no need to enable the anti-mistouch mode. In this case, not determining whether the electronic device's posture conforms to the first posture or whether the capacitance data of the first sensor meets the first condition can save power consumption.
[0009] In some embodiments, the electronic device can further determine whether its screen state is the first screen state if the electronic device's posture conforms to the first posture and the capacitance data detected by the first sensor meets the first condition. It is understood that if the electronic device's posture does not conform to the first posture and the capacitance data of the first sensor does not meet the first condition, it can be inferred that the probability of triggering the anti-mistouch mode is low. In this case, not determining the screen state of the electronic device can, to some extent, save power consumption.
[0010] In one possible implementation of the first aspect, when the electronic device is in a first state, the first sensor detects first capacitance data; when the electronic device is in a second state, the first sensor detects second capacitance data; the first condition is that the capacitance data detected by the first sensor changes from first capacitance data to second capacitance data.
[0011] In one possible implementation of the first aspect, the first state is the held state and the second state is the unheld state.
[0012] It is understood that the capacitance data detected by the first sensor meets the first condition, which may include: the capacitance data detected by the first sensor meets the data condition that the electronic device changes from a held state to a non-held state.
[0013] It's understandable that when a user puts an electronic device in their pocket or backpack, the device's state generally changes from being held to being unheld. Therefore, determining the change in the device's holding state based on the capacitance data of the first sensor, and then determining the timing for activating the anti-mistouch mode based on this change, can improve the accuracy of determining the activation timing of the anti-mistouch mode, reduce the probability of accidental activation, and improve the user experience.
[0014] In some embodiments, the first sensor may be a specific absorption rate (SAR) sensor. It is understood that the first sensor may also be any other device capable of detecting the capacitance of an electronic device when a human body approaches.
[0015] In one possible implementation of the first aspect, the first value corresponding to the first capacitor data is greater than the first threshold, the second value corresponding to the second capacitor data is less than or equal to the first threshold, and the difference between the first value and the second value is greater than the second threshold.
[0016] It can be understood that a second value corresponding to the capacitance data being less than or equal to the first threshold indicates that the user is moving away from the electronic device. When the capacitance data value (or alarm value) decreases from the first value to the second value, and the difference between the first and second values is greater than the second threshold, it indicates that the human body has transitioned from contacting the electronic device to moving away from it, i.e., it can be inferred that the electronic device has changed from a held state to a non-held state. Based on this data condition, the change in the holding state of the electronic device can be accurately determined, thereby improving the accuracy of determining when to activate the anti-mistouch mode, reducing the probability of accidental activation of the anti-mistouch mode, and improving the user experience.
[0017] In one possible implementation of the first aspect, when the screen of the electronic device is in a first screen state, the electronic device is detected to be in a first posture, and the capacitance data detected by the first sensor meets a first condition, thereby activating the anti-mistouch mode; including:
[0018] If the electronic device's posture is a first posture for a duration greater than or equal to a first duration, the electronic device's screen is in a first screen state for a duration greater than or equal to a first duration, and the capacitance data detected by the first sensor meets a first condition, and the duration of the second capacitance data detected by the first sensor is greater than or equal to a first duration, then the anti-mistouch mode is activated.
[0019] In one possible implementation of the first aspect, when the screen of the electronic device is in a first screen state, the electronic device is detected to be in a first posture, and the capacitance data detected by the first sensor meets a first condition, and the anti-mistouch mode is activated; this includes: detecting that the electronic device is in the first posture for a duration greater than or equal to a first first duration, the screen of the electronic device is in the first screen state for a duration greater than or equal to the first first duration, and based on the capacitance data detected by the first sensor meeting the first condition, and the first sensor detecting the second capacitance data for a duration greater than or equal to the first duration, the anti-mistouch mode is activated.
[0020] In this embodiment, when the screen of the electronic device is detected to be in the first screen state, the electronic device's posture conforms to the first posture, and the capacitance data of the first sensor meets the first condition, the anti-mistouch mode will not be triggered immediately. This avoids the situation where the screen is turned off immediately after the user puts down the electronic device, but the user might suddenly want to check the time. If the user picks up the phone, the anti-mistouch mode exits, and the screen turns on again, resulting in frequent screen-on / off cycles that negatively impact the user experience.
[0021] In one possible implementation of the first aspect, the first posture includes: an upright vertical posture; or an inverted vertical posture; or an upright tilted posture; or an inverted tilted posture; or an upside-down posture; or a change from an upright posture to an inverted posture, wherein the upright posture includes an upright vertical posture and an upright tilted posture, and the inverted posture includes an inverted vertical posture and an inverted tilted posture.
[0022] It is understood that the above-described first posture is merely an illustrative example. In some embodiments, the first posture can be set according to actual needs. In some embodiments, the first posture can be set based on sample statistical data of the posture of the electronic device in scenarios such as a backpack, pocket, or desktop. This can improve the accuracy of determining the scenario in which the electronic device is located, thereby improving the accuracy of determining when to activate the anti-mistouch mode, reducing the probability of accidentally activating the anti-mistouch mode, and improving the user experience.
[0023] In one possible implementation of the first aspect, the electronic device is a foldable electronic device, and the first posture includes: an upright vertical posture in a folded state; or, an inverted vertical posture in a folded state; or, an upright tilted posture in a folded state; or, an inverted tilted posture in a folded state; or, an inverted posture in a folded state; or, a change from an upright posture to an inverted posture in a folded state, wherein the upright posture includes an upright vertical posture and an upright tilted posture, and the inverted posture includes an inverted vertical posture and an inverted tilted posture.
[0024] In some embodiments, when the electronic device is foldable, the first posture needs to be the corresponding posture in the folded state. It is understood that when a user is not using the foldable electronic device and places it in a pocket or backpack, the foldable electronic device is generally in a folded state. Therefore, using the folded state as a prerequisite for the first posture of the foldable electronic device can improve the accuracy of determining when to activate the accidental touch prevention mode, reduce the probability of accidentally activating the mode, and improve the user experience.
[0025] In one possible implementation of the first aspect, the electronic device includes a first screen, a second screen, and a third screen, wherein the first screen and the second screen are foldable relative to each other, and the third screen is disposed opposite to the first screen; the electronic device is in a first posture, including: the first screen, the second screen, or the third screen of the electronic device is in a first posture.
[0026] It's understandable that foldable electronic devices typically include multiple screens. Therefore, based on the deployment locations of the gyroscopes and accelerometers, the attitude of any one screen can be selected to represent the attitude of the electronic device. This eliminates the need to obtain the attitude of all screens in the foldable electronic device, saving computational resources. Furthermore, eliminating the need to deploy multiple gyroscopes and accelerometers saves on hardware costs.
[0027] In some embodiments, the first sensor is an electromagnetic absorption ratio (SAR) sensor.
[0028] It is understood that the first sensor can also be any other device capable of detecting the capacitance of an electronic device when a human body approaches it. In the embodiments of this application, the capacitance data based on the SAR sensor can accurately reflect whether a human body is moving away from or in contact with the electronic device, improving the accuracy of judging whether the device is held or not, thereby improving the accuracy of judging when to activate the anti-accidental touch mode.
[0029] In some embodiments, the electronic device includes a sensor driver and a lock screen application. The sensor driver includes a motion type module. When the screen of the electronic device is in a first screen state, the electronic device is detected to be in a first posture, and the capacitance data detected by the first sensor meets a first condition, and the anti-mistouch mode is activated. This includes: the motion type module determining that the electronic device is in a first posture and the capacitance data detected by the first sensor meets the first condition, and sending an anti-mistouch event to the lock screen application; the lock screen application obtaining the screen state of the electronic device, and if the screen of the electronic device is in the first screen state, the lock screen application activating the anti-mistouch mode.
[0030] In some embodiments, at the software level, a motion type module can be added to the sensor driver. The anti-mistouch module in the lock screen application can register to listen for anti-mistouch events (or motion events) in the sensor driver. This allows the motion type module in the sensor driver to promptly send an anti-mistouch event to the anti-mistouch module in the lock screen application when it detects that the electronic device's posture matches a first posture and the capacitance data of the first sensor meets a first condition, thereby improving the timeliness of activating the anti-mistouch mode.
[0031] In a second aspect, embodiments of this application provide an electronic device, including: a memory for storing instructions; and a processor for executing the instructions to implement the first aspect and any possible implementation of the anti-accidental touch method in the first aspect.
[0032] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions, which, when executed by an electronic device, implements the first aspect and any possible implementation of the method for preventing accidental touches.
[0033] Fourthly, embodiments of this application provide a computer program product including instructions that, when executed, cause the anti-accidental touch method in the first aspect and any possible implementation of the first aspect to be implemented.
[0034] Fifthly, embodiments of this application provide a chip including a processor coupled to a memory for executing computer programs or instructions stored in the memory, such that the chip implements the first aspect and any possible implementation of the anti-accidental touch method in the first aspect. Attached Figure Description
[0035] Figure 1 According to some embodiments of this application, a schematic diagram of a scenario in which an anti-accidental touch method is applied is shown;
[0036] Figure 2 According to some embodiments of this application, a schematic diagram of a non-foldable mobile phone 100 is shown;
[0037] Figure 3 A schematic diagram of a foldable mobile phone 200 is shown according to some embodiments of this application;
[0038] Figure 4 (a)-(e) show schematic diagrams of several mobile phones 100 in a first posture according to some embodiments of this application;
[0039] Figure 5 (a)-(e) show schematic diagrams of several mobile phones 200 in a first posture according to some embodiments of this application;
[0040] Figures 6a-6d According to some embodiments of this application, schematic diagrams of placement scenarios for several electronic devices are shown;
[0041] Figure 7 According to some embodiments of this application, a flowchart of a method for preventing accidental touches is shown;
[0042] Figure 8 According to some embodiments of this application, a schematic diagram of the software structure of an electronic device is shown;
[0043] Figure 9 According to some embodiments of this application, an interactive flow diagram of an anti-accidental touch method is shown;
[0044] Figure 10 According to some embodiments of this application, a schematic diagram of the hardware structure of an electronic device is shown. Detailed Implementation
[0045] The illustrative embodiments of this application include, but are not limited to, a method for preventing accidental touches, an electronic device, and a readable storage medium.
[0046] It should be noted that the electronic devices provided in this application include, but are not limited to, mobile phones, smart TVs, wearable devices (such as watches, bracelets, and earphones), tablets, desktop computers, laptop computers, personal computers (PCs), virtual reality (VR) devices, augmented reality (AR) devices, terminals in industrial control, terminals in self-driving, terminals in remote medical surgery, terminals in smart grids, terminals in transportation safety (such as vehicle infotainment systems), terminals in smart cities, and terminals in smart homes (such as air conditioners, refrigerators, fans, lights, televisions, and speakers), etc. This application does not limit the specific form of the electronic devices.
[0047] To facilitate understanding, the technical terms involved in the embodiments of this application will be explained first.
[0048] An accelerometer is used to acquire acceleration data (or gravitational acceleration component values) along the X, Y, and Z axes of an electronic device. Gravitational acceleration g is constant, vertically downwards, and its value is constant. However, when the angle of the accelerometer relative to the ground changes with the position of the electronic device, the acceleration components of gravitational acceleration g in the X, Y, and Z axes change, thus altering the acquired acceleration data in these three axes. By using the acceleration data along the X, Y, and Z axes obtained from the built-in accelerometer, along with the gravitational acceleration g value, the angles of the electronic device's X, Y, and Z axes relative to the direction of gravitational acceleration can be calculated—that is, the tilt angle of the electronic device.
[0049] Gyroscope sensors: These can be used to acquire angular velocity data of electronic devices around three axes (X-axis, Y-axis, and Z-axis) to determine the flipping process of the electronic device.
[0050] Electromagnetic wave absorption ratio (SAR) sensor: It can be used to detect the capacitance of electronic devices when a human body approaches. The closer the human body is to the SAR sensor, the larger the corresponding value of the capacitance.
[0051] The following is combined Figure 1 Taking a mobile phone 100 as an example, this application provides an exemplary description of the application scenario of an anti-accidental touch method provided in this embodiment.
[0052] like Figure 1 As shown, mobile phone 100 can determine whether there is an obstruction in front of its screen based on a proximity sensor. For example, when mobile phone 100 is in user 1001's pocket, the proximity sensor can detect an obstruction in front of the screen. In this case, mobile phone 100 will activate the anti-mistouch mode, keeping the screen off and unresponsive to touch wake-up operations. This effectively prevents the screen from being accidentally triggered, such as preventing it from turning on when touched by a pocket or bag, thus saving power consumption.
[0053] However, relying solely on proximity sensors to determine when to activate the accidental touch prevention mode has low accuracy. This can lead to accidental activation of the mode in certain situations, rendering the phone unusable and impacting the user experience. For example, if the phone is placed flat on a cluttered table with some files obscuring its surface, it might mistakenly interpret the scenario as the phone being in a pocket or bag, triggering the accidental touch prevention mode. Consequently, the screen may become unresponsive to touch gestures, affecting the user experience.
[0054] To address the aforementioned issues, this application provides a method for preventing accidental touches. This method comprehensively determines whether an electronic device needs to enter an anti-accidental touch mode based on changes in the device's posture, screen state, and grip. For example, when the electronic device's screen is in a first screen state (e.g., locked screen, always-on display (AOD) state), and the device's posture matches a first posture (e.g., inverted upright posture, inverted tilted posture, etc.), and the capacitance data detected by the first sensor meets a first condition (e.g., data conditions when the electronic device transitions from a gripped state to a non-gripped state), it can be inferred that the user has placed the electronic device in a backpack or pocket, and in this case, the anti-accidental touch mode can be activated. This method, by combining changes in the electronic device's posture, screen state, and grip, comprehensively determines the timing for the electronic device to enter the anti-accidental touch mode, effectively improving the accuracy of entering the anti-accidental touch mode, avoiding accidental triggering, and enhancing the user experience.
[0055] In some embodiments, the first sensor may be a specific absorption rate (SAR) sensor. It is understood that the first sensor may also be any other device capable of detecting the capacitance of an electronic device when a human body approaches. For ease of understanding of the technical solution of this application, the first sensor in this application is described using a SAR sensor as an example.
[0056] In some embodiments, the first condition may include: the capacitance data detected by the first sensor changes from first capacitance data to second capacitance data, wherein the first sensor detects the first capacitance data when the electronic device is in a first state (e.g., a held state); and the first sensor detects the second capacitance data when the electronic device is in a second state (e.g., a non-held state). The first value corresponding to the first capacitance data is greater than a first threshold, the second value corresponding to the second capacitance data is less than or equal to the first threshold (e.g., 8000), and the difference between the first value and the second value is greater than (or greater than or equal to) a second threshold (e.g., 10000).
[0057] Specifically, a second value corresponding to the capacitance data that is less than or equal to the first threshold indicates that the user is moving away from the electronic device. A decrease in the capacitance data value (or alarm value) from the first value to the second value, with the difference between the first and second values being greater than or equal to the second threshold, indicates that the human body has transitioned from contacting the electronic device to moving away from it, i.e., it can be inferred that the electronic device has transitioned from a held state to a non-held state. It should be noted that the specific values of the first and second thresholds can be set as needed based on the shape of the electronic device, the configuration of the first sensor, etc., and are not limited in this embodiment.
[0058] It's understandable that when a user places an electronic device in their pocket or backpack, the device's state generally changes from being held to being unheld. The capacitance data from the first sensor can accurately reflect whether the user is moving away from or in contact with the electronic device, improving the accuracy of determining whether it's held or unheld. Therefore, judging the change in the user's holding state based on the capacitance data from the first sensor, and then determining the timing for activating the anti-mistouch mode based on this change, can improve the accuracy of determining when to activate the anti-mistouch mode, reduce the probability of accidental activation, and improve the user experience.
[0059] It is understood that in some embodiments, in curved screen or bezel-less electronic devices, the state of the electronic device being held can be determined based on whether touch signals are detected at the edge area of the screen. It is also understood that this solution is only applicable to electronic devices with curved screens or bezel-less devices where the sides are also screen areas, and cannot be applied to other electronic devices. However, the embodiment of this application determines the holding state of the electronic device based on a first sensor, without needing to determine the holding posture through touch signals from the screen, and can be applied to any type of electronic device.
[0060] In some embodiments, the anti-mistouch mode can be activated when the duration of the detected electronic device's posture in a first posture is greater than or equal to a first duration, the duration of the electronic device's screen state in the first screen state is greater than or equal to the first duration, the capacitance data detected by the first sensor meets the data condition for transitioning from a held state to a non-held state, and the duration of the capacitance data value being less than a second threshold is greater than or equal to the first duration. This ensures that when the electronic device's screen is detected to be in the first screen state, the electronic device's posture matches the first posture, and the capacitance data from the first sensor meets the first condition, the anti-mistouch mode will not be immediately triggered. This avoids the situation where the screen is turned off immediately after the user puts down the electronic device, but the user suddenly wants to check the time, and then picks up the phone, the anti-mistouch mode exits, and the screen turns on again, resulting in frequent screen on / off cycles that negatively impact the user experience.
[0061] In some embodiments, the first posture may include any one of the following postures: upright vertical posture, inverted vertical posture, upright tilted posture, inverted tilted posture, upside down state, or a change from an upright posture to an inverted posture. It is understood that the above-described first posture is merely illustrative. In some embodiments, the first posture can be set according to actual needs. For example, the first posture can be set based on sample statistical data of the posture of the electronic device in scenarios such as a backpack, pocket, or desktop. This can improve the accuracy of determining the scenario in which the electronic device is located, thereby improving the accuracy of determining when to activate the accidental touch prevention mode, reducing the probability of accidental activation of the accidental touch prevention mode, and improving the user experience.
[0062] The following is combined Figures 2-5 The first posture of the electronic device mentioned in the embodiments of this application is illustrated by way of example.
[0063] To more clearly illustrate the first posture of the electronic devices involved in the embodiments below, we will first take a mobile phone as an example to explain the three-axis directions of the electronic devices in some embodiments.
[0064] Figure 2 A schematic diagram of a non-foldable mobile phone 100 is shown, as follows: Figure 2 As shown, for mobile phone 100, the X-axis direction can be from the left side of mobile phone 100 to the right side of mobile phone 100, and the X-axis direction is parallel to the straight line portion of the bottom edge of mobile phone 100; the Y-axis direction can be from the bottom of mobile phone 100 to the top of mobile phone 100, and the Y-axis direction is parallel to the straight line portion of the left or right side of mobile phone 100; the Z-axis direction is from the back of mobile phone 100 to the screen of mobile phone 100 (not shown in the figure), and the Z-axis direction is parallel to the thickness direction of mobile phone 100.
[0065] Figure 3 Image (a) illustrates a schematic diagram of a foldable mobile phone 200, as shown below. Figure 3 As shown in (a), the mobile phone 200 may include a first screen 210, a second screen 220, and a third screen 230. The first screen 210 and the second screen 220 can be folded relative to each other, and the third screen 230 is arranged opposite to the first screen 210. The third screen 230 is the outer screen of the mobile phone 200, and the first screen 210 and the second screen 220 are the inner screens of the mobile phone 200.
[0066] Figure 3 Figure (b) illustrates a schematic diagram of a mobile phone 200 in a folded position, as shown below. Figure 3As shown in (b), for the mobile phone 200, the X-axis direction can be the direction from the left side of the third screen 230 to the right side of the third screen 230 when the third screen 230 is upright, and the X-axis direction is parallel to the folding axis of the mobile phone 200; the Y-axis direction can be the direction from the bottom of the third screen 230 to the top of the third screen 230 when the third screen 230 is upright, and the Y-axis direction is parallel to the straight line portion of the left or right side of the third screen 230; the Z-axis direction is the direction from the back of the first screen 210 to the front of the first screen 210 (not shown in the figure), and the Z-axis direction is parallel to the thickness direction of the mobile phone 200 in the folded posture.
[0067] It is understood that the above definitions of the three-axis directions are merely illustrative. Different three-axis directions may be defined in different electronic devices. This application does not limit the scope of the embodiments.
[0068] The following section uses the non-foldable phone 100 as an example to introduce some examples of the first posture of non-foldable electronic devices.
[0069] Figure 4 Image (a) illustrates a mobile phone 100 in an upright, vertical position. Figure 2 Taking the three-axis orientation of the mobile phone 100 shown as an example, the upright vertical posture can be considered the posture when the direction of the gravitational acceleration g of the mobile phone 100 is in the negative direction of the Y-axis. It can be understood that the direction of gravitational acceleration g is a constant downward direction.
[0070] Figure 4 Figure (b) illustrates a schematic diagram of a mobile phone 100 in an inverted, vertical position. Figure 2 Taking the three-axis direction of the mobile phone 100 shown as an example, the inverted vertical posture can be the posture when the direction of the gravitational acceleration g of the mobile phone 100 is the positive direction of the Y axis.
[0071] Figure 4 Image (c) illustrates a schematic diagram of a mobile phone 100 in an upright tilted posture. The upright tilted posture can be an upright posture with a tilt angle within a first angular range. Figure 2 Taking the three-axis direction of the mobile phone 100 shown as an example, the upright tilt posture can be the posture when the angle between the direction of the gravitational acceleration g of the mobile phone 100 and the positive Y-axis is within a first angle range. In some embodiments, the first angle range can be greater than 90° and less than 170°, that is, the tilt angle A1 of the mobile phone 100 relative to the horizontal plane is greater than 0° and less than 80°. It can be understood that the first angle range can be set according to actual needs. For example, the first angle range can also be greater than 90° and less than 180°, etc., and this application embodiment does not limit it.
[0072] Figure 4Figure (d) illustrates a schematic diagram of a mobile phone 100 in an inverted tilted posture. The inverted tilted posture can be an inverted posture with a tilt angle within a second angle range. Figure 2 Taking the three-axis direction of the mobile phone 100 shown as an example, the inverted tilt posture can be the posture when the angle between the gravitational acceleration direction g of the mobile phone 100 and the positive Y-axis is within the second angle range. In some embodiments, the second angle range can be greater than 10° and less than 90°, that is, the tilt angle A2 of the mobile phone 100 relative to the horizontal plane is greater than 0° and less than 80°. It can be understood that the second angle range can be set according to actual needs. For example, the second angle range can also be greater than 0° and less than 90°, etc., and this application embodiment does not limit it.
[0073] Figure 4 Image (e) illustrates a mobile phone 100 in an inverted position. Figure 2 Taking the three-axis direction of the mobile phone 100 shown as an example, the inverted posture can be the posture when the direction of the gravitational acceleration of the mobile phone 100 is the positive direction of the Z-axis.
[0074] In some embodiments, when the electronic device is a foldable electronic device, the first posture can include any one of the following postures: upright (standing upright), inverted (standing upright), tilted (standing upright), inverted (tilted) or folded (folded upside down), or transitioning from an upright to an inverted posture. It is understood that when a user is not using the foldable electronic device and places it in a pocket or backpack, the foldable electronic device is generally in a folded state. Therefore, using the folded state as a prerequisite for the first posture of the foldable electronic device can improve the accuracy of determining when to activate the accidental touch prevention mode, reduce the probability of accidentally activating the mode, and improve the user experience.
[0075] The following section uses the foldable phone 200 as an example to illustrate some examples of the first posture of foldable electronic devices.
[0076] Figure 5 Image (a) illustrates a mobile phone 200 in a folded position but upright position. Figure 3 Taking the three-axis direction of the mobile phone 200 shown as an example, the upright vertical posture in the folded posture can be the posture when the mobile phone 200 is in the folded posture and the direction of the gravitational acceleration of the third screen 230 is the negative direction of the Y axis.
[0077] Figure 5 Image (b) illustrates a mobile phone 200 in a folded, upright position. Figure 3Taking the three-axis direction of the mobile phone 200 shown as an example, the inverted vertical posture in the folded posture can be the posture when the mobile phone 200 is in the folded posture and the direction of the gravitational acceleration of the third screen 230 is the positive direction of the Y axis.
[0078] Figure 5 Image (c) illustrates a schematic diagram of a mobile phone 200 in a folded, upright-tilted posture. This upright-tilted posture in the folded posture can be an upright posture with a tilt angle within a third angle range. Figure 3 Taking the three-axis direction of the mobile phone 200 shown as an example, the upright tilted posture in the folded posture can be the posture when the mobile phone 200 is in the folded posture and the angle between the gravitational acceleration direction of the third screen 230 and the negative Y-axis direction is within the third angle range. In some embodiments, the third angle range can be greater than 90° and less than 170°, that is, the tilt angle A3 of the mobile phone 200 relative to the horizontal plane is greater than 0° and less than 80°. It can be understood that the third angle range can be set according to actual needs. For example, the third angle range can also be greater than 90° and less than 180°, etc., and this application embodiment does not limit it. This application embodiment does not limit it.
[0079] Figure 5 Figure (d) illustrates a schematic diagram of a mobile phone 200 in a folded, inverted, tilted position. This inverted, tilted position in the folded posture can be an inverted posture where the tilt angle A2 is within a second angle range. Figure 3 Taking the three-axis direction of the mobile phone 200 shown as an example, the inverted tilt posture can be the posture when the mobile phone 200 is in a folded posture and the angle between the gravitational acceleration direction of the third screen 230 and the positive Y-axis is within the fourth angle range. In some embodiments, the fourth angle range can be greater than 90° and less than 170°, that is, the tilt angle A4 of the mobile phone 200 relative to the horizontal plane is greater than 0° and less than 80°. It can be understood that the fourth angle range can be set according to actual needs. For example, the fourth angle range can also be greater than 0° and less than 90°, etc., and this application embodiment does not limit it.
[0080] Figure 5 Image (e) illustrates a mobile phone 200 in a folded, inverted position. Figure 3 Taking the three-axis direction of the mobile phone 200 shown as an example, the inverted posture in the folded posture can be the posture when the mobile phone 200 is in the folded posture and the direction of the gravitational acceleration of the third screen 230 is the positive direction of the Z-axis.
[0081] It is understood that the above description of the mobile phone 200 uses the posture of the third screen 230 detected by the gyroscope and accelerometer as an example to illustrate the posture of the mobile phone 200. In some embodiments, depending on the deployment position of the gyroscope and accelerometer, the posture of the mobile phone 200 can also be described based on the posture of the first screen 210 and the second screen 220, and this application embodiment does not limit this.
[0082] In some embodiments, for foldable electronic devices, the attitude of any screen can be selected to represent the attitude of the electronic device based on the deployment location of the gyroscopes and accelerometers. This eliminates the need to obtain the attitudes of all screens of the foldable electronic device, saving computational resources. Furthermore, eliminating the need to deploy multiple gyroscopes and accelerometers saves hardware costs.
[0083] In some embodiments, the postures of multiple screens can be selected to represent the posture of the electronic device, and this application embodiment does not limit this.
[0084] It is understood that the attitude of the electronic device in this embodiment can be obtained based on the gyroscope and accelerometer in the electronic device. It can also be obtained through other devices with attitude detection functions, and this embodiment does not limit the scope of the application.
[0085] In some embodiments, the first posture can also be a change from an upright posture to an inverted posture. It is understood that when a user puts an electronic device in a pocket or backpack, the electronic device's state generally changes from an upright posture to an inverted posture. Therefore, using a change from an upright posture to an inverted posture as the first posture can further improve the accuracy of determining when to activate the anti-mistouch mode. It is understood that an upright posture includes an upright vertical posture and an upright tilted posture; an inverted posture includes an inverted vertical posture and an inverted tilted posture.
[0086] Figures 6a-6d The diagram illustrates the placement scenario of electronic devices, using mobile phone 200 as an example.
[0087] like Figure 6a As shown, when the mobile phone 200 detects that the mobile phone 200 is in a folded posture and the third screen 230 changes from an upright state to an inverted state, the posture of the mobile phone 200 can be determined as the first posture.
[0088] like Figure 6b As shown, when the phone 200 is in a folded posture and placed flat on the table, the phone 200 can detect that the direction of the gravitational acceleration of the third screen is the negative direction of the Z-axis. Therefore, it can be determined that the posture of the phone 200 is not the first posture. Thus, the phone 200 will not activate the anti-mistouch mode.
[0089] like Figure 6cAs shown, when the phone 200 is in a folded posture and placed upside down on the table, the phone 200 can detect that the direction of the gravitational acceleration of the third screen is the positive direction of the Z-axis, and thus the posture of the phone 200 can be determined as the first posture.
[0090] like Figure 6d As shown, when the phone 200 is in a tent posture, that is, when the angle A5 between the first screen 210 and the second screen 220 is greater than or equal to 25° and less than or equal to 90°, the phone 200 can detect that the phone 200 is in an open state, and the anti-mistouch mode will not be activated at this time.
[0091] The method for preventing accidental touches mentioned in the embodiments of this application will be described in detail below.
[0092] Figure 7 The diagram illustrates a flowchart of a method for preventing accidental touches. This method can be executed by an electronic device, such as... Figure 7 As shown, methods to prevent accidental touches may include:
[0093] 101: The screen state of the electronic device is detected as the first screen state, the posture of the electronic device conforms to the first posture, and the capacitance data of the first sensor conforms to the first condition.
[0094] In some embodiments, the first screen state may include a locked screen state or an AOD state, wherein the locked screen state includes a screen-on lock screen state and a screen-off lock screen state.
[0095] In some embodiments, the first posture may include an upright vertical posture, an inverted vertical posture, an upright tilted posture, an inverted tilted posture, a change from an upright posture to an inverted posture, an upside-down state, etc.
[0096] In some embodiments, when the electronic device is a foldable electronic device, the first posture may include an upright vertical posture under the folded posture, an inverted vertical posture under the folded posture, an upright tilted posture under the folded posture, an inverted tilted posture under the folded posture, a change from an upright posture to an inverted posture under the folded posture, and an inverted posture under the folded posture, etc.
[0097] It is understood that the first posture mentioned in the embodiments of this application is merely an illustrative example. In some embodiments, the first posture can be set according to actual needs, for example, it can be set based on sample statistical data of the posture of the electronic device in scenarios such as a backpack, pocket, or table. The illustrative description of the first posture can be found by referring to... Figures 2-6d As mentioned above, it will not be repeated here.
[0098] In some embodiments, the first condition may include: the capacitance data detected by the first sensor changes from first capacitance data to second capacitance data, wherein the first sensor detects the first capacitance data when the electronic device is in a first state (e.g., a held state); and the first sensor detects the second capacitance data when the electronic device is in a second state (e.g., a non-held state). The first value corresponding to the first capacitance data is greater than a first threshold, the second value corresponding to the second capacitance data is less than or equal to the first threshold (e.g., 8000), and the difference between the first value and the second value is greater than (or greater than or equal to) a third threshold (e.g., 10000).
[0099] In some embodiments, the first condition may include: the capacitance data detected by the first sensor changes from first capacitance data to second capacitance data within a preset time period.
[0100] For example, at 10:00:01, when the user is holding the phone 200, the capacitance value detected by the first sensor can be 19000. When the user puts the foldable phone 200 into their pocket at 10:00:02, since the user is not holding the phone 200, the capacitance value detected by the first sensor can be 7500. Since the capacitance value detected by the first sensor is less than 8000, and the capacitance value detected by the first sensor decreases by more than or equal to 10000 within 4 seconds, the phone 200 can determine that it has changed from a held state to a non-held state. At this time, the capacitance data indicates that the first condition is met.
[0101] It's understandable that when a user puts an electronic device in their pocket or backpack, the device's state generally changes from being held to being held. Therefore, determining the change in the held state of the electronic device based on the capacitance data of the first sensor, and then determining the timing for activating the anti-mistouch mode based on this change, can improve the accuracy of determining the activation timing of the anti-mistouch mode, reduce the probability of accidental activation, and improve the user experience.
[0102] In some embodiments, when the electronic device detects that its screen is in a first screen state, it can further determine whether the electronic device's posture conforms to a first posture and whether the capacitance data of the first sensor meets a first condition. That is, when the screen is not in the first screen state, there is no need to determine whether the electronic device's posture conforms to the first posture or whether the capacitance data of the first sensor meets the first condition. It can be understood that when the screen of the electronic device is on, it is generally in use by the user, so there is no need to enable the anti-mistouch mode. In this case, not determining whether the electronic device's posture conforms to the first posture or whether the capacitance data of the first sensor meets the first condition can save power consumption.
[0103] For example, when the mobile phone 200 detects that the screen status is AOD, it can further determine the posture of the mobile phone 200. If the mobile phone 200 further determines that the posture of the mobile phone 200 is an inverted tilt posture, and the capacitance data value detected by the SAR sensor in the mobile phone 200 is 7500, and the SAR sensor detects a decrease in the capacitance data value of greater than or equal to 10000 within 4 seconds, then the anti-mistouch mode can be activated.
[0104] In some embodiments, the electronic device can further determine whether its screen state is the first screen state if the electronic device's posture conforms to the first posture and the capacitance data detected by the first sensor meets the first condition. It is understood that if the electronic device's posture does not conform to the first posture and the capacitance data of the first sensor does not meet the first condition, it can be inferred that the probability of triggering the anti-mistouch mode is low. In this case, not determining the screen state of the electronic device can, to some extent, save power consumption.
[0105] In some embodiments, detecting whether the screen state of the electronic device is a first screen state, whether the posture of the electronic device conforms to a first posture, and whether the capacitance data of the first sensor meets a first condition can also be performed in parallel or in other order, which is not limited in the embodiments of this application.
[0106] In some embodiments, the anti-mistouch mode can be activated when the duration of the electronic device's first posture being greater than or equal to the first duration, the duration of the electronic device's screen state being the first screen state being greater than or equal to the first duration, the capacitance data detected by the first sensor meets the data conditions for transitioning from a held state to a non-held state, and the duration of the detected capacitance data value being less than the second threshold being greater than or equal to the first duration.
[0107] For example, when phone 200 detects that the screen is in AOD state, the phone 200 is in an inverted tilted position, and the capacitance data value detected by the SAR sensor in phone 200 is 7500, and the SAR sensor detects a decrease of greater than or equal to 10000 in the capacitance data value within 4 seconds, then the anti-mistouch mode can be not activated at this time. Instead, the anti-mistouch mode will be activated if the phone 200 screen remains in AOD state or locked state, the phone 200 remains in an inverted tilted position or other first position within the next 3 seconds, and the capacitance data value detected by the SAR sensor in phone 200 remains less than 8000.
[0108] This ensures that when the screen of the electronic device is detected to be in the first screen state, the electronic device's posture matches the first posture, and the capacitance data of the first sensor meets the first condition, the anti-mistouch mode will not be immediately triggered. This avoids the situation where the screen immediately turns off due to the anti-mistouch mode triggered as soon as the user puts down the electronic device, but the user suddenly wants to check the time. If the user picks up the phone at this time, the anti-mistouch mode exits, and the screen turns on again, resulting in frequent screen-on and off cycles that negatively impact the user experience.
[0109] 102: Enable the anti-accidental touch mode.
[0110] It is understood that in this embodiment of the application, the electronic device can activate the anti-mistouch mode when it detects that the screen state of the electronic device is a first screen state, the posture of the electronic device conforms to a first posture, and the capacitance data of the first sensor meets a first condition. In the anti-mistouch mode, the electronic device is in a screen-off state and does not respond to screen touch wake-up operations.
[0111] In some embodiments, when the accidental touch prevention mode is enabled, the screen of the electronic device may display a prompt message to remind the user that the electronic device has entered the accidental touch prevention mode.
[0112] When it is detected that the screen state of the electronic device is not in the first screen state, the posture of the electronic device does not conform to the first posture, and the value of the capacitance data of the first sensor is greater than any one or more of the first threshold, the electronic device can turn off the anti-mistouch mode. At this time, the electronic device can respond normally to the touch wake-up operation of the screen.
[0113] The anti-mistouch method provided in this application combines the changes in the electronic device's posture, screen state, and grip state to determine the timing for the electronic device to enter the anti-mistouch mode. This can effectively improve the accuracy of entering the anti-mistouch mode, avoid accidental triggering of the anti-mistouch mode, and improve the user experience.
[0114] In this embodiment, the capacitance data based on the first sensor (e.g., a SAR sensor) can accurately reflect whether a person is away from or in contact with an electronic device, improving the accuracy of judging whether the device is held or not, thereby further improving the accuracy of judging when to activate the anti-accidental touch mode.
[0115] The method for preventing accidental touches provided in this application embodiment eliminates the need for additional proximity light devices, thus saving on the cost of electronic devices.
[0116] The software architecture of the electronic device mentioned in the embodiments of this application will be described below.
[0117] Figure 8 A schematic diagram of the software structure of an electronic device is shown, such as... Figure 8As shown, an electronic device may include an application layer, an application framework layer, system libraries, and a kernel layer.
[0118] like Figure 8 As shown, the application layer can include a series of applications. These applications can include lock screen apps, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, and other applications.
[0119] Specifically, the lock screen application can be used to register and listen for sensor-driven motion events. Furthermore, upon receiving a sensor-driven accidental touch event, such as a motion event, the lock screen application can obtain the current screen state. If the current screen state is determined to be the first screen state, the accidental touch prevention mode can be activated, which involves powering off the screen and preventing it from responding to touch wake-up operations.
[0120] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications within the application layer. The application framework layer includes predefined functions. It may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0121] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGLES), 2D graphics engines (e.g., SGL), etc.
[0122] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0123] In some embodiments, the sensor driver may include a motion type module. This module can acquire detection data from a gyroscope sensor and an accelerometer at a first sampling rate, as well as capacitance data detected by a SAR sensor (i.e., the SAR sensor's reported value). Based on the detection data from the gyroscope sensor and the accelerometer, it can determine whether the electronic device conforms to a first posture and whether the capacitance data of the first sensor meets a first condition. The motion type module can then send an anti-mistouch event to the lock screen application when it detects that the electronic device's posture conforms to the first posture and that the capacitance data detected by the first sensor meets the first condition.
[0124] The following is combined Figure 8The software architecture of the illustrated electronic device is used as an example to further illustrate the anti-mistouch method in this application embodiment, taking as an example whether the posture of the electronic device conforms to a first posture, whether the capacitance data detected by the first sensor meets a first condition, and whether the screen state of the electronic device is in the first screen state. It should be particularly emphasized that this application does not limit the order of the three judgment conditions (whether the posture of the electronic device conforms to the first posture, whether the capacitance data detected by the first sensor meets the first condition, and whether the screen state of the electronic device is in the first screen state). That is to say, as long as the screen of the electronic device is in the first screen state, the electronic device is in the first posture, and the capacitance data detected by the first sensor meets the first condition, the anti-mistouch mode is activated.
[0125] Figure 9 The diagram illustrates a method for preventing accidental touches, as shown below. Figure 9 As shown, methods to prevent accidental touches may include:
[0126] 201: Determine that the attitude of the electronic device conforms to the first attitude and that the capacitance data of the first sensor conforms to the first condition.
[0127] In some embodiments, the sensor driver in the electronic device may be provided with a motion type module. The motion type module can acquire the detection data of the gyroscope sensor and the accelerometer at a first sampling rate, as well as the capacitance data detected by the SAR sensor (i.e., the SAR sensor's report value); and determine whether the electronic device conforms to a first posture based on the detection data of the gyroscope sensor and the accelerometer, and determine whether the capacitance data of the first sensor conforms to a first condition.
[0128] In some embodiments, the detection data of the gyroscope sensor and the accelerometer, as well as the capacitance data of the SAR sensor, can be filtered based on a filtering algorithm to obtain filtered data. Based on the filtered data, it can be determined whether the attitude of the electronic device conforms to a first attitude and whether the capacitance data of the first sensor conforms to a first condition.
[0129] The method for determining whether the posture of the electronic device conforms to the first posture and whether the capacitance data detected by the first sensor conforms to the first condition can be as described in step 101 above, and will not be repeated here.
[0130] 202: Get the current screen state.
[0131] In some embodiments, an electronic device may obtain the current screen state based on a lock screen application.
[0132] In some embodiments, when the motion type module detects that the posture of the electronic device conforms to a first posture and the capacitance data detected by the first sensor meets a first condition, it may send an anti-mistouch event to the lock screen application of the electronic device.
[0133] In some embodiments, the motion type module in the sensor driver sends an anti-mistouch event to the lock screen application when it detects that the electronic device's posture conforms to a first posture and the capacitance data detected by the first sensor meets a first condition. The anti-mistouch event can be a motion event. The motion event may include event information indicating that the electronic device's posture conforms to the first posture and the capacitance data detected by the first sensor meets the first condition.
[0134] In some embodiments, the lock screen application may register to listen for motion events driven by a sensor. This allows the motion type module in the sensor driver to send a motion event to the lock screen application when it detects that the electronic device's posture conforms to a first posture and that the capacitance data of the first sensor meets a first condition.
[0135] Lock screen applications can obtain the current screen state when they receive an event that prevents accidental touches (such as a motion event).
[0136] 204: The current screen state is confirmed as the first screen state, and the anti-mistouch mode is enabled.
[0137] In some embodiments, when the lock screen application of an electronic device determines that the current screen state is the first screen state, it can enable the anti-mistouch mode, that is, power off the screen and control the screen not to respond to touch wake-up operations.
[0138] The anti-mistouch method provided in this application combines the changes in the electronic device's posture, screen state, and grip state to determine the timing for the electronic device to enter the anti-mistouch mode. This can effectively improve the accuracy of entering the anti-mistouch mode, avoid accidental triggering of the anti-mistouch mode, and improve the user experience.
[0139] In this embodiment, the capacitance data based on the first sensor (e.g., a SAR sensor) accurately reflects whether the human body is away from or in contact with the electronic device, improving the accuracy of judging the holding state and the non-holding state, thereby further improving the accuracy of judging the timing of activating the anti-accidental touch mode.
[0140] The method for preventing accidental touches provided in this application embodiment eliminates the need for additional proximity light devices, thus saving on the cost of electronic devices.
[0141] The following section uses the mobile phone 100 as an example to introduce the hardware structure of electronic devices. Figure 10A structural schematic diagram of mobile phone 100 is shown.
[0142] like Figure 10 As shown, the mobile phone 100 may include a processor 110, a power module 140, a memory 180, a mobile communication module 130, a wireless communication module 120, a sensor module 190, an audio module 150, a camera 170, an interface module 160, buttons 101, and a display screen 102, etc.
[0143] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the mobile phone 100. In other embodiments of this application, the mobile phone 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0144] Processor 110 may include one or more processing units, such as processing modules or circuits of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Digital Signal Processor (DSP), Micro-programmed Control Unit (MCU), Artificial Intelligence (AI) processor, or Field Programmable Gate Array (FPGA). Different processing units may be independent devices or integrated within one or more processors. Processor 110 may include storage units for storing instructions and data. In some embodiments, the storage unit in processor 110 is a cache memory 180.
[0145] The processor can be used to execute the anti-accidental touch method mentioned in the embodiments of this application.
[0146] The sensor module 190 may include a gyroscope sensor, an accelerometer, and a SAR sensor.
[0147] A gyroscope sensor can be used to determine the motion attitude of the mobile phone 100. In some embodiments, the gyroscope sensor can be used to acquire angular velocity data of the mobile phone 100 around three axes (i.e., the X-axis, Y-axis, and Z-axis).
[0148] Accelerometer: Used to acquire acceleration data (or gravitational acceleration component values) of the phone 100 in the X, Y, and Z axes. It can be understood that the direction of gravitational acceleration g is constant vertically downwards, and the value of gravitational acceleration g is constant. When the angle of the accelerometer relative to the ground changes with the position of the phone 100, the acceleration components of gravitational acceleration g in the X, Y, and Z axes of the phone 100 will change, and thus the acceleration data acquired by the accelerometer in the X, Y, and Z axes of the phone 100 will change. Using the acceleration data in the X, Y, and Z axes of the phone 100 obtained from the built-in accelerometer, along with the value of gravitational acceleration g, the angle information of the phone 100's X, Y, and Z axes relative to the direction of gravitational acceleration can be calculated, i.e., the tilt angle information of the phone 100.
[0149] SAR sensors can be used to detect the capacitance of mobile phone 100 when a human body approaches it. The closer the human body is to mobile phone 100, the larger the capacitance value detected by the SAR sensor.
[0150] This application provides an electronic device, including: a memory for storing instructions; and a processor for executing the anti-accidental touch method provided in this application.
[0151] This application provides a computer-readable storage medium storing a computer program or instructions. When the computer program or instructions are executed by an electronic device, the method for preventing accidental touches provided in this application is implemented.
[0152] This application provides a computer program product, including instructions, which, when executed, enable the anti-accidental touch method provided in this application.
[0153] This application provides a chip including a processor coupled to a memory for executing computer programs or instructions stored in the memory, thereby enabling the chip to implement the anti-accidental touch method provided in this application.
[0154] The various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0155] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.
[0156] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.
[0157] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, CD-ROMs, magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other propagation signals. Therefore, machine-readable media include any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.
[0158] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.
[0159] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.
[0160] It should be noted that in the examples and description of this patent, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0161] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art should understand that various changes in form and detail may be made thereto without departing from the spirit and scope of this application.
Claims
1. A method for preventing accidental touches, characterized in that, For an electronic device, the electronic device including a first sensor, the method includes: When the screen of the electronic device is in the first screen state, the electronic device is detected to be in the first posture and the capacitance data detected by the first sensor meets the first condition, and the anti-accidental touch mode is activated. The first screen state includes either a locked screen state or an always-on display (AOD) state.
2. The method for preventing accidental touches according to claim 1, characterized in that, When the electronic device is in the first state, the first sensor detects the first capacitance data; When the electronic device is in the second state, the first sensor detects the second capacitance data; The first condition is that the capacitance data detected by the first sensor changes from the first capacitance data to the second capacitance data.
3. The method for preventing accidental touches according to claim 2, characterized in that, The first state is the held state, and the second state is the unheld state.
4. The method for preventing accidental touches according to claim 3, characterized in that, The first value corresponding to the first capacitance data is greater than the first threshold, the second value corresponding to the second capacitance data is less than or equal to the first threshold, and the difference between the first value and the second value is greater than the second threshold.
5. The method for preventing accidental touches according to claim 4, characterized in that, The step of activating the anti-mistouch mode when the screen of the electronic device is in a first screen state, detects that the electronic device is in a first posture, and the capacitance data detected by the first sensor meets a first condition, includes: The anti-mistouch mode is activated when the electronic device is in the first posture for a duration greater than or equal to the first duration, the screen of the electronic device is in the first screen state for a duration greater than or equal to the first duration, the capacitance data detected by the first sensor meets the first condition, and the duration of the second capacitance data detected by the first sensor is greater than or equal to the first duration.
6. The method for preventing accidental touch according to any one of claims 1-5, characterized in that, The first posture includes: Upright and vertical posture; Or, an upside-down upright posture; Alternatively, an upright but tilted posture; Or, an inverted or tilted posture; Or, in an upside-down position; Alternatively, the posture can be changed from an upright posture to an inverted posture, wherein the upright posture includes the upright vertical posture and the upright tilted posture, and the inverted posture includes the inverted vertical posture and the inverted tilted posture.
7. The method for preventing accidental touch according to any one of claims 1-5, characterized in that, The electronic device is a foldable electronic device, and the first posture includes: The upright, vertical posture when folded; Or, the inverted vertical posture when folded; Or, the upright tilted posture in the folded state; Or, an inverted, tilted posture while folded; Alternatively, it can be folded upside down. Alternatively, the folded state can be transformed from an upright posture to an inverted posture, wherein the upright posture includes the upright vertical posture and the upright tilted posture, and the inverted posture includes the inverted vertical posture and the inverted tilted posture.
8. The method for preventing accidental touches according to claim 7, characterized in that, The electronic device includes a first screen, a second screen, and a third screen, wherein the first screen and the second screen are foldable relative to each other, and the third screen is disposed opposite to the first screen; The electronic device is in a first posture, including: The first screen, the second screen, or the third screen of the electronic device is in the first posture.
9. The method for preventing accidental touch according to any one of claims 1-8, characterized in that, The first sensor is an electromagnetic wave absorption ratio (SAR) sensor.
10. The method for preventing accidental touches according to claim 1, characterized in that, The electronic device includes a sensor driver and a lock screen application, and the sensor driver includes a motion type module; The step of activating the anti-mistouch mode when the screen of the electronic device is in a first screen state, detects that the electronic device is in a first posture, and the capacitance data detected by the first sensor meets a first condition, includes: The motion type module determines that the electronic device is in a first posture and that the capacitance data detected by the first sensor meets the first condition, and then sends an anti-mistouch event to the lock screen application. The lock screen application obtains the screen state of the electronic device. If the screen of the electronic device is in the first screen state, the lock screen application activates the anti-mistouch mode.
11. An electronic device, characterized in that, include: Memory, used to store instructions; A processor for executing the instructions to implement the anti-accidental touch method according to any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that, The readable storage medium stores a computer program or instructions, which, when executed by an electronic device, implement the anti-accidental touch method as described in any one of claims 1 to 10.
13. A computer program product, characterized in that, Includes instructions that, when executed, cause the method for preventing accidental touches as described in any one of claims 1 to 10 to be implemented.
14. A chip, characterized in that, The chip includes a processor coupled to a memory for executing a computer program or instructions stored in the memory, such that the chip implements the anti-accidental touch method according to any one of claims 1 to 10.