Mistouch prevention method and electronic device

By combining accelerometers and deep learning models with capacitance data and proximity sensors to determine whether electronic devices are obstructed, the problem of accidental touches when the screen is on is solved, achieving more efficient anti-accidental touch measures and improving the user experience.

WO2026092020A1PCT designated stage Publication Date: 2026-05-07HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-09-26
Publication Date
2026-05-07

AI Technical Summary

Technical Problem

Existing electronic devices are prone to accidental touches when the screen is on, leading to misoperation. Existing anti-accidental touch modes are effective when the screen is locked, but their effectiveness is limited when the screen is unlocked, and they cannot effectively block small-area accidental touches.

Method used

By combining an accelerometer and processor with a deep learning model, the system detects acceleration and capacitance data to determine whether the electronic device is obstructed, activates the anti-accidental touch mode, and incorporates a proximity sensor to improve the accuracy of the judgment.

Benefits of technology

It improves the accuracy and intelligence of the anti-accidental touch mode, reduces the risk of misjudgment, effectively prevents accidental operation, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025124410_07052026_PF_FP_ABST
    Figure CN2025124410_07052026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a mistouch prevention method and an electronic device, applied to the technical field of electronics. The electronic device comprises: an acceleration sensor and a processor, wherein the acceleration sensor is used for detecting acceleration data of the electronic device; and the processor is used for determining, on the basis of the acceleration data and whether the electronic device is blocked, whether the electronic device is placed into a pocket, and enabling a mistouch prevention mode. By performing comprehensive determination on the basis of data of a plurality of sensors, the accuracy of mistouch determination is improved. Moreover, the problem of mistouch of the electronic device is effectively solved, and user experience is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Methods to prevent accidental touches and electronic devices

[0001] This application claims priority to Chinese patent application filed on November 4, 2024, with application number 202411566130.1 and entitled "Method and Electronic Device for Preventing Accidental Touch", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of electronic technology, and in particular to a method and electronic device for preventing accidental touches. Background Technology

[0003] To enhance user convenience, an increasing number of electronic devices utilize touch panels (TPs). Users can control these devices by tapping or swiping their fingers on the screen. In daily life, users sometimes place electronic devices with the screen on into their pockets or bags. Alternatively, when placing a device with the screen off into a pocket, it might be accidentally put in with the screen still on. When an electronic device's screen is on, if it comes into contact with skin, clothing, or a backpack, the friction between the screen and the object generates capacitive signals similar to a finger touch, resulting in accidental touches. The electronic device then performs unexpected actions based on these accidental capacitive signals, impacting the user experience. For example, a user might make a call and, after ending the call, put the device in their pocket without turning off the screen. During movement, clothing rubbing against the screen could cause the device to dial the wrong number.

[0004] Currently, electronic devices can use anti-mistouch modes to prevent accidental touches. For example, in the locked state, the device can activate the anti-mistouch mode based on the proximity sensor being blocked. However, this method only works when the screen is locked and is ineffective when unlocked. Alternatively, in the unlocked state, the device can determine that a screen notification area is larger than a first interception condition, identify the notification as an accidental touch, and block it. For example, the first interception condition might be 4cm². However, this method has a high threshold for triggering interception and can only block large-area accidental touches, not small-area ones. Another method is to activate the anti-mistouch mode when the device is placed in a pocket, based on ultrasonic waves to determine if it is blocked. However, this method is ineffective in preventing accidental touches while the device is in a pocket. While these methods can block accidental touches, they have limitations, being effective only in specific states and failing to effectively solve the problem of accidental touches on electronic devices.

[0005] Therefore, how to effectively solve the problem of accidental touches on electronic devices and improve user experience has become an urgent technical issue. Summary of the Invention

[0006] This application provides a method and electronic device for preventing accidental touches, which optimizes the anti-accidental touch strategy, effectively solves the problem of accidental touches in electronic devices, and improves the user experience.

[0007] To achieve the above objectives, this application adopts the following technical solution:

[0008] In a first aspect, this application provides an electronic device, which includes: an accelerometer and a processor; the accelerometer is used to detect acceleration data of the electronic device; the processor is used to determine whether the electronic device is placed in a pocket based on the acceleration data and whether the electronic device is obstructed, and to activate the anti-accidental touch mode.

[0009] In this application, a comprehensive assessment of acceleration data and whether the electronic device is obstructed is used to determine whether the electronic device meets the conditions for triggering the accidental touch prevention mode. This improves the accuracy of accidental touch detection, effectively reduces the risk of misjudgment, and effectively solves the problem of accidental touches on electronic devices. Furthermore, the optimized accidental touch prevention strategy makes the mode more intelligent and precise, improving the user experience.

[0010] According to the first aspect, or any implementation of the first aspect above, the processor is used to determine whether the electronic device is placed in a pocket based on acceleration data and whether the electronic device is obstructed, including: the processor is used to determine whether the electronic device is placed in a pocket based on acceleration data satisfying a first condition and the electronic device being obstructed; wherein the first condition includes acceleration data matching a target action, or acceleration data being greater than or equal to an acceleration threshold.

[0011] For example, an electronic device determines whether acceleration data matches the target action based on the output of an action judgment model.

[0012] For example, the action judgment model can be a deep learning model, trained using a large model. The electronic device inputs acceleration data into this action judgment model and obtains its output. Based on the output, the electronic device determines whether the first condition is met.

[0013] In this application, user actions are identified based on acceleration data, thus enhancing the device's intelligence level. The triggering conditions for the anti-accidental touch mode have been expanded to include acceleration data analysis. This allows for precise analysis of user intent and accurate identification of target actions, effectively preventing accidental touches when the user places the electronic device in their pocket.

[0014] According to the first aspect, or any implementation of the first aspect above, the electronic device further includes a touch sensor for detecting capacitance data on the display screen of the electronic device; and a processor for determining whether the electronic device is obstructed based on the capacitance data.

[0015] Among them, the capacitance data is the information of the capacitance value detected by the touch sensor. The capacitance value can represent the change of electric field of the touch sensor when it detects a touch or proximity.

[0016] According to the first aspect, or any implementation of the first aspect above, the processor is further configured to determine whether the electronic device is occluded based on the capacitance data, including: the processor is configured to determine that the electronic device is occluded when the occlusion judgment model outputs an occlusion processing result based on the capacitance data; the occlusion judgment model has the function of identifying whether the electronic device is occluded.

[0017] For example, the occlusion detection model can be a deep learning model, obtained through training and inference on a large model. The electronic device inputs the capacitance data detected by the touch sensor into the occlusion detection model, which determines whether the capacitance data matches the capacitance data when the electronic device is occluded. If it matches, it outputs "yes"; otherwise, it outputs "no".

[0018] In this application, the determination of whether an electronic device is occluded is based on the trained model and capacitance data, making the occlusion determination more intelligent and accurate, reducing the possibility of misjudgment, and improving the versatility of the device.

[0019] In some embodiments of this application, the processor can determine whether an electronic device is blocked based on the distribution of capacitance data.

[0020] In this application, the touch sensor can detect changes in capacitance on the display screen in real time, providing accurate data to determine whether the electronic device is obstructed, thus improving the accuracy of subsequent determinations regarding whether to trigger the anti-mistouch mode. This expands the methods for confirming whether an electronic device is obstructed and enriches the functionality of the touch sensor.

[0021] According to the first aspect, or any implementation of the first aspect above, the electronic device further includes a proximity light sensor for detecting proximity light data of the electronic device; and a processor for determining whether the electronic device is blocked based on the proximity light data.

[0022] In some embodiments of this application, when the proximity light data is greater than or equal to a proximity light threshold, it is determined that the electronic device is blocked. When the proximity light data is less than the proximity light threshold, it is determined that the electronic device is not blocked.

[0023] The proximity light data refers to the intensity of light detected by the proximity light sensor. The proximity light threshold is a predetermined minimum threshold value for the proximity light data when an object approaches the electronic device and the electronic device is blocked.

[0024] For example, if an electronic device determines that the light intensity has decreased based on proximity light data detected by a proximity sensor, the electronic device can determine that an object is approaching and the electronic device is being blocked. If the electronic device determines that the light intensity has increased based on proximity light data detected by the proximity sensor, the electronic device can determine that the object is moving away and the electronic device is not being blocked.

[0025] In this application, a proximity sensor can detect changes in light intensity in real time and determine whether an electronic device is obstructed based on these changes. It is applicable to various pipeline conditions, enabling the electronic device to operate effectively in multiple scenarios. This will help to effectively address the issue of accidental touches in electronic devices and reduce the likelihood of such incidents.

[0026] In some embodiments of this application, the electronic device is a foldable electronic device. The foldable electronic device is in a folded state, and the acceleration data includes x-axis acceleration data, y-axis acceleration data, and z-axis acceleration data. The foldable screen is folded along the y-axis. Determining whether the electronic device is placed in a pocket based on the acceleration data and whether the electronic device is obstructed includes: a processor that inverts the y-axis acceleration data and the z-axis acceleration data; and a processor that determines whether the electronic device is placed in a pocket based on the x-axis acceleration data, the preprocessed y-axis acceleration data, the preprocessed z-axis acceleration data, and whether the electronic device is obstructed.

[0027] In some embodiments of this application, after the electronic device enables the anti-accidental touch mode, it intercepts the reporting points on the touch screen and does not respond to hardware buttons or execute the functions corresponding to the hardware buttons.

[0028] In some embodiments of this application, the electronic device is in a screen-on state, or the electronic device is in a screen-off state.

[0029] In this application, the electronic device makes a judgment based on acceleration data and whether the electronic device is obstructed. Based on these two conditions, it accurately determines whether the electronic device meets the conditions for triggering the anti-accidental touch mode, thereby improving the accuracy of accidental touch judgment and effectively reducing the risk of misjudgment.

[0030] According to the first aspect, or any implementation of the first aspect above, the processor is further configured to determine, based on at least one of acceleration data, whether the electronic device is obstructed, and whether a finger touches the display screen of the electronic device, that the electronic device is removed from the pocket and the anti-mistouch mode is turned off.

[0031] For example, after the accidental touch prevention mode is enabled, the electronic device determines whether it has been removed from a pocket based on acceleration data. If so, the accidental touch prevention mode is disabled; otherwise, it determines whether the electronic device is obstructed. If the electronic device is not obstructed, the accidental touch prevention mode is disabled; otherwise, it determines whether a finger is touching the display screen. If a finger is touching the display screen, the accidental touch prevention mode is disabled; otherwise, it remains enabled.

[0032] The finger-touch display screen can also be described as a finger reporting point, which is the capacitive signal generated when a finger touches the touch screen.

[0033] For example, if the acceleration data corresponds to an action other than the target action and being in the pocket (such as taking the device out of the pocket), then it is determined that the electronic device takes the device out of the pocket.

