Touch recognition method and electronic device

By performing coarse and fine detection on the capacitive touch panel, the capacitance changes of hands and water are distinguished, solving the problem of false touches caused by water contact and improving the accuracy and speed of wet-hand touch recognition.

CN120215731BActive Publication Date: 2026-05-29HONOR DEVICE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2023-12-20
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing electronic devices are prone to misinterpreting capacitive touch panels as finger touches when water comes into contact with them, leading to accidental touch events. Furthermore, they cannot accurately recognize finger touch operations when hands are wet, causing touch malfunctions.

Method used

The capacitance array is obtained through a capacitive touch panel. Coarse detection is performed to initially determine whether there is contact between a hand and interfering substances. If so, fine detection is performed to distinguish the capacitance changes between the hand and water, and to obtain the touch position of the hand.

Benefits of technology

It improves the accuracy and speed of wet-hand touch recognition, avoids accidental touches, and ensures that electronic devices respond normally to user operations even with wet hands.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120215731B_ABST
    Figure CN120215731B_ABST
Patent Text Reader

Abstract

The application provides a touch recognition method and an electronic device. The method comprises: the electronic device acquires a capacitance array through a capacitive touch panel, the capacitance array comprising capacitances of a plurality of detection points in the capacitive touch panel. Then, coarse detection is performed according to the capacitance array, that is, it is preliminarily judged whether the capacitive touch panel is contacted by a hand and whether the capacitive touch panel is contacted by an interfering substance. If it is determined that the capacitive touch panel is contacted by the hand and the interfering substance, fine detection is performed on the capacitance array, that is, it is further judged that the hand contact corresponds to the capacitances in the capacitance array, and then the touch position of the hand is acquired according to the capacitances corresponding to the hand contact.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminals, and more particularly to a touch recognition method and an electronic device. Background Technology

[0002] Currently, an increasing number of electronic devices use capacitive touch panels. However, when water comes into contact with these panels, the devices may misinterpret it as a finger touch, leading to accidental touches. Furthermore, when users input touch operations with wet hands, the devices may be unable to detect the correct finger touch, resulting in touch malfunctions.

[0003] How to provide an accurate touch recognition method is an urgent problem to be solved. Summary of the Invention

[0004] This application provides a touch recognition method and an electronic device. The method includes: the electronic device acquiring a capacitance array via a capacitive touch panel, the capacitance array including the capacitance of multiple detection points in the capacitive touch panel. Then, a coarse detection is performed based on the capacitance array, i.e., a preliminary determination of whether the capacitive touch panel has been touched by a hand and whether it has been touched by interfering substances. If it is determined that the capacitive touch panel has been touched by a hand or interfering substances, a fine detection is performed on the capacitance array, i.e., further determining the capacitance in the capacitance array corresponding to the hand contact, and then obtaining the touch position of the hand based on the capacitance corresponding to the hand contact. This can improve the accuracy of wet-hand touch recognition.

[0005] In a first aspect, this application provides a touch recognition method applied to an electronic device including a capacitive touch panel. The method includes: acquiring a capacitance array, the capacitance array including capacitances at multiple detection points in the capacitive touch panel; determining, based on the capacitance array, whether the capacitive touch panel is in contact with a hand, and determining, based on the capacitance array, whether the capacitive touch panel is in contact with water; if it is determined that the capacitive touch panel is in contact with a hand and water, determining whether there are capacitors in the capacitance array within a target range corresponding to the hand contact; if so, obtaining the touch position of the hand based on the capacitors within the target range.

[0006] The capacitance at the multiple detection points described in this application typically refers to the capacitance of all detection points in a capacitive touch panel. Furthermore, the capacitance at each detection point can be obtained through mutual capacitance detection or self-capacitance detection.

[0007] After implementing the method provided in the first aspect, the electronic device can initially determine whether there is hand or water contact with the capacitive touch panel, i.e., whether it is in a wet-hand touch state. If so, the electronic device further determines the capacitor corresponding to the hand touch. Then, based on the location of the detection point to which the capacitor corresponding to the hand touch belongs, a highly accurate touch position can be obtained.

[0008] In conjunction with the method described in the first aspect, the method specifically includes: using a first condition to determine whether the capacitive touch panel is touched by a hand; using a second condition to determine whether there is a capacitor in the target range corresponding to the hand contact in the capacitor array; the second condition is more stringent than the first condition.

[0009] In this way, the electronic device first uses the first condition for preliminary detection, and then uses the more stringent second condition for fine detection. This method of detection in two stages, coarse and fine, can improve the convergence speed of the touch recognition algorithm and enhance the performance of the touch recognition function. In the coarse detection stage, the touch recognition state can be quickly determined, and then the corresponding touch mode can be used in a timely manner to respond to the user's touch operation.

[0010] In conjunction with the method described in the first aspect, the first condition includes: determining that the capacitive touch panel has been touched by hand when there are capacitors in the capacitor array that are greater than a first value and the number of capacitors that are greater than a second value is greater than a third value; the first value is greater than the second value. The second condition includes: determining that the capacitive touch panel has been touched by hand when there are capacitors in the capacitor array that are greater than a seventh value and the number of capacitors that are less than an eighth value among the capacitors in the target range surrounding the seventh value is greater than a ninth value; the seventh value is greater than the first value.

[0011] The aforementioned first and second conditions are exemplified under the following conditions: (1) If the electronic device uses mutual capacitance detection, the capacitance array is specifically the capacitance array corresponding to the difference between the original value and the sensed value at the detection point; (2) If the electronic device uses self-capacitance detection, the capacitance array is specifically the capacitance array corresponding to the difference between the sensed value and the original value at the detection point. Under the above two conditions, it can be ensured that the change in capacitance at the detection point caused by hand contact is a positive value, which facilitates data processing by the electronic device. In addition, when the electronic device uses self-capacitance detection, if the capacitance array is specifically set to the difference between the original value and the sensed value at the detection point, the above first condition needs to be replaced with the first condition involving the eleventh, twelfth, and thirteenth values ​​as described in the embodiment. The second condition also needs to be replaced in a similar way, which will not be elaborated here.

[0012] Thus, since the first condition adopted in this application is based on the entire capacitor array, it considers the special characteristic that the difference in detection points at the contact area is the largest under hand contact by judging whether the maximum value is large enough, and by judging whether there are enough large values, it considers the overall characteristic that the difference in detection points in the entire capacitor array is large under hand contact. In other words, by adopting the first condition provided by this application, it is possible to quickly determine whether there is hand contact in a comprehensive and targeted manner. The second condition adopted in this application takes into account that water on a capacitive touch panel is not grounded and has the characteristic of floating, while the hand is grounded. Based on this, the different effects of water and hand on the capacitance of the detection point can be used to accurately identify the capacitance that changes at the detection point due to hand contact.

[0013] In conjunction with the method described in the first aspect, the touch position of the hand is obtained based on the capacitance within the target range, specifically including: using a centroid algorithm to obtain the touch position of the hand based on the capacitance within the target range.

[0014] In this way, since the finger touches the panel and covers multiple detection points, the capacitance corresponding to the center of gravity of the finger can be analyzed based on the capacitance at multiple detection points, thereby obtaining a more accurate touch position of the hand.

