Touch processing method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202510521839.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2026-10-23
AI Technical Summary
[0002]随着电子设备技术的迅速发展,电子设备的电容式触摸屏的灵敏度、抗震能力都有了显著提高,但是,针对用户触控电容式触摸屏的场景,仍然会出现触摸坐标抖动,导致触控的准确性较低的问题
[0008]本申请实施例提供的触摸处理方法、装置、电子设备以及存储介质,在检测到作用于电容式触摸屏的触摸操作的情况下,检测电容式触摸屏对应的贴膜状态,其中,贴膜状态包括已贴膜或者未贴膜,若基于贴膜状态确定电容式触摸屏已贴膜,则检测电容式触摸屏对应的贴膜厚度,若贴膜厚度达到厚度阈值,则关闭针对电容式触摸屏的悬浮补偿功能,从而在检测到电容式触摸屏贴了厚膜时关闭悬浮补偿功能,优化触控坐标抖动问题,提升触控的准确性。
Smart Images

Figure CN122963387A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic device technology, and more specifically, to a touch processing method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the rapid development of electronic device technology, the sensitivity and shock resistance of capacitive touch screens in electronic devices have been significantly improved. However, in scenarios where users touch capacitive touch screens, touch coordinate jitter still occurs, resulting in low touch accuracy. Summary of the Invention
[0003] In view of the above problems, this application proposes a touch processing method, apparatus, electronic device, and storage medium to solve the above problems.
[0004] In a first aspect, embodiments of this application provide a touch processing method applied to an electronic device, the electronic device including a capacitive touchscreen. The method includes: upon detecting a touch operation applied to the capacitive touchscreen, detecting the film application status of the capacitive touchscreen, wherein the film application status includes whether the film is applied or not; if it is determined that the capacitive touchscreen is applied based on the film application status, then detecting the film thickness of the capacitive touchscreen; if the film thickness reaches a thickness threshold, then disabling the hover compensation function for the capacitive touchscreen.
[0005] Secondly, embodiments of this application provide a touch processing device applied to an electronic device, the electronic device including a capacitive touchscreen, the device including: a film application status detection module, used to detect the film application status of the capacitive touchscreen when a touch operation is detected acting on the capacitive touchscreen, wherein the film application status includes film application or no film application; a film application thickness detection module, used to detect the film application thickness of the capacitive touchscreen if it is determined based on the film application status that the capacitive touchscreen is filmed; and a hover compensation function deactivation module, used to deactivate the hover compensation function for the capacitive touchscreen if the film application thickness reaches a thickness threshold.
[0006] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the processor performs the above-described method.
[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing program code, which can be invoked by a processor to execute the above-described method.
[0008] The touch processing method, apparatus, electronic device, and storage medium provided in this application, when detecting a touch operation applied to a capacitive touchscreen, detect the film application status of the capacitive touchscreen. The film application status includes whether the capacitive touchscreen is filmed or not. If it is determined that the capacitive touchscreen is filmed based on the film application status, the film thickness of the capacitive touchscreen is detected. If the film thickness reaches a thickness threshold, the hover compensation function for the capacitive touchscreen is turned off. Thus, when a thick film is detected on the capacitive touchscreen, the hover compensation function is turned off, optimizing the touch coordinate jitter problem and improving the accuracy of touch. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 A schematic diagram of the suspension error compensation data is shown;
[0011] Figure 2 A schematic flowchart of a touch processing method provided in an embodiment of this application is shown;
[0012] Figure 3 This illustration shows a schematic diagram of the previous frame's tolerance data under levitation compensation provided in an embodiment of this application.
[0013] Figure 4 This illustration shows a schematic diagram of the capacitance data of the next frame under suspension compensation provided in an embodiment of this application.
[0014] Figure 5 A schematic flowchart of a touch processing method provided in an embodiment of this application is shown;
[0015] Figure 6 This application shows Figure 5 The flow chart of step S230 of the touch processing method is shown;
[0016] Figure 7 A schematic flowchart of a touch processing method provided in an embodiment of this application is shown;
[0017] Figure 8 A schematic flowchart of a touch processing method provided in an embodiment of this application is shown;
[0018] Figure 9 A schematic flowchart of a touch processing method provided in an embodiment of this application is shown;
[0019] Figure 10A schematic diagram of coordinate jitter capacitance data is shown;
[0020] Figure 11 A schematic diagram of the capacitor node distribution is shown;
[0021] Figure 12 A schematic diagram of the capacitance data for multi-finger touch is shown;
[0022] Figure 13 A block diagram of a touch processing device according to an embodiment of this application is shown;
[0023] Figure 14 A block diagram of an electronic device for performing a touch processing method according to an embodiment of this application is shown;
[0024] Figure 15 A storage unit for storing or carrying program code implementing the touch processing method according to an embodiment of the present application is shown. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0026] Currently, the main approach to optimizing touch hovering issues is to improve hovering conditions, such as replacing the plastic frame of electronic devices with a metal frame. However, even with a metal frame, touch coordinate jitter still occurs, especially noticeable in multi-finger coaxial scenarios. Furthermore, because hovering affects the capacitive sensing data of the touch and triggers the hovering compensation function for the capacitive touch value data, hovering compensation is prone to miscompensation in screen protector scenarios, leading to excessive signal generation around the finger and disturbance of the capacitance value data at the finger's touch position, resulting in coordinate changes and ultimately screen jitter. Figure 1 The image shows the data of the floating error compensation. It is clear from the image that the data next to the finger is the incorrectly compensated data. The incorrectly compensated data will cause the coordinates of the finger area to be offset. Moreover, the error compensation will be different in each frame. The final result is that the coordinate jitter is abnormally obvious, which in turn leads to abnormal jitter.
[0027] To address the aforementioned problems, the inventors, through extensive research, discovered and proposed the touch processing method, apparatus, electronic device, and storage medium provided in the embodiments of this application. By disabling the hover compensation function when a thick film is detected on the capacitive touchscreen, the touch coordinate jitter problem is optimized, thereby improving touch accuracy. The specific touch processing method will be described in detail in subsequent embodiments.
[0028] The following will explain the technical terms that may be involved in the embodiments of this application.
[0029] TpAlgo: Touch algorithm module.
[0030] Base: Reference point. In the process of detecting touch, the touch control chip of a capacitive touch screen first obtains the raw data by sampling through an ADC (Analog-to-Digital Converter) to obtain the raw value; then, a reference is established based on the raw value to obtain the reference value.
[0031] DiffData: Capacitive touchscreen capacitance data, obtained by subtracting the original value from the baseline value. The coordinate value can be calculated from the difference. To obtain the correct difference, a correct baseline needs to be maintained. That is, the original value used to establish the baseline should be the original value sampled when the capacitive touchscreen is in a stable state. The stable state refers to the state of the capacitive touchscreen when there are no objects such as fingers, styluses, or water droplets that would change the magnitude of the original value.
[0032] Reference anomaly: In actual use, capacitive touch screens may obtain incorrect references due to the presence of water droplets, sweaty hands, or touch during power-on. This can lead to decreased touch screen sensitivity or false alarms. False alarms refer to a situation where a certain position on the capacitive touch screen is not actually touched, but the touch control chip calculates that there are coordinates.
[0033] Mutual capacitance: Mutual capacitance touchscreens are a new type of capacitive touch technology. A mutual capacitance touchscreen contains a grid, like an array, composed of an X*Y baseline array, forming an X*Y unit capacitance. It forms mutual capacitances between the elements in the columns and rows, and the controller measures the distortion of the electric field at each node on the touch position. Therefore, when a finger approaches or touches a mutual capacitance touchscreen, the capacitance decreases.
[0034] Self-capacitance: In capacitive touchscreens, self-capacitance refers to the capacitance between the touchscreen surface and its internal structure. When a finger or other conductor touches the touchscreen surface, an electric field is created between the surface and the interior, generating capacitance—this is self-capacitance. The magnitude of self-capacitance depends on factors such as the touchscreen's geometry, materials, and surface condition. In capacitive touchscreens, self-capacitance can be used to detect touch events on the touchscreen surface, thus enabling interactive functionality. The scanning method for self-capacitance involves projecting the touch point on the touchscreen onto the X and Y axes, calculating the coordinates along each axis, and then combining these coordinates to form the touch point's coordinates. Self-capacitance only generates two data signals: TX and RX.
[0035] Simply connected region: Any closed curve drawn within a connected region B will be considered part of the connected region B.
[0036] Hover Compensation Function: Hover compensation is a feature in capacitive touchscreen technology, primarily used to address changes in capacitive touch data caused by various factors during touch detection. In real-world scenarios, capacitive touchscreens are susceptible to interference from factors such as water droplets, sweaty hands, and touches during power-on, leading to incorrect baselines and affecting capacitive touch data. Furthermore, in multi-finger touch scenarios, especially with coaxial hovering, crosstalk occurs, further impacting the accuracy of capacitive touch data. To ensure accurate touch coordinate calculation, compensation is needed for these interfering factors—hover compensation. When a finger approaches or touches the capacitive touchscreen, the capacitance changes. The touch control chip uses an ADC to sample and acquire raw data, establishing a baseline value. The baseline value is then subtracted from the raw value to obtain the difference (DiffData), which is used to calculate the coordinate value. Under normal stable conditions (when there are no fingers, styluses, water droplets, or other objects on the capacitive touchscreen that could alter the raw value), a relatively accurate baseline and difference can be obtained for coordinate calculation. However, in actual use, the aforementioned interference factors can cause abnormal baselines, resulting in inaccurate coordinate calculations. The hover compensation function uses algorithms to adjust inaccurate capacitive sensing data caused by interference, attempting to make the calculated coordinates closer to the actual touch position. Specifically, when a touch operation is detected, the self-capacitance signal value corresponding to the touch operation can be used to compensate for the mutual capacitance signal value. This compensation mechanism solves the problem of unstable reporting and avoids screen jitter.
[0037] Please see Figure 2 , Figure 2 A flowchart illustrating a touch processing method according to an embodiment of this application is shown. This method optimizes touch coordinate jitter and improves touch accuracy by disabling the hover compensation function when a thick film is detected on a capacitive touchscreen. In a specific embodiment, this touch processing method is applied to, for example... Figure 13 The touch processing device 200 and the electronic device 100 equipped with the touch processing device 200 are shown. Figure 14 The following will use an electronic device as an example to illustrate the specific process of this embodiment. Of course, it is understood that the electronic device used in this embodiment may include smartphones, tablets, wearable devices, in-vehicle infotainment systems, etc., and is not limited thereto. The following will focus on... Figure 2 The process is described in detail below. In this embodiment, the electronic device includes a capacitive touchscreen, and the touch processing method may specifically include the following steps:
[0038] Step S110: When a touch operation is detected on the capacitive touch screen, the film application status of the capacitive touch screen is detected, wherein the film application status includes whether the film is applied or not.
[0039] Alternatively, the electronic device may include a capacitive touchscreen.
[0040] In this embodiment, touch operations applied to the capacitive touchscreen can be detected. When a touch operation is detected, the corresponding screen protector status of the capacitive touchscreen can be detected, where the screen protector status may include whether the screen protector is applied or not. If no touch operation is detected, the screen protector status of the capacitive touchscreen can be ignored while continuing to detect touch operations. When a touch operation is detected, the screen protector status of the capacitive touchscreen can be detected.
[0041] In some implementations, touch operations on the capacitive touchscreen can be detected in real time, at preset time intervals, at preset time points, or according to other preset rules, etc., without limitation.
[0042] In one approach, touch operations on a capacitive touchscreen can include: click operations on a capacitive touchscreen. Optionally, click operations on a capacitive touchscreen can include: single-finger click operations, multi-finger click operations, single click operations, multiple consecutive click operations, palm click operations, etc., without limitation.
[0043] As another approach, touch operations applied to a capacitive touchscreen can include: pressing operations applied to a capacitive touchscreen. Optionally, pressing operations applied to a capacitive touchscreen can include: single-finger pressing operations applied to a capacitive touchscreen, multi-finger pressing operations applied to a capacitive touchscreen, palm pressing operations applied to a capacitive touchscreen, long-press operations applied to a capacitive touchscreen, etc., without limitation.
[0044] As another approach, touch operations applied to a capacitive touchscreen can include: swiping operations applied to a capacitive touchscreen. Optionally, swiping operations applied to a capacitive touchscreen can include: single-finger swiping operations applied to a capacitive touchscreen, multi-finger swiping operations applied to a capacitive touchscreen, swiping operations applied to a capacitive touchscreen along a specified direction applied to a capacitive touchscreen, swiping operations applied to a capacitive touchscreen that satisfy a specified swiping trajectory applied to a capacitive touchscreen, swiping operations applied to a capacitive touchscreen that satisfy a specified swiping distance applied to a capacitive touchscreen, etc., without limitation.
[0045] One feasible approach is to detect the film application status of a capacitive touchscreen by comparing its capacitance image features. The capacitance data generated during touchscreen operation forms specific image features; different films alter the capacitance characteristics, resulting in differences in these features. Therefore, the electronic device can pre-store capacitance image feature samples for different film thicknesses (with and without film). During detection, the currently acquired capacitance image features are compared with these samples to determine the film application status and, in the case of a film, the corresponding film thickness.
[0046] As another feasible approach, a pressure sensor built into the electronic device can be used to detect the film application status of the capacitive touchscreen. Specifically, a pressure sensor is installed below or on the edge of the capacitive touchscreen. After the film is applied, the pressure transmitted when a finger touches the screen changes due to the presence and thickness of the film. The pressure sensor collects the pressure data during touch, and the electronic device analyzes the characteristics of these changes. For example, the presence of a film may relatively weaken pressure transmission. By recognizing this pressure change pattern and combining it with a preset pressure change threshold and a film application pressure characteristic model, the electronic device determines the film application status of the capacitive touchscreen.
[0047] As another feasible approach, optical detection can be used to detect the film application status of a capacitive touchscreen. This involves incorporating optical transmitting and receiving devices within the electronic device. The transmitting device emits light of a specific wavelength onto the surface of the capacitive touchscreen. At the interface between the touchscreen and the film, the light undergoes reflection and refraction. The reflection and refraction differ between the screen and the screen, and also vary depending on the film thickness. The receiving device collects the reflected light signals. The device then compares the changes in intensity, angle, and spectrum of these signals with pre-defined optical characteristic data for both screen-applied and unapplied screens to determine the film application status of the capacitive touchscreen.
[0048] Step S120: If it is determined that the capacitive touchscreen has been filmed based on the film application status, then the film thickness corresponding to the capacitive touchscreen is detected.
[0049] If it is determined that the capacitive touchscreen has a film applied based on the film application status, the thickness of the film applied to the capacitive touchscreen can be detected; if it is determined that the capacitive touchscreen does not have a film applied based on the film application status, the thickness of the film applied to the capacitive touchscreen can be stopped, and the hover compensation function for the capacitive touchscreen can be enabled.
[0050] Optionally, the thickness of the film corresponding to the capacitive touchscreen can be detected by comparing the capacitance image features of the capacitive touchscreen; the thickness of the film corresponding to the capacitive touchscreen can be detected by using the pressure sensor built into the electronic device; or the thickness of the film corresponding to the capacitive touchscreen can be detected by using optical detection methods, etc., which will not be elaborated here.
[0051] In some implementations, the thickness of the film on the capacitive touchscreen can be detected at the same time as the film application status; or, the thickness of the film on the capacitive touchscreen can be detected only after it has been determined that the film has been applied. No limitation is made here.
[0052] Step S130: If the thickness of the film reaches the thickness threshold, then disable the hover compensation function for the capacitive touch screen.
[0053] In some implementations, the electronic device may pre-set and store a thickness threshold, which is used as a basis for determining the thickness of the film corresponding to the capacitive touchscreen. Therefore, in this embodiment, when the thickness of the film corresponding to the capacitive touchscreen is detected, the film thickness can be compared with the thickness threshold to determine whether the film thickness reaches the thickness threshold. Optionally, the comparison result between the film thickness and the thickness threshold includes: the film thickness reaches the thickness threshold or the film thickness does not reach the thickness threshold.
[0054] If the comparison result indicates that the film thickness reaches a thickness threshold, then the capacitive touchscreen is considered to have a thicker film. In scenarios where a thick film is applied to a capacitive touchscreen, hover compensation is prone to miscompensation, causing excessive signal generation around the touch location. This results in capacitance data disturbance at the touch location, leading to coordinate changes and ultimately, screen jitter. Therefore, to avoid this, the hover compensation function for capacitive touchscreens can be disabled to optimize touch coordinate jitter and improve touch accuracy. Optionally, the touch driver can be notified to disable the hover compensation function, and the driver can then notify the touch chip to disable the hover compensation function, thereby achieving the disabling of the hover compensation function.
[0055] If the comparison result indicates that the film thickness does not reach the thickness threshold, it can be considered that the film thickness corresponding to the capacitive touch screen is relatively thin. The film attached to the capacitive touch screen is a thin film, and its impact on the hover compensation is small and negligible. It will not cause disturbance to the capacitance data at the touch position, resulting in coordinate changes and the final screen jitter. The hover compensation function for the capacitive touch screen can be enabled.
[0056] Please see Figure 3 and Figure 4 , Figure 3This application provides an embodiment of the previous frame's tolerance data under hover compensation. Figure 4 The following is an example of the tolerance data for the next frame under suspension compensation provided in an embodiment of this application. Figure 3 The local maximum value of 750 in the data is located in the third row, while Figure 4 The local maximum value of 750 in the data is located in the second row. Due to the side effects of hover compensation, the distribution of local maximum values is different. Turning off hover compensation can solve the above-mentioned false compensation situation, thereby optimizing the problem of obvious touch coordinate jitter.
[0057] One embodiment of this application provides a touch processing method that, when a touch operation is detected on a capacitive touchscreen, detects the film application status of the capacitive touchscreen. The film application status includes whether the film is applied or not. If it is determined that the capacitive touchscreen is applied based on the film application status, the film thickness is detected. If the film thickness reaches a thickness threshold, the hover compensation function for the capacitive touchscreen is turned off. This method disables the hover compensation function when a thick film is detected on the capacitive touchscreen, optimizes the touch coordinate jitter problem, and improves touch accuracy.
[0058] Please see Figure 5 , Figure 5 A schematic flowchart of a touch processing method according to an embodiment of this application is shown. The following will focus on... Figure 5 The process is described in detail below. In this embodiment, the touch processing method is applied to the aforementioned electronic device, which includes a capacitive touchscreen. The touch processing method specifically includes the following steps:
[0059] Step S210: When a touch operation is detected on the capacitive touch screen, the film application status of the capacitive touch screen is detected, wherein the film application status includes whether the film is applied or not.
[0060] Step S220: If it is determined that the capacitive touchscreen has been filmed based on the film application status, then the film thickness corresponding to the capacitive touchscreen is detected.
[0061] For a detailed description of steps S210-S220, please refer to steps S110-S120, which will not be repeated here.
[0062] Step S230: If the thickness of the film reaches the thickness threshold and the electronic device is in game mode, then the hover compensation function for the capacitive touch screen is turned off.
[0063] In this embodiment, if the thickness of the film corresponding to the capacitive touchscreen is determined to reach a thickness threshold, the mode of the electronic device can be further detected. Specifically, if the electronic device is detected to be in game mode, the hover compensation function for the capacitive touchscreen can be disabled. It is understood that touch performance in game scenarios is extremely important for achieving a superior gaming experience; therefore, targeted optimization can be implemented to improve touch performance in game scenarios. If the electronic device is detected to be in non-game mode, the hover compensation function for the capacitive touchscreen can be enabled.
[0064] As a feasible approach, if the film thickness corresponding to the capacitive touchscreen is determined to reach a thickness threshold, the electronic device's operating system can obtain relevant information about the running application. Based on this information, it can determine whether the electronic device is in game mode. Game applications typically possess specific identifiers or attributes, which the electronic device identifies to determine if it is in game mode. For example, applications register specific category tags with the system during development, allowing the system to identify game applications based on these tags; some game applications also have unique package naming rules, which the system can use to match a pre-defined list of game applications. When a running application is detected to match the identifier characteristics of a game application, the electronic device can be determined to be in game mode.
[0065] As another feasible approach, if the thickness of the film corresponding to the capacitive touchscreen is determined to reach a thickness threshold, the system resource usage can be used to determine whether the electronic device is in game mode. Games typically consume significant system resources. The electronic device can monitor the usage of system resources such as CPU, GPU, and memory in real time, setting a resource usage threshold range. When CPU usage consistently exceeds a certain percentage (e.g., 70%), GPU load is high, and memory usage reaches a certain level (e.g., exceeding 60% of total memory), and these high resource usage conditions persist for a period of time (e.g., 5 minutes), the electronic device, combining these resource usage characteristics and duration, can determine that it is in game mode.
[0066] As another feasible approach, if the thickness of the film corresponding to the capacitive touchscreen reaches a certain threshold, the mode of the electronic device can be determined based on user operations to determine whether it is in game mode. Game operations exhibit unique behavioral patterns. The electronic device can utilize built-in sensors (such as accelerometers and gyroscopes) and touch detection functions to analyze user behavior and determine whether it is in game mode based on the analyzed behavior. In game scenarios, users may frequently perform multi-finger touch operations with large amplitude and high frequency. The electronic device can statistically analyze information such as the number of touch operations, the number of touch points, the duration of touches, and changes in the speed and direction of finger swipes over a period of time. This data, combined with changes in device posture detected by the accelerometer and gyroscope (such as frequent tilting and rotation during racing games), can be compared with a preset game operation behavior model. When the detected behavior matches the game operation behavior model with a high degree of similarity, the electronic device is determined to be in game mode.
[0067] Please see Figure 6 , Figure 6 This application shows Figure 5 The flow chart of step S230 of the touch processing method is shown. The following will focus on... Figure 6 The process shown will be described in detail, and the method may specifically include the following steps:
[0068] Step S231: If the thickness of the film reaches the thickness threshold and the mode of the electronic device is the game mode, then the touch operation is detected in the touch area of the capacitive touch screen.
[0069] In some implementations, if the thickness of the film corresponding to the capacitive touchscreen is detected to reach a thickness threshold and the electronic device is in game mode, then the touch operation can be detected in the touch area of the capacitive touchscreen.
[0070] As one feasible approach, if the thickness of the film corresponding to the capacitive touchscreen reaches a thickness threshold and the electronic device is in game mode, the mutual capacitance data of the capacitive touchscreen can be acquired. Based on the mutual capacitance data, the touch area of the touch operation within the capacitive touchscreen can be determined. The mutual capacitance touchscreen consists of a grid composed of baseline arrays in the X and Y directions. Mutual capacitance is formed between the elements in the columns and rows. When a finger approaches or touches the capacitive touchscreen, it changes the electric field at the touch location, thus affecting the magnitude of the mutual capacitance. The controller sequentially scans the electrodes in the X and Y directions, measuring the change in mutual capacitance value at each intersection node. When the change in mutual capacitance value at a node exceeds a set threshold, it indicates that the row and column intersection area of that node is the touch area of the capacitive touchscreen.
[0071] As another feasible approach, if the thickness of the film corresponding to the capacitive touchscreen reaches a thickness threshold and the electronic device is in game mode, the self-capacitance data of the capacitive touchscreen can be acquired. Based on the self-capacitance data, the touch area of the touch operation within the capacitive touchscreen can be determined. Each electrode of the self-capacitance touchscreen independently detects its own capacitance change. When a finger touches the capacitive touchscreen, a capacitance is formed between the finger and the electrode, changing the electrode's original capacitance value. By measuring the capacitance value of each electrode in real time, the controller can determine that the area where the electrode is located is the touch area of the capacitive touchscreen when it detects a significant change in the capacitance value of one or more electrodes (exceeding a preset capacitance change threshold).
[0072] Step S232: If a game screen is displayed in the touch area, then disable the hover compensation function for the capacitive touch screen.
[0073] When the electronic device is in game mode, it can display the game screen in full screen (the entire area) or in a partial screen (a specific area). For example, if the electronic device displays in a split-screen mode, with one screen showing the game screen and the other showing non-game content, this can be considered as the electronic device displaying a partial screen showing the game screen.
[0074] In some implementations, when a touch operation is detected on a touch area of the capacitive touchscreen, it can be detected whether a game screen is displayed in that touch area. If a game screen is detected in the touch area, it can be assumed that the user is playing a game, and the hover compensation function for the capacitive touchscreen can be turned off to improve touch performance in game scenarios; if no game screen is detected in the touch area, it can be assumed that the user is not playing a game, and the hover compensation function for the capacitive touchscreen can be turned on.
[0075] One embodiment of this application provides a touch processing method that, upon detecting a touch operation on a capacitive touchscreen, detects the film application status of the capacitive touchscreen. This film application status includes whether the film is applied or not. If the capacitive touchscreen is determined to be filmed based on the film application status, the film thickness is detected. If the film thickness reaches a thickness threshold and the electronic device is in game mode, the float compensation function of the capacitive touchscreen is disabled. Compared to... Figure 2 The touch processing method shown in this embodiment also addresses the issue of disabling the float compensation function of the capacitive touchscreen when the electronic device is in game mode, which can improve the accuracy of game touch and enhance the user's gaming experience.
[0076] Please see Figure 7 , Figure 7A schematic flowchart of a touch processing method according to an embodiment of this application is shown. The following will focus on... Figure 7 The process is described in detail below. In this embodiment, the touch processing method is applied to the aforementioned electronic device, which includes a capacitive touchscreen. The touch processing method specifically includes the following steps:
[0077] Step S310: When a touch operation is detected on the capacitive touch screen, the film application status of the capacitive touch screen is detected, wherein the film application status includes whether the film is applied or not.
[0078] Step S320: If it is determined that the capacitive touchscreen has been filmed based on the film application status, then the film thickness corresponding to the capacitive touchscreen is detected.
[0079] For a detailed description of steps S310-S320, please refer to steps S110-S120, which will not be repeated here.
[0080] Step S330: If the thickness of the film reaches the thickness threshold and the number of touch points corresponding to the touch operation reaches at least two, then the hover compensation function for the capacitive touch screen is turned off.
[0081] In this embodiment, if the thickness of the film corresponding to the capacitive touchscreen is determined to reach a thickness threshold, the number of touch points corresponding to the touch operation can be further detected, and it can be determined whether the number of touch points corresponding to the touch operation is at least two. If at least two touch points are detected, the hover compensation function for the capacitive touchscreen can be disabled. It is understood that when at least two touch points are detected, the touch operation can be considered a multi-finger touch operation. In multi-finger situations, hover compensation of the capacitive touch capacitance data is generally triggered. Hover compensation in film-covered scenarios is prone to miscompensation, leading to additional signals around the finger and disturbances in the capacitance data at the finger's touch position, resulting in coordinate changes and ultimately screen jitter. Therefore, disabling the hover compensation function of the capacitive touchscreen can avoid coordinate jitter in multi-finger touch scenarios. Conversely, if only one touch point is detected, the hover compensation function for the capacitive touchscreen can be enabled.
[0082] As an feasible approach, the number of touch points corresponding to a touch operation can be detected based on capacitive sensing hardware. Taking a mutual capacitance touchscreen as an example, its internal structure consists of a grid composed of baseline arrays in the X and Y directions. Each intersection corresponds to a capacitor. When a finger touches the screen, it changes the capacitance value at the touch location, and this capacitance change at the touch point is detected by the corresponding electrode. The controller can scan the entire electrode array to obtain capacitance change data for each node. If independent capacitance changes are detected at different nodes, it can be preliminarily determined that multiple touch points exist. For example, in a 10×10 electrode array, if capacitance changes exceeding a set threshold are detected at both nodes (X3, Y5) and (X7, Y8), it can be determined that the number of touch points corresponding to the touch operation is two. A self-capacitance touchscreen determines touch points by detecting changes in the capacitance of each electrode itself. When multiple electrodes show capacitance changes simultaneously, it indicates the presence of multiple touch points.
[0083] As another feasible approach, the number of touch points corresponding to touch operations can be detected based on software algorithms. The capacitance change data acquired from hardware may contain noise and interference, which can be processed and analyzed using software algorithms. Commonly used algorithms include filtering algorithms, such as mean filtering and median filtering, to remove noise signals and improve data accuracy. Then, clustering algorithms are used to group the electrodes that detected capacitance changes. For example, density clustering (DBSCAN) can be used to group adjacent electrodes with related capacitance changes based on the distance and density between them. Each group corresponds to one touch point. Finally, the number of groups is counted to obtain the number of touch points corresponding to the touch operation.
[0084] In some implementations, if the film thickness reaches a thickness threshold and the number of touch points corresponding to the touch operation is at least two, and at least two touch points are coaxial, then the hover compensation function for capacitive touchscreens is disabled. It is understood that coaxial hovering in touch principles can cause crosstalk, affecting the capacitive sensing data of the touch. Furthermore, multi-finger touch triggers hover compensation of the capacitive touch capacitance data. Hover compensation in film-covered scenarios can easily lead to miscompensation, causing additional signals around the finger and disturbances in the capacitance data at the finger's touch position, resulting in coordinate changes and ultimately screen jitter. Therefore, in multi-finger touch scenarios with coaxial touch, disabling the hover compensation function for capacitive touchscreens can improve touch accuracy.
[0085] As one feasible approach, when the number of touch points corresponding to a touch operation is determined to be at least two, the horizontal and vertical coordinates of each of the at least two touch points on the capacitive touchscreen can be detected. Based on the horizontal and vertical coordinates of the at least two touch points on the capacitive touchscreen, it can be detected whether there are coaxial touch points among the at least two touch points. Specifically, if at least two touch points have touch points with the same horizontal coordinate or touch points with the same vertical coordinate, it can be determined that at least two touch points are coaxial.
[0086] One embodiment of this application provides a touch processing method that, upon detecting a touch operation on a capacitive touchscreen, detects the film application status of the capacitive touchscreen. The film application status includes whether the film is applied or not. If the capacitive touchscreen is determined to be filmed based on the film application status, the film thickness is detected. If the film thickness reaches a thickness threshold and the number of touch points corresponding to the touch operation is at least two, the float compensation function of the capacitive touchscreen is disabled. Compared to... Figure 2 The touch processing method shown in this embodiment also disables the hover compensation function of the capacitive touch screen when the number of touch points corresponding to the touch operation reaches at least two, which can improve the accuracy of multi-finger touch and enhance the user's touch experience.
[0087] Please see Figure 8 , Figure 8 A schematic flowchart of a touch processing method according to an embodiment of this application is shown. The following will focus on... Figure 8 The process is described in detail below. In this embodiment, the touch processing method is applied to the aforementioned electronic device, which includes a capacitive touchscreen. The touch processing method specifically includes the following steps:
[0088] Step S410: When a touch operation is detected on the capacitive touch screen, the film application status of the capacitive touch screen is detected, wherein the film application status includes whether the film is applied or not.
[0089] Step S420: If it is determined that the capacitive touchscreen has been filmed based on the film application status, then the film thickness corresponding to the capacitive touchscreen is detected.
[0090] For a detailed description of steps S410-S420, please refer to steps S110-S120, which will not be repeated here.
[0091] Step S430: If the thickness of the film reaches the thickness threshold and there is liquid at the touch position corresponding to the touch operation on the capacitive touch screen, then the suspension compensation function for the capacitive touch screen is turned off.
[0092] In this embodiment, if it is determined that the thickness of the film corresponding to the capacitive touch screen reaches the thickness threshold, it is possible to continue detecting whether there is liquid at the touch position corresponding to the touch operation on the capacitive touch screen. Specifically, if liquid is detected at the touch location corresponding to a touch operation on a capacitive touchscreen, the hover compensation function for the capacitive touchscreen can be disabled. This is because the presence of liquid alters the capacitive characteristics of the touchscreen. Normally, hover compensation adjusts the capacitive sensing data to compensate for interference, but the presence of liquid can cause this compensation mechanism to malfunction. Furthermore, hover compensation is prone to false positives when a screen protector is applied, and the situation is exacerbated by the presence of liquid on the capacitive touchscreen. This results in additional signals around the finger and disturbances in the capacitance value data at the finger's touch location. These false positives cause the calculated finger area coordinates to shift, and the degree of false positives varies from frame to frame, leading to significant coordinate jitter and consequently game jitter. Therefore, when liquid is present at the touch location corresponding to a touch operation, the hover compensation function for the capacitive touchscreen can be disabled. Disabling hover compensation avoids the problems of over-compensation and false compensation caused by water interference, thereby optimizing the abnormal touch coordinate jitter situation. If no liquid is detected at the touch position corresponding to the touch operation on the capacitive touchscreen, the hover compensation function for the capacitive touchscreen can be enabled.
[0093] As an feasible approach, if it is determined that the thickness of the film corresponding to the capacitive touchscreen reaches a thickness threshold, then the presence of liquid at the touch position corresponding to the touch operation can be detected based on the capacitance data of the capacitive touchscreen at the touch position corresponding to the touch operation.
[0094] In one approach, upon obtaining capacitance data of the capacitive touchscreen at the touch location corresponding to a touch operation, it is possible to determine, based on this capacitance data, whether the capacitance data of the touch nodes included in the same receiving cable RX within that touch location has positive and negative values. Specifically, if it is determined, based on the capacitance data, that the capacitance data of the touch nodes included in the same receiving cable within the touch area has both positive and negative values, then it can be determined that liquid is present at the touch location corresponding to the touch operation on the capacitive touchscreen.
[0095] As another approach, upon obtaining the capacitance data of the capacitive touchscreen at the touch location corresponding to the touch operation, it is possible to determine, based on this capacitance data, whether the capacitance data of the touch nodes included in the same drive cable TX within the touch area has positive and negative values. Specifically, if it is determined based on the capacitance data that the capacitance data of the touch nodes included in the same drive cable within the touch area has both positive and negative values, then it can be determined that liquid is present at the touch location corresponding to the touch operation on the capacitive touchscreen.
[0096] As another approach, upon obtaining capacitance data of the capacitive touchscreen at the touch location corresponding to a touch operation, it is possible to determine, based on this capacitance data, whether the capacitance data of touch nodes included in the same receiving cable and the same driving cable within the touch area have positive and negative values. Specifically, if it is determined based on the capacitance data that the capacitance data of touch nodes included in the same receiving cable and the same driving cable within the touch area have both positive and negative values, then it can be determined that liquid is present at the touch location corresponding to the touch operation on the capacitive touchscreen.
[0097] One embodiment of this application provides a touch processing method that, upon detecting a touch operation on a capacitive touchscreen, detects the film application status of the capacitive touchscreen. The film application status includes whether the film is applied or not. If the capacitive touchscreen is determined to be filmed based on the film application status, the film thickness is detected. If the film thickness reaches a thickness threshold and liquid is present at the touch position corresponding to the touch operation, the float compensation function of the capacitive touchscreen is disabled. Compared to... Figure 2 The touch processing method shown in this embodiment also disables the float compensation function of the capacitive touch screen when there is liquid at the touch position corresponding to the touch operation, which can improve the accuracy of float touch and enhance the user's touch experience.
[0098] Please see Figure 9 , Figure 9 A schematic flowchart of a touch processing method according to an embodiment of this application is shown. The following will focus on... Figure 9 The process is described in detail below. In this embodiment, the touch processing method is applied to the aforementioned electronic device, which includes a capacitive touchscreen. The touch processing method specifically includes the following steps:
[0099] Step S510: When a touch operation is detected on the capacitive touch screen, the film application status of the capacitive touch screen is detected, wherein the film application status includes whether the film is applied or not.
[0100] Step S520: If it is determined that the capacitive touchscreen has been filmed based on the film application status, then the film thickness corresponding to the capacitive touchscreen is detected.
[0101] Step S530: If the film thickness reaches the thickness threshold, then disable the hover compensation function for the capacitive touchscreen.
[0102] For a detailed description of steps S510-S530, please refer to steps S110-S130, which will not be repeated here.
[0103] Step S540: Detect the capacitance data of each of the multiple capacitive nodes of the capacitive touchscreen under the touch operation.
[0104] In this embodiment, when a touch operation is detected on the capacitive touchscreen, the capacitance data corresponding to each of the multiple capacitive nodes of the capacitive touchscreen under the touch operation can be detected. Optionally, the capacitance data corresponding to each of the multiple capacitive nodes may include: the self-capacitance data and / or the mutual capacitance data corresponding to each of the multiple capacitive nodes.
[0105] In some implementations, when a touch operation is detected on a capacitive touchscreen, the electronic device can collect the capacitance data of the current frame through a touch chip, that is, the capacitance data corresponding to each of the multiple capacitance nodes.
[0106] The capacitance data corresponding to each of the multiple capacitive nodes of the capacitive touchscreen under touch operation can be detected in a scenario where the hover compensation function for the capacitive touchscreen is enabled or disabled, and there is no limitation here.
[0107] Step S550: Based on the capacitance data corresponding to each of the plurality of capacitor nodes, determine the touch position of the touch operation on the capacitive touch screen.
[0108] In this embodiment, when the capacitance data of each of the multiple capacitor nodes corresponding to the capacitive touch screen under touch operation is detected, the touch position of the touch operation on the capacitive touch screen can be determined based on the capacitance data of each of the multiple capacitor nodes.
[0109] In some implementations, when the capacitance data corresponding to each of the multiple capacitive nodes of the capacitive touchscreen is detected under a touch operation, the touch position of the touch operation on the capacitive touchscreen can be obtained by calculating the capacitance data corresponding to each of the multiple capacitive nodes through a touch algorithm.
[0110] In some implementations, when the capacitance data corresponding to each of the multiple capacitor nodes of the capacitive touchscreen is detected under a touch operation, the capacitance data corresponding to each of the multiple capacitor nodes can be optimized and calculated to obtain the touch position of the touch operation on the capacitive touchscreen.
[0111] One approach to determine the touch position of a touch operation on a capacitive touchscreen based on the capacitance data corresponding to each of multiple capacitive nodes may include: selecting target capacitive nodes from the multiple capacitive nodes whose capacitance data is greater than a capacitance threshold, and determining the touch position of the touch operation on the capacitive touchscreen based on the capacitance data corresponding to the target capacitive nodes.
[0112] That is, limiting the capacitance data corresponding to the capacitor nodes included in the coordinate calculation to be greater than a certain capacitance threshold (such as 140) is to reduce the impact of false compensation signals on touch coordinate calculation. Figure 10 As shown, in Figure 10 Previously, the outer ring's calculation range included many capacitance nodes, which may have been affected by incorrect compensation. The capacitance data of these nodes was unstable, leading to inaccuracies in coordinate calculations. The revised version only includes nodes with capacitance values greater than 140 (inner region). The capacitance data of these nodes is relatively more stable and more accurately reflects the actual situation of finger touch. This is because capacitance nodes greater than the threshold are usually caused by valid operations such as finger touch, while nodes with smaller capacitance values may be due to incorrect compensation or noise. Through this filtering, the capacitance nodes used for coordinate calculation are confined to the actual area of finger pressure, avoiding interference from nearby over-compensation signals or noise. This improves the accuracy of touch coordinate calculations and effectively reduces screen jitter.
[0113] As another approach, determining the touch position of a touch operation on a capacitive touchscreen based on the capacitance data corresponding to each of the multiple capacitor nodes may include: determining the capacitance weights corresponding to each of the multiple capacitor nodes, wherein the capacitance weights corresponding to the capacitor nodes are negatively correlated with the distance between the capacitor nodes and the center point of the touch operation; and determining the touch position of the touch operation on the capacitive touchscreen based on the capacitance data and capacitance weights corresponding to each of the multiple capacitor nodes.
[0114] like Figure 11 As shown, taking a 3x3 area affected by the finger as an example, the coordinate calculation involves the sum of the products of the capacitance weights and capacitance data (capacitance sensing values (diff)) in the Tx and Rx directions, as well as the sum of the capacitance nodes. For example, the calculation of ulSum_tx in the Tx direction is obtained by multiplying the capacitance weight corresponding to the fixed channel number with the capacitance sensing value and then summing the results; the same applies to the Rx direction. The final touch position is obtained by dividing ulSum_tx and ulSum_rx by the sum of the capacitance nodes and ulSum_c, respectively. In this calculation method, the sensing value and corresponding weight of each capacitance node affect the coordinate calculation result. An example is shown below:
[0115] Assume that Peak is located in channel (Tx8, Rx4): (diff represents the capacitance induction value of each capacitor node);
[0116] ulSum_tx=(diff1+diff2+diff3)*Tx7+(diff4+diff+diff5)*Tx8+(diff6+diff7+diff8)*Tx9
[0117] The sum of the products of the weights in the Tx direction and diff, where diff1, diff2…diffn represent the capacitive inductance values of specific capacitor nodes; (Tx7=7, Tx8=8, Tx9=9)
[0118] ulSum_rx=(diff1+diff4+diff6)*Rx3+(diff2+diff+diff7)*Rx4+(diff3+diff5+diff8)*Rx5
[0119] The sum of the products of the weights in the Rx direction and diff, where diff1, diff2…diffn represent the capacitive inductance values of specific capacitor nodes; (Rx3=3, Rx4=4, Tx5=5)
[0120] ulSum_c=diff1+diff2+diff3+diff4+diff+diff5+diff6+diff7+diff8
[0121] Capacitor node summation
[0122] The touch position of this touch operation is determined to be:
[0123] PosTx = ulSum_tx / ulSum_c
[0124] PosRx = ulSum_rx / ulSum_c
[0125] The coordinates are corrected by adjusting the weights of channels A, B, and C. In detail, when obtaining the ulSum_tx value, it is calculated using fixed channel numbers, such as Tx7, Tx8, and Tx9 in the formula. Specifically, the values 7, 8, and 9 in the formula represent the weight of channel 7. That is, when there is a touch on channel 7, the weight of the corresponding capacitive node in the TX direction is 7. Correcting the channel weights is equivalent to calibrating this 7. To improve accuracy, 7 can be changed to a 7.xx floating-point number. Correcting the channel weights will then modify the final output touch position (the principle is the same for the RX direction).
[0126] However, in practice, signals surrounding local maxima may contain interference caused by mis-compensation due to hover compensation, which can affect coordinate accuracy. Therefore, in this embodiment, the node weights in areas outside the local maxima (such as the channel where Peak is located) are successively reduced by a percentage (the capacitance weight corresponding to a capacitance node is negatively correlated with the distance between the capacitance node and the center point of the touch operation). In a 3x3 area, when calculating capacitance nodes, the corresponding capacitance sensing value is multiplied by a coefficient less than 1 (such as 0.8). This range can be extended to 4x4, 5x5, and other areas. As long as the area is outside the local maximum, the capacitance weight is multiplied by an adjustable coefficient between 0 and 1 during calculation, thereby reducing the weight of signals outside the finger. Thus, by reducing the weight of signals surrounding local maxima, even if there are mis-compensated signals outside the finger area, their impact on coordinate calculation will be significantly reduced. Because the capacitance sensing values corresponding to these mis-compensated signals have a reduced weight in the calculation, their contribution to the final coordinates is reduced, making the coordinate calculation more focused on the effective signals of the finger touch area, thereby improving the accuracy of coordinate calculation, reducing touch coordinate jitter caused by signal interference, optimizing screen jitter problems, and improving user experience. An example is as follows:
[0127] Will Figure 11 The weights of nodes other than those in the Diff decrease by a percentage sequentially, for example... Figure 11 The formulas used in the calculations shown in the diagram are modified as follows:
[0128] ulSum_tx=(diff1+diff2+diff3)*Tx7+(diff4+diff+diff5)*Tx8+(diff6+diff7+diff8)*Tx9 is changed to:
[0129] ulSum_tx=(diff1*0.8+diff2*0.8+diff3*0.8)*Tx7+(diff4+diff+diff5)*Tx8+(diff6*0.8+diff7*0.8+diff8*0.8)*Tx9. This reduces the weight of signals outside the finger area, so even if there are erroneously added signals outside the finger area, they will attenuate to a level that has a relatively small impact on the coordinates.
[0130] As another approach, when there are coaxial touch points among the touch points corresponding to the touch operation, multiple capacitive nodes correspond to the coaxial touch points. Determining the touch position of the touch operation on the capacitive touchscreen based on the capacitance data corresponding to each of the multiple capacitive nodes can include: performing infinite impulse response filtering optimization on the capacitance data corresponding to each of the multiple capacitive nodes to obtain optimized capacitance data corresponding to each of the multiple capacitive nodes, and determining the touch position of the touch operation on the capacitive touchscreen based on the optimized capacitance data corresponding to each of the multiple capacitive nodes.
[0131] like Figure 12 As shown, on a capacitive touchscreen, when touch point A and touch point B are coaxial, pressing touch point A changes the surrounding electric field distribution, thus affecting the capacitance data at touch point B. Due to the levitation effect, the capacitance value of touch point B changes, which may lead to deviations in the coordinate calculation of touch point B. For example, in game operation, when multiple fingers are operated simultaneously and are coaxial, similar interference will occur, causing abnormal phenomena such as screen jitter.
[0132] Therefore, in this embodiment, for the above scenario, an Infinite Impulse Response Filter (IIR) is applied to the capacitance data corresponding to each of the multiple capacitance nodes. This is achieved by weighted averaging the capacitance data of each node in the touch point B region. The calculation formula is: the current node's capacitance data equals the sum of the capacitance data from the previous (xn) times, the previous two (xn) times, and so on, divided by n. This method utilizes historical information about the capacitance data, as changes in capacitance data typically exhibit a certain degree of continuity. By averaging multiple historical capacitance data, abrupt changes or instability caused by the influence of touch point A can be smoothed out. For example, if the capacitance value of touch point B suddenly increases due to interference from touch point A, but historical data shows this value deviates from the normal range, the impact of this outlier will be averaged after IIR filtering. This makes the final capacitance data more reflective of the actual touch situation at touch point B, thereby improving the accuracy of coordinate calculation, reducing coordinate changes caused by capacitance data fluctuations, and optimizing screen stability.
[0133] One embodiment of this application provides a touch processing method that, upon detecting a touch operation on a capacitive touchscreen, detects the film application status of the capacitive touchscreen, where the film application status includes whether the film is applied or not. If the capacitive touchscreen is determined to be filmed based on the film application status, the film thickness is detected. If the film thickness reaches a thickness threshold, the hover compensation function for the capacitive touchscreen is disabled. The capacitance data of multiple capacitive nodes corresponding to the touch operation are detected, and the touch position of the touch operation on the capacitive touchscreen is determined based on the capacitance data of the multiple capacitive nodes. Compared to... Figure 2 The touch operation method shown in this embodiment further optimizes the capacitance data corresponding to the touch operation, which can improve the accuracy of the determined touch position, thereby improving the accuracy of the touch and the user experience.
[0134] Please see Figure 13 , Figure 13A block diagram of a touch processing device according to an embodiment of this application is shown. The following will focus on... Figure 13 The block diagram shown illustrates this embodiment. In this embodiment, the touch processing device is applied to the aforementioned electronic device, which includes a capacitive touchscreen. The touch processing device 200 includes: a film application status detection module 210, a film application thickness detection module 220, and a hover compensation function deactivation module 230, wherein:
[0135] The film application status detection module 210 is used to detect the film application status of the capacitive touch screen when a touch operation is detected on the capacitive touch screen, wherein the film application status includes whether the film is applied or not.
[0136] The film thickness detection module 220 is used to detect the film thickness of the capacitive touch screen if it is determined that the capacitive touch screen has a film applied based on the film application status.
[0137] The hover compensation function deactivation module 230 is used to deactivate the hover compensation function for the capacitive touch screen if the thickness of the film reaches a thickness threshold.
[0138] Furthermore, the hover compensation function disabling module 230 includes: a first hover compensation function disabling submodule, wherein:
[0139] The first floating compensation function shutdown submodule is used to disable the floating compensation function for the capacitive touch screen if the thickness of the film reaches the thickness threshold and the electronic device is in game mode.
[0140] Furthermore, the first hover compensation function disabling submodule includes: a touch area detection unit and a first hover compensation function disabling unit, wherein:
[0141] A touch area detection unit is used to detect the touch area of the touch operation on the capacitive touch screen if the thickness of the film reaches the thickness threshold and the mode of the electronic device is the game mode.
[0142] The first hover compensation function deactivation unit is used to deactivate the hover compensation function for the capacitive touch screen if a game screen is displayed in the touch area.
[0143] Furthermore, the hover compensation function disabling module 230 includes: a second hover compensation function disabling submodule, wherein:
[0144] The second floating compensation function shutdown submodule is used to disable the floating compensation function for the capacitive touch screen if the thickness of the film reaches the thickness threshold and the number of touch points corresponding to the touch operation reaches at least two.
[0145] Furthermore, the second hover compensation function disabling submodule includes: a second hover compensation function disabling unit, wherein:
[0146] The second hover compensation function deactivation unit is used to deactivate the hover compensation function for the capacitive touch screen if the thickness of the film reaches the thickness threshold and the number of touch points corresponding to the touch operation reaches at least two, and there are coaxial touch points among the at least two touch points.
[0147] Furthermore, the hover compensation function disabling module 230 includes: a third hover compensation function disabling submodule, wherein:
[0148] The third floating compensation function shutdown submodule is used to disable the floating compensation function for the capacitive touch screen if the film thickness reaches the thickness threshold and there is liquid at the touch position corresponding to the touch operation.
[0149] Furthermore, the touch processing device 200 also includes: a capacitance data detection module and a touch position determination module, wherein:
[0150] The capacitance data detection module is used to detect the capacitance data of each of the multiple capacitance nodes of the capacitive touch screen under the touch operation.
[0151] The touch position determination module is used to determine the touch position of the touch operation on the capacitive touch screen based on the capacitance data corresponding to each of the plurality of capacitor nodes.
[0152] Furthermore, the touch position determination module includes: a target capacitive node filtering submodule and a first touch position determination submodule, wherein:
[0153] The target capacitor node filtering submodule is used to filter target capacitor nodes whose corresponding capacitance data is greater than the capacitance threshold from the plurality of capacitor nodes.
[0154] The first touch position determination submodule is used to determine the touch position of the touch operation on the capacitive touch screen based on the capacitance data corresponding to the target capacitor node.
[0155] Furthermore, the touch position determination module includes: a capacitance weight determination submodule and a second touch position determination submodule, wherein:
[0156] The capacitor weight determination submodule is used to determine the capacitor weight corresponding to each of the plurality of capacitor nodes, wherein the capacitor weight corresponding to the capacitor node is negatively correlated with the distance between the capacitor node and the center point of the touch operation.
[0157] The second touch position determination submodule is used to determine the touch position of the touch operation on the capacitive touch screen based on the capacitance data and capacitance weights of the multiple capacitor nodes.
[0158] Furthermore, the touch position determination module includes: a capacitance data optimization submodule and a third touch position determination submodule, wherein:
[0159] The capacitance data optimization submodule is used to perform infinite impulse response filtering optimization on the capacitance data corresponding to each of the multiple capacitance nodes to obtain the optimized capacitance data for each of the multiple capacitance nodes.
[0160] The third touch position determination submodule is used to determine the touch position of the touch operation on the capacitive touch screen based on the optimized capacitance data corresponding to each of the multiple capacitor nodes.
[0161] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0162] In the several embodiments provided in this application, the coupling between modules can be electrical, mechanical, or other forms of coupling.
[0163] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0164] Please see Figure 14 This document illustrates a structural block diagram of an electronic device 100 provided in an embodiment of this application. The electronic device 100 can be a smartphone, tablet computer, e-reader, or other electronic device capable of running applications. The electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications can be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more applications are configured to perform the methods described in the foregoing method embodiments.
[0165] The processor 110 may include one or more processing cores. The processor 110 connects to various parts within the electronic device 100 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and by calling data stored in the memory 120. Optionally, the processor 110 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 110 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 110 and may be implemented separately using a communication chip.
[0166] The memory 120 may include random access memory (RAM) or read-only memory (ROM). The memory 120 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the electronic device 100 during use (such as phonebook data, audio and video data, chat log data, etc.).
[0167] Please see Figure 15 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 300 stores program code that can be called by a processor to execute the methods described in the above method embodiments.
[0168] The computer-readable storage medium 300 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 300 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 300 has storage space for program code 310 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 310 may be compressed, for example, in a suitable form.
[0169] In summary, the touch processing method, apparatus, electronic device, and storage medium provided in this application, when detecting a touch operation on a capacitive touchscreen, detect the film application status of the capacitive touchscreen, wherein the film application status includes whether the film is applied or not. If it is determined that the capacitive touchscreen is applied based on the film application status, the film thickness of the capacitive touchscreen is detected. If the film thickness reaches a thickness threshold, the hover compensation function for the capacitive touchscreen is turned off. Thus, when a thick film is detected on the capacitive touchscreen, the hover compensation function is turned off, optimizing the touch coordinate jitter problem and improving the accuracy of touch.
[0170] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A touch processing method, characterized in that, Applied to an electronic device, the electronic device including a capacitive touchscreen, the method includes: When a touch operation is detected on the capacitive touchscreen, the film application status of the capacitive touchscreen is detected, wherein the film application status includes whether the film is applied or not. If it is determined that the capacitive touchscreen has been filmed based on the film application status, then the film thickness corresponding to the capacitive touchscreen is detected. If the thickness of the film reaches a thickness threshold, the hover compensation function for the capacitive touchscreen is turned off.
2. The method according to claim 1, characterized in that, The step of disabling the hover compensation function for the capacitive touchscreen if the film thickness reaches a thickness threshold includes: If the thickness of the film reaches the thickness threshold and the electronic device is in game mode, then the hover compensation function for the capacitive touchscreen is turned off.
3. The method according to claim 2, characterized in that, If the thickness of the film reaches the thickness threshold and the electronic device is in game mode, then disabling the hover compensation function for the capacitive touchscreen includes: If the thickness of the film reaches the thickness threshold and the electronic device is in the game mode, then the touch operation is detected in the touch area of the capacitive touch screen. If a game screen is displayed in the touch area, the hover compensation function for the capacitive touchscreen is turned off.
4. The method according to claim 1, characterized in that, The step of disabling the hover compensation function for the capacitive touchscreen if the film thickness reaches a thickness threshold includes: If the thickness of the film reaches the thickness threshold and the number of touch points corresponding to the touch operation reaches at least two, then the hover compensation function for the capacitive touch screen is turned off.
5. The method according to claim 4, characterized in that, If the film thickness reaches a thickness threshold and the number of touch points corresponding to the touch operation reaches at least two, then the hover compensation function for the capacitive touchscreen is disabled, including: If the thickness of the film reaches the thickness threshold and the number of touch points corresponding to the touch operation reaches at least two, and there are coaxial touch points among the at least two touch points, then the hover compensation function for the capacitive touch screen is turned off.
6. The method according to claim 1, characterized in that, The step of disabling the hover compensation function for the capacitive touchscreen if the film thickness reaches a thickness threshold includes: If the thickness of the film reaches the thickness threshold and there is liquid at the touch position corresponding to the touch operation on the capacitive touchscreen, then the suspension compensation function for the capacitive touchscreen is turned off.
7. The method according to any one of claims 1-6, characterized in that, The method further includes: The capacitance data of each of the multiple capacitive nodes of the capacitive touchscreen is detected under the touch operation. Based on the capacitance data corresponding to each of the multiple capacitor nodes, the touch position of the touch operation on the capacitive touchscreen is determined.
8. The method according to claim 7, characterized in that, Determining the touch position of the touch operation on the capacitive touchscreen based on the capacitance data corresponding to each of the plurality of capacitor nodes includes: Select target capacitor nodes whose capacitance data is greater than the capacitance threshold from the plurality of capacitor nodes; Based on the capacitance data corresponding to the target capacitor node, the touch position of the touch operation on the capacitive touch screen is determined.
9. The method according to claim 7, characterized in that, Determining the touch position of the touch operation on the capacitive touchscreen based on the capacitance data corresponding to each of the plurality of capacitor nodes includes: Determine the capacitance weight corresponding to each of the plurality of capacitor nodes, wherein the capacitance weight corresponding to a capacitor node is negatively correlated with the distance between the capacitor node and the center point of the touch operation; Based on the capacitance data and capacitance weights of each of the multiple capacitor nodes, the touch position of the touch operation on the capacitive touchscreen is determined.
10. The method according to claim 7, characterized in that, When there are coaxial touch points among the touch points corresponding to the touch operation, the plurality of capacitive nodes correspond to the coaxial touch points. Determining the touch position of the touch operation on the capacitive touchscreen based on the capacitance data corresponding to each of the plurality of capacitive nodes includes: The capacitance data corresponding to each of the multiple capacitor nodes is optimized by infinite impulse response filtering to obtain the optimized capacitance data corresponding to each of the multiple capacitor nodes. Based on the optimized capacitance data corresponding to each of the multiple capacitor nodes, the touch position of the touch operation on the capacitive touchscreen is determined.
11. A touch processing device, characterized in that, Applied to an electronic device, the electronic device including a capacitive touchscreen, the device includes: The film application status detection module is used to detect the film application status of the capacitive touch screen when a touch operation is detected on the capacitive touch screen, wherein the film application status includes whether the film is applied or not. The film thickness detection module is used to detect the film thickness of the capacitive touch screen if it is determined that the capacitive touch screen has been filmed based on the film application status. The hover compensation function disable module is used to disable the hover compensation function for the capacitive touch screen if the thickness of the film reaches a thickness threshold.
12. An electronic device, characterized in that, The method includes a memory and a processor, the memory being coupled to the processor, the memory storing instructions, and when the instructions are executed by the processor, the processor performing the method as described in any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code that can be invoked by a processor to execute the method as described in any one of claims 1-10.