[0034] In this application, after the accidental touch prevention mode is activated, the electronic device also determines whether to deactivate the mode based on data detected by multiple sensors. This intelligent management of the accidental touch prevention mode's deactivation avoids affecting normal user operation. While effectively preventing accidental touches, it also enhances the device's intelligence and improves the user experience.

[0035] Secondly, this application provides a method for preventing accidental touches, applied to an electronic device. The method includes: detecting acceleration data of the electronic device; determining whether the electronic device is placed in a pocket based on the acceleration data and whether the electronic device is obstructed, and activating the anti-accidental touch mode.

[0036] According to the second aspect, or any implementation of the second aspect above, determining that the electronic device is placed in the pocket based on acceleration data and whether the electronic device is obstructed, and activating the anti-accidental touch mode, includes: determining that the electronic device is placed in the pocket based on acceleration data meeting a first condition and the electronic device being obstructed; wherein the first condition includes acceleration data matching the target action, or acceleration data being greater than or equal to an acceleration threshold.

[0037] According to the second aspect, or any implementation of the second aspect above, the method further includes: detecting capacitance data on the display screen of the electronic device; and determining whether the electronic device is blocked based on the capacitance data.

[0038] According to the second aspect, or any implementation of the second aspect above, determining whether an electronic device is blocked based on capacitance data includes: determining that the electronic device is blocked when the blocking judgment model outputs a blocking result based on capacitance data.

[0039] According to the second aspect, or any implementation of the second aspect above, the method further includes: the method further includes: detecting proximity light data of the electronic device; determining whether the electronic device is blocked based on the proximity light data.

[0040] According to the second aspect, or any implementation of the second aspect above, the method further includes: determining, based on at least one of acceleration data, whether the electronic device is obstructed, and whether a finger touches the display screen of the electronic device, that the electronic device is removed from the pocket and the anti-mistouch mode is turned off.

[0041] Thirdly, this application provides an anti-accidental touch device, which includes a processor and a memory, the memory being coupled to the processor and used to store computer-readable instructions. When the processor reads the computer-readable instructions from the memory, the anti-accidental touch device causes the device to perform the method as described in the second aspect and any one of the embodiments of the second aspect above.

[0042] Fourthly, this application provides a chip system including at least one processor and at least one interface circuit. The at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor. The at least one processor executes the instructions and performs the method as described in the second aspect and any one of the embodiments of the second aspect above.

[0043] Fifthly, this application provides a computer-readable storage medium including a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in the second aspect and any one of the embodiments described above.

[0044] In a sixth aspect, this application provides a computer program product comprising: a computer program or instructions that, when executed on a computer, cause the computer to perform the method as described in the second aspect and any one of the embodiments described above.

[0045] The technical effects corresponding to any implementation method of aspects two through six, as well as any aspect, can be found in the first aspect and the technical effects corresponding to any implementation method of the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0046] Figure 1 is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application;

[0047] Figure 2 is a schematic diagram of the software structure of the electronic device provided in an embodiment of this application;

[0048] Figure 3 is a schematic flowchart of the method for preventing accidental touches provided in an embodiment of this application;

[0049] Figure 4 is a schematic diagram of the three-dimensional coordinate system of the mobile phone provided in the embodiment of this application;

[0050] Figure 5 is a schematic diagram of acceleration changes for different actions provided in the embodiments of this application;

[0051] Figure 6 is a schematic diagram of the method for preventing accidental touches provided in an embodiment of this application;

[0052] Figure 7 is a schematic diagram of different types of electronic devices provided in the embodiments of this application;

[0053] Figure 8 is a schematic flowchart of the method for preventing accidental touches provided in an embodiment of this application;

[0054] Figure 9 is a schematic flowchart of the method for preventing accidental touches provided in an embodiment of this application;

[0055] Figure 10 is a schematic diagram of the method for preventing accidental touches provided in an embodiment of this application;

[0056] Figure 11 is a schematic diagram of the capacitance data of the touch screen of the electronic device provided in the embodiment of this application when it is in a pocket and when it is not in a pocket;

[0057] Figure 12 is a schematic diagram of the anti-accidental touch device provided in the embodiment of this application. Detailed Implementation

[0058] The technical solutions of the embodiments of this application are described below with reference to the accompanying drawings. In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to be a limitation of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one” and “one or more” refer to one or more (including two).

[0059] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0060] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0061] To address the problems in the aforementioned technologies, this application provides a method for preventing accidental touches. This method can be applied to electronic devices with touchscreens, or to processors, circuits, modules, logic nodes, chips, or chip systems within such electronic devices. For ease of description, this application uses the application of this method to an electronic device as an example. The electronic device performs pocket entry detection based on data from multiple sensors. When the user's action is determined to be the target action and the electronic device is obstructed, an anti-accidental touch mode is activated. After activating the anti-accidental touch mode, the electronic device blocks screen notifications and does not respond to hardware button presses. This method improves the accuracy of determining whether an electronic device is in a pocket, reduces the risk of misjudgment, and effectively prevents accidental touches. It effectively solves the problem of accidental touches on electronic devices, has strong applicability, and improves the user experience.

[0062] It is understood that the above-mentioned screen reporting can also be described as reporting points, and the term "reporting point" will be used uniformly thereafter to describe screen reporting points. Reporting points typically refer to the capacitance data or capacitance signals generated when the screen is touched, detected by the electronic device. The values ​​of reporting points are positive. Reporting points can include information such as the coordinates of the touch point, the touch area, and the touch type.

[0063] It is understood that the aforementioned electronic device can be any device equipped with a touchscreen. For example, the electronic device can be a handheld device or a wearable device. Examples include mobile phones, tablets, laptops, PDAs, mobile internet devices (MIDs), ultra-mobile personal computers (UMPCs), satellite terminals, or smartwatches. This application does not impose any special limitations on the specific form of the electronic device.

[0064] Among them, electronic equipment can also be called terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), etc.

[0065] Figure 1 is a schematic diagram of the hardware structure of an electronic device 100 according to an embodiment of this application.

[0066] The method for preventing accidental touches provided in this application embodiment can be applied to the electronic device 100 as shown in FIG1.

[0067] In some embodiments of this application, as shown in FIG1, the electronic device 100 may include at least one of the following: mobile phone, foldable electronic device, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, super mobile personal computer, netbook, cellular phone, PDA, AR device, VR device, artificial intelligence device, wearable device, in-vehicle device, smart home device, and smart city device. This application does not impose any special limitations on the type of electronic device 100.

[0068] Electronic device 100 may include a processor 110, a memory 120, a power supply 130, a communication module 140, an audio module 150, a sensor module 160, buttons 170, a camera module 180, a display screen 190, and an input / output module 111, etc. The sensor module 160 may include a pressure sensor 160A, a proximity sensor 160B, an accelerometer 160C, a touch sensor 160D, etc.

[0069] The structures illustrated in the embodiments of this application do not constitute a limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0070] Processor 110 may include one or more processing units, such as application processors, modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0071] The processor 110 can generate operation control signals based on the instruction opcode and timing signals to control the instruction fetching and execution.

[0072] The processor 110 may also include a memory for storing instructions and data. In some embodiments of this application, the memory in the processor 110 may be a cache memory. This memory can store instructions or data that have been used or are frequently used by the processor 110.

[0073] In some embodiments of this application, the processor 110 may include one or more interfaces. These interfaces may include integrated circuit I2C interfaces, I2S interfaces, PCM interfaces, UART interfaces, MIPI interfaces, GPIO interfaces, SIM interfaces, and / or USB interfaces, etc. The processor 110 can connect to modules such as the sensor module 160, audio module 150, communication module 140, display screen 190, or camera module 180 through at least one of these interfaces.

[0074] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0075] In this embodiment, the processor 110 can acquire data detected by the sensor module 160, determine based on the data detected by the sensor module 160 that the electronic device 100 has been placed in a pocket, and activate the accidental touch prevention mode. After activating the accidental touch prevention mode, the processor 110 can also acquire data detected by the sensor module 160, determine based on the data detected by the sensor module 160 that the electronic device 100 has been removed from the pocket, and deactivate the accidental touch prevention mode. See below for specific implementation details.

[0076] Power supply 130 is used to supply power to processor 110, memory 120, display screen 190, camera module 180, etc.

[0077] Electronic device 100 can achieve wired or wireless communication functions through communication module 140. For example, communication module 140 can provide a wireless communication solution for electronic device 100, including at least one of 2G, 3G, 4G, 5G, or future communication networks. Communication module 140 can also provide modules for electronic device 100, including wireless local area network modules, Bluetooth modules, BLE modules, ultra-wideband (UWB) modules, global navigation satellite system (GNSS) modules, FM modules, near field communication (NFC) modules, or infrared modules, etc.

[0078] Electronic device 100 can implement display functions through a GPU, display screen 190, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 190 and the application processor. The GPU is used to perform mathematical and geometric calculations and graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0079] Display screen 190 is used to display images, videos, etc. In some embodiments of this application, electronic device 100 may include one or more display screens 190. Display screen 190 may be at least one of LCD, OLED, AMOLED, FLED, Miniled, MicroLED, Micro-OLED, quantum dot light-emitting diode (QLED) displays, etc.

[0080] In the application embodiment, the display screen 190 can respond to the anti-mistouch mode by blocking the reporting points in the display screen 190.

[0081] Electronic device 100 can realize camera function through camera module 180, ISP, video codec, GPU, display screen 190, application processor AP, neural network processor NPU, etc.

[0082] The camera module 180 can be used to acquire color image data and depth data of the subject. The ISP can be used to process the color image data acquired by the camera module 180. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits this electrical signal to the ISP for processing, converting it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise and brightness. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments of this application, the ISP can be set in the camera module 180.

[0083] In some embodiments of this application, the camera module 180 may consist of a color camera module and a 3D sensing module.

[0084] In some embodiments of this application, the photosensitive element of the camera in the color camera module may include a CCD or a CMOS phototransistor. The photosensitive element converts light signals into electrical signals, which are then transmitted to the ISP for conversion into digital image signals. The ISP outputs the digital image signals to the DSP for processing.

[0085] In some embodiments of this application, the 3D sensing module may be a structured light 3D sensing module. The structured light 3D sensing module may include an infrared emitter, an infrared camera module, etc. The structured light 3D sensing module first emits a light spot with a specific pattern onto the object being photographed, then receives the encoded pattern of the light spot on the object's surface, and compares it with the original projected light spot to determine the object's three-dimensional coordinates. These three-dimensional coordinates may include the distance between the electronic device 100 and the object being photographed. The 3D sensing module can obtain the distance (i.e., depth) between itself and the object being photographed by measuring the infrared reflection time, thus obtaining a 3D depth map.