[0015] In conjunction with the method described in the first aspect, the method specifically includes: using a third condition when determining whether the capacitive touch panel has been in contact with water; the third condition includes: in the capacitor array, if there are capacitors with a value less than a fourth value and the number of capacitors with a value less than a fifth value is greater than a sixth value, it is determined that the capacitive touch panel has been in contact with water; the fourth value is less than the fifth value.

[0016] Thus, because the third condition provided in this application is based on the entire capacitor array, it considers the specificity that the difference between detection points in the contact area is minimal under water contact by judging whether the minimum value is small enough, and by judging whether there are enough small values, it considers the overall characteristic that the difference between most detection points in the entire capacitor array is small under water contact. In other words, by adopting the third condition provided in this application, it is possible to quickly determine whether there is water contact in a comprehensive and targeted manner.

[0017] In conjunction with the method described in the first aspect, the method further includes: if it is determined that the capacitive touch panel is wet and there is no hand contact, then the touch position of the water is not acquired.

[0018] In this way, the electronic device does not perform calculations on the capacitor array, and therefore does not acquire the touch position of the water, and thus does not respond to the touch of the water, thereby preventing the electronic device from being accidentally triggered and avoiding the occurrence of problems, including but not limited to those described in this application. Figure 3 The issue shown in b is the misdisplay of handwriting and other problems.

[0019] In conjunction with the method described in the first aspect, the method further includes: if it is determined that the capacitive touch panel is wet and has not been touched by a hand, then filtering out the capacitor array.

[0020] In conjunction with the method described in the first aspect, the method further includes: if it is determined that the capacitive touch panel is free of water and is in contact with a hand, then obtaining the touch position of the hand based on the capacitance array.

[0021] In this way, if the electronic device initially determines that there is no water and only hand contact, the conventional touch mode can be used to quickly identify the hand's touch position.

[0022] In conjunction with the method described in the first aspect, the method further includes: displaying handwriting corresponding to the touch position on a display screen corresponding to the touch position; or, executing a task corresponding to a control displayed at the touch position.

[0023] In this way, after recognizing the touch location of a hand, the electronic device can respond to the touch operation of that hand in a timely manner and execute the corresponding task.

[0024] In conjunction with the method described in the first aspect, the touch location includes the location of one or more detection points.

[0025] In other words, in addition to providing single-point touch functionality, electronic devices can also provide multi-point touch functionality. Specifically, when a user's finger simultaneously touches multiple locations on a capacitive touch panel, the capacitance at these multiple detection points changes accordingly. This allows the electronic device to identify the positions of the multiple detection points corresponding to the touch location based on the changed capacitance.

[0026] In a second aspect, this application provides an electronic device including a capacitive touch panel and one or more processors; a memory coupled to the one or more processors, and computer program code including computer instructions, wherein the one or more processors call the computer instructions to cause the electronic device to perform the methods described in any of the first aspects.

[0027] Thirdly, this application provides a chip for use in an electronic device, the chip including one or more processors for invoking computer instructions to cause the electronic device to perform the methods described in any of the first aspects.

[0028] Fourth aspect. This application provides a computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform the methods described in any of the first aspects. Attached Figure Description

[0029] Figure 1This is a schematic diagram of the structure of an electronic device screen 10 provided in an embodiment of this application;

[0030] Figure 2 This is a schematic diagram of the structure of a capacitive touch panel 12 provided in an embodiment of this application;

[0031] Figure 3 A set of touch recognition user interface diagrams provided for embodiments of this application;

[0032] Figure 4 A flowchart of a touch recognition method provided in an embodiment of this application;

[0033] Figure 5 A flowchart illustrating a method for determining a touch mode provided in an embodiment of this application;

[0034] Figure 6A A capacitor array that satisfies a first condition under hand touch only, as provided in the embodiments of this application;

[0035] Figure 6B A capacitor array that satisfies a first condition under water-based touch control, as provided in this application embodiment;

[0036] Figure 6C A capacitor array that satisfies a first condition and a third condition under wet-hand touch, as provided in this application embodiment;

[0037] Figure 7 A flowchart illustrating a wet-hand touch mode method provided in this application embodiment;

[0038] Figure 8A A capacitor array that satisfies a first condition under wet-hand touch, as provided in an embodiment of this application;

[0039] Figure 8B This application provides a capacitor array for filtering interference under wet-hand touch conditions.

[0040] Figure 9 This is a schematic diagram of an electronic device hardware architecture provided in an embodiment of this application. Detailed Implementation

[0041] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings.

[0042] In the description of the embodiments of this application, unless otherwise stated, " / " means "or", for example, A / B can mean A or B; "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean A alone, A and B at the same time, and B alone.

[0043] In the description of the embodiments of this application, unless otherwise stated, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0044] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.

[0045] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with the user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visible interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of an electronic device.

[0046] Currently, most electronic devices have capacitive touch panels in their screens. For details on the layout, structure, and working principle of capacitive touch panels in electronic device screens, please refer to the following introduction.

[0047] See Figure 1 , Figure 1 A schematic diagram of the structure of the screen 10 of an electronic device provided in this application is shown.

[0048] like Figure 1As shown, the screen 10 of the electronic device may include, from top to bottom, components such as a protective layer 11, a capacitive touch panel 12, a display module 13, and a substrate 14. The electronic device can implement touch detection function by using mutual capacitance detection through the capacitive touch panel 12, or it can implement touch detection function by using self-capacitance detection through the capacitive touch panel 12. This application embodiment does not limit this approach.

[0049] Figure 1 The structure of screen 10 shown is merely an example. Screen 10 may include more components, or multiple components may be combined into an integrated structure. This application does not limit this. For example, screen 10 may also include a shell supporting the entire screen 10. As another example, the capacitive touch panel 12 and display module 13 may be manufactured independently, or they may be integrated into one unit to form a touch screen, etc.

[0050] See Figure 2 , Figure 2 A schematic diagram of the structure of a capacitive touch panel 12 provided in this application is shown.

[0051] like Figure 2 As shown, the capacitive touch panel 12 includes two interleaved first electrode arrays and second electrode arrays. The first electrode array includes N columns of electrodes arranged in parallel, each column comprising multiple electrodes connected sequentially along the Y-axis. The second electrode array includes M rows of electrodes arranged in parallel, each row comprising multiple electrodes connected sequentially along the X-axis. Optionally, the first and second electrode arrays can be disposed on the same layer. If the first electrode array is connected on this layer, the second electrode array connects the electrodes through bridging.