[0086] Structured light 3D sensing modules can also be applied to motion-sensing game consoles, industrial machine vision inspection, and other fields. 3D sensing modules can also be used in game consoles, AR, VR, and other related applications.

[0087] In other embodiments of this application, the camera module 180 may also consist of two or more cameras. These two or more cameras may include a color camera, which can be used to acquire color image data of the object being photographed. These two or more cameras may employ stereoscopic vision technology to acquire depth data of the object being photographed.

[0088] In some embodiments of this application, the electronic device 100 may include one or more camera modules 180. The electronic device 100 may include a front-facing camera module and a rear-facing camera module. The front-facing camera module can be used to acquire color image data and depth data of the photographer, while the rear-facing camera module can be used to acquire color image data and depth data of the subject (such as a person, landscape, etc.) in front of the photographer.

[0089] In some embodiments of this application, the electronic device 100 can identify whether the image captured by the front-facing camera module includes the user's image, and further determine whether the user is looking at the display screen of the electronic device 100 based on the captured image.

[0090] In some embodiments of this application, the CPU, GPU, or NPU in the processor 110 can process the color image data and depth data acquired by the camera module 180. In some embodiments of this application, the NPU can identify the color image data acquired by the camera module 180 using neural network algorithms based on skeletal point recognition technology, such as convolutional neural network algorithms (CNN), to determine the skeletal points of the person being photographed. The CPU or GPU can also be used to run neural network algorithms to determine the skeletal points of the person being photographed based on the color image data. In some embodiments of this application, the CPU, GPU, or NPU can also be used to confirm the body shape of the person being photographed (such as body proportions, the degree of fatness or thinness of body parts between skeletal points) based on the depth data acquired by the camera module 180 (which may be a 3D sensing module) and the identified skeletal points, and can further determine the beautification parameters for the person being photographed, and finally process the captured image of the person being photographed based on the body beautification parameters so that the body shape of the person being photographed in the captured image is beautified.

[0091] The memory 120 can be used to store computer executable program code, including instructions. The memory 120 may include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.). Furthermore, the memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. The processor 110 executes various functional methods or data processing of the electronic device 100 by running instructions stored in the memory 120 and / or instructions stored in memory disposed in the processor.

[0092] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 150 and application processor.

[0093] Pressure sensor 160A is used to sense pressure signals and convert them into electrical signals. In some embodiments of this application, pressure sensor 160A can be disposed on display screen 190; in other embodiments, pressure sensor 160A can be detachably disposed outside display screen 190. There are many types of pressure sensor 160A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 160A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 190, electronic device 100 detects the intensity of the touch operation based on pressure sensor 160A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 160A. In some embodiments of this application, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view SMS messages is executed. When a touch operation with a strength greater than or equal to the first pressure threshold is applied to the SMS application icon, the instruction to create a new SMS message is executed.

[0094] The proximity sensor 160B may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device 100 emits infrared light outward through the LED. The electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects. When the intensity of the detected reflected light (which can also be described as proximity light data) is greater than a proximity light threshold, it can be determined that an object is approaching the electronic device 100, and the electronic device 100 is blocked. When the intensity of the detected reflected light is less than the proximity light threshold, the electronic device 100 can determine that no object is approaching the electronic device 100, and the electronic device 100 is not blocked. The electronic device 100 may use the proximity sensor 160B to detect when a user holds the electronic device 100 close to their ear for a phone call, so as to automatically turn off the screen to save power. The proximity sensor 160B can also be used in an anti-mistouch mode.

[0095] In this embodiment of the application, the processor 110 of the electronic device 100 acquires the proximity light data detected by the proximity light sensor 160B, and determines whether the electronic device 10 is blocked based on the proximity light data detected by the proximity light sensor 160B.

[0096] Accelerometer 160C can detect the magnitude of acceleration of electronic device 100 in various directions (generally three axes). Accelerometer 160C can be an accelerometer.

[0097] In this embodiment of the application, the processor 110 of the electronic device 10 can acquire acceleration data detected by the accelerometer 160C to determine whether the acceleration data meets the first condition.

[0098] Touch sensor 160D, also known as a "touch device," can be disposed on display screen 190. The touch sensor 160D and display screen 190 together form a touchscreen, also known as a "touchscreen." Touch sensor 160D detects touch operations applied to or near it, generating touch (TP, Touch Panel) signals, which can also be described as capacitive data. Touch sensor 160D can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 190. In other embodiments of this application, touch sensor 160D may also be disposed on the surface of electronic device 100, in a different location than display screen 190.

[0099] In this embodiment of the application, the processor 110 of the electronic device 100 acquires the capacitance data detected by the touch sensor 160D, and determines whether the electronic device 100 is blocked based on the capacitance data detected by the touch sensor 160D.

[0100] In this embodiment of the application, after the electronic device 100 activates the anti-mistouch mode, the processor 110 of the electronic device 100 can also acquire the capacitance data detected by the touch sensor 160D, and determine whether there is a finger reporting based on the capacitance data detected by the touch sensor 160D.

[0101] Button 170 may include a power button, volume buttons, etc. Button 170 may also be described as a hardware button. Button 170 may be a mechanical button or a touch button. Electronic device 100 can receive button input and generate button signals related to user settings and function control of electronic device 100. For example, when electronic device 100 is in a screen-off state, and the power button detects a press operation, it sends a wake-up command to processor 110. In response to the wake-up command, processor 110 wakes up electronic device 100 and illuminates the display screen 190 of electronic device 100. The lock screen interface is displayed on display screen 190.

[0102] In this embodiment, after the electronic device 100 activates the anti-mistouch mode, the processor 110 of the electronic device 100 may not respond to the button 170. That is, the processor 110 does not respond to the button signal sent by the button 170 and does not execute the function corresponding to the button signal.

[0103] It is understood that the structures illustrated in the embodiments of this application do not constitute a limitation on the electronic device 100. It may include more or fewer components than illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of both.

[0104] Figure 2 is a software structure block diagram of an electronic device 100 according to an embodiment of this application.

[0105] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments of this application, the Android system is divided into five layers, from top to bottom: the application layer, the application framework layer, the Android runtime (ART) and native C / C++ libraries, the hardware abstraction layer, and the kernel layer.

[0106] The application layer can include a series of application packages.

[0107] As shown in Figure 2, the application package may include applications such as gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0108] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0109] As shown in Figure 2, the application framework layer may include a window manager, content provider, view system, resource manager, notification manager, activity manager, input manager, etc.

[0110] The window manager provides a window management service (WMS), which can be used for window management, window animation management, surface management, and as a relay station for the input system.

[0111] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc. Content providers enable data access between applications.

[0112] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0113] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0114] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0115] The Activity Manager Service (AMS) can be used to start, switch, and schedule system components (such as activities, services, content providers, and broadcast receivers), as well as manage and schedule application processes.

[0116] The input manager can provide an input management service (IMS), which can be used to manage system inputs, such as touchscreen input, keypad input, and sensor input. IMS retrieves events from input device nodes and, through interaction with the WMS, distributes these events to the appropriate windows.

[0117] The Android runtime comprises the core libraries and the Android runtime itself. The Android runtime is responsible for converting source code into bytecode, bytecode into machine code, and running the machine code. In terms of compilation technology, the Android runtime supports ahead-of-time (AOT) compilation and just-in-time (JIT) compilation. AOT converts bytecode into machine code and stores it in memory during application installation; JIT converts a portion of the bytecode into machine code in real-time during application runtime.

[0118] The core library primarily provides basic Java class library functionalities, such as libraries for fundamental data structures, mathematics, I / O, tools, databases, and networking. It also provides APIs for users to develop Android applications.

[0119] Native C / C++ libraries can include multiple functional modules. Examples include: surface manager, media framework, libc, OpenGL ES, SQLite, and Webkit. The surface manager manages the display subsystem and provides 2D and 3D layer blending for multiple applications. The media framework supports playback and recording of various common audio and video formats, as well as still image files. The media library supports various audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. libc provides a standard C function library. OpenGL ES provides drawing and manipulation of 2D and 3D graphics in applications. SQLite provides a lightweight relational database for applications. Webkit provides browser kernel support.

[0120] The modules in the application framework layer are written in Java, while the modules in the native C / C++ library are written in C / C++. Communication between the two can be achieved through the Java Native Interface (JNI).

[0121] The Hardware Abstraction Layer (HAL) runs in user space, encapsulates kernel-level drivers, and provides calling interfaces to the upper layers. It can include display modules, camera modules, audio modules, and Bluetooth modules.

[0122] The kernel layer is the layer between hardware and software. It can contain display drivers, camera drivers, audio drivers, Bluetooth drivers, and other sensor drivers. In addition to providing hardware drivers, the kernel layer also supports functions such as memory management, system process management, file system management, and power management.

[0123] The method for preventing accidental touches in the embodiments of this application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0124] The following uses the electronic device 100 shown in Figure 1 as an example to illustrate the anti-accidental touch solution provided in this application, but this application does not limit the implementing entity. For example, the electronic device 100 in the anti-accidental touch solution provided in this application can also be a chip, chip system, or processor (such as processor 110) that supports the implementation of the anti-accidental touch solution by the electronic device 100, or it can be a logic node, logic module, or software that can implement all or part of the functions of the electronic device 100.

[0125] It is understood that in this application, the electronic device 100 may perform some or all of the steps in this application. These steps are merely examples, and this application may also perform other steps or variations thereof. Furthermore, the steps may be performed in different orders as presented in this application, and it is not necessary to perform all the steps in this application.

[0126] In the accidental touch prevention scheme provided in this application embodiment, the electronic device detects acceleration data through an accelerometer and determines whether the electronic device is placed in a pocket based on the acceleration data and whether the electronic device is obstructed. If it is determined that the electronic device is placed in a pocket, the accidental touch prevention mode is activated.

[0127] In some embodiments of this application, the electronic device can determine that it has been placed in a pocket based on acceleration data satisfying a first condition and the electronic device being obstructed. For example, the electronic device first determines that the acceleration data satisfies the first condition, then determines that the electronic device is obstructed, and then determines that the electronic device has been placed in a pocket. Alternatively, the electronic device first determines that the electronic device is obstructed, then determines that the acceleration data satisfies the first condition, and then determines that the electronic device has been placed in a pocket.

[0128] Figure 3 shows a flowchart illustrating the activation of an anti-accidental touch mode according to this application, applied to an electronic device. An embodiment of the method of this application will be described with reference to Figure 3. The method may include the following steps:

[0129] S301. Detect acceleration data of electronic equipment.

[0130] S302. Based on acceleration data and whether the electronic device is obstructed, determine if the electronic device is placed in the pocket and activate the anti-accidental touch mode.