[0052] (1) In the mutual capacitance detection method, each electrode in the first electrode array forms a mutual capacitance (denoted as Cm) with the adjacent electrode in the second electrode array, thereby forming a detection point arranged in a two-dimensional array on the capacitive touch panel 12. Based on the mutual capacitance values ​​detected by these detection points, the touch position can be determined. Specifically, the electronic device can use the first electrode array as the transmit (Tx) electrode and the second electrode array as the receive (Rx) electrode. Excitation signals are sequentially input to each column of electrodes in the first electrode array, while the sensing signals of all rows in the second electrode array are detected simultaneously. For example, excitation signals are input sequentially in the order of Y1, Y2...YN. During the sequential input of excitation signals, the sensing signals in X1, X2...XM of the second electrode array are detected simultaneously, thereby obtaining the mutual capacitance between the first electrode array and the second electrode array, i.e., obtaining a frame of capacitance array. By analyzing the capacitance values ​​in the capacitance array, the coordinate point where a preset change occurs is taken as the touch position. Among them, the mutual capacitance changes by a preset value include a reduction in mutual capacitance. This is because the human body can conduct electricity, and a finger touch will absorb a portion of the excitation signal in the first electrode array at the touch position, thereby reducing the mutual capacitance detected by the detection point at the touch area.

[0053] (2) In the self-capacitance detection method, each electrode in the first electrode array and each electrode in the second electrode array form a self-capacitance (denoted as Cs) with ground, thereby constituting the capacitive touch panel 12 into a two-dimensional array of detection points. Based on the self-capacitance values ​​detected at these detection points, the touch position can be determined. Specifically, the self-capacitance between the first electrode array and ground is detected, and the self-capacitance between the second electrode array and ground is detected. The coordinate point where the self-capacitance of a column in the first electrode array that has undergone a preset change and the self-capacitance of a row in the second electrode array that has undergone a preset change are taken as the touch position. The preset change in self-capacitance includes an increase in self-capacitance by a preset value. This is because the human body has capacitance to ground, and when a finger touches a detection point, it is equivalent to connecting a self-capacitance between the finger and ground in parallel at the detection point.

[0054] However, when the capacitive touch panel 12 is exposed to interference, such as water, coffee, dust, or other interfering substances, these substances can cause changes in capacitance at the detection points, thus interfering with finger touch recognition. For an example of the interference caused by water, please refer to the following section on the specific interference it causes to finger touch recognition. Figure 3 Introduction.

[0055] refer to Figure 3 , Figure 3 An exemplary schematic diagram of a set of touch recognition user interfaces provided in an embodiment of this application is shown.

[0056] Figure 3 (a) shows the user interface 1 displayed by the electronic device when the screen is clean and there are no accidental touches. Specifically, the user interface 1 is provided by the electronic device's drawing and writing applications. When there are no interfering substances on the screen 10 of the electronic device and no input object (such as a finger or stylus) is in contact, the electronic device will not be accidentally triggered to display handwriting in the user interface 1.

[0057] Figure 3 (b) shows the user interface 2 displayed by the electronic device in the event of accidental touch caused by water. Specifically, this user interface 2 is provided by the electronic device's drawing and writing applications. When there is interfering material (such as water stains) on the screen 10 and no input object (such as a finger or stylus) is in contact, the electronic device may still be accidentally triggered to display handwriting that the user has not entered in the user interface 2.

[0058] Figure 3 (c) shows the user interface 3 displayed by the electronic device when the dry hand touch recognition is accurate. Specifically, the user interface 3 is provided by the electronic device's drawing and writing applications. When there are no interfering substances on the screen 10 and an input object (such as a finger) is in contact, the electronic device will be triggered to display the complete handwriting corresponding to the complete sliding trajectory of the finger in the user interface 3.

[0059] Figure 3 (d) shows the user interface 4 displayed by the electronic device when wet-hand touch recognition is inaccurate. This user interface 4 is provided for drawing and writing applications of the electronic device. When there is interfering material (such as water stains) on the screen 10 and an input object (such as a finger) touches it, although the electronic device will be triggered to display the handwriting corresponding to the finger sliding trajectory in the user interface 3, the handwriting may be incomplete, that is, the electronic device has not completely recognized the finger sliding trajectory.

[0060] Figure 3 This paper uses water as the interfering substance and only takes the interference of drawing and writing applications as examples to illustrate the interference caused by interfering substances to touch recognition of electronic devices. Besides water, other interfering substances, as well as other objects and forms of interference, can also be included; this application does not limit these aspects.

[0061] Based on the foregoing Figures 1-3 As explained in the introduction, for the screen 10 using the capacitive touch panel 12, when water comes into contact with the screen 10, the electronic device may misinterpret it as a finger touch, thus triggering a false touch event, such as incorrectly displaying handwriting. Furthermore, when a user inputs a touch operation with wet hands, the electronic device may be unable to detect the correct finger touch operation, leading to touch malfunction, such as incomplete handwriting display.

[0062] The aforementioned interference is caused by the following: Taking water as an interfering substance, when water comes into contact with a capacitive touch panel and when a finger touches the capacitive touch panel, the direction of change in the mutual capacitance generated by the capacitive touch panel is opposite; that is, water contact increases the mutual capacitance, while finger contact decreases it. However, when water comes into contact with a self-capacitive touch panel and when a finger touches it, the direction of change in the self-capacitance generated by the capacitive touch panel is the same; that is, both water contact and finger contact increase the self-capacitance. Based on the above analysis, it can be seen that the interfering environment alters the distribution and state of the capacitance of the capacitive touch panel itself, thereby interfering with the recognition of the finger touch position, leading to a decrease in the accuracy of the ultimately determined touch position or directly rendering the touch function unusable.

[0063] To address the aforementioned problems, this application provides a touch recognition method and an electronic device. The method includes: the electronic device acquiring a capacitance array via a capacitive touch panel, the capacitance array including the capacitance of multiple detection points in the capacitive touch panel. Then, a coarse detection is performed based on the capacitance array, i.e., a preliminary determination of whether the capacitive touch panel is in contact with a hand and whether it is in contact with any interfering material. If it is determined that the capacitive touch panel is in contact with a hand or interfering material, a fine detection is performed on the capacitance array, i.e., further determining the capacitance in the capacitance array corresponding to the hand contact, and then obtaining the touch position of the hand based on the capacitance corresponding to the hand contact.

[0064] Implementing the touch recognition method provided in this application can bring the following beneficial effects:

[0065] (1) Provide touch recognition functionality in more scenarios. Specifically, electronic devices can still provide touch recognition functionality even when hands are wet.

[0066] (2) Accelerate the convergence speed of the touch recognition algorithm. Specifically, by dividing the process into two stages, coarse detection and fine detection, the touch recognition state can be quickly determined in the coarse detection stage, and then the corresponding touch mode can be adopted in a timely manner to respond to the user's touch operation.

[0067] (3) Improve the accuracy of wet hand touch recognition. Specifically, by dividing the process into two stages, coarse detection and fine detection, the fine detection stage can accurately distinguish the capacitance changes caused by hand touch and water touch respectively, and the touch position can be calculated with high precision based solely on the capacitance changes caused by the hand.

[0068] The capacitive touch panel involved in this application can use mutual capacitance detection to collect the mutual capacitance of each detection point, and / or use self-capacitance detection to collect the self-capacitance of each detection point. For details regarding these two capacitance collection methods, please refer to the preceding text. Figure 2 The details of this will not be elaborated here.

[0069] The capacitor array involved in this application specifically refers to the difference in capacitance at each detection point. Details regarding the method for obtaining this difference can be found later in this document. Figure 4 The description at S401, and the representation of this difference, can be found in the following text. Figures 6A-6C The description of the capacitor array shown will not be elaborated here.