[0131] In this embodiment of the application, the electronic device includes an acceleration sensor, which detects the acceleration data of the electronic device in real time. For example, the acceleration sensor can be an accelerometer.

[0132] Accelerometers in electronic devices acquire acceleration data at a first frequency. This first frequency, typically expressed in Hertz (Hz), is the frequency at which the accelerometer acquires acceleration data at fixed time intervals. It represents the number of acceleration data acquisitions per second. For example, 10Hz means ten acceleration data acquisitions per second.

[0133] Understandably, the primary frequency can be dynamically adjusted based on factors such as the movement of the electronic device. For example, when the electronic device is stationary, the primary frequency can be lowered to reduce power consumption, such as from 100Hz to 10Hz. When the electronic device is moving, the primary frequency can be increased to obtain more accurate acceleration data and accurately determine the user's actions, such as from 10Hz to 100Hz.

[0134] It's understandable that during the use of electronic devices, accelerometers collect acceleration data in real time, and the devices can store this data. This allows the devices to determine the user's actions based on the stored acceleration data. However, acceleration data typically reflects the real-time motion state of the electronic device. Historical acceleration data is outdated and cannot be used to determine the current motion state. To ensure the real-time nature and accuracy of the data, only the most recent acceleration data can be stored.

[0135] In this embodiment of the application, the electronic device can store acceleration data according to a first length, wherein the first length is the maximum capacity for storing acceleration data.

[0136] For example, an electronic device uses a queue to store acceleration data, with an initial length of 100. This allows the device to store 100 acceleration data points. When new data is acquired, if the queue is full, a first-in, first-out (FIFO) strategy is used to remove the oldest data and add the new data.

[0137] Understandably, the initial length limit restricts the amount of acceleration data stored, preventing excessive memory consumption, saving resources, and simplifying data management. Furthermore, the acceleration data stored in electronic devices is the most up-to-date data, allowing the devices to respond quickly based on the latest acceleration information.

[0138] The acceleration data can include the acceleration data of the electronic device in three dimensions. The acceleration data can include acceleration values ​​and timestamps. The three dimensions can be three dimensions in a three-dimensional coordinate system, namely the acceleration of the electronic device along the x-axis, the acceleration along the y-axis, and the acceleration along the z-axis.

[0139] In this context, a three-dimensional coordinate system is typically used to describe the position and motion of electronic devices in space. For example, the x-axis typically represents the direction of horizontal movement to the left or right, the y-axis typically represents the direction of horizontal movement forward or backward, and the z-axis typically represents the direction of vertical movement upward or downward.

[0140] For example, taking a mobile phone as an example, with the touchscreen of an electronic device as a flat screen, a three-dimensional coordinate system is established with the center point of the mobile phone touchscreen as the origin, as shown in Figure 4. The x-axis is parallel to the short side of the phone, the y-axis is parallel to the long side of the phone, and the z-axis is perpendicular to the plane of the x and y axes, i.e., the z-axis is perpendicular to the touchscreen. The positive x-axis can be parallel to the short side of the phone, pointing from the left long side to the right long side; the positive y-axis can be parallel to the long side of the phone, pointing from the bottom short side to the top short side; and the positive z-axis can be perpendicular to the touchscreen, pointing from the phone's outer casing to the touchscreen. On the horizontal plane, the x-axis can describe the phone's left or right movement, and the x-axis acceleration is the acceleration when the phone moves left or right. The y-axis can describe the device's forward or backward movement, and the y-axis acceleration is the acceleration when the phone moves forward or backward. The z-axis can describe the phone's vertical movement, such as up or down, and the z-axis acceleration is the acceleration when the phone moves up or down.

[0141] It is understandable that an accelerometer in an electronic device can detect acceleration data both when the screen is on and when the screen is off. The electronic device can store the acceleration data detected by the accelerometer according to a first length.

[0142] In the on-screen state, the touchscreen of an electronic device is turned on, illuminated, and displays content. In the off-screen state, the touchscreen is turned off or in standby mode, not illuminated, and does not display content; this can be understood as a "black screen."

[0143] It's understandable that when an electronic device's screen is on, accidental touches are more likely to occur. When the screen is off, accidental touches are more likely to occur on the device's physical buttons.

[0144] In this embodiment of the application, the electronic device obtains acceleration data from a queue storing acceleration data.

[0145] It is understood that the processor of an electronic device includes an application processor (AP) and a coprocessor (CP). The AP has very strong processing power, while the CP is a low-energy-efficiency general-purpose processing unit with low computing power, capable of only performing simple computational tasks. In this embodiment, when the electronic device is in a screen-on state, the AP can retrieve acceleration data from the queue storing acceleration data and execute the accidental touch prevention method of this application. In this embodiment, when the electronic device is in a screen-off state, the CP can retrieve acceleration data from the queue storing acceleration data and execute the accidental touch prevention method of this application.

[0146] In some embodiments of this application, the electronic device can determine that the acceleration data meets the first condition in a variety of ways.

[0147] The first condition is whether the acceleration data meets the criteria for activating the anti-accidental touch mode. The first condition may include one or more of the following: whether the acceleration data matches the target action, and whether the acceleration data is greater than or equal to the acceleration threshold.

[0148] In some embodiments of this application, the first condition that the electronic device determines the acceleration data satisfies may include one or more of the following: the electronic device determines that the acceleration data matches the target action, or the electronic device determines that the acceleration data is greater than or equal to an acceleration threshold.

[0149] For example, the target action could include placing an electronic device into a container. For instance, this could be a bagging action. The container could be a pocket, backpack, shopping bag, etc.

[0150] For example, electronic devices determine whether acceleration data matches the target action based on the output of an action judgment model.

[0151] The electronic device determines whether the first condition is met based on acceleration data by: inputting the acceleration data into the action judgment model, and determining whether the action corresponding to the acceleration data matches the target action based on the output of the action judgment model. If yes, the first condition is met; otherwise, the first condition is not met.

[0152] The action recognition model can be a deep learning model, trained using a large model. This model can be used to identify user actions, such as target actions.

[0153] For example, the training process of an action recognition model may include the following steps: The server collects a large amount of acceleration data from electronic devices performing different actions as training data. For instance, the training data may include acceleration data detected by accelerometers when different people operate different electronic devices in different environments and perform different actions. Different actions include target actions, exiting a pocket action, normal use, being in a pocket, changing from portrait to landscape mode, etc. A deep learning model is selected as the training model. For example, the deep learning model could be a long short-term memory network (LSTM), a convolutional neural network (CNN), etc. The server inputs the training data into the training model for training. The training process typically includes forward propagation, loss calculation, and backpropagation to optimize the weights and structure of the training model. After training, the action recognition model is obtained. This action recognition model can recognize different actions.

[0154] Electronic devices can obtain action judgment models from servers. The electronic device inputs acceleration data into the action judgment model and obtains its output. The output is the action corresponding to the acceleration data, as inferred by the action judgment model, such as a target action or other actions. For example, if the output is a target action, it is determined that the acceleration data matches the target action, satisfying the first condition. If the output is an action other than the target action, it is determined that the acceleration data does not match the target action, and the first condition is not satisfied.

[0155] Understandably, the action judgment model in the above example is used to identify and judge different actions.

[0156] For example, when training an action recognition model, the server can be trained using only the acceleration data of the target action. This action recognition model is only used to determine whether the acceleration data detected by the electronic device represents the target action.

[0157] The electronic device can obtain the action judgment model from the server. The electronic device inputs acceleration data into the action judgment model and obtains the output result of the action judgment model. For example, if the output result of the target action judgment model is "yes", then it is determined that the action corresponding to the acceleration data is the target action, and the acceleration data matches the target action, satisfying the first condition; if the target action judgment model is "no", then it is determined that the action corresponding to the acceleration data is not the target action, and the acceleration data does not match the target action, failing to satisfy the first condition.

[0158] Understandably, in this example, the action judgment model is only used to identify and judge one action.

[0159] It is understood that the embodiments of this application do not limit the specific implementation method of determining whether the action corresponding to the acceleration data matches the target action based on the acceleration data.

[0160] It is understandable that, according to S301, acceleration data includes acceleration in three dimensions. Based on this acceleration data, the motion state of the electronic device in three-dimensional space can be comprehensively detected so that the electronic device can judge the user's actions when operating the electronic device.

[0161] While a user is using an electronic device, the accelerometer can detect acceleration in three dimensions in real time. The changes in acceleration data in these three dimensions differ depending on the user's actions. Therefore, the user's actions can be determined based on the acceleration data.

[0162] For example, taking a mobile phone as an electronic device, Figure 5 shows the acceleration changes corresponding to different actions. In Figure 5, the horizontal axis represents time, and the vertical axis represents acceleration.

[0163] Figure 5(a) shows the acceleration changes when a user picks up a phone. When a user picks up a phone, the phone undergoes an upward acceleration process; therefore, the acceleration along the z-axis increases instantaneously. The acceleration along the x-axis and y-axis will change slightly, depending on the user's hand movements, such as tilting.

[0164] Figure 5(b) shows the acceleration variation when a user is using a mobile phone normally. When using a mobile phone normally, the user typically lifts the phone without moving it significantly. The phone's acceleration is mainly affected by gravity; the acceleration along the z-axis is high, while the acceleration along the x-axis and y-axis is lower. Furthermore, due to the stability of holding the phone, the acceleration in all three dimensions changes slightly.

[0165] Figure 5(c) shows the acceleration change when a user switches their phone from portrait to landscape mode. Taking clockwise rotation as an example, as the phone rotates, gravity gradually shifts from the x-axis to the y-axis. Therefore, the acceleration along the x-axis decreases, the acceleration along the y-axis increases, and the acceleration along the z-axis fluctuates. Generally, the switch from portrait to landscape is relatively quick; therefore, the acceleration along the x-axis decreases instantaneously, and the acceleration along the y-axis increases instantaneously.

[0166] Figure 5(d) shows the acceleration change when a user puts a phone in their pocket. When the phone is placed in the pocket, its orientation is closer to its horizontal position, and gravity gradually shifts from the y-axis and z-axis to the x-axis. Therefore, the acceleration along the x-axis increases, while the acceleration along the y-axis and z-axis decreases. Furthermore, the speed at which the phone is placed in the pocket is generally fast; therefore, the acceleration along the x-axis increases instantaneously, while the acceleration along the y-axis and z-axis decreases instantaneously.

[0167] Figure 5(e) shows the acceleration variation of a mobile phone in a pocket. When a mobile phone is in a pocket, it is usually in portrait orientation; for example, the bottom short edge of the phone touches the bottom of the pocket, causing friction between them. This results in a significant decrease in the y-axis acceleration, which becomes negative. Due to the influence of gravity and body motion, the mobile phone usually moves along the x-axis or z-axis, with the x-axis and z-axis accelerations being positive and fluctuating.