[0070] The terms "rough testing" and "fine testing" in this application refer to graded testing using different testing conditions. The testing conditions used in fine testing are more stringent than those used in rough testing. For details, please refer to the following text. Figure 5 , Figure 7 The detailed description of the method flow shown will not be repeated here.

[0071] The interfering substances involved in this application include, but are not limited to, water, coffee, juice, or dust. The following description uses water as an example of an interfering substance. The touch recognition method provided in this application is also applicable to touch recognition methods corresponding to other interfering substances.

[0072] Next reference Figure 4 , Figure 4 An exemplary flowchart of a touch recognition method provided in an embodiment of this application is shown.

[0073] like Figure 4 As shown, the method includes the following steps:

[0074] S401, perform coarse detection on the acquired capacitance to preliminarily determine the touch state of the capacitive touch panel.

[0075] Specifically, after the electronic device is powered on, it can control the capacitive touch panel 12 to periodically detect the sensing value of each detection point. Then, based on the sensing value and the original value, it obtains the corresponding difference, and performs coarse detection on the difference to preliminarily determine the touch state of the capacitive touch panel 12. Based on the aforementioned structural relationship between the screen 10 and the capacitive touch panel 12, it can be seen that the touch state of the capacitive touch panel 12 is equivalent to the state of the screen 10. Unless otherwise specified, these two terms refer to the same thing.

[0076] The methods for obtaining the difference between the sensed value and the original value specifically include:

[0077] Sensing value: Regardless of whether there are interfering substances or input devices on the screen 10, the capacitance value detected by the capacitive touch panel 12 is called the sensing value.

[0078] Specifically, the sensed value includes the mutual capacitance or self-capacitance corresponding to each detection point in the capacitive touch panel 12, depending on the detection method of the capacitive touch panel 12. In one possible implementation, the sensed value detected in each cycle can be in the form of a capacitance array, where each capacitance value uniquely corresponds to the sensed value of a detection point in the capacitive touch panel 12.

[0079] Original value: When there are no interfering objects or input devices on the screen 10, the capacitance value detected by the capacitive touch panel 12 is called the original value. The original value represents the initial state of the capacitive touch panel 12.

[0080] Specifically, the original value also includes the mutual capacitance or self-capacitance corresponding to each detection point in the capacitive touch panel 12, depending on the detection method of the capacitive touch panel 12. In one possible implementation, the original value can also be in the form of a capacitance array, where each capacitance value uniquely corresponds to the original value of a detection point in the capacitive touch panel 12. Furthermore, the original value can be pre-set before the electronic device leaves the factory, or the original value can be obtained through testing after the electronic device leaves the factory.

[0081] Difference: This is obtained by calculating the difference between the sensed value and the original value. It can be the sensed value minus the original value or the original value minus the sensed value. The following text will use the difference obtained by subtracting the sensed value from the original value as an example to introduce the method provided in this application.

[0082] Specifically, this difference also includes the mutual capacitance difference or self-capacitance difference corresponding to each detection point in the capacitive touch panel 12, depending on the detection method of the capacitive touch panel 12. When the sensed value is in the form of a capacitor array and the original value is also in the form of a capacitor array, the difference in the form of a capacitor array can be obtained by subtracting the original value from the sensed value at the corresponding position in the array. Unless otherwise specified, the capacitor array mentioned in this application generally refers to the capacitor array corresponding to the difference.

[0083] The methods for determining the touch state based on the difference include:

[0084] Through extensive analysis of the capacitance arrays corresponding to the aforementioned differences in the states of touch on screen 10 under conditions of only hand touch, only water touch, and both water and hand touch, it was found that the capacitance arrays corresponding to the differences in different touch states possess different characteristics. Therefore, the touch state can be determined by judging the characteristics of the capacitance arrays. In this application, the touch state includes, but is not limited to: touch only by the input body, touch only by the interfering substance, and touch by both the interfering substance and the input body. For the sake of convenience in introducing this solution, this application uses water to represent the interfering substance and a hand to represent the input body to specifically describe the touch recognition method.

[0085] When it is initially determined that the touch state is wet hand touch, the electronic device executes the subsequent S402-1; when it is initially determined that the touch state is water-only touch, the electronic device executes the subsequent S402-2; when it is initially determined that the touch state is hand-only touch, the electronic device executes the subsequent S402-3.

[0086] For details on the coarse detection method, specifically the implementation for determining the touch state, please refer to the following section. Figure 5 The method flow shown will not be described in detail here.

[0087] S402-1 uses a wet-hand touch mode to perform precise detection of capacitance data, that is, to determine the capacitance changes caused by water and the capacitance changes caused by the hand.

[0088] Specifically, in S401, when the touch state of the capacitive touch panel 12 is determined to be wet-hand touch, in order to accurately identify the touch position of the hand, it is necessary to enable the wet-hand touch mode to perform fine detection on the capacitance data. This further distinguishes between capacitance changes caused by water and capacitance changes caused by the hand from the capacitance array, filters out the capacitance changes caused by water as interference signals, and then executes the subsequent S403 based on the capacitance changes caused by the hand. The capacitance changes caused by the hand determined by the wet-hand touch mode can be referred to as the difference within the target range in the capacitance array, and the capacitance changes caused by water can be referred to as the difference within the non-target range in the capacitance array.

[0089] For details on the precise detection method, specifically the specific implementation of determining the capacitance changes induced by water and by hand, please refer to the following text. Figure 7 The method flow shown will not be described in detail here.

[0090] S402-2, does not respond to water-only touch.

[0091] Specifically, when it is determined in S401 that the touch state of the capacitive touch panel 12 is water-only, in order to prevent the electronic device from being accidentally triggered, that is, to prevent the occurrence of events including but not limited to... Figure 3 As shown in b, if there are issues such as misdisplaying handwriting, the electronic device will not perform calculations on the capacitor array, and therefore will not obtain the touch position of the water, and thus will not respond to the touch of the water.

[0092] S402-3 uses a conventional touch mode, which determines the touch position of the hand based on the acquired capacitance.

[0093] Specifically, when it is determined in S401 that the touch state of the capacitive touch panel 12 is hand-only, in order to accurately identify the touch position of the hand and respond to the touch operation of the hand in a timely manner, the electronic device can use the conventional touch mode to calculate the capacitor array to obtain the touch position of the hand, and then respond to the touch operation of the hand.

[0094] In the hand-only touch mode, the method for obtaining the touch position of the hand includes, but is not limited to, any of the following:

[0095] (1) Determine the position of the detection point corresponding to the peak value in the entire capacitor array as the touch position of the hand;

[0096] (2) The position of the detection point in the entire capacitor array that is greater than a preset value is determined as the touch position of the hand. Optionally, the preset value is, for example, the first value described in S502 below, or the seventh value described in S701 below.

[0097] (3) Use the centroid algorithm or triangular algorithm to determine the position of the detection point output by the algorithm as the touch position of the hand for all differences within the preset range of the peak value in the entire capacitor array. The preset range can be a 3*3 (or 7*7) subarray centered on the peak value. The size of the subarray is not limited in this embodiment.