[0168] Figure 5(f) shows the acceleration changes when a phone is taken out of a pocket. The user typically takes the phone out vertically. During this process, the phone is no longer in contact with the pocket and moves upwards; therefore, the y-axis acceleration increases from negative to positive, and the z-axis acceleration gradually increases. As the phone separates from the pocket, the user holds the phone stably, and the phone no longer has lateral inertia; the x-axis acceleration gradually decreases.

[0169] In other embodiments of this application, whether the acceleration data satisfies a first condition is determined based on an acceleration threshold. The acceleration threshold is a predetermined minimum threshold value for the acceleration data when a user places the electronic device in their pocket.

[0170] It is understandable that, based on the content of Figure 5 above, the changes in acceleration data are not the same when a user performs different actions with an electronic device. Therefore, acceleration data can be collected from different users in different environments and situations (such as sitting, walking, or standing) when they put the electronic device in their pocket, and acceleration thresholds can be determined based on this acceleration data.

[0171] If the acceleration data detected by the electronic device is greater than or equal to the acceleration threshold, it indicates that the user is performing the action of putting the item into the bag, and the acceleration data meets the first condition. Otherwise, the user has not performed the action of putting the item into the bag, and the acceleration data does not meet the first condition.

[0172] It is understood that the embodiments of this application do not limit the specific implementation of the electronic device determining that the acceleration data satisfies the first condition.

[0173] It's understandable that during user interaction with electronic devices, some actions can cause the device's acceleration changes to resemble the target action. For example, the action of putting down an electronic device. Therefore, to avoid misinterpreting the target action, it's necessary to determine if the electronic device is obstructed. If it is obstructed, it indicates the device has been placed in the container. If it is not obstructed, it indicates the device has not been placed in the container, and the user's action is not the target action.

[0174] The following details the specific implementation method for determining whether an electronic device is blocked.

[0175] In this embodiment of the application, the electronic device can determine whether it is blocked by proximity light data detected by the proximity light sensor or capacitance data detected by the touch sensor.

[0176] In some embodiments of this application, the electronic device includes a proximity sensor that detects proximity light data of the electronic device. When the proximity light data is greater than or equal to a proximity light threshold, it is determined that the electronic device is blocked. When the proximity light data is less than the proximity light threshold, it is determined that the electronic device is not blocked.

[0177] The proximity light data refers to the intensity of light detected by the proximity light sensor. The proximity light threshold is a predetermined minimum threshold value for the proximity light data when an object approaches the electronic device and the electronic device is blocked.

[0178] In other embodiments of this application, the electronic device includes a touch sensor that detects capacitance data of the electronic device. The electronic device inputs the capacitance data into an occlusion determination model and determines whether the electronic device is occluded based on the output of the occlusion determination model.

[0179] The occlusion detection model can be a deep learning model, obtained through training and inference on a large model. The occlusion detection model is used to determine whether an electronic device is occluded.

[0180] For example, the training process of an occlusion detection model may include the following steps: A server collects a large amount of touchscreen capacitance data when electronic devices are placed in a container as training data. A deep learning model is selected as the training model. The server inputs the training data into the training model for training. The training process typically includes forward propagation, loss calculation, and backpropagation to optimize the weights and structure of the training model. After training, the occlusion detection model is obtained. This occlusion detection model is used to determine whether an electronic device is occluded.

[0181] Electronic devices can obtain an occlusion detection model from a server. The electronic device inputs capacitance data into this model and receives its output. For example, the occlusion detection model determines whether the capacitance data matches the capacitance data of the electronic device when it is occluded. If it matches, the model outputs "yes," and the electronic device determines that it is occluded. If it does not match, the model outputs "no," and the electronic device determines that it is not occluded.

[0182] Understandably, the specific implementation of how electronic devices determine whether they are blocked is described below and will not be repeated here.

[0183] In this embodiment, the electronic device determines that a first condition is met based on acceleration data, and that the electronic device is blocked, thus determining that the electronic device has been placed in a pocket. The electronic device then activates an anti-mistouch mode. After activating the anti-mistouch mode, the electronic device blocks notifications on the touchscreen and does not respond to hardware buttons.

[0184] The anti-mistouch mode is used to block notifications on the touchscreen. It can also be described as a pocket mode, where the electronic device is in a pocket and should block notifications on the touchscreen, not responding to hardware buttons to avoid accidental touches.

[0185] It should be understood that when an electronic device is in anti-mistouch mode, it can block any reported point on the touchscreen, not respond to hardware buttons, and not execute the functions corresponding to the hardware buttons.

[0186] In this embodiment, after the electronic device activates the anti-mistouch mode, the electronic device may not respond to touch operations on its touchscreen or hardware buttons; or, upon receiving a touch operation on its touchscreen or hardware buttons, the electronic device may display a prompt message to indicate that it has entered the anti-mistouch mode; or, the electronic device may automatically lock its screen, etc. This embodiment does not limit the specific implementation of the anti-mistouch mode.

[0187] It is understood that, in this embodiment of the application, after the electronic device activates the anti-mistouch mode, it can block all accidental touch notifications on the screen. Both large and small accidental touch notifications can be blocked. The solution of this application can effectively block any accidental touch notification on the touchscreen, blocking every single accidental touch notification. The electronic device can also disable hardware buttons by not responding to them. Through the anti-mistouch mode, the possibility of accidental touches on the electronic device is reduced, improving the user experience.

[0188] In practical applications, electronic devices can also disable the accidental touch prevention mode. In some embodiments of this application, the accidental touch prevention mode is disabled when the electronic device meets a second condition.

[0189] The second condition is the criterion for disabling the accidental touch prevention mode. The second condition includes one or more of the following: determining whether the electronic device has been removed from a pocket based on acceleration data, whether the electronic device is obstructed, and whether there is a finger tap on the electronic device's touchscreen (or, in other words, whether a finger is touching the touchscreen). A finger tap refers to the capacitive signal generated when a finger touches the touchscreen.

[0190] Electronic devices can disable the anti-accidental touch mode if one or more of the following conditions are met: the electronic device is removed from a pocket based on acceleration data, the electronic device is not obstructed, and there is a finger tap on the touchscreen of the electronic device.

[0191] It is understood that, in the above embodiments, activating the anti-mistouch mode requires determining whether the acceleration data meets the first condition and whether the electronic device is obstructed. After the electronic device activates the anti-mistouch mode, it makes a judgment based on the second condition. If any one of the second conditions is met, the electronic device deactivates the anti-mistouch mode.

[0192] In this embodiment, after the anti-mistouch mode is enabled, the electronic device can acquire acceleration data detected by an accelerometer and determine whether the electronic device has taken its arm out of its pocket based on the corresponding action. The electronic device can also acquire capacitance data detected by a proximity sensor or a touch sensor and determine whether the electronic device is obstructed based on this data. Furthermore, the electronic device can determine whether a finger is detected on the touchscreen based on the capacitance data detected by the touch sensor. If any of the above conditions are met, the electronic device is determined to meet the second condition, and the anti-mistouch mode is disabled.

[0193] Figure 6 is a flowchart illustrating a method for disabling the accidental touch prevention mode according to an embodiment of this application. As shown in Figure 6, the accidental touch prevention mode is disabled when the electronic device meets a second condition. The method includes:

[0194] S600: Detects acceleration data of electronic devices.

[0195] S601. Determine whether the electronic device has been removed from the pocket based on the acceleration data. If yes, proceed to S605; otherwise, proceed to S602.

[0196] S602. Determine whether the electronic device is blocked. If so, proceed to S603; otherwise, proceed to S605.

[0197] S603. Determine if there is a finger reporting function in the electronic device. If yes, proceed to S605; otherwise, proceed to S604.

[0198] S604, Do not turn off the accidental touch prevention mode.

[0199] S605, Turn off the accidental touch prevention mode.

[0200] In some embodiments of this application, the electronic device can determine whether to remove itself from a pocket based on an action judgment model. The electronic device can input current acceleration data into the action judgment model and determine whether to remove itself from the pocket based on the output of the action judgment model.

[0201] For example, the action judgment model could be a deep learning model used to identify and judge different actions. This action judgment model is trained based on acceleration data of different actions. The electronic device inputs this acceleration data into the action judgment model. If the output of the action judgment model indicates a target action or being in a pocket, it is determined that the electronic device has not been removed from the pocket, and the electronic device determines whether it is being obstructed. Data from other sensors (such as proximity sensors or touch sensors) can also be used to determine if the electronic device is obstructed. If the output indicates an action other than the target action or being in a pocket (such as a removal action), it is determined that the electronic device has been removed from the pocket, satisfying the second condition, and the electronic device deactivates the anti-accidental touch mode.

[0202] For example, the action judgment model could be a deep learning model used only to recognize the action of removing the bag, trained based on acceleration data of the bag-removing action. The electronic device inputs this acceleration data into the action judgment model. If the model outputs "yes," it determines that the electronic device has removed the bag, satisfying the second condition, and the device disables the anti-accidental touch mode. If the model outputs "no," it determines that the electronic device has not been removed from the bag, not satisfying the second condition, and the device determines whether it is being obstructed.

[0203] It is understandable that an electronic device may include a single action judgment model for determining different actions. Alternatively, an electronic device may include multiple action judgment models, each used to determine only one type of action.

[0204] In some embodiments of this application, if it is determined that the electronic device is not in a pocket, data detected by other sensors is acquired to determine whether the electronic device is obstructed. These other sensors may be proximity sensors or touch sensors. If it is determined that the electronic device is obstructed, the electronic device determines whether a finger is detected. For example, it may determine whether a finger is detected on the touchscreen of the electronic device based on data from the touch sensor. If it is determined that the electronic device is not obstructed, it is determined that the electronic device is not in a pocket, satisfying a second condition, and the electronic device disables its anti-mistouch mode.

[0205] In some embodiments of this application, if it is determined that the electronic device is not removed from a pocket and is obstructed, the presence of a finger tap on the touchscreen of the electronic device is determined based on the capacitance data detected by the touch sensor. If no finger tap is detected, it is determined that the electronic device is still in the pocket, and the anti-mistouch mode is not turned off. If a finger tap is detected, it is determined that the electronic device meets the second condition, and the anti-mistouch mode is turned off.

[0206] It is understandable that in practical applications, there are situations where users use electronic devices in their pockets. There are also situations where the accelerometer or proximity sensor malfunctions and cannot detect data, preventing the electronic device from exiting the anti-mistouch mode. To address these situations, in this embodiment, the electronic device can determine whether a finger is detected on the touchscreen based on the capacitance data detected by the touch sensor. If a finger is detected, the electronic device must exit the anti-mistouch mode and disable it so that the user can use the electronic device normally. Otherwise, the anti-mistouch mode remains enabled.