[0098] (4) For all differences within a preset range that are greater than a preset value in the entire capacitor array, a centroid algorithm or a triangulation algorithm is used to determine the position of the detection point output by the algorithm as the touch position of the hand. Optionally, the preset value is, for example, the first value described in S502 below, or the seventh value described in S701 below. The preset range can be a 3*3 (or 7*7) subarray centered on the peak value. The size of the subarray is not limited in this embodiment.

[0099] The tasks performed in response to a hand touch operation include, but are not limited to, performing tasks such as those described above. Figure 3 The text in the image shows the handwriting, or the task corresponding to the control displayed at the touch location.

[0100] S403 determines the touch position of the hand based on the capacitance change caused by the hand.

[0101] Specifically, after determining the capacitance change caused by the hand in S402-1, the electronic device can calculate the capacitance change caused by the hand to obtain the touch position of the hand, and then respond to the touch operation of the hand.

[0102] Among them, the methods for obtaining the touch position of the hand in the wet-hand touch state include, but are not limited to:

[0103] (1) Only the position of the detection point corresponding to the peak value in the target range of the capacitance array is determined as the touch position of the hand. The target range refers to the capacitance change caused by the hand under the wet hand touch state determined in S402-1. For the specific determination method, please refer to the method described in S701-S702 below.

[0104] (2) Only the centroid algorithm or triangulation algorithm is used to determine the position of the detection point output by the algorithm as the hand touch position for all values ​​in the target range of the capacitance array. The target range refers to the capacitance change caused by the hand under the wet hand touch state determined in S402-1. The specific determination method is described in S701-S702 below.

[0105] As can be seen, compared with the aforementioned method of obtaining the touch position of the hand only in the hand-touch state, the method of obtaining the touch position of the hand in the wet-hand touch state only processes the difference within the target range of the capacitor array rather than processing the entire capacitor array. This is because the target range is the capacitance change caused by the hand that the electronic device can accurately distinguish when using the wet-hand touch mode, thereby improving accuracy.

[0106] The tasks performed in response to a hand touch operation include, but are not limited to, performing tasks such as those described above. Figure 3 The text in the image shows the handwriting, or the task corresponding to the control displayed at the touch location.

[0107] Next, the method flow for determining the touch state and adopting the corresponding touch mode involved in the aforementioned S401 will be described in detail.

[0108] refer to Figure 5 , Figure 5 This is a flowchart illustrating a method for determining a touch mode, as provided in an embodiment of this application.

[0109] like Figure 5 As shown, the method includes the following steps:

[0110] S501, obtain the capacitance array corresponding to the difference of all detection points in the capacitive touch panel.

[0111] Specifically, the electronic device can obtain the sensing values ​​of all detection points in the capacitive touch panel 12 through mutual capacitance detection or self-capacitance detection, and then subtract the sensing value of the corresponding detection point from the original value of each detection point to obtain the capacitance array composed of the difference of each detection point.

[0112] For a detailed explanation of the sensed value, original value, and difference, please refer to the explanation in section S401 above, which will not be repeated here.

[0113] S502, determine whether the capacitor array satisfies the first condition, and determine whether the capacitor array satisfies the third condition.

[0114] Specifically, the electronic device performs a coarse detection on the capacitor array using the first and third conditions. If the capacitor array only meets the first condition, it is preliminarily determined that only a hand is in contact with the capacitive touch panel 12, and the subsequent step S503-3 is executed. If the capacitor array only meets the second condition, it is preliminarily determined that only water is in contact with the capacitive touch panel 12, and the subsequent step S503-2 is executed. If the capacitor array meets both the first and third conditions, it is preliminarily determined that both a hand and water are in contact with the capacitive touch panel 12, and the subsequent step S503-1 is executed.

[0115] In this embodiment of the application, the first and third conditions are different for the capacitor array obtained by mutual capacitance detection and the capacitor array obtained by self-capacitance detection, respectively, as follows:

[0116] 1. Mutual capacitance detection method.

[0117] If the first condition is met, it is determined that only hand contact exists.

[0118] Taking mutual capacitance detection as an example, when only a hand is in contact with the screen 10, the sensing value at the detection point in the contact area decreases, resulting in a positive difference between the original value and the sensing value. The sensing values ​​at the detection points in the non-contact area change little or remain unchanged. Considering the characteristics that the difference in the detection points is greatest at the hand-contact area, relatively large at the areas near the hand-contact area, and approximately zero at the other areas, it can be determined whether there is hand contact by detecting whether the capacitor array meets the first condition.

[0119] The first condition includes, for example, whether the maximum value in the capacitor module is greater than a first value, and whether the number of larger values ​​in the capacitor module is greater than a third value. If so, it is determined that there has been hand contact; otherwise, it is considered that there has been no hand contact. In other words, the first condition includes, for example, whether there are capacitors in the capacitor array with values ​​greater than the first value and the number of capacitors with values ​​greater than the second value is greater than the third value, thus determining that there has been hand contact. Here, the first value is greater than the second value.

[0120] Combination Figure 6A Let's take a look. Figure 6A An example is shown of a capacitor array that satisfies the first condition under hand touch only.

[0121] like Figure 6A As shown, the capacitor array satisfies the first condition: there exists a capacitor in the array with a value greater than the first value, and the number of capacitors with a value greater than the second value is greater than the third value. The first value is 1000, the second value is 500, and the third value is 7*7=49.

[0122] Understandable, Figure 6AThe size of the capacitor array shown and the values ​​therein are merely examples, and the embodiments of this application do not impose any limitations on them.

[0123] The above analysis shows that the first condition provided in this application is based on the entire capacitor array. It considers the unique characteristic of the largest difference between detection points in the contact area under hand contact by judging whether the maximum value is large enough, and by judging whether there are enough large values, taking into account the overall characteristic that the difference between most detection points in the entire capacitor array is large under hand contact. In other words, by adopting the first condition provided in this application, it is possible to quickly and comprehensively determine whether hand contact has occurred.

[0124] The third condition is met, confirming that only water contact exists.

[0125] Taking mutual capacitance detection as an example, when only water is in contact with screen 10, the sensing value of the detection point corresponding to the contact area increases, resulting in a negative difference between the original value and the sensing value. The sensing values ​​of the detection points in non-contact areas change little or remain unchanged. Considering the characteristics that the difference in the detection points is smallest in the water contact area, the difference in the detection points near the water contact area is small, and the difference in the detection points in other areas is approximately 0, it can be determined whether there is hand contact by detecting whether the capacitance array meets the third condition.

[0126] The third condition includes, for example, whether the minimum value in the capacitor module is less than the fourth value, and whether the number of smaller values ​​in the capacitor module is greater than the sixth value. If so, water contact is determined; otherwise, no water contact is considered. In other words, the third condition includes, for example, that water contact is determined if, in the capacitor array, there are capacitors with values ​​less than the fourth value and the number of capacitors with values ​​less than the fifth value is greater than the sixth value. Here, the fourth value is less than the fifth value.

[0127] Combination Figure 6B Let's take a look. Figure 6B An example is shown of a capacitor array that satisfies the third condition under water-only touch.

[0128] like Figure 6B As shown, the capacitor array satisfies the third condition: there are capacitors in the array with values ​​less than the fourth value, and the number of capacitors with values ​​less than the fifth value is greater than the sixth value. The fourth value is illustrated as -800, the fifth value as -500, and the sixth value as 7*7=49.

[0129] Understandable, Figure 6B The size of the capacitor array shown and the values ​​therein are merely examples, and the embodiments of this application do not impose any limitations on them.

[0130] The above analysis shows that the third condition provided in this application is based on the entire capacitor array. It considers the unique characteristic that the difference between detection points in the contact area is minimal under water contact by judging whether the minimum value is sufficiently small, and by judging whether there are enough small values, taking into account the overall characteristic that the difference between most detection points in the entire capacitor array is small under water contact. In other words, by adopting the third condition provided in this application, the presence or absence of water contact can be determined quickly and comprehensively.

[0131] If the first and third conditions are met, it is determined that water and hand are in contact (wet hand touch control).

[0132] Taking mutual capacitance detection as an example, when water and a hand touch the capacitive touch panel 12, their effects on the capacitance of the corresponding detection point in the contact area are opposite. That is, the hand causes a decrease in the sensing value of the detection point with a positive difference, while the water causes an increase in the sensing value of the detection point with a negative difference. Therefore, by detecting whether the capacitance array satisfies the aforementioned first and third conditions, it can be determined whether a hand and water have been in contact.

[0133] Combination Figure 6C Let's take a look. Figure 6C An example is shown of a capacitor array that satisfies the first and third conditions under wet-hand touch.

[0134] like Figure 6C As shown, the capacitor array satisfies the first and third conditions. For a description of the first and third conditions, please refer to the previous introduction.

[0135] Understandable, Figure 6C The size of the capacitor array shown and the values ​​therein are merely examples, and the embodiments of this application do not impose any limitations on them.

[0136] The previous text used mutual capacitance detection as an example to illustrate how to determine if there is a hand or water on the screen. Similarly, the method for determining the presence of a hand or water on the screen using self-capacitance detection is similar, but the difference lies in the degree of change. Water positively affects the difference at the detection point under self-capacitance detection, as does a hand, but the degree of these changes differs. Therefore, the conditions used under self-capacitance detection can be determined based on these different degrees of change, as detailed below.

[0137] 2. Self-capacity detection method

[0138] If the first condition is met, it is determined that only hand touch is used.

[0139] Because the direction of change in the difference at the detection point caused by hand contact in the self-capacitance detection method is opposite to that in the mutual capacitance detection method, the first condition used to detect whether there is hand contact on the screen 10 in the self-capacitance detection method is different from the first condition in the aforementioned mutual capacitance detection method.

[0140] The first condition includes, for example, whether the minimum value in the capacitor module is less than the eleventh value, and whether the number of smaller values ​​in the capacitor module is less than the thirteenth value. If so, it is determined that there has been hand contact; otherwise, it is considered that there has been no hand contact. In other words, the eleventh condition includes, for example, whether there are capacitors in the capacitor array with values ​​less than the eleventh value and the number of capacitors with values ​​less than the twelfth value is greater than the thirteenth value, thus determining that there has been hand contact. Here, the eleventh value is less than the twelfth value.

[0141] The above analysis shows that the first condition provided in this application is based on the entire capacitor array. It considers the specificity that the difference between detection points in the contact area is minimal under hand contact by judging whether the minimum value is small enough, and by judging whether there are enough small values, taking into account the overall characteristic that the difference between most detection points in the entire capacitor array is small under hand contact. In other words, by adopting the first condition provided in this application, it is possible to quickly and comprehensively determine whether hand contact has occurred.

[0142] The third condition is met, confirming that only water-based touch control is used.

[0143] Because the direction of change in the difference at the detection point caused by water contact in the self-capacitance detection method is the same as that in the mutual capacitance detection method, the third condition used to detect whether there is water contact on the screen 10 in the self-capacitance detection method is similar to the third condition in the aforementioned mutual capacitance detection method. The difference lies in the slightly different specific values, which need to be determined according to the specifications of the capacitive touch panel 12. Furthermore, since water causes a positive change in the difference at the detection point in the self-capacitance detection method, and a hand also causes a positive change in the difference at the detection point in the self-capacitance detection method, but the degree of positive change is different, that is, the increase in the sensing value caused by water is smaller than the increase in the sensing value caused by a hand, the values ​​in the third condition of the self-capacitance detection method need to have the following differences from those in the first condition.

[0144] The third condition includes, for example, whether the minimum value in the capacitor module is less than the fourteenth value, and whether the number of smaller values ​​in the capacitor module is less than the sixteenth value. If so, it is determined that there has been hand contact; otherwise, it is considered that there has been no hand contact. In other words, the third condition includes, for example, whether there are capacitors in the capacitor array with values ​​less than the fourteenth value and the number of capacitors with values ​​less than the fifteenth value is greater than the sixteenth value, thus determining that there has been hand contact. Here, the fourteenth value is less than the fifteenth value. Furthermore, the absolute value of the fourteenth value is less than the absolute value of the aforementioned eleventh value, the absolute value of the fifteenth value is less than or equal to the absolute value of the aforementioned twelfth value, and the sixteenth value is less than or equal to the thirteenth value.

[0145] If the first and third conditions are met, water and hand touch (wet hand touch) are required.

[0146] Taking self-capacitance detection as an example, when water and a hand touch the capacitive touch panel 12, both have the same effect on the capacitance of the detection point corresponding to the contact area, but the degree of influence is different. Therefore, by using the first and third conditions under the self-capacitance detection method described above, it can be determined whether there is contact between a hand and water.

[0147] Optionally, since the size of the capacitance module acquired by the electronic device varies depending on the capacitive touch panel, screen, and detection method, this application embodiment does not impose specific limitations on the first, second, third, fourth, fifth, and sixth values, as well as the eleventh, twelfth, thirteenth, fourteenth, fifteenth, and sixteenth values ​​involved in the aforementioned mutual capacitance detection method. Taking specific values ​​as an example, for the capacitive touch panel 12 using the mutual capacitance detection method, the first value can be 1000, the second value can be 500, the third value can be 49, the fourth value can be -800, the fifth value can be -500, and the sixth value can be 49. Since the influence of water contact and hand contact on the sensing value at the detection point differs—that is, the decrease in sensing value caused by a hand is greater than the increase in sensing value caused by water—in this application, the absolute value of the first value is set to be larger than the absolute value of the fourth value, which can more accurately determine whether there is a hand or water on the screen 10.

[0148] Optionally, in self-capacitance detection, the difference can be represented by subtracting the original value from the sensed value, instead of subtracting the sensed value from the original value as used in non-mutual capacitance detection. In this way, under self-capacitance detection, the change in difference caused by finger touch is positive, making it easier for the electronic device to calculate positive differences. Correspondingly, when the difference is defined as the sensed value minus the original value, the aforementioned first and third conditions are adjusted in reverse, which will not be elaborated further here.