[0207] Understandably, contact conditions can be distinguished based on capacitance data. A positive capacitance value indicates that the touchscreen is being effectively touched. For example, touch caused by a finger, stylus, or other conductive materials (such as a touch glove). A reporting point is only generated when the capacitance data is positive. A negative capacitance value indicates that the touchscreen detected a touch originating from a non-conductive object, such as clothing. Therefore, different contact conditions can be distinguished based on the capacitance data. In this embodiment, the presence of a reporting point is first determined based on the capacitance data, and then it is detected whether the reporting point is a finger reporting point.

[0208] The presence of a finger reporting point can be determined based on its shape. For example, the contact shape can be determined based on the capacitance data detected by the touch sensor. If the contact shape is a finger or the contact area is greater than a preset threshold, it indicates that the user is operating the electronic device. The preset threshold is the minimum touch area of ​​the touchscreen of the electronic device when the user uses it, determined experimentally or empirically. The electronic device then determines that a finger reporting point exists on the touchscreen. Alternatively, the frequency of capacitance data detected by the touch sensor can be used to determine if a finger reporting point exists. The frequency is the number of reporting points detected per unit time (which can also be understood as the number of touch events detected per unit time). If the user is using the electronic device, their fingers will frequently touch the touchscreen. The touch sensor will detect multiple reporting points in a short period, resulting in a high frequency. Therefore, the presence of a finger reporting point can be determined based on the frequency of reporting points. The presence of a finger reporting point can also be determined based on touch pressure or capacitance changes. This application embodiment does not show the specific implementation method of the electronic device determining finger reporting points.

[0209] It is understandable that the electronic device first determines whether it has been removed from a pocket based on the accelerometer, then determines whether it is obstructed, and finally determines whether a finger is detected on the touchscreen. The second condition is then determined sequentially. However, in practical applications, the various judgment conditions in the second condition can be executed simultaneously or sequentially. For example, the electronic device could first determine whether it is obstructed, then determine whether it has been removed from a pocket based on the acceleration data, and then determine whether a finger is detected. This application does not limit the specific execution order of the various judgment conditions in the second condition.

[0210] It is understood that, in the embodiments of this application, after determining that the anti-mistouch mode should not be turned off, the electronic device continues to use the anti-mistouch mode in order to determine whether the electronic device meets the second condition and whether to turn off the anti-mistouch mode based on the current data.

[0211] In this application, when the electronic device is in either a screen-on or screen-off state, it can be detected based on data from multiple sensors. When the sensor data determines that the electronic device meets a first condition, an anti-mistouch mode is activated, blocking reported points on the touchscreen and refusing to respond to hardware buttons. The electronic device can comprehensively determine whether it is in a pocket by integrating data from multiple sensors, improving the accuracy of mis-touch detection and reducing the risk of false alarms. Furthermore, regardless of the electronic device's state, when the first condition is met, any reported point on the electronic device is blocked, and no hardware button is responded to. This method effectively blocks accidental touches, improving the user experience. When the electronic device meets a second condition, the anti-mistouch mode exits without affecting normal user operation. This application's solution optimizes the anti-mistouch strategy, making the anti-mistouch mode more intelligent and accurate, effectively improving the user experience.

[0212] It is understood that the above embodiments are illustrated using electronic devices as examples. With the rapid development of technology, the types of electronic devices are increasing, as are the types of touchscreens used in them. Touchscreens in electronic devices can be candybar screens or foldable screens. Correspondingly, electronic devices can be candybar phones or foldable devices. Furthermore, the design and configuration of sensors in electronic devices must adapt to different types of electronic devices and touchscreens.

[0213] In some embodiments of this application, the folding screen in a foldable device can be a flexible folding screen, which can be folded along the folding edge to form multiple screens. In other embodiments of this application, the folding screen in a foldable device can be a multi-screen folding screen. This multi-screen folding screen can include multiple screens. These multiple screens can be connected sequentially via a folding axis (or a pivot). Each screen can rotate around the folding axis connected to it, realizing the folding of the multi-screen folding screen. For example, taking a flexible folding screen as an example, if the electronic device has only one folding edge, folding along that edge can fold the touchscreen (i.e., the folding screen) into two independently displayable screens, such as a first screen and a second screen. Correspondingly, the usage state of an electronic device with a folding screen can include a folded state and an unfolded state. The folding method of an electronic device with a folding screen can be vertical folding or horizontal folding. The touchscreen of an electronic device with a folding screen can include an inner screen and an outer screen. The inner screen is usually a folding screen, and the outer screen can be a flat screen or one of the independently displayable screens among the folding screens after the electronic device is folded, for example, the first screen.

[0214] For example, Figure 7(a) shows a schematic diagram of an electronic device with a candybar screen, where the electronic device contains only one touchscreen. Figure 7(b) shows a schematic diagram of an electronic device with a foldable screen, where the electronic device is folded vertically in its unfolded state. The touchscreen of this electronic device can be folded along the folding edge 701, and after folding, the touchscreen is divided into two independently displayable screens, screen A and screen B. If there is another touchscreen on the back of screen A, such as screen C, then the schematic diagram of the electronic device in its folded state is shown in Figure 7(c). In this case, screen A is opposite to screen B and is not visible to the user. As shown in Figure 7(c), screen C, which is opposite to screen A, faces the user and is visible to the user.

[0215] It is understandable that, based on the electronic devices shown in Figure 7(b) and Figure 7(c), the inner screen of the electronic device is a foldable screen composed of screen A and screen B, and the outer screen is screen C, which is a flat screen.

[0216] For example, as shown in Figure 7(d), the electronic device uses a foldable screen for its touchscreen, and the folding method of the electronic device is a schematic diagram of its unfolded state when folded horizontally. The touchscreen of this electronic device can be folded along folding edges 702 and 703. After folding, the touchscreen is divided into three independently displayable screens, namely screen D, screen E, and screen F. If the electronic device is folded along the two folding edges, the schematic diagram of the electronic device in the folded state is shown in Figure 7(e). In this case, screen E is opposite to screen F and is not visible to the user. As shown in Figure 7(e), screen D faces the user and is visible to the user.

[0217] It is understandable that, based on the electronic devices shown in Figure 7(d) and Figure 7(e), the inner screen of the electronic device is a foldable screen composed of screen D, screen E and screen F, and the outer screen is screen D, which is an independently displayable screen in the foldable screen.

[0218] It is understood that the schematic diagram of the electronic device shown in Figure 7 is only an example. Optionally, an electronic device including a foldable screen may not include an outer screen. For electronic devices including foldable screens, the folding mode of the electronic device and the inner and / or outer screens corresponding to each folding mode are pre-set at the factory. This application does not limit the touch screen of the electronic device.

[0219] The following sections describe the specific implementation methods for preventing accidental touches in electronic devices that include different types of touchscreens and different sensors.

[0220] Figure 8 illustrates another method for preventing accidental touches provided in this application embodiment. This method includes the entire process of enabling and disabling the accidental touch prevention mode. This method is applicable to electronic devices that include a candybar screen, an accelerometer, a proximity sensor, and a touch sensor.

[0221] S801, Obtain acceleration data.

[0222] S802. Determine whether the first condition is met based on the acceleration data. If yes, execute S803; otherwise, end the process.

[0223] S803. Activate the proximity light sensor and determine whether the electronic device is blocked based on the proximity light data detected by the proximity light sensor. If yes, proceed to S804; otherwise, end the process.

[0224] S804, Enable anti-accidental touch mode.

[0225] S805. When the electronic device meets the second condition, turn off the accidental touch prevention mode.

[0226] It is understood that electronic devices can acquire acceleration data whether the screen is on or off. The specific implementation method is described in the embodiments above and will not be repeated here. It is also understood that electronic devices can determine whether the acceleration data meets the first condition based on the action judgment model and the acceleration threshold. The specific implementation method is described in the embodiments above and will not be repeated here.

[0227] In some embodiments of this application, an electronic device can determine whether it is being blocked by proximity light data detected by a proximity sensor.

[0228] If the proximity light data is less than the proximity light threshold, the electronic device is determined to be blocked; if the proximity light data is greater than or equal to the proximity light threshold, the electronic device is determined to be unblocked.

[0229] Alternatively, if the proximity sensor detects a decrease in light intensity based on proximity light data, the electronic device can determine that an object is approaching and the device is being blocked, thus activating the anti-accidental touch mode. If the proximity sensor detects an increase in light intensity based on proximity light data, the electronic device can determine that the object is moving away and the device is not being blocked, thus ending the process.

[0230] For example, proximity light data can be proximity light data at multiple times. Changes in proximity light data can be determined based on these multiple times, and the electronic device can be determined to be blocked based on these changes.

[0231] Optionally, the electronic device can activate the proximity sensor after determining that the acceleration data meets the first condition, thereby determining whether the electronic device is blocked.

[0232] It is understood that, after determining that the action corresponding to the acceleration data is the target action, this embodiment of the application also determines whether the object is obstructed based on the proximity light data detected by the proximity light sensor. This double verification improves the accuracy of determining whether the electronic device has been placed in the container and reduces the risk of misjudgment.

[0233] It is understood that an electronic device determines whether it is obstructed by proximity light data detected by a proximity sensor. In this example, the electronic device also includes a touch sensor, which can also determine whether it is obstructed based on capacitance data detected by the touch sensor. This application does not limit the specific implementation of how the electronic device determines whether it is obstructed.

[0234] It is understandable that in the above embodiment, the electronic device first determines whether the acceleration data meets the first condition, and then determines that the electronic device is blocked. In practical applications, the electronic device can also first determine that it is blocked, and then determine whether the acceleration data meets the first condition. Alternatively, the electronic device can simultaneously determine whether it is blocked and whether the acceleration data meets the first condition.

[0235] In some embodiments of this application, after the electronic device activates the anti-mistouch mode, the electronic device acquires acceleration data detected by an accelerometer, proximity light data detected by a proximity sensor, and capacitance data detected by a touch sensor. Based on the acceleration data detected by the accelerometer, it determines whether the device has been removed from its pocket; based on the proximity light data detected by the proximity sensor, it determines whether the electronic device is obstructed; and based on the capacitance data detected by the touch sensor, it determines whether a finger is detected on the touchscreen. If any of the above conditions are met, the electronic device is determined to meet a second condition, and the anti-mistouch module is deactivated.

[0236] It is understood that the specific implementation of determining whether an electronic device is blocked based on the proximity light data detected by the proximity light sensor can be found in the above embodiments, and will not be repeated here.

[0237] Understandably, the electronic device determines its corresponding action as the target action based on acceleration data, and determines that it is being blocked based on proximity light data detected by the proximity sensor. Therefore, it determines that the electronic device is placed in a pocket and activates the accidental touch prevention mode. After activating the accidental touch prevention mode, it acquires sensor data, and deactivates the mode when it determines that the electronic device meets a second condition based on the sensor data.