[0149] The S503-1 uses a wet-hand touch mode.

[0150] For details, please refer to the detailed descriptions of S402-1 and S403 above, and S701, S702, S703-1 and S703-2 below, which will not be repeated here.

[0151] S503-2, does not respond to water-only touch.

[0152] Specifically, to prevent electronic devices from being accidentally triggered, that is, to prevent situations including but not limited to... Figure 3 As shown in b, if there are issues such as misdisplaying handwriting, the electronic device will not perform calculations on the capacitor array, and therefore will not obtain the touch position of the water, and thus will not respond to the touch of the water.

[0153] The S503-3 uses a conventional touch mode.

[0154] For details, please refer to the description in S402-3 above, which will not be repeated here.

[0155] Next, the method and process of determining the touch position of the hand using the wet hand touch mode involved in the aforementioned S402-1-S403 will be described in detail.

[0156] refer to Figure 7 , Figure 7 This is a flowchart illustrating a wet-hand touch mode method provided in an embodiment of this application.

[0157] like Figure 7 As shown, the method includes the following steps:

[0158] S701, determine the capacitors in the capacitor array that are greater than the seventh value, and determine the capacitors within a preset range using the capacitor as the center.

[0159] Specifically, in wet-hand touch mode, to further and more accurately distinguish between capacitance changes caused by hand contact and capacitance changes caused by water, it is necessary to further determine a larger capacitance value in the capacitance array, namely the seventh value. This larger capacitance value must be larger than the first and eleventh values ​​used in the aforementioned coarse detection. Then, within this capacitance array, with the capacitances greater than the seventh value as the center, a preset range of capacitances is determined. This preset range can be, for example, the size of a 3*3 or 7*7 subarray; this application does not impose any limitations on this.

[0160] Combination Figure 8A Let's take a look. Figure 8A An example is shown of a capacitor array that satisfies the first and third conditions under wet-hand touch.

[0161] like Figure 8A As shown, this capacitor array is similar to the one described above. Figure 6CThe capacitor array shown is identical, containing capacitors with values ​​greater than the seventh value, such as 1652 and 2556. Furthermore, around 2556 are capacitors with values ​​of 1648, 1625, 1578, and 2355. In one possible implementation, when multiple capacitors with values ​​greater than the seventh value exist, and these multiple seventh-value capacitors belong to the same preset range, the largest capacitor within that preset range is used as the center. In another possible implementation, when multiple capacitors with values ​​greater than the seventh value exist, each capacitor with a value greater than the seventh value can be used as a center to determine the preset range. Figure 8A The example is based on the first feasible method, namely, using 1652 as center 1, preset range 1 as preset range of center 1, and using 2566 as center 2, preset range 2 as preset range of center 2.

[0162] The touch recognition method provided in this application, which involves a coarse detection stage and a fine detection stage, can accelerate the overall convergence speed of the algorithm. This means that it can quickly determine which touch mode to use and then promptly output the touch recognition result using the corresponding touch mode to quickly respond to the user's touch operation.

[0163] S702, determine whether the number of capacitors with a value less than the eighth value among the capacitors within the preset range is greater than the ninth value.

[0164] Specifically, taking the mutual capacitance detection method as an example, since the water droplet is not grounded on the screen and has the superimposed and suspended characteristics, the edge of the water droplet and the inside of the water droplet have opposite effects on the capacitance at the detection point. The edge of the water droplet causes the sensing value at the detection point to decrease and the difference is positive, while the inside of the water droplet causes the sensing value at the detection point to increase and the difference is negative. In other words, the capacitance change at the detection point caused by the edge of the water droplet is the same as that of a finger. This can easily cause electronic devices to misinterpret the water droplet as a hand touch.

[0165] Therefore, a second condition is needed to further refine the detection of other capacitors within a preset range surrounding the capacitor with the seventh value, in order to determine whether there are a large number of small negative values ​​within the preset range. This second condition is, for example, whether the number of capacitors with values ​​less than the eighth value within the preset range is greater than the ninth value. If so, it indicates that the difference within the preset range is a capacitance change caused by a water droplet, and therefore, proceed to step S703-2; otherwise, it indicates that the difference within the preset range is a capacitance change caused by a hand, and therefore, proceed to step S703-1. The absolute value of the eighth value can be greater than or equal to the fourth value mentioned above, and the ninth value can be half the total number of capacitors within the preset range.

[0166] Continue to combine Figure 8AFrom the above, the preset range 1 where the center 1 is located does not meet the aforementioned second condition. Therefore, the preset range 1 belongs to the interference range of capacitance change caused by water contact. The preset range 2 where the center 2 is located meets the aforementioned second condition. Therefore, the preset range 2 belongs to the target range of capacitance change caused by hand contact.

[0167] S703-1, the preset range is used as the target range for hand contact, and the touch position of the hand is determined based on the capacitance within the target range.

[0168] Specifically, the method for determining the touch position of the hand based on the capacitance within the target range can be found in the description of S403 above, and will not be repeated here.

[0169] S703-2, the preset range is used as the interference range of water contact, and the capacitance within the interference range is filtered out.

[0170] In one feasible approach, the electronic device can directly filter out all capacitances outside the target range. (Reference) Figures 8A-8B The electronic device filters out capacitors outside the target range in the capacitor array. This filtering method is, for example, to set the capacitor to 0. When the capacitor is 0, the difference is 0, which means that the capacitor at the contact point is the original value and has not changed.

[0171] In another feasible approach, the electronic device can filter out only the capacitors within the interference range. Specifically, when the interference range overlaps with the target range in terms of capacitors, the electronic device can retain the capacitor or compensate for it to subsequently determine the hand touch position based on the capacitors within the target range. Specifically, when compensating for the overlapping capacitors, the compensation can be based on the degree of interference in the target range. For example, a larger number and higher negative values ​​in the overlapping area indicate a greater degree of interference, thus requiring a higher compensation ratio. The specific compensation value can be obtained by proportionally adjusting the capacitors in the non-overlapping areas of the target range. If there is complete overlap, compensation is based on the preset difference corresponding to finger contact.

[0172] The hardware architecture and form factor of the electronic device involved in this application will be described next.

[0173] Electronic devices can be equipped with Or other portable terminal devices with different operating systems, such as mobile phones, tablets, desktop computers, laptops, handheld computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, as well as cellular phones, personal digital assistants (PDAs), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, in-vehicle devices, smart home devices and / or smart city devices, etc.

[0174] Figure 9 A schematic diagram of the structure of the electronic device 100 is shown.

[0175] Electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

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

[0177] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0178] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0179] In this embodiment of the application, the processor 110 is used to call the corresponding software and hardware modules to perform, such as Figures 4-5 The method for determining the touch detection mode shown, and the execution of such... Figure 7 The wet hand touch detection method shown can be referred to in the previous method embodiment description, and will not be repeated here.

[0180] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0181] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0182] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0183] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.

[0184] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0185] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.

[0186] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device 100 to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device 100 to display images.

[0187] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0188] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.

[0189] 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 structural 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.

[0190] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0191] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

[0192] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0193] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0194] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0195] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.