[0238] As shown in Figures 7(d) and 7(e), when the touchscreen of an electronic device is a foldable screen and the folding method is left-right folding, the user's usage habits and interaction methods are the same as those of a candybar phone, regardless of whether the device is in an unfolded or folded state. Foldable devices typically also include proximity sensors. The left-right folding action does not change the coordinate system of the accelerometer. Therefore, in this embodiment, the specific implementation of the anti-mistouch method for the left-right foldable device is the same as that for a candybar phone. The anti-mistouch method of this application can be used to prevent accidental touches when each screen of the left-right foldable device is lit.

[0239] It is understandable that, as shown in Figures 7(b) and (c), when the electronic device is in its unfolded state, its form is the same as the candybar phone shown in Figure 7(a). In the unfolded state, the user's habits and interaction methods are the same as with the candybar phone. Therefore, when the foldable device is in its unfolded state, the specific implementation of the anti-mistouch method is the same as with the candybar phone. However, when in its folded state, screen A folds downwards, facing screen B. This vertical folding action changes the coordinate system of the accelerometer.

[0240] For example, as shown in Figure 7(b), for a foldable device that folds vertically, two accelerometers are typically used, one located on screen A and the other on screen B. The accelerometer on screen A is the primary sensor, responsible for main acceleration detection. The accelerometer on screen B is the secondary sensor, providing additional data support. Therefore, for foldable devices that fold vertically, the acceleration data detected by the primary sensor is typically used to determine the movement of the electronic device and the user's actions when using it. When the foldable device is in its folded state, as shown in Figure 7(c), screen A is folded forward 180°. In the coordinate system of the primary sensor, the x-axis direction remains unchanged, while the y-axis and z-axis directions are opposite to their original definitions. Therefore, to ensure that the acceleration data reflects the correct acceleration direction, the acceleration values ​​in the y-axis and z-axis directions need to be inverted.

[0241] Figure 9 illustrates another method for preventing accidental touches provided in this application embodiment. This method includes the entire process of enabling and disabling the accidental touch prevention mode. The method is applied to an electronic device containing a foldable screen, wherein the foldable screen is folded vertically, and the usage state is a folded state. The electronic device also includes an accelerometer, a proximity sensor, and a touch sensor.

[0242] S901. Acquire acceleration data when the electronic device is in a folded state.

[0243] S902. Preprocess the acceleration data. Determine whether the first condition is met based on the preprocessed acceleration data. If yes, execute S903; otherwise, end the processing.

[0244] S903. Determine whether the electronic device is blocked. If so, proceed to S904; otherwise, end the process.

[0245] S904, Enable anti-accidental touch mode.

[0246] S905. When the electronic device meets the second condition, turn off the accidental touch prevention mode.

[0247] In some embodiments of this application, the electronic device determines whether it is folded based on its usage state, and acquires acceleration data when the electronic device is folded.

[0248] For example, based on the example shown in Figure 7(c), the electronic device is in a folded state. The processor of the electronic device acquires acceleration data.

[0249] It is understandable that the specific implementation of determining the usage state of an electronic device and whether it is in a folded state can be found in existing technologies, and will not be elaborated here.

[0250] It is understood that the specific implementation method for electronic devices to acquire acceleration data can be found in the above embodiments, and will not be repeated here.

[0251] In some embodiments of this application, the acceleration data of the y-axis and z-axis in the acquired acceleration data are inverted, and it is determined whether the first condition is met based on the acceleration data of the x-axis, the inverted acceleration data of the y-axis, and the inverted acceleration data of the z-axis.

[0252] For example, the preprocessed acceleration data in three dimensions is input into the action judgment model, and the output of the action judgment model is used to determine whether the preprocessed acceleration data meets the first condition.

[0253] It is understood that the specific implementation method for the electronic device to determine whether the acceleration data meets the first condition is described in the above embodiments, and will not be repeated here.

[0254] It is understandable that in the above embodiment, the electronic device first determines whether the first condition is met based on the preprocessed acceleration data, and then determines that the electronic device is blocked. In practical applications, the electronic device can also first determine that it is blocked, and then determine whether the preprocessed acceleration data meets the first condition. Alternatively, the electronic device can simultaneously determine whether it is blocked and whether the acceleration data meets the first condition. It is understandable that the electronic device determines that the first condition is met based on the preprocessed acceleration data, and that the electronic device is blocked, determines that the electronic device is placed in a pocket, and activates the accidental touch prevention mode. After activating the accidental touch prevention mode, sensor data is acquired, and when the sensor data determines that the electronic device meets the second condition, the accidental touch prevention mode is deactivated.

[0255] It should be understood that the electronic devices in the above examples all include proximity sensors, which can be used to determine whether the electronic device is obstructed. In practical applications, electronic devices may not include proximity sensors, or the proximity sensors may be faulty and unable to determine whether the electronic device is obstructed. In this case, the electronic device can determine whether it is obstructed by using capacitance data detected by a touch sensor.

[0256] Figure 10 shows a flowchart illustrating the method for preventing accidental touches provided in this embodiment of the application in an electronic device containing a foldable screen. The folding method of the foldable screen is when it is folded left and right. The electronic device also includes an accelerometer and a touch sensor.

[0257] In this embodiment, the electronic device can also be a foldable device including a foldable screen, and the folding method of the foldable device is vertical folding. The electronic device can also be a candybar phone including a flat screen. However, the electronic device does not include a proximity sensor.

[0258] It is understandable that, regardless of the usage status of the electronic device or the type of touch screen, electronic devices containing touch screens can detect the touch screen through touch sensors and determine whether the electronic device is obstructed based on the data detected by the touch sensors.

[0259] S1001, Obtain acceleration data.

[0260] S1002. Determine whether the first condition is met based on the acceleration data. If yes, proceed to S1003; otherwise, end the process.

[0261] S1003. Determine whether the electronic device is blocked based on the capacitance data detected by the touch sensor. If yes, proceed to S1004; otherwise, end the process.

[0262] S1004, Enable anti-accidental touch mode.

[0263] S1005. If the electronic device meets the second condition, turn off the accidental touch prevention mode.

[0264] It is understandable that electronic devices can acquire acceleration data whether the screen is on or off.

[0265] Understandably, electronic devices can determine whether acceleration data meets the first condition based on action judgment models or acceleration thresholds.

[0266] Understandably, if the electronic device is a foldable device, and the folding method is vertical, the acceleration data needs to be preprocessed before determining whether it meets the first condition. For example, if the electronic device determines that the acceleration data meets the first condition, it can determine whether the electronic device is in an obstructed state by using the capacitance data detected by the touch sensor.

[0267] Among them, the capacitance data is the information of the capacitance value detected by the touch sensor. The capacitance value can represent the change of electric field of the touch sensor when it detects a touch or proximity.

[0268] It's understandable that when an object approaches a touchscreen, it changes the electric field within the touchscreen, causing a change in capacitance. Touch sensors can detect these changes in capacitance to determine if a touch has occurred and the intensity of the touch. When a positive capacitance value is detected, it's determined that the touchscreen has been touched, and a reporting point can be determined based on this capacitance data. A reporting point is a touch signal or touch event generated when the touchscreen is touched. A reporting point can include information such as the coordinates of the touch point, the touch area, and the touch type. The coordinate information is typically expressed in pixels. For example, when a user touches the touchscreen of an electronic device using their finger or a stylus, the electronic device detects the user's touch operation and generates a corresponding reporting point.

[0269] For example, as shown in Figure 11, if the electronic device is in the folded state as shown in Figure 7(e), when the folded electronic device with its screen on is in a pocket, the capacitance data of the D-screen detected by the touch sensor is shown in Figure 11(a). The pixel coordinates in the electronic device correspond to the pixels of the touchscreen. Since most of the D-screen of the electronic device is in contact with clothing, the distribution of capacitance data in the touchscreen is strongly disturbed (such as by electrostatic interference or electric field interference), resulting in negative capacitance values. At this time, the capacitance data of most pixels in the touchscreen is negative, and the electronic device is obstructed.

[0270] Each small square represents a pixel on the touchscreen. Colored squares indicate that the capacitance of that pixel is negative, while blank squares indicate that the capacitance of that pixel is positive, with a value close to 0.

[0271] For example, when the folded electronic device with its screen on is not in a pocket, such as when it is placed on a table or held by the user, the capacitance data of the touch sensor detected by the D-screen is shown in Figure 11(b). The capacitance data of most pixels in the touchscreen are positive. At this time, the electronic device is not obstructed.

[0272] Understandably, the distribution of capacitance data detected by the touch sensor on the touchscreen differs significantly depending on whether the electronic device is obstructed or not. When the electronic device is obstructed, the capacitance data of most pixels on the touchscreen is negative. When the electronic device is unobstructed, the capacitance data of most pixels on the touchscreen is positive. Therefore, the electronic device can determine whether it is obstructed based on the capacitance data detected by the touch sensor.

[0273] Electronic devices can input capacitance data detected by touch sensors into an occlusion detection model, and determine whether the electronic device is occluded based on the model's output. For example, if the output is "yes," the anti-mistouch mode is activated; if the output is "no," the process ends.

[0274] Electronic devices can also determine whether they are blocked based on the distribution of capacitance data.

[0275] It is understood that the embodiments of this application determine whether an electronic device has been placed in a pocket based on both acceleration data and whether the electronic device is obstructed. Using data from multiple sensors can improve the accuracy of determining whether an electronic device has been placed in a container and reduce the risk of false positives.

[0276] Understandably, the electronic device determines that the first condition is met based on acceleration data, and determines that the device is blocked based on capacitance data detected by the touch sensor. Therefore, it determines that the electronic device is placed in a pocket and activates the accidental touch prevention mode. After activating the accidental touch prevention mode, it acquires sensor data, and when it determines that the second condition is met based on the sensor data, it deactivates the accidental touch prevention mode.

[0277] It should be understood that the above embodiments illustrate the accidental touch prevention method of this application using different device types and the various sensors included in the electronic device. The specific implementation of determining whether an electronic device is obstructed is independent of the device type. When determining whether an electronic device is obstructed, adjustments can be made adaptively based on the types of sensors included in the electronic device. For example, if the electronic device includes both a proximity sensor and a contact sensor, the proximity sensor has a higher priority in determining whether an obstruction is caused by it. If the proximity sensor malfunctions, the contact sensor can be used to determine whether an obstruction is caused by it.