[0196] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, frequency modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 2.

[0197] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

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

[0199] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be manufactured using organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), miniled, microLEDs, micro-OLEDs, quantum dot light-emitting diodes (QLEDs), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.

[0200] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0201] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. 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 the 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, the ISP can be set in the camera 193.

[0202] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0203] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.

[0204] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0205] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0206] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM).

[0207] Random access memory can include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, fifth generation DDR SDRAM is generally called DDR5 SDRAM), etc.

[0208] Non-volatile memory can include disk storage devices and flash memory.

[0209] Flash memory can be classified according to its operating principle, including NOR FLASH, NAND FLASH, 3D NAND FLASH, etc.; according to the level of the storage cell, including single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc.; and according to the storage specification, including universal flash storage (UFS) and embedded multimedia card (eMMC), etc.

[0210] The random access memory can be directly read and written by the processor 110. It can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data.

[0211] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 110.

[0212] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.

[0213] In this embodiment, the aforementioned memory can be used to store the execution code that implements the touch recognition method provided in this application, such as the code described above. Figure 4 , Figure 5 and Figure 7 The execution code of the method shown.

[0214] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0215] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0216] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.

[0217] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.

[0218] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.

[0219] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.

[0220] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, 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 180A, 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 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, 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 an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.

[0221] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shake of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 100 by moving in the opposite direction, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing game scenarios.

[0222] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.

[0223] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic flip unlocking can be set.

[0224] The 180E accelerometer can detect the magnitude of acceleration of electronic device 100 in various directions (typically three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic devices and applied to applications such as screen orientation switching and pedometers.

[0225] A distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser. In some embodiments, during a shooting scene, electronic device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.

[0226] The proximity sensor 180G 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 sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 may use the proximity sensor 180G to detect when a user holds the electronic device 100 close to their ear for a call, so as to automatically turn off the screen to save power. The proximity sensor 180G can also be used in holster mode and pocket mode for automatic unlocking and locking of the screen.

[0227] The ambient light sensor 180L is used to sense the brightness of ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 based on the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also work with the proximity sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0228] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.

[0229] Temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 uses the temperature detected by temperature sensor 180J to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs thermal protection by reducing the performance of a processor located near temperature sensor 180J to reduce power consumption. In other embodiments, when the temperature is below another threshold, electronic device 100 heats battery 142 to prevent abnormal shutdown of electronic device 100 due to low temperature. In still other embodiments, when the temperature is below yet another threshold, electronic device 100 boosts the output voltage of battery 142 to prevent abnormal shutdown due to low temperature.

[0230] Touch sensor 180K, also known as a "capacitive touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor 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 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.

[0231] In this embodiment, the touch sensor 180K constitutes the capacitive touch panel 12 mentioned above. For a detailed description of the structure and working principle of the capacitive touch panel 12, please refer to the relevant description above, which will not be repeated here.

[0232] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from the vibrating bone segments of the human vocal cords. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor 180M can also be incorporated into headphones to form bone conduction headphones. The audio module 170 can parse the voice signals from the vibrating bone segments of the vocal cords acquired by the bone conduction sensor 180M to realize voice functionality. The application processor can parse heart rate information from the blood pressure signals acquired by the bone conduction sensor 180M to realize heart rate detection functionality.

[0233] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.

[0234] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.

[0235] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.

[0236] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0237] It should be understood that the steps in the above-described method embodiments provided in this application can be implemented 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 implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.

[0238] This application also provides an electronic device that may include a memory and a processor. The memory may be used to store a computer program; the processor may be used to invoke the computer program in the memory to cause the electronic device to perform the method in any of the above embodiments.

[0239] This application also provides a chip system including at least one processor for implementing the functions involved in the methods performed by the electronic device in any of the above embodiments.

[0240] In one possible design, the chip system also includes a memory for storing program instructions and data, which may be located within or outside the processor.

[0241] The chip system can consist of chips or include chips and other discrete components.

[0242] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.

[0243] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application embodiment does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application embodiment does not specifically limit the type of memory or the arrangement of the memory and processor.

[0244] For example, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0245] This application also provides a computer program product comprising: a computer program (also referred to as code or instructions) that, when run, causes a computer to perform the method executed by the electronic device in any of the above embodiments.

[0246] This application also provides a computer-readable storage medium storing a computer program (also referred to as code or instructions). When the computer program is run, it causes the computer to perform the method executed by the electronic device in any of the above embodiments.

[0247] The various embodiments of this application can be combined arbitrarily to achieve different technical effects.

[0248] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive).

[0249] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0250] In summary, the above description is merely an embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made according to the disclosure of the present invention should be included within the scope of protection of the present invention.

Claims

1. A touch recognition method, characterized in that, The method is applied to an electronic device including a capacitive touch panel, and the method includes: Obtain a capacitance array, wherein the capacitance array includes the capacitance of multiple detection points in the capacitive touch panel; Based on the capacitor array satisfying the first and third conditions, it is determined that a hand and water have come into contact with the capacitive touch panel; the first condition includes: there is a capacitor in the capacitor array with a value greater than a first value, and the number of capacitors with a value greater than a second value is greater than a third value, wherein the first value is greater than the second value; the third condition includes: there is a capacitor in the capacitor array with a value less than a fourth value, and the number of capacitors with a value less than a fifth value is greater than a sixth value, wherein the fourth value is less than the fifth value; In the capacitor array, determine one or more capacitors within a preset range centered on a capacitor with a value greater than the seventh value, wherein the seventh value is greater than the first value; The capacitors within the preset range that satisfy the second condition are taken as the capacitors within the target range that the hand touches. The second condition includes: among the capacitors within the preset range centered on the capacitors with a value greater than the seventh value, the number of capacitors with a value less than the eighth value is not greater than the ninth value. The touch position of the hand is obtained based on the capacitance within the target range.

2. The method according to claim 1, characterized in that, The method for obtaining the touch position of the hand based on the capacitance within the target range specifically includes: using a centroid algorithm to obtain the touch position of the hand based on the capacitance within the target range.

3. The method according to claim 1 or 2, characterized in that, The method further includes: If it is determined that the capacitive touch panel is wet and there is no hand contact, the touch position of the water will not be acquired.

4. The method according to claim 1, characterized in that, The method further includes: If it is determined that the capacitive touch panel is wet and has not been touched by hand, then the capacitor array is filtered out.

5. The method according to claim 1, characterized in that, The method further includes: If it is determined that the capacitive touch panel is dry and a hand is in contact with it, the touch position of the hand is obtained based on the capacitor array.

6. The method according to claim 1, characterized in that, The method further includes: The handwriting corresponding to the touch position is displayed on the screen corresponding to the touch position; Alternatively, the task corresponding to the control displayed at the touch location can be executed.

7. The method according to claim 1, characterized in that, The touch location includes the location of one or more detection points.

8. An electronic device, characterized in that, The electronic device includes a capacitive touch panel, a memory, and one or more processors; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the electronic device to perform the method as described in any one of claims 1-7.

9. A chip, said chip being used in an electronic device, characterized in that, The chip includes one or more processors, the processors being configured to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1-7.