[0278] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0279] This application embodiment can divide the above-described electronic device into functional modules based on the method example described above. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0280] Based on the same inventive concept, this application provides an anti-accidental touch device. The anti-accidental touch device provided in this application is applied to the electronic device 100 shown in FIG1. ​​The anti-accidental touch device may include a processor and a memory, the memory being coupled to the processor. The memory is used to store computer-readable instructions. When the processor reads the computer-readable instructions from the memory, the anti-accidental touch device executes the method of any one of the embodiments shown in FIG3-FIG10.

[0281] For example, Figure 12 shows a schematic diagram of the structure of an anti-accidental touch device provided in an embodiment of this application. As shown in Figure 12, the anti-accidental touch device includes a data acquisition module, a first processing module, a second processing module, and an anti-accidental touch module.

[0282] The data acquisition module is used to collect sensor data. It can collect acceleration data detected by the accelerometer, proximity light data detected by the proximity sensor, and capacitance data detected by the touch sensor, among others.

[0283] The data acquisition module is also used to send sensor data to the first processing module and the second processing module. The data acquisition module can send acceleration data to the first processing module so that the first processing module can determine whether a first condition is met. For example, the first processing module can determine whether the user's action is a target action or a bag-dispensing action based on the acceleration data. The data acquisition module can also send proximity light data detected by the proximity sensor or capacitance data detected by the touch sensor to the second processing module so that the second processing module can determine whether the electronic device is obstructed. For example, whether the electronic device is obstructed or not.

[0284] The first processing module is used to determine whether the acceleration data meets a first condition based on the acceleration data. The first processing module is also used to determine whether to remove the device from the pocket based on the acceleration data. The first processing module can also send the processing result to the accidental touch prevention module, so that the accidental touch prevention module can perform corresponding processing based on the processing result. For example, if the first processing module determines that the acceleration data meets the first condition, the first processing module can send the message "condition met" to the accidental touch prevention module, so that the accidental touch prevention module can activate the accidental touch prevention mode. As another example, if the first processing module determines that the electronic device has been removed from the pocket, the first processing module can send the message "removed from pocket" to the accidental touch prevention module, so that the accidental touch prevention module can deactivate the accidental touch prevention mode.

[0285] The second processing module determines whether an electronic device is obstructed based on proximity light data detected by the proximity sensor or capacitance data detected by the touch sensor. For example, it determines whether the electronic device is obstructed based on the proximity light data detected by the proximity sensor or the capacitance data detected by the touch sensor. The second processing module also determines whether a finger detection is present based on the capacitance data detected by the touch sensor. The second processing module can send the determination result to the accidental touch prevention module, so that the accidental touch prevention module can perform corresponding processing based on the determination result. For example, if the second processing module determines that the electronic device is obstructed, it can send the determination result (i.e., the electronic device is obstructed) to the accidental touch prevention module, so that the accidental touch prevention module can turn the accidental touch prevention mode on or off. As another example, if the second processing module determines that a finger detection is present on the electronic device, it can send the presence of a finger detection to the accidental touch prevention module, so that the accidental touch prevention module can turn off the accidental touch prevention mode.

[0286] The accidental touch prevention module is used to determine whether to enable the accidental touch prevention mode based on data sent by the first processing module and the second processing module. The module is also used to determine whether to disable the accidental touch prevention mode based on data sent by the first and second processing modules. If the data sent by the first processing module meets a first condition, and the data sent by the second processing module indicates that the electronic device is obstructed, then the accidental touch prevention module enables the accidental touch prevention mode. After enabling the accidental touch prevention mode, if the data sent by the first and second processing modules includes one or more of the following: the data sent by the first processing module indicates that the device is taken out of the pocket, the data sent by the second processing module indicates that the electronic device is not obstructed, or the data sent by the second processing module indicates that a finger is detected, then the accidental touch prevention module disables the accidental touch prevention mode.

[0287] It is understood that in the above example, the data acquisition module, the first processing module, the second processing module, and the accidental touch prevention module can be independent components. These modules interact with each other to complete the accidental touch prevention control. In practical applications, multiple modules among the data acquisition module, the first processing module, the second processing module, and the accidental touch prevention module can also be deployed on the same component; for example, the first processing module and the second processing module can be integrated into a single processing module. This application does not limit the functional modules of the accidental touch prevention device.

[0288] The modules of the aforementioned anti-accidental touch device are divided according to functional logic, but other division methods may also exist. Furthermore, the modules can have other names. Each module can be implemented in hardware, software, or a combination of both. The specific implementation method (hardware, software, or a combination) for a particular module depends on the specific application and design constraints of the technical solution. Different modules can be implemented with different hardware, and multiple modules can be implemented with the same hardware; this application does not specifically limit this.

[0289] This application also provides a chip system, which includes at least one processor and at least one interface circuit.

[0290] The processor and interface circuitry can be interconnected via lines. For example, the interface circuitry can be used to receive signals. Or, for example, the interface circuitry can be used to send signals to other devices (e.g., the processor). Exemplarily, the interface circuitry can read instructions stored in memory and send the instructions to the processor. When the instructions are executed by the processor, the steps in the above embodiments can be performed. Of course, the chip system may also include other discrete components, and this application does not specifically limit this.

[0291] Optionally, there can be one or more processors in the chip system. The processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that reads software code stored in memory.

[0292] Optionally, the chip system may also include a memory, which may be one or more. The memory may be integrated with the processor or disposed separately from the processor; this application is not limited in this regard. For example, the memory may be a non-transient processor, such as read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application does not specifically limit the type of memory or the arrangement of the memory and processor. For example, the chip system may be a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a system-on-a-chip (SoC), a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0293] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The method steps disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.

[0294] This application also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the method described in the above-described method embodiments.

[0295] Computer-readable storage media include, but are not limited to, any of the following: USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other media capable of storing program code.

[0296] This application provides a computer program product, which includes a computer program or instructions that, when run on a computer, cause the computer to perform the methods described in the above-described method embodiments.

[0297] In addition, this application also provides an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory. The memory is used to store computer execution instructions. When the apparatus is running, the processor can execute the computer execution instructions stored in the memory to cause the apparatus to perform the methods in the above-described method embodiments.

[0298] In addition, this application also provides a system, which may specifically be a chip, component or module. The system may include a connected processor and a memory. The memory is used to store computer execution instructions. When the system is running, the processor can execute the computer execution instructions stored in the memory to enable the system to perform the methods in the above-described method embodiments.

[0299] In this embodiment, the electronic device, computer storage medium, computer program product or chip are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding method provided above, and will not be repeated here.

[0300] The steps of the methods or algorithms described in conjunction with the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, compact disc read-only memory (CD-ROM), or any other form of storage medium well known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an application-specific integrated circuit (ASIC).

[0301] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, the division of the above functional modules is only used as an example. In practical applications, the above functions can be assigned to different functional modules as needed; that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0302] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The embodiments can be combined with or referenced to each other without conflict. The apparatus embodiments described above are merely illustrative; for example, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0303] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0304] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0305] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0306] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An electronic device, characterized in that, The electronic device includes: an accelerometer and a processor. The accelerometer is used to detect the acceleration data of the electronic device; The processor is configured to determine whether the electronic device is placed in a pocket based on the acceleration data and whether the electronic device is obstructed, and to activate the anti-accidental touch mode.

2. The electronic device according to claim 1, characterized in that, The processor is configured to determine whether the electronic device is placed in the pocket based on the acceleration data and whether the electronic device is obstructed, including: The processor is configured to determine that the electronic device is placed in a pocket based on the acceleration data satisfying a first condition and the electronic device being obstructed; wherein the first condition includes the acceleration data matching a target action, or the acceleration data being greater than or equal to an acceleration threshold.

3. The electronic device according to claim 1 or 2, characterized in that, The electronic device also includes a touch sensor. The touch sensor is used to detect capacitance data on the display screen of the electronic device; The processor is also configured to determine whether the electronic device is blocked based on the capacitance data.

4. The electronic device according to claim 3, characterized in that, The processor is further configured to determine whether the electronic device is blocked based on the capacitance data, including: The processor is used to determine that the electronic device is occluded when the occlusion judgment model outputs an occlusion processing result based on the capacitance data; the occlusion judgment model has the function of identifying whether the electronic device is occluded.

5. The electronic device according to claim 1 or 2, characterized in that, The electronic device also includes a proximity light sensor. The proximity light sensor is used to detect proximity light data of the electronic device; The processor is also configured to determine whether the electronic device is blocked based on the proximity light data.

6. The electronic device according to any one of claims 1-5, characterized in that, The processor is further configured to determine, based on at least one of the acceleration data, whether the electronic device is obstructed, and whether a finger touches the display screen of the electronic device, that the electronic device is removed from the pocket and the anti-accidental touch mode is turned off.

7. A method for preventing accidental touches, applied to electronic devices, characterized in that, The method includes: Detect the acceleration data of the electronic device; Based on the acceleration data and whether the electronic device is obstructed, the system determines that the electronic device is placed in the pocket and activates the anti-accidental touch mode.

8. The method according to claim 7, characterized in that, The step of determining whether the electronic device is placed in a pocket and activating the anti-accidental touch mode based on the acceleration data and whether the electronic device is obstructed includes: Based on the acceleration data satisfying a first condition and the electronic device being obstructed, it is determined that the electronic device is placed in a pocket; wherein, the first condition includes the acceleration data matching the target action, or the acceleration data being greater than or equal to an acceleration threshold.

9. The method according to claim 7 or 8, characterized in that, The method further includes: Detect the capacitance data displayed on the screen of the electronic device; The electronic device is determined to be blocked based on the capacitance data.

10. The method according to claim 9, characterized in that, The step of determining whether the electronic device is blocked based on the capacitance data includes: When the occlusion judgment model outputs the occlusion processing result based on the capacitance data, it is determined that the electronic device is occluded; the occlusion judgment model has the function of identifying whether the electronic device is occluded.

11. The method according to claim 7 or 8, characterized in that, The method further includes: Detect the proximity light data of the electronic device; The proximity light data is used to determine whether the electronic device is blocked.

12. The method according to any one of claims 7-11, characterized in that, The method further includes: Based on at least one of the acceleration data, whether the electronic device is obstructed, and whether a finger touches the display screen of the electronic device, it is determined that the electronic device is taken out of the pocket and the anti-accidental touch mode is turned off.

13. A chip system, characterized in that, It includes at least one processor and at least one interface circuit, the at least one interface circuit being used to perform transceiver functions and send instructions to the at least one processor, the at least one processor executing the instructions, the at least one processor performing the method as described in any one of claims 7-12.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 7-12.

15. A computer program product, characterized in that, The computer program product includes: a computer program or instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 7-12.

Citation Information

Patent Citations

  • Touch screen, electronic equipment and display control method

    CN113407053A

  • False touch prevention method and terminal

    CN114125144A

  • Ultrasonic touch sensor-based virtual button

    US20160378244A1