Touch detection method, device, storage medium, and program product
By detecting abnormal posture and capacitance of electronic devices, the problem of accidental touches caused by charging and electrostatic interference in capacitive touchscreens has been solved, thus reducing the probability of accidental touches.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-11-27
- Publication Date
- 2026-05-29
AI Technical Summary
Capacitive touchscreens are susceptible to interference from factors such as charging and static electricity, leading to accidental touch problems such as "ghost touch" and "notion not disappearing," which affect the functionality of electronic devices and the user experience.
By detecting the posture of electronic devices and abnormal capacitance of the touch screen, it is determined whether there is a false touch. If the touch screen is facing down and the capacitance is abnormal, the reporting of touch events is stopped or the abnormal capacitance changes are filtered to reduce the probability of false touch.
While avoiding any impact on user experience, this effectively reduces the probability of accidental touches and ensures the normal operation of electronic devices.
Smart Images

Figure CN122111248A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a touch detection method, device, storage medium, and program product. Background Technology
[0002] With the continuous development of terminal technology, electronic products are being updated at an increasingly rapid pace. Among electronic products, capacitive touchscreens are commonly used in devices such as mobile phones and tablets. These devices detect user touch operations based on changes in the capacitance of their touchscreens. However, the capacitance changes of capacitive touchscreens are easily affected by factors such as charging and static electricity, which can lead to false touch problems such as "ghost touches" and "undisappeared touch detection." These issues can seriously affect the functionality of electronic devices and the user experience. Summary of the Invention
[0003] This application provides a touch detection method, device, storage medium, and program product, which can reduce the probability of accidental touches. The technical solution is as follows:
[0004] Firstly, a touch detection method is provided for an electronic device, the electronic device including a capacitive touchscreen, the touchscreen including multiple sensing capacitors. In this method, first capacitance data of the touchscreen is acquired, the first capacitance data including the capacitance change of each sensing capacitor in the touchscreen; the orientation of the electronic device is determined; if the orientation of the electronic device is touchscreen-down and if there is an abnormal capacitance condition on the touchscreen, then it is determined that no touch operation was detected, or a touch operation is detected based on the non-abnormal capacitance change in the first capacitance data.
[0005] If the electronic device is positioned with the touchscreen facing down and there are abnormal capacitance values on the touchscreen, it indicates that the user is likely not using the device but is prone to accidental touches. Therefore, in this scenario, the electronic device can either stop reporting touch events directly or filter out abnormal capacitance changes in the initial capacitance data before performing touch detection. This reduces the probability of accidental touches and ensures the normal operation of the electronic device while minimizing disruption to the user experience.
[0006] Optionally, the capacitance anomaly refers to a situation where all capacitance values in the original capacitance data of the touchscreen are greater than or equal to a preset capacitance value. In this case, if the electronic device is positioned with the touchscreen facing down and if the touchscreen exhibits a capacitance anomaly, the operation to determine that no touch operation was detected can be as follows: if the electronic device is positioned with the touchscreen facing down, and all capacitance values in the original capacitance data of the touchscreen are greater than or equal to the preset capacitance value, then it is determined that no touch operation was detected. This original capacitance data includes the capacitance value of each sensing capacitor in the touchscreen.
[0007] The preset capacitance value is used to determine whether the touchscreen of an electronic device is currently in complete contact with air.
[0008] As an example, a preset capacitance value is used to distinguish whether the touchscreen of an electronic device is in contact with air or with the surface of a certain type of object.
[0009] In this scenario, if the electronic device is positioned with the touchscreen facing down and exposed to air rather than resting on a surface of such an object, then theoretically, most of the capacitance values in the touchscreen's original capacitance data should be less than the preset capacitance value. Conversely, if the electronic device is positioned with the touchscreen facing down and resting on a surface of such an object, then theoretically, all capacitance values in the touchscreen's original capacitance data should be greater than or equal to the preset capacitance value.
[0010] As another example, the preset capacitance value is used to distinguish whether the touch screen of an electronic device is very close to a conductive object, i.e., whether it is placed directly on a conductive object or on an insulating pad on a conductive object.
[0011] In this scenario, if the electronic device is positioned with the touchscreen facing down and exposed to air, neither placed on a conductive object nor on an insulating pad, then theoretically most of the capacitance values in the touchscreen's original capacitance data should be less than the preset capacitance value. Conversely, if the electronic device is positioned with the touchscreen facing down and placed directly on a conductive object or on an insulating pad, then theoretically all capacitance values in the touchscreen's original capacitance data should be greater than or equal to the preset capacitance value.
[0012] If the electronic device is positioned with the touchscreen facing down and all capacitance values in the touchscreen's raw capacitance data are greater than or equal to a preset capacitance value, it indicates that the electronic device is upside down on some kind of object. In this case, the user is likely not using the electronic device but is prone to accidental touches. Therefore, in this scenario, the electronic device can directly stop reporting touch events. This reduces the probability of accidental touches while minimizing disruption to the user experience, ensuring the normal operation of the electronic device.
[0013] Optionally, the operation of obtaining the first capacitance data of the touch screen can be as follows: obtaining the original capacitance data of the touch screen, which includes the capacitance value of each sensing capacitor in the touch screen; obtaining the differential capacitance data of the touch screen based on the original capacitance data and the reference capacitance data, which includes the reference value of each sensing capacitor in the touch screen and the differential capacitance data includes the capacitance change of each sensing capacitor in the touch screen; and obtaining the first capacitance data of the touch screen based on the differential capacitance data of the touch screen.
[0014] Compared to the differential capacitance data, the first capacitance data can better highlight the capacitance changes caused by touch.
[0015] Optionally, the capacitance anomaly refers to an abnormal capacitance change in the capacitance difference data. In this case, after acquiring the capacitance difference data of the touchscreen, the electronic device can further determine the abnormal capacitance change in the capacitance difference data and obtain an anomaly data marker based on the abnormal capacitance change in the capacitance difference data.
[0016] Abnormal capacitance changes refer to capacitance values that are likely caused by interference from factors such as charging or static electricity.
[0017] This anomalous data marker is used to mark the index position of the anomalous capacitance change in the differential capacitance data.
[0018] It should be noted that, under normal circumstances, the capacitance changes in the differential capacitance data of a touchscreen are all relatively small in absolute value, and can be both positive and negative. However, in abnormal situations caused by factors such as the reference capacitance data not being updated in a timely manner, or interference from charging or static electricity, some negative values with relatively large absolute values may appear in the differential capacitance data of the touchscreen. Therefore, in this application, the negative values with relatively large absolute values appearing in the touchscreen can be regarded as abnormal capacitance changes.
[0019] Based on this, when the differential capacitance data of the touch screen is a differential data matrix, the operation of determining the abnormal capacitance change in the differential capacitance data can be as follows: determine the abnormal element in the differential data matrix based on one or more of the characteristics of elements in the same row, elements in the same column, row and column elements, adjacent row elements, and adjacent column elements. The abnormal element is the abnormal capacitance change in the differential capacitance data.
[0020] It should be noted that after identifying the outlier elements in the difference data matrix, the index information of the outlier elements can also be obtained as an outlier data marker. This outlier element index information can include the index of each outlier element among all the outlier elements in the difference data matrix.
[0021] Optionally, the operation of determining abnormal elements in the difference data matrix based on one or more of the following characteristics: features of elements in the same row, features of elements in the same column, features of elements in a row and a column, features of elements in adjacent rows, and features of elements in adjacent columns, can be as follows: If at least *a* consecutive elements in the same row of the difference data matrix are negative and the absolute values of these at least *a* elements are all greater than or equal to a first threshold, then these at least *a* elements are determined to be abnormal elements, where *a* is an integer greater than or equal to 2; and / or, if at least *b* consecutive elements in the same column of the difference data matrix are negative and the absolute values of these at least *b* elements are all greater than or equal to a second threshold, then these at least *b* elements are determined to be abnormal elements, where *b* is an integer greater than or equal to 2; and / or, if at least *c* consecutive elements in the same row of the difference data matrix are negative and the absolute values of these at least *c* elements are greater than or equal to a second threshold, then these at least *c* elements are determined to be abnormal elements. If the difference data matrix contains at least d consecutive negative elements in the same column, and the absolute values of these at least d elements are all greater than or equal to the fourth threshold, then the at least c elements and the at least d elements are determined to be anomalous elements, where c and d are integers greater than or equal to 1 and the other is an integer greater than or equal to 2; and / or, if the difference data matrix contains at least e consecutive negative elements in a row, and the difference between these at least e elements and the elements in the adjacent row is greater than or equal to the fifth threshold, then the at least e elements are determined to be anomalous elements, where e is an integer greater than or equal to 2; and / or, if the difference data matrix contains at least f consecutive negative elements in a column, and the difference between these at least f elements and the elements in the adjacent column is greater than or equal to the sixth threshold, then the at least f elements are determined to be anomalous elements, where f is an integer greater than or equal to 2.
[0022] Optionally, if the electronic device is in the position of the touchscreen facing down and if there is a capacitance abnormality in the touchscreen, the operation of detecting touch operation based on the non-abnormal capacitance change in the first capacitance data can be as follows: if the electronic device is in the position of the touchscreen facing down and if the abnormal data marker is obtained, then determine the abnormal capacitance change in the first capacitance data based on the abnormal data marker; detect touch operation based on the capacitance change in the first capacitance data other than the abnormal capacitance change.
[0023] As an example, the operation of determining the abnormal capacitance change in the first capacitance data based on the abnormal data marker can be as follows: determine the target capacitance change corresponding to the abnormal data marker in the first capacitance data of the touch panel as the abnormal capacitance change. The target capacitance change is the capacitance change indexed in the first capacitance data based on the abnormal data marker.
[0024] As another example, the operation of determining the abnormal capacitance change in the first capacitance data based on the abnormal data marker can be as follows: determine the target capacitance change corresponding to the abnormal data marker in the first capacitance data; for any target capacitance change in the first capacitance data, if the target capacitance change is less than the second capacitance change threshold, then determine that the target capacitance change is an abnormal capacitance change; otherwise, determine that the target capacitance change is not an abnormal capacitance change.
[0025] It should be noted that a larger second capacitance change threshold results in stronger anti-interference capability, but also a greater impact on the original touch detection process; conversely, a smaller second capacitance change threshold results in weaker anti-interference capability, but a smaller impact on the original touch detection process. Technicians can choose a suitable second capacitance change threshold that balances these two aspects.
[0026] In one possible implementation, if the electronic device is in a position where the touchscreen is facing down and if there is an abnormal capacitance condition on the touchscreen, then it is determined that no touch operation was detected. Alternatively, the operation of detecting a touch operation based on the non-abnormal capacitance change in the first capacitance data can be as follows: if the electronic device is in a position where the touchscreen is facing down, the state of the electronic device meets preset conditions, and there is an abnormal capacitance condition on the touchscreen, then it is determined that no touch operation was detected. Alternatively, the operation of detecting a touch operation based on the non-abnormal capacitance change in the first capacitance data can be as follows.
[0027] The state of an electronic device may include one or more of the following: the duration of inactivity of the electronic device, the duration of screen illumination of the electronic device, etc.
[0028] The preset conditions may include one or more of the following: the idle time of the electronic device is greater than or equal to the first duration, and the screen-on time of the electronic device is greater than or equal to the second duration.
[0029] The static duration of an electronic device refers to the duration during which the electronic device remains stationary after changing from a moving state to a stationary state.
[0030] The screen-on time of an electronic device refers to the duration of time the screen remains on after the electronic device changes from a screen-off state to a screen-on state.
[0031] It should be noted that if the electronic device is positioned with the touchscreen facing down and the static duration of the electronic device is greater than or equal to a first duration, it indicates that the user is highly unlikely to be using the electronic device. Therefore, this application can determine that no touch operation was detected when the electronic device is positioned with the touchscreen facing down, the static duration of the electronic device is greater than or equal to a first duration, and there is an abnormal capacitance condition on the touchscreen, or detect touch operation based on the non-abnormal capacitance change in the first capacitance data. This can minimize the impact on user experience.
[0032] In addition, when an electronic device changes from a screen-off state to a screen-on state, the capacitance value of the sensing capacitor in the touch panel may have some errors due to the power-on effect of the display screen. Therefore, this application can determine that no touch operation was detected when the electronic device is in the position of the touch screen facing down and the screen-on duration of the electronic device is greater than or equal to the second duration, and when there is an abnormal capacitance condition of the touch screen, or detect the touch operation based on the non-abnormal capacitance change in the first capacitance data, so as to achieve more accurate touch detection.
[0033] Secondly, a touch detection device is provided, which has the function of implementing the touch detection method described in the first aspect. The touch detection device includes at least one module for implementing the touch detection method provided in the first aspect.
[0034] Thirdly, an electronic device is provided, comprising: one or more processors, and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, wherein the one or more processors invoke the computer instructions to cause the electronic device to perform the touch detection method provided in the first aspect.
[0035] Fourthly, a chip system is provided for use in an electronic device, the chip system including one or more processors, the one or more processors being used to invoke computer instructions to cause the electronic device to perform the touch detection method provided in the first aspect.
[0036] Fifthly, a computer-readable storage medium is provided, the computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform the touch detection method provided in the first aspect.
[0037] In a sixth aspect, a computer program product is provided that, when the computer program product is run on an electronic device, causes the electronic device to perform the touch detection method provided in the first aspect.
[0038] The technical effects achieved by the second, third, fourth, fifth, and sixth aspects mentioned above are similar to those achieved by the corresponding technical means in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0039] Figure 1 This is a schematic diagram of the appearance of an electronic device provided in an embodiment of this application.
[0040] Figure 2 This is a schematic diagram of the cross-sectional structure of a touch screen along the third direction Z provided in an embodiment of this application.
[0041] Figure 3 This is a schematic diagram of the structure of a touch panel provided in an embodiment of this application.
[0042] Figure 4 This is a schematic diagram of a structure of multiple first electrode strips provided in an embodiment of this application.
[0043] Figure 5 This is a schematic diagram of a structure of multiple second electrode strips provided in an embodiment of this application.
[0044] Figure 6 This is a schematic diagram of an inductive capacitor provided in an embodiment of this application.
[0045] Figure 7 This is a scene diagram of a user touching a touch screen of an electronic device, provided in an embodiment of this application.
[0046] Figure 8 This is a schematic diagram of the magnetic field of an induced capacitor formed by a first electrode and a second electrode, provided in an embodiment of this application.
[0047] Figure 9 This is a circuit discharge diagram of an electronic device with its touchscreen facing upwards, provided in an embodiment of this application.
[0048] Figure 10 This is a schematic diagram of circuit discharge when the touch screen of an electronic device is placed face down, according to an embodiment of this application.
[0049] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0050] Figure 12 This is a block diagram of a software system for an electronic device provided in an embodiment of this application.
[0051] Figure 13 This is a block diagram of a software system for another electronic device provided in an embodiment of this application.
[0052] Figure 14 This is a flowchart of a touch detection method provided in an embodiment of this application.
[0053] Figure 15 This is a flowchart of another touch detection method provided in the embodiments of this application.
[0054] Figure 16 This is a schematic diagram illustrating the placement of a touchscreen in an electronic device according to an embodiment of this application.
[0055] Figure 17 This is a flowchart of another touch detection method provided in the embodiments of this application.
[0056] Figure 18 This is a flowchart of another touch detection method provided in the embodiments of this application.
[0057] Figure 19 This is a schematic diagram of differential capacitance data for a touch panel provided in an embodiment of this application.
[0058] Figure 20 This is a schematic diagram of differential capacitance data for another touch panel provided in an embodiment of this application.
[0059] Figure 21 This is a schematic diagram of differential capacitance data for another touch panel provided in an embodiment of this application.
[0060] Figure 22 This is a schematic diagram of differential capacitance data for another touch panel provided in an embodiment of this application.
[0061] Figure 23 This is a schematic diagram of differential capacitance data for another touch panel provided in an embodiment of this application.
[0062] Figure 24 This is a schematic diagram of differential capacitance data for another touch panel provided in an embodiment of this application.
[0063] Figure 25 This is a flowchart of another touch detection method provided in the embodiments of this application.
[0064] Figure 26 This is a flowchart of another touch detection method provided in the embodiments of this application. Detailed Implementation
[0065] In the following description, specific details such as particular system architectures and technologies are set forth for illustrative purposes and not for limiting purposes, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details.
[0066] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0067] It should be understood that "one or more" as mentioned in this application refers to one, two, or more, and "multiple" as mentioned in this application refers to two or more. In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone.
[0068] To facilitate a clear description of the technical solutions of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" do not necessarily imply that they are different.
[0069] The terms "one embodiment" or "some embodiments" used in this application mean that one or more embodiments of this application include the specific features, structures, or characteristics described in that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this application do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.
[0070] The electronic devices involved in the embodiments of this application will be described below.
[0071] The embodiments of this application can be applied to electronic devices. For example, the electronic device may be a mobile phone, tablet computer, laptop computer, wearable device, e-reader, in-vehicle device, digital camera, augmented reality (AR) device, virtual reality (VR) device, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), laptop computer, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical care, wireless terminal in smart grid, wireless terminal in transportation safety, wireless terminal in smart city, wireless terminal in smart home, etc. The embodiments of this application do not limit the form of the electronic device.
[0072] For example, Figure 1 This is a schematic diagram of the appearance of an electronic device 10 provided in an embodiment of this application. Figure 1 The electronic device 10 shown is a mobile phone. It should be understood that the embodiments in this application are only for illustrative purposes. Figure 1 The appearance shown is provided as an example. When the electronic device 10 is a device other than a mobile phone, the appearance of the electronic device 10 may also be different. Figure 1 The appearance shown does not constitute a limitation on the appearance of the electronic device 10.
[0073] like Figure 1 As shown, the electronic device 10 may include a touch screen 101. Figure 2 This is a schematic cross-sectional view of a touchscreen 101 along a third direction Z, as provided in an embodiment of this application. The third direction Z refers to the thickness direction of the touchscreen 101. For ease of description, a first direction X and a second direction Y are also defined here. Both the first direction X and the second direction Y are extension directions of the touchscreen 101. The first direction X, the second direction Y, and the third direction Z are perpendicular to each other.
[0074] like Figure 2As shown, the touchscreen 101 includes a stacked touch panel (TP) 11 and a display panel 12. The touch panel 11 is used to detect touch operations performed by a user on the touch panel 11. The display panel 12 is used to provide visual output related to the touch operation. It is readily understood that the third direction Z is also the thickness direction of the touch panel 11 and the display panel 12, and the first direction X and the second direction Y are also the extension directions of the touch panel 11 and the display panel 12.
[0075] In this embodiment, the touch panel 11 can be a mutual capacitance touch panel or a self-capacitance touch panel.
[0076] The following explanation uses a mutual capacitance touch panel as an example to illustrate the structure of the touch panel 11 and the principle by which the touch panel 11 detects the user's touch operation on the touch panel 11.
[0077] 1. The structure of the touch panel 11.
[0078] Figure 3 This is a schematic diagram of the structure of a touch panel 11 provided in an embodiment of this application. Figure 3 As shown, the touch panel 11 includes multiple first electrode strips 13 and multiple second electrode strips 14. The structure of the multiple first electrode strips 13 is as follows: Figure 4 As shown, the structure of the multiple second electrode strips 14 is as follows: Figure 5 As shown. The plurality of first electrode strips 13 and the plurality of second electrode strips 14 are insulated from each other.
[0079] exist Figure 3 and Figure 4 The illustrated structure exemplarily shows eight first electrode strips 13, namely 13a, 13b, 13c, 13d, 13e, 13f, 13g, and 13h. Each first electrode strip 13 extends along a first direction X, and the plurality of first electrode strips 13 are arranged along a second direction Y. Here, the plurality of first electrode strips 13 include a plurality of first electrodes 131 and a plurality of first connectors 132. The plurality of first electrodes 131 are arranged in a... Figure 4 The array arrangement is shown. Along the first direction X, two adjacent first electrodes 131 are connected by a first connector 132, thereby forming a plurality of first electrode strips 13.
[0080] exist Figure 3 and Figure 5The illustrated structure exemplarily shows eight second electrode strips 14, namely 14a, 14b, 14c, 14d, 14e, 14f, 14g, and 14h. Each second electrode strip 14 extends along a second direction Y, and the plurality of second electrode strips 14 are arranged along a first direction X. Here, the plurality of second electrode strips 14 include a plurality of second electrodes 141 and a plurality of second connectors 142. The plurality of second electrodes 141 are arranged in a... Figure 5 The array arrangement is shown. Along the second direction Y, two adjacent second electrodes 141 are connected by a second connector 142, thereby forming a plurality of second electrode strips 14.
[0081] like Figure 3 As shown, the arrangement of the plurality of first electrode strips 13 and the plurality of second electrode strips 14 is such that, along the third direction Z, any first connector 132 in each first electrode strip 13 is intersected with a second connector 142 in one of the second electrode strips 14. In this way, each of the plurality of first electrodes 131 is located between the plurality of second electrodes 141, and each of the plurality of second electrodes 141 is located between the plurality of first electrodes 131.
[0082] based on Figures 3 to 5 In the structure shown, in the touch panel 11, any one of the first electrodes 131 can form a sensing capacitor with an adjacent second electrode 141. That is, multiple first electrodes 131 and multiple second electrodes 141 will form multiple sensing capacitors. For example, Figure 6 yes Figure 3 A magnified view of the structure of region A in the middle. (See attached image.) Figure 6 As shown, in Figure 3 Region A includes two first electrodes 131 and two second electrodes 141. For ease of description, the two first electrodes 131 are referred to as first sub-electrode 1311 and second sub-electrode 1312, respectively, and the two second electrodes 141 are referred to as third sub-electrode 1411 and fourth sub-electrode 1412, respectively. The first sub-electrode 1311 and the third sub-electrode 1411 form a first induced capacitor C1; the first sub-electrode 1311 and the fourth sub-electrode 1412 form a second induced capacitor C2; the second sub-electrode 1312 and the fourth sub-electrode 1412 form a third induced capacitor C3; and the second sub-electrode 1312 and the third sub-electrode 1411 form a fourth induced capacitor C4.
[0083] 2. The principle of touch panel 11 detecting touch operations.
[0084] The electronic device 10 may include a touch chip (integrated circuit, IC), which is connected to all the first electrodes 131 and second electrodes 141, and is used to input drive signals to the first electrodes 131 and detect the capacitance value of the sensing capacitor through the second electrodes 141.
[0085] Figure 7 This is a scene diagram of a touchscreen 101 of a user touch electronic device 10 provided in an embodiment of this application. The inductive capacitance formed by the first electrode 131 and the second electrode 141 located at the user's touch position in the touchscreen 101 is called capacitor CM. Then, when the user does not touch this position, the magnetic field formed by capacitor CM can be as follows... Figure 8 As shown in Figure (a), in this case, capacitor CM has a first capacitance value. When the user touches this location, the magnetic field formed by capacitor CM and the human body can be as follows: Figure 8 As shown in Figure (b), since the human body is a conductor, it forms a new capacitor CT with the first electrode 131. This changes the capacitance value of capacitor CM, causing it to change from a first capacitance value to a second capacitance value. Based on this, the change in the capacitance value of capacitor CM can reflect whether the user has touched the location of capacitor CM.
[0086] Based on the above principle, within one detection cycle of the touch panel 11, the touch IC can input drive signals to each of the multiple first electrode strips 13 sequentially. Here, "one detection cycle" refers to the time required for the touch IC to input a drive signal to each of the first electrode strips 13 in the touch panel 11 exactly once. Generally, the touch panel 11 has multiple detection cycles within one second. When inputting a drive signal to any one of the first electrode strips 13, the touch IC can detect the capacitance value of each of the multiple sensing capacitors formed by each of the multiple second electrode strips 14. Therefore, at the end of one detection cycle, the touch IC can obtain the capacitance value of each of all the sensing capacitors in the touch panel 11, and thereby detect whether a touch operation has occurred.
[0087] It should be noted that the above is only based on Figures 3 to 6 The structure shown is used as an example to illustrate the structure of the mutual capacitance type touch panel 11. In actual applications, the mutual capacitance type touch panel 11 can also be other structures, as long as it can form multiple sensing capacitors. This application embodiment does not limit this.
[0088] Furthermore, the above description is merely an example of the structure of the touch panel 11 and the principle of its touch operation detection based on the mutual capacitance touch panel. The structure of the self-capacitance touch panel and the principle of its touch operation detection are similar and will not be repeated here.
[0089] It should be noted that the touchscreen 101 in this embodiment can also be referred to as the screen of the electronic device 10. It should be understood that in this embodiment, user touch of the screen is not limited to the user's finger touching the screen; it can also be the user's knuckles or other body parts touching the screen. The embodiments in this application are illustrated only using the example of the user's finger touching the screen.
[0090] Understandably, whether it's a mutual capacitance type touch panel 11 or a self-capacitance type touch panel 11, the touch panel 11 includes multiple sensing capacitors, and these multiple sensing capacitors are arranged in multiple rows and columns. The touch IC can acquire the capacitance value of each of these multiple sensing capacitors in each detection cycle. In this embodiment, the capacitance values of the multiple sensing capacitors acquired by the touch IC in one detection cycle can be collectively referred to as a frame of raw capacitance data, which can be used to detect whether a touch operation exists in that frame.
[0091] The capacitance of the sensing capacitor in the touch panel 11 changes with the adjacent medium; the capacitance is very small when the medium is air and very large when the medium is metal. Generally, when the electronic device 10 is grounded, the capacitance at the touch location when a hand touches the screen is approximately 800 picofarads to 3000 picofarads; when the electronic device 10 is floating, the capacitance at the touch location when a hand touches the screen is approximately 800 picofarads to 2500 picofarads. Here, "floating" means the electronic device 10 is not connected to a charger, and "grounded" means the electronic device 10 is connected to a charger.
[0092] In some cases, when the touchscreen 101 of the electronic device 10 is placed face down directly on a conductive object or on an insulating pad on a conductive object, the capacitance value of the sensing capacitor in the touch panel 11 increases because the touch panel 11 is very close to the conductive object. If the electronic device 10 is charging or is affected by factors such as static electricity, the capacitance value of the sensing capacitor in the touch panel 11 will increase further. This can easily lead to accidental touch problems such as "ghost touch" and "not disappearing touch detection," seriously affecting the functionality and user experience of the electronic device 10.
[0093] "Ghost hand" refers to a situation where a non-human hand touches the screen, yet the effect is the same as a human hand touching the screen. For example, an application opens its interface on its own even though the user's hand hasn't touched the screen. Generally, "ghost hand" disappears quickly after it appears and does not affect normal use.
[0094] Among them, "the reporting point does not disappear" means that when the "ghost hand" appears, it continues to exist without disappearing while the screen is on. At this time, touching the screen with a human hand will not have any effect. Normal use can only be restored after the screen is turned off and then on again.
[0095] In this embodiment, "touchscreen 101 facing upward" means that the touchscreen 101 is facing the opposite direction to the ground, at which point the touchscreen 101 is at the highest point of the electronic device 10. "Touchscreen 101 facing downward" means that the touchscreen 101 is facing the ground, at which point the touchscreen 101 is at the lowest point of the electronic device 10.
[0096] The following is combined with Figure 9 and Figure 10 The following examples illustrate the cases where the touchscreen 101 of the electronic device 10 is placed facing upwards and downwards:
[0097] When the touchscreen 101 of the electronic device 10 is placed facing upwards, the touchscreen 101 is at the highest point of the electronic device 10. In this case, even if there is interference such as charging or static electricity, the interference current will dissipate along the metal frame of the electronic device 10 to the bottom, and will have little impact on the capacitance value of the sensing capacitor in the touch panel 11 of the top touchscreen 101.
[0098] like Figure 9 As shown, when the touchscreen 101 of the electronic device 10 is placed face up on an insulating pad on an iron plate, static electricity is released through an electrostatic gun at the gap between the touchscreen 101 and the metal frame. The static electricity breaks down the adhesive between the touchscreen 101 and the metal frame, directly hitting the metal frame. Then, the interference current flows along the metal frame through the coupling capacitor between it and the iron plate to the iron plate, and then discharges to the ground. During this process, the touchscreen 101 at the top is minimally affected.
[0099] However, when the touchscreen 101 of the electronic device 10 is placed face down, the touchscreen 101 is at the lowest point of the electronic device 10. In this case, if there is interference such as charging or static electricity, the interference current will leak along the metal frame of the electronic device 10 to the bottom touchscreen 101, which will have a significant impact on the capacitance value of the sensing capacitor in the touch panel 11 of the touchscreen 101.
[0100] like Figure 10 As shown, when the touchscreen 101 of the electronic device 10 is placed face down on an insulating pad on an iron plate, static electricity is released at the battery cover of the electronic device 10 using an electrostatic gun. The static electricity will break through the adhesive between the battery cover and the metal frame, directly hitting the metal frame. Then, the interference current flows along the metal frame through the conductive foam to the copper foil on the touchscreen 101, and then through the coupling capacitor between the touchscreen 101 and the iron plate to the iron plate, before being discharged to the ground. During this process, the touchscreen 101 is at the bottom, and the interference current flows through it, making it significantly affected. When the impact reaches a certain level, false touch problems such as "ghost touch" and "undisappearing reported touches" will occur.
[0101] Therefore, this application provides a touch detection method that, when the touchscreen 101 of the electronic device 10 is facing down, determines whether touch operation needs to be detected and the specific method for detecting touch operation by checking whether the capacitance data of the touchscreen 101 is abnormal. This aims to minimize accidental touches caused by environmental factors or other interference when the touchscreen 101 of the electronic device 10 is facing down. The touch detection method provided in this application does not increase hardware costs and is simple to implement in software.
[0102] The electronic device 10 involved in the touch detection method provided in the embodiments of this application will be described next.
[0103] Figure 11 This is a schematic diagram of the structure of an electronic device 10 provided in an embodiment of this application. See also... Figure 11 The electronic device 10 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 143, a battery 144, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a 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 light 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.
[0104] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 10. In other embodiments of this application, the electronic device 10 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.
[0105] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, memory, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0106] The controller can serve as the nerve center and command center of the electronic device 10. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0107] 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 this memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves system efficiency.
[0108] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 10. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions, such as saving music, video, and other files on the external memory card.
[0109] Internal memory 121 can be used to store computer-executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 10 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback, image playback, etc.), etc. The data storage area may store data created by electronic device 10 during use (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0110] The wireless communication function of electronic device 10 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.
[0111] Electronic device 10 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.
[0112] Electronic device 10 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0113] Electronic device 10 can realize display functions through GPU, display screen 194 and application processor, etc.
[0114] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a minimized display, a micro-led display, a micro-oled display, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 10 may include one or N display screens 194, where N is an integer greater than 1.
[0115] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 10. In some embodiments, the angular velocity of the electronic device 10 about three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used in scenarios such as image stabilization, navigation, and motion-sensing games.
[0116] The accelerometer 180E can be used to detect the magnitude of acceleration in various directions (generally three axes) of the electronic device 10. When the electronic device 10 is stationary, the magnitude and direction of gravity can be detected. The accelerometer 180E can also be used to identify the attitude of the electronic device 10, and can be applied to applications such as screen orientation switching and pedometers.
[0117] Touch sensor 180K, also known as a "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. Touch sensor 180K 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 10, in a different position than display screen 194.
[0118] The software system of electronic device 10 will be described below.
[0119] The software system of electronic device 10 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to illustrate the software system of electronic device 10. It should be noted that although this application embodiment uses the Android system as an example, its basic principles are equally applicable to electronic devices based on operating systems such as iOS or Windows.
[0120] Figure 12 This is a block diagram of a software system for an electronic device 10 provided in an embodiment of this application. See also... Figure 12 A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into an application layer, an application framework layer, the Android runtime, a system layer, and a kernel layer.
[0121] The application layer can include a series of applications. For example... Figure 12As shown, the application layer can include applications such as camera, calendar, map, wireless local area networks (WLAN), music, SMS, gallery, call, navigation, Bluetooth, and video.
[0122] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0123] like Figure 12 As shown, the application framework layer may include an input manager service (IMS) and a power manager service (PMS).
[0124] IMS is used to handle input events, such as touch events. After receiving an input event reported by the input subsystem, IMS can send the input event to the corresponding application or system service.
[0125] The Power Management System (PMS) is used to manage the power-on and power-off of the display screen and can record the power mode. For example, if the PMS records the power mode as "On", it can power on the display screen; if the PMS records the power mode as "Off", it can power off the display screen.
[0126] like Figure 12 As shown, the application framework layer may also include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0127] The window manager manages window programs. It can obtain the screen size, determine the presence of a status bar, lock the screen, and capture the screen. The content provider stores and retrieves data, making it accessible to applications. This data can include videos, images, audio, incoming and outgoing calls, browsing history and bookmarks, and phone books. The view system includes visual controls, such as controls for displaying text and images. The view system can be used to build the application's display interface, which can consist of one or more views, such as a view displaying SMS notification icons, a view displaying text, and a view displaying images. The phone manager provides communication functions for the electronic device 10, such as managing call status (including connection and disconnection). The resource manager provides various resources for the application, such as localized strings, icons, images, layout files, and video files. The notification manager allows applications to display notifications in the status bar. These notifications can be used to convey informational messages and can disappear automatically after a short pause without user interaction. For example, the notification manager can be used to notify of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the system's top status bar, such as notifications from background applications. The notification manager can also display notifications as dialog boxes on the screen, such as text messages in the status bar, sound alerts, vibrations of electronic devices, and flashing indicator lights.
[0128] The Android Runtime comprises the core libraries and the virtual machine. The Android Runtime is responsible for the scheduling and management of the Android system. The core libraries consist of two parts: one part contains the functionalities that Java calls, and the other part is the core Android library itself. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0129] The system layer can include multiple functional modules, such as a surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), and 2D graphics engines (e.g., SGL). The surface manager manages the display subsystem and provides fusion of two-dimensional (2D) and three-dimensional (3D) layers for multiple applications. The media libraries support playback and recording of various common audio and video formats, as well as still image files. The media libraries can support various audio and video coding formats, such as Moving Picture Experts Group (MPEG) 4, H.264 (also known as Advanced Video Coding, AVC), Moving Picture Experts Group Audio Layer III (MP3), Advanced Audio Coding (AAC), Adaptive Multi-rate (AMR), Joint Photographic Experts Group (JPG), and Portable Network Graphics (PNG). 3D graphics processing libraries are used to implement 3D graphics drawing, image rendering, compositing, and layer processing. 2D graphics engines are drawing engines for 2D graphics.
[0130] The kernel layer is the layer between hardware and software. For example... Figure 12 As shown, the kernel layer may include an input subsystem, display driver, camera driver, audio driver, sensor driver, etc.
[0131] The input subsystem manages data from various input devices (such as buttons, touch sensors, etc.), and can convert the received input data into input events and report them to the IMS.
[0132] In some embodiments, such as Figure 13 As shown, the input subsystem may include an input event processing layer, an input core layer, and an input device driver layer.
[0133] The input device driver layer is used to access hardware devices, converting the underlying hardware's response data to the user into standard input events, which are then submitted to the input event processing layer through the input core layer. For example, the input device driver layer may include a touch driver.
[0134] The input core layer serves as a bridge between the input device driver layer and the input event handling layer. On the one hand, it provides the input device driver layer with interfaces for input device registration and operation; on the other hand, it notifies the input event handling layer to process the input events submitted by the input device driver layer.
[0135] The input event handling layer provides a unified access interface for user space and is responsible for processing input events submitted by the input device driver layer for use by the upper-layer IMS. In this embodiment, the kernel layer is located in kernel space, and other software layers (such as application layer, application framework layer, Android Runtime, and system layer) are located in user space.
[0136] In addition, such as Figure 13 As shown, the electronic device 10 may also include a hardware layer, which may include various hardware devices. For example, the hardware layer may include a touch screen, which may include a touch IC, a touch panel, and a display screen, etc.
[0137] The touch IC can acquire the capacitance data of the touch panel in each detection cycle and send it to the touch driver. The touch driver can determine whether a touch operation exists based on the capacitance data. When a touch operation exists, a corresponding touch event can be generated and submitted to the input event processing layer through the input core layer.
[0138] For example, the display screen may include a display driver integrated circuit (DDIC) and a display panel, with the DDIC controlling the image display on the display panel. The touch panel and the display panel can be stacked together.
[0139] Optionally, the hardware layer may also include gyroscope sensors, accelerometers, etc., but this application embodiment does not limit this.
[0140] Understandably, Figure 12 and Figure 13 The layers in the software system shown, and the functional modules included in each layer, do not constitute a specific limitation on the electronic device 10. In other embodiments of this application, the electronic device 10 may include more or fewer layers than shown, and each layer may include more or fewer functional modules; this application does not limit this.
[0141] The above embodiments of the electronic device 10, when performing touch detection, are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the electronic device 10 can be divided into different functional modules to complete all or part of the functions described above. In addition, the specific names of each functional module are only for easy distinction and are not intended to limit the protection scope of the embodiments of this application.
[0142] This application does not specifically limit the structure of the execution subject of the touch detection method. As long as the code containing the touch detection method provided in this application is run, the touch detection method can be processed according to the touch detection method provided in this application. For example, the execution subject of the touch detection method provided in this application can be a functional module in an electronic device that can call and execute a program, or it can be a processing device applied in an electronic device, such as a chip.
[0143] After describing the technical architecture involved in the embodiments of this application, the timing diagram of the touch detection method provided in the embodiments of this application is described in detail below.
[0144] Figure 14 This is a flowchart of a touch detection method provided in an embodiment of this application. See also... Figure 14 The method may include the following steps:
[0145] Step 1401: The touch IC acquires the raw capacitance data of the touch panel within the current detection cycle.
[0146] The raw capacitance data of the touch panel may include the capacitance value of each of the sensing capacitors in the touch panel.
[0147] In some embodiments, all the sensing capacitors in the touch panel are arranged in multiple rows and columns. Then, the raw capacitance data of the touch panel can be represented as a raw data matrix, where each element of the raw data matrix is the capacitance value of the sensing capacitor at the corresponding position.
[0148] For example, assuming all the sensing capacitors in the touch panel are arranged in 17 rows and 11 columns, then the original data matrix can be a matrix of 17 rows and 11 columns, and the element in the i-th row and j-th column of the original data matrix is the capacitance value of the sensing capacitor located in the i-th row and j-th column of the touch panel, where i and j are both positive integers.
[0149] It should be noted that the touch IC can obtain the capacitance value of each sensing capacitor in the touch panel during each detection cycle. In this way, the original capacitance data of the touch panel during the detection cycle can be obtained at the end of the detection cycle, and then steps 1402 to 1405 can be executed to perform touch detection.
[0150] Step 1402: The touch IC obtains the differential capacitance data of the touch panel based on the original capacitance data and the reference capacitance data of the touch panel.
[0151] The differential capacitance data of the touch panel can include the capacitance change of each of the sensing capacitors in the touch panel. The capacitance change of a single sensing capacitor in the differential capacitance data refers to the change in its capacitance value relative to a reference value.
[0152] The reference capacitance data includes the reference value of each of the sensing capacitors in the touch panel; that is, the capacitance value of each sensing capacitor in the touch panel when there is no touch operation. The reference values of all sensing capacitors in the touch panel can be the same or different.
[0153] In some embodiments, the capacitance characteristics of the touch panel may change due to variations in temperature, humidity or other environmental factors, or due to hardware aging, external interference (such as static electricity, screen stains, etc.). Therefore, during use, the touch IC can periodically update the reference capacitance data to ensure the accuracy and stability of touch detection.
[0154] For example, the touch IC can determine at least one frame of raw capacitance data that is flat (or stable) among the multiple frames of raw capacitance data acquired within the preset time interval every preset time interval, and then select the flattest frame of raw capacitance data from the flat at least one frame of raw capacitance data as the reference capacitance data.
[0155] The raw capacitance data frame here refers to the raw capacitance data of the touch panel obtained by the touch IC within one detection cycle.
[0156] The preset duration can be set in advance. For example, the preset duration can be greater than or equal to the detection period and less than or equal to 1 second.
[0157] There are several ways for a touch IC to determine whether a frame of raw capacitance data is flat. One possible method is for the touch IC to determine the standard deviation of all capacitance values in a frame of raw capacitance data. If the standard deviation is less than or equal to a preset value, the frame of raw capacitance data is determined to be flat; otherwise, it is determined that the frame of raw capacitance data is not flat. The preset value can be set in advance. For example, the preset value can be 0.1, 0.01, etc., and this embodiment does not limit this.
[0158] Of course, it is not limited to the above methods. The touch IC can also determine whether a frame of original capacitance data is flat in other ways. This application embodiment does not limit this.
[0159] In some embodiments, if the original capacitance data of the touch panel is an original data matrix, then the reference capacitance data can be a baseline data matrix, and the difference capacitance data can be a difference data matrix. The number of rows and columns of both the baseline data matrix and the difference data matrix are the same as the number of rows and columns of the original data matrix. The element in the i-th row and j-th column of the baseline data matrix represents the reference value of the sensing capacitance located in the i-th row and j-th column of the touch panel. The element in the i-th row and j-th column of the difference data matrix represents the capacitance change of the sensing capacitance located in the i-th row and j-th column of the touch panel.
[0160] For example, the touch IC can subtract the reference data matrix from the original data matrix to obtain the difference data matrix.
[0161] Step 1403: The touch IC obtains the first capacitance data of the touch panel based on the differential capacitance data of the touch panel.
[0162] The first capacitance data of the touch panel can include the capacitance change of each of the all sensing capacitors in the touch panel. Compared with the differential capacitance data, the first capacitance data can better highlight the capacitance change caused by touch.
[0163] For example, the touch IC can perform one or more of the following processes on the differential capacitance data: noise filtering, gain adjustment, data normalization, and data linearization, to convert the differential capacitance data into first capacitance data. Of course, the touch IC can also process the differential capacitance data in other ways to obtain the first capacitance data, and this application embodiment does not limit this.
[0164] Step 1404: The touch IC sends the first capacitance data of the touch panel to the touch driver.
[0165] The touch IC can send the first capacitance data of the touch panel to the touch driver, which then performs touch detection based on this data.
[0166] Step 1405: After receiving the first capacitance data of the touch panel, the touch driver detects the touch operation based on the first capacitance data.
[0167] When a touch operation occurs, the capacitance change at the touch location is greater than the capacitance change at other locations. Based on this, the touch driver can detect the touch operation according to the first capacitance data.
[0168] There are several ways for a touch driver to detect touch operations based on the first capacitance data. In one possible approach, the touch driver can determine whether there is a capacitance change in the first capacitance data whose absolute value is greater than or equal to a first capacitance change threshold. If the absolute value of each capacitance change in the first capacitance data is less than the first capacitance change threshold, then it is determined that no touch operation has been detected. If at least one capacitance change in the first capacitance data has an absolute value greater than or equal to the first capacitance change threshold, then it is determined that a touch operation has been detected, and a touch event is generated based on the capacitance changes in the first capacitance data whose absolute values are greater than or equal to the first capacitance change threshold. Of course, the touch driver can also detect touch operations based on the first capacitance data in other ways, and this application embodiment does not limit this approach.
[0169] The threshold value for the first capacitance change can be preset. For example, the threshold value for the first capacitance change can be 400 picofarads, 500 picofarads, 600 picofarads, etc., but this application embodiment does not limit it.
[0170] The touch event may include information such as the number of touch points, the location of the touch points, the state of the touch points, and timestamps, but this application embodiment does not limit this.
[0171] For example, after the touch driver generates a touch event, it can pass the touch event to the input event handling layer through the input core layer, and then the input event handling layer passes the touch event to IMS. IMS can then send the touch event to the corresponding application or system service for processing.
[0172] It should be noted that, in the above Figure 14 During the touch detection process described in the embodiments, when the touchscreen of the electronic device is facing down and placed on a conductive object or an insulating pad on a conductive object, interference from factors such as charging and static electricity may cause abnormal increases or decreases in the capacitance values of some sensing capacitors in the touch panel located at the lower part of the electronic device. This results in abnormalities in some capacitance values in the original capacitance data of the touch panel, which can easily lead to false touch problems such as "ghost touch" or "not disappearing touch report". To address this, the embodiments of this application provide the following... Figures 15 to 25 The touch detection method described in the embodiments aims to minimize the occurrence of such accidental touches.
[0173] In addition, from the above text Figure 14 As can be seen from the embodiments, the detection of touch operations depends on the first capacitance data, which in turn depends on the reference capacitance data. In some possible cases, when the touch screen of the electronic device is facing down and placed on a conductive object or an insulating pad on a conductive object, the capacitance values of all sensing capacitors in the touch panel will increase as a whole. That is, the original capacitance data of the touch panel will increase, and the reference capacitance data will also increase accordingly. In this way, the difference between the original capacitance data and the reference capacitance data remains almost constant, and false touch problems such as "ghost touch" or "not disappearing reported touch" will not occur. However, at the instant the electronic device is lifted from a conductive object or an insulating pad on a conductive object, the capacitance values of all sensing capacitors in the touch panel decrease as a whole. That is, the original capacitance data of the touch panel decreases. If the reference capacitance data has not yet been updated and remains the previously larger reference capacitance data, the difference between the original capacitance data and the reference capacitance data will increase. This can easily cause the absolute value of the capacitance change in the subsequently determined first capacitance data to reach the first capacitance change threshold, thus easily triggering the conditions for reporting a touch event. This can lead to false touch problems such as "ghost touch" or "reported touch not disappearing." The presence of interference factors such as charging and static electricity can exacerbate these false touch problems. Therefore, the embodiments of this application provide the following... Figures 18 to 25 The touch detection method described in the embodiments aims to minimize the occurrence of such accidental touches.
[0174] Figure 15 This is a flowchart of a touch detection method provided in an embodiment of this application. See also... Figure 15 The method may include the following steps:
[0175] Step 1501: The touch IC acquires the raw capacitance data of the touch panel within the current detection cycle.
[0176] The operation of step 1501 is similar to that of step 1401 above, and will not be described again in this embodiment.
[0177] It should be noted that the touch IC can obtain the capacitance value of each sensing capacitor in the touch panel during each detection cycle. In this way, the original capacitance data of the touch panel during the detection cycle can be obtained at the end of the detection cycle, and then steps 1502 to 1507 can be executed to perform touch detection.
[0178] Step 1502: The touch IC obtains the differential capacitance data of the touch panel based on the original capacitance data and the reference capacitance data of the touch panel.
[0179] The operation of step 1502 is similar to that of step 1402 above, and will not be described again in this embodiment.
[0180] Step 1503: The touch IC obtains the first capacitance data of the touch panel based on the differential capacitance data of the touch panel.
[0181] The operation of step 1503 is similar to that of step 1403 above, and will not be described again in this embodiment.
[0182] Step 1504: The touch IC sends the first capacitance data of the touch panel to the touch driver.
[0183] The operation of step 1504 is similar to that of step 1404 above, and will not be described again in this embodiment.
[0184] Step 1505: After receiving the first capacitance data of the touch panel, the touch driver determines whether the current posture of the electronic device is that the touch screen is facing down.
[0185] There are several ways for a touch driver to determine whether an electronic device is currently in a position where the touchscreen is facing down. One possible method is that after receiving the first capacitance data from the touch panel, the touch driver can obtain the acceleration of the electronic device along three axes (x, y, and z) from an accelerometer. If the acceleration of the electronic device along the z-axis is less than or equal to a first preset acceleration, the acceleration along the x-axis is less than or equal to a second preset acceleration, and the acceleration along the y-axis is less than or equal to a third preset acceleration, then the current posture of the electronic device is determined to be touchscreen-down; otherwise, the current posture is determined to be touchscreen-out.
[0186] The first, second, and third preset accelerations can all be set in advance.
[0187] The first preset acceleration can be close to or equal to -9.8 m / s². 2 (meters per second squared). For example, the first preset acceleration can be -9 m / s². 2 -9.1m / s 2 -9.2m / s 2 However, the embodiments in this application do not limit this.
[0188] Both the second and third preset accelerations can be close to or equal to 0 m / s². 2 For example, both the second and third preset accelerations can be -0.4 m / s². 2 -0.5m / s 2 -0.6m / s 2 However, the embodiments in this application do not limit this.
[0189] Of course, the above methods are not the only ones used. Touch drivers can also determine whether the current posture of the electronic device is that the touch screen is facing down in other ways. This application does not limit this.
[0190] If the current orientation of the electronic device is not with the touchscreen facing down, the touch driver can detect the touch operation based on the first capacitance data. The specific operation is similar to the operation in step 1405 above, and will not be described again in this embodiment.
[0191] If the current orientation of the electronic device is with the touchscreen facing down, the touch driver can execute steps 1506 and 1507 as follows.
[0192] Step 1506: When the current orientation of the electronic device is that the touch screen is facing down, the touch driver determines whether all capacitance values in the original capacitance data of the touch panel are greater than or equal to the preset capacitance value.
[0193] In some embodiments, the touch IC may send the first capacitance data of the touch panel to the touch driver at the same time as sending the first capacitance data of the touch panel to the touch driver.
[0194] In other embodiments, the touch IC may send only the first capacitance data of the touch panel to the touch driver. After receiving the first capacitance data of the touch panel, the touch driver can obtain the original capacitance data of the touch panel from the touch IC when the current orientation of the electronic device is that the touch screen is facing down.
[0195] The preset capacitance value is used to determine whether the touchscreen of an electronic device is currently in complete contact with air. The preset capacitance value can be set in advance, or it can be set by a technician as needed.
[0196] As an example, a preset capacitance value is used to distinguish whether the touchscreen of an electronic device is in contact with air or with the surface of a certain type of object.
[0197] In this scenario, if the electronic device is currently positioned with the touchscreen facing down and in contact with the air, rather than resting on the surface of such an object, then theoretically most of the capacitance values in the original capacitance data of the touch panel should be less than the preset capacitance value. Conversely, if the electronic device is currently positioned with the touchscreen facing down and resting on the surface of such an object, then theoretically all capacitance values in the original capacitance data of the touch panel should be greater than or equal to the preset capacitance value.
[0198] As another example, the preset capacitance value is used to distinguish whether the touch screen of an electronic device is very close to a conductive object, i.e., whether it is placed directly on a conductive object or on an insulating pad on a conductive object.
[0199] In this scenario, if the electronic device is currently positioned with the touchscreen facing down and exposed to air, neither placed on a conductive object nor on an insulating pad, then theoretically most of the capacitance values in the original capacitance data of the touch panel should be less than the preset capacitance value. However, if the electronic device is currently positioned with the touchscreen facing down and the touchscreen is placed directly on a conductive object or on an insulating pad, then theoretically all capacitance values in the original capacitance data of the touch panel should be greater than or equal to the preset capacitance value.
[0200] If the original capacitance data of the touch panel contains a capacitance value less than the preset capacitance value, the touch driver detects the touch operation based on the first capacitance data. The specific operation is similar to the operation in step 1405 above, and will not be described again in this embodiment.
[0201] If all capacitance values in the original capacitance data of the touch panel are greater than or equal to the preset capacitance value, then proceed to step 1507.
[0202] Step 1507: If all capacitance values in the original capacitance data of the touch panel are greater than or equal to the preset capacitance value, the touch driver determines that no touch operation has been detected.
[0203] If all capacitance values in the original capacitance data of the touch panel are greater than or equal to the preset capacitance value, the touch driver will not perform the operation of detecting touch operation based on the first capacitance data, and it can be directly determined that no touch operation was detected.
[0204] In this embodiment, when the electronic device is in a position where the touchscreen is facing down, or when the electronic device is placed on the surface of an object, or directly on a conductive object or an insulating pad on a conductive object, the touch driver can directly determine that no touch operation has been detected and stop reporting touch events. Thus, in scenarios where users are unlikely to use the electronic device but are prone to accidental touches, directly stopping the reporting of touch events reduces the probability of accidental touches while minimizing disruption to user experience and ensuring the normal operation of the electronic device.
[0205] For example, such as Figure 16 As shown, when the touchscreen of an electronic device is placed face down directly on a conductive object or on an insulating pad on a conductive object, although the touch IC is still detecting the original capacitance data of the touch panel and sending the first capacitance data to the touch driver accordingly, the touch driver no longer performs the operation of detecting touch operations based on the first capacitance data, but directly stops reporting touch events. Thus, even if abnormal capacitance changes occur due to interference factors such as charging or static electricity, no accidental touches will occur because the touch driver stops reporting touch events.
[0206] Figure 17 This is a flowchart of a touch detection method provided in an embodiment of this application. See also... Figure 17 The method may include the following steps:
[0207] Step 1701: The touch IC acquires the raw capacitance data of the touch panel within the current detection cycle.
[0208] The operation of step 1701 is similar to that of step 1501 above, and will not be described again in this embodiment.
[0209] It should be noted that the touch IC can obtain the capacitance value of each sensing capacitor in the touch panel during each detection cycle. In this way, the original capacitance data of the touch panel during the detection cycle can be obtained at the end of the detection cycle, and then steps 1702 to 1708 can be executed to perform touch detection.
[0210] Step 1702: The touch IC obtains the differential capacitance data of the touch panel based on the original capacitance data and the reference capacitance data of the touch panel.
[0211] The operation of step 1702 is similar to that of step 1502 above, and will not be described again in this embodiment.
[0212] Step 1703: The touch IC obtains the first capacitance data of the touch panel based on the differential capacitance data of the touch panel.
[0213] The operation of step 1703 is similar to that of step 1503 above, and will not be described again in this embodiment.
[0214] Step 1704: The touch IC sends the first capacitance data of the touch panel to the touch driver.
[0215] The operation of step 1704 is similar to that of step 1504 above, and will not be described again in this embodiment.
[0216] Step 1705: After receiving the first capacitance data of the touch panel, the touch driver determines whether the current posture of the electronic device is that the touch screen is facing down.
[0217] The operation of step 1705 is similar to that of step 1505 above, and will not be described again in this embodiment.
[0218] Step 1706: When the current orientation of the electronic device is that the touch screen is facing down, the touch driver determines whether the state of the electronic device meets the preset conditions.
[0219] The state of an electronic device may include one or more of the following: the duration of inactivity, the duration of screen illumination, etc., and this application embodiment does not limit this. When the current orientation of the electronic device is that the touchscreen is facing down, the touch driver can determine the state of the electronic device to judge whether it meets preset conditions.
[0220] Preset conditions can be set in advance. For example, preset conditions may include one or more of the following: the idle time of the electronic device is greater than or equal to a first duration, the screen-on time of the electronic device is greater than or equal to a second duration, etc.
[0221] Both the first duration and the second duration can be preset. For example, the first duration can be 1 second, 1.5 seconds, 2 seconds, etc., and the second duration can be 4 seconds, 5 seconds, 6 seconds, etc. The embodiments of this application do not limit this.
[0222] The static duration of an electronic device refers to the duration during which the electronic device remains stationary after changing from a moving state to a stationary state.
[0223] The screen-on time of an electronic device refers to the duration of time the screen remains on after the electronic device changes from a screen-off state to a screen-on state.
[0224] In some embodiments, the touch driver can periodically acquire acceleration data of the electronic device from an accelerometer and angular velocity data of the electronic device from a gyroscope sensor, and then detect whether the electronic device is currently moving or stationary based on the acceleration data and the angular velocity data. Through periodic detection, the touch driver can determine the duration of the electronic device's stationary state. Of course, the touch driver can also acquire the duration of the electronic device's stationary state in other ways, and this embodiment does not limit this method.
[0225] In some embodiments, the touch driver can periodically obtain power mode information from the PMS (Power Management System) and detect whether the electronic device is currently in a screen-on or screen-off state based on this power mode information. When the power mode information is On, the electronic device is determined to be in a screen-on state; when the power mode information is Off, the electronic device is determined to be in a screen-off state. Through periodic detection, the touch driver can determine the screen-on duration of the electronic device. Of course, the touch driver can also obtain the screen-on duration of the electronic device through other methods, and this application embodiment does not limit this method.
[0226] It should be noted that if the current orientation of the electronic device is with the touchscreen facing down, and the duration of inactivity of the electronic device is greater than or equal to the first duration, it indicates that the user is likely not using the electronic device. Therefore, in this embodiment of the application, steps 1707 and 1708 can be executed only if the duration of inactivity of the electronic device is greater than or equal to the first duration, in order to minimize the impact on the user's use.
[0227] In addition, when an electronic device changes from a screen-off state to a screen-on state, the capacitance value of the sensing capacitor in the touch panel may have some errors due to the power-on effect of the display screen. Therefore, in this embodiment, if the screen-on duration of the electronic device is greater than or equal to the second duration, the following steps 1707 and 1708 can be executed to achieve more accurate touch detection.
[0228] If the state of the electronic device does not meet the preset conditions, the touch driver detects the touch operation based on the first capacitance data. The specific operation is similar to the operation in step 1405 above, and will not be described again in this embodiment.
[0229] If the electronic device's state meets the preset conditions, then continue with step 1707.
[0230] Step 1707: When the state of the electronic device meets the preset conditions, the touch driver determines whether all capacitance values in the original capacitance data of the touch panel are greater than or equal to the preset capacitance value.
[0231] The operation of determining whether all capacitance values in the original capacitance data of the touch panel are greater than or equal to the preset capacitance value in step 1707 is similar to the operation in step 1506 above, and will not be described again in this embodiment.
[0232] Step 1708: If all capacitance values in the original capacitance data of the touch panel are greater than or equal to the preset capacitance value, the touch driver determines that no touch operation has been detected.
[0233] The operation of step 1708 is similar to that of step 1507 above, and will not be described again in this embodiment.
[0234] In this embodiment, when the electronic device is currently positioned with the touchscreen facing down, and the electronic device meets preset conditions, and when the electronic device is placed on the surface of a certain type of object, or directly on a conductive object or an insulating pad on a conductive object, the touch driver can directly determine that no touch operation has been detected, and thus stop reporting touch events. In scenarios where users are unlikely to use the electronic device but are prone to accidental touches, directly stopping the reporting of touch events reduces the probability of accidental touches while minimizing disruption to user experience, ensuring the normal operation of the electronic device.
[0235] Figure 18 This is a flowchart of a touch detection method provided in an embodiment of this application. See also... Figure 18 The method may include the following steps:
[0236] Step 1801: The touch IC acquires the raw capacitance data of the touch panel within the current detection cycle.
[0237] The operation of step 1801 is similar to that of step 1501 above, and will not be described again in this embodiment.
[0238] It should be noted that the touch IC can obtain the capacitance value of each sensing capacitor in the touch panel during each detection cycle. In this way, the original capacitance data of the touch panel during the detection cycle can be obtained at the end of the detection cycle, and then steps 1802 to 1807 can be executed to perform touch detection.
[0239] Step 1802: The touch IC obtains the differential capacitance data of the touch panel based on the original capacitance data and the reference capacitance data of the touch panel.
[0240] The operation of step 1802 is similar to that of step 1502 above, and will not be described again in this embodiment.
[0241] Step 1803: The touch IC determines the abnormal capacitance change in the differential capacitance data of the touch panel and obtains an abnormal data marker based on the abnormal capacitance change in the differential capacitance data.
[0242] Abnormal capacitance changes refer to capacitance values that are likely caused by interference from factors such as charging or static electricity.
[0243] This anomalous data marker is used to mark the index position of the anomalous capacitance change in the differential capacitance data.
[0244] for example, Figure 19 This is a schematic diagram illustrating differential capacitance data of a touch panel provided in an embodiment of this application. Under normal circumstances, such as... Figure 19 As shown in Figure (a), the capacitance changes in the differential capacitance data of this touch panel are all relatively small in absolute value, and both positive and negative values exist. However, in abnormal situations caused by factors such as the reference capacitance data not being updated in a timely manner, or interference from charging or static electricity, such as... Figure 19 As shown in Figure (b), some negative values with relatively large absolute values appear in the differential capacitance data of the touch panel. Therefore, in this embodiment, the negative values with relatively large absolute values appearing in the touch panel can be regarded as abnormal capacitance changes.
[0245] Optionally, when the differential capacitance data of the touch panel is a differential data matrix, the touch IC can determine the abnormal element in the differential data matrix based on one or more of the characteristics of elements in the same row, elements in the same column, row and column elements, adjacent row elements, and adjacent column elements. The abnormal element is the abnormal capacitance change.
[0246] After the touch IC identifies the abnormal element in the difference data matrix, it can also obtain the abnormal element index information as an abnormal data marker. The abnormal element index information can include the index of each abnormal element in all abnormal elements in the difference data matrix.
[0247] In some embodiments, when the differential capacitance data of the touch panel is a differential data matrix, the operation of the touch IC to determine abnormal elements in the differential data matrix may include one or more of the following five methods:
[0248] The first method: If there are at least a consecutive negative elements in the same row of the difference data matrix and the absolute value of the at least a elements is greater than or equal to the first threshold, then the touch IC determines that the at least a elements are all abnormal elements.
[0249] 'a' can be preset. 'a' is an integer greater than or equal to 2. For example, 'a' can be 8, 9, 10, etc., but this embodiment does not limit this.
[0250] The first threshold can be preset. For example, the first threshold can be 70, 80, 90, etc., but this application embodiment does not limit it.
[0251] After the touch IC determines that at least a elements are abnormal elements, it can also obtain the index information of the abnormal elements, which may include the index of each of the at least a elements.
[0252] for example, Figure 20 This is a schematic diagram of a difference data matrix for a touch panel provided in an embodiment of this application. Assume 'a' is 10 and the first threshold is 80. Since there are 11 consecutive negative elements in the 17th row of this difference data matrix, and the absolute value of each of these 11 elements is greater than 80, the touch IC can determine that these 11 elements are all abnormal elements, and can then obtain the index of each of these 11 elements.
[0253] The second method: If there are at least b consecutive negative elements in the same column of the difference data matrix and the absolute value of the at least b elements is greater than or equal to the second threshold, then the touch IC determines that the at least b elements are all abnormal elements.
[0254] b can be set in advance. b is an integer greater than or equal to 2. For example, b can be 2, 3, 4, etc., but this embodiment does not limit it.
[0255] The second threshold can be preset. For example, the second threshold can be 80, 90, 100, etc., but this application embodiment does not limit this.
[0256] After the touch IC determines that at least b elements are abnormal elements, it can also obtain the index information of the abnormal elements, which may include the index of each of the at least b elements.
[0257] for example, Figure 21 This is a schematic diagram of a difference data matrix for a touch panel provided in an embodiment of this application. Assume b is 2 and the second threshold is 100. Since there are two consecutive negative elements in the first column of this difference data matrix, and the absolute values of these two elements are both greater than 100, the touch IC can determine that these two elements are abnormal elements, and then obtain the index of each of these two elements.
[0258] The third method: If there are at least c consecutive negative elements in the same row of the difference data matrix and the absolute values of the at least c elements are all greater than or equal to the third threshold, and if there are at least d consecutive negative elements in the same column of the difference data matrix and the absolute values of the at least d elements are all greater than or equal to the fourth threshold, then the touch IC determines that the at least c elements and the at least d elements are abnormal elements.
[0259] Both c and d can be preset. One of c and d is an integer greater than or equal to 1, and the other is an integer greater than or equal to 2. For example, c can be 8, 9, 10, etc., and d can be 1, 2, 3, etc. The embodiments of this application do not limit this.
[0260] Both the third and fourth thresholds can be preset. For example, the third threshold can be 70, 80, 90, etc., and the fourth threshold can be 90, 100, 110, etc. The embodiments of this application do not limit this.
[0261] After the touch IC determines that at least c elements and at least d elements are abnormal elements, it can also obtain the index information of the abnormal elements. The index information of the abnormal elements may include the index of each of the at least c elements and at least d elements.
[0262] for example, Figure 22 This is a schematic diagram of a difference data matrix for a touch panel provided in an embodiment of this application. Assume c is 8, d is 1, the third threshold is 70, and the fourth threshold is 100. Since there are 11 consecutive negative elements in the 17th row of this difference data matrix, and the absolute values of these 11 elements are all greater than 70, and there are 2 negative elements in the first column of this difference data matrix, and the absolute values of these 2 elements are both greater than 100, the touch IC can determine that these 11 elements and these 2 elements are abnormal elements, and can then obtain the index of each of these 11 elements and these 2 elements.
[0263] The fourth method: If there is a row in the difference data matrix where at least e consecutive elements are negative, and the difference between each of the at least e elements and the elements in the adjacent row is greater than or equal to the fifth threshold, then the touch IC determines that the at least e elements are all abnormal elements.
[0264] e can be preset. e is an integer greater than or equal to 2. For example, e can be 5, 6, 7, etc., but this embodiment does not limit it.
[0265] The fifth threshold can be preset. For example, the fifth threshold can be 80, 90, 100, etc., but this application embodiment does not limit it.
[0266] After the touch IC determines that at least e elements are abnormal elements, it can also obtain the index information of the abnormal elements, which may include the index of each of the at least e elements.
[0267] for example, Figure 23 This is a schematic diagram of a difference data matrix for a touch panel provided in an embodiment of this application. Assume e is 5 and the fifth threshold is 100. Since there are 5 consecutive negative elements in the 7th row of the difference data matrix, and the difference between these 5 elements and the corresponding element in the adjacent 8th row is greater than 100, and there are 10 consecutive negative elements in the 17th row of the difference data matrix, and the difference between these 10 elements and the corresponding element in the adjacent 16th row is greater than 100, the touch IC can determine that these 5 and 10 elements are abnormal elements, and can then obtain the index of each of these 5 and 10 elements.
[0268] The fifth method: If there is a column in the difference data matrix where at least f consecutive elements are negative, and the difference between the at least f elements and the elements in the adjacent columns is greater than or equal to the sixth threshold, then the touch IC determines that the at least f elements are all abnormal elements.
[0269] f can be preset. f is an integer greater than or equal to 2. For example, f can be 2, 3, 4, etc., but this embodiment does not limit it.
[0270] The sixth threshold can be preset. For example, the fifth threshold can be 80, 90, 100, etc., but this application embodiment does not limit this.
[0271] After the touch IC determines that at least f elements are abnormal elements, it can also obtain the index information of the abnormal elements, which may include the index of each of the at least f elements.
[0272] for example, Figure 24This is a schematic diagram of a difference data matrix for a touch panel provided in an embodiment of this application. Assume f is 3 and the sixth threshold is 100. Since there are three consecutive negative elements in the first column of this difference data matrix, and the difference between these three elements and the corresponding element in the adjacent second column is greater than 100, the touch IC can determine that these three elements are all abnormal elements, and can then obtain the index of each of these three elements.
[0273] Of course, the touch IC is not limited to the above methods. It can also determine the abnormal elements in the difference data matrix in other ways. This application embodiment does not limit this.
[0274] Step 1804: The touch IC obtains the first capacitance data of the touch panel based on the differential capacitance data of the touch panel.
[0275] The operation of step 1804 is similar to that of step 1503 above, and will not be described again in this embodiment.
[0276] It is easy to understand that the first capacitance data corresponds one-to-one with the capacitance change in the differential capacitance data, so the abnormal data marker can also mark the capacitance change in the first capacitance data.
[0277] Step 1805: The touch IC sends the first capacitance data of the touch panel and the abnormal data flag to the touch driver.
[0278] It should be noted that if the touch IC determines in step 1804 that there is no abnormal capacitance change in the differential capacitance data of the touch panel, then there is no need to obtain an abnormal data flag. Accordingly, the touch IC also does not need to send an abnormal data flag to the touch driver in step 1805.
[0279] Step 1806: After receiving the first capacitance data and the abnormal data marker of the touch panel, the touch driver determines whether the current posture of the electronic device is that the touch screen is facing down.
[0280] The operation of determining whether the current posture of the electronic device is that the touch screen is facing down in step 1806 is similar to the operation in step 1505 above, and will not be described again in this embodiment.
[0281] It should be noted that if the touch IC does not send an abnormal data flag to the touch driver in step 1805, then the touch driver does not need to execute step 1806 when it only receives the first capacitance data sent by the touch IC. It can directly detect the touch operation based on the first capacitance data. The specific operation is similar to the operation of step 1405 above, and will not be described again in this embodiment.
[0282] It should be noted that if the touch driver determines in step 1806 that the current posture of the electronic device is not with the touch screen facing down, then the touch driver can directly detect the touch operation based on the first capacitance data. The specific operation is similar to the operation in step 1405 above, and will not be described again in this embodiment.
[0283] If the touch driver determines that the current orientation of the electronic device is with the touchscreen facing down, then proceed with step 1807 as follows.
[0284] Step 1807: When the current orientation of the electronic device is that the touch screen is facing down, the touch driver determines the abnormal capacitance change in the first capacitance data of the touch panel based on the abnormal data marker, and detects the touch operation based on the capacitance change in the first capacitance data other than the abnormal capacitance change.
[0285] In some embodiments, the operation of the touch driver determining the abnormal capacitance change in the first capacitance data of the touch panel based on the abnormal data marker can be as follows: the touch driver determines that the target capacitance change corresponding to the abnormal data marker in the first capacitance data of the touch panel is the abnormal capacitance change.
[0286] The target capacitance change is the capacitance change indexed in the first capacitance data based on the anomaly data marker.
[0287] In other embodiments, the operation of the touch driver determining the abnormal capacitance change in the first capacitance data of the touch panel based on the abnormal data marker can be as follows: the touch driver determines the target capacitance change corresponding to the abnormal data marker in the first capacitance data of the touch panel; for any target capacitance change in the first capacitance data, if the target capacitance change is less than a second capacitance change threshold, then the target capacitance change is determined to be an abnormal capacitance change, otherwise the target capacitance change is determined not to be an abnormal capacitance change.
[0288] The second capacitance change threshold can be preset, and the second capacitance change threshold is a negative value. For example, the second capacitance change threshold can be -300, -400, -500, etc., and this application embodiment does not limit it.
[0289] It should be noted that a larger second capacitance change threshold results in stronger anti-interference capability, but also a greater impact on the original touch detection process; conversely, a smaller second capacitance change threshold results in weaker anti-interference capability, but a smaller impact on the original touch detection process. Technicians can choose a suitable second capacitance change threshold that balances these two aspects.
[0290] In some embodiments, the operation of the touch driver to detect a touch operation based on the capacitance change in the first capacitance data excluding abnormal capacitance changes can be as follows: the touch driver deletes the abnormal capacitance changes in the first capacitance data to obtain second capacitance data, and detects the touch operation based on the second capacitance data.
[0291] There are several ways for a touch driver to detect touch operations based on the second capacitance data. In one possible approach, the touch driver can determine whether there is a capacitance change in the second capacitance data whose absolute value is greater than or equal to a first capacitance change threshold. If the absolute value of each capacitance change in the second capacitance data is less than the first capacitance change threshold, then it is determined that no touch operation has been detected. If at least one capacitance change in the second capacitance data has an absolute value greater than or equal to the first capacitance change threshold, then it is determined that a touch operation has been detected, and then a touch event is generated based on the capacitance changes in the second capacitance data whose absolute values are greater than or equal to the first capacitance change threshold. Of course, the touch driver can also detect touch operations based on the second capacitance data in other ways, and this application embodiment does not limit this approach.
[0292] For example, after the touch driver generates a touch event, it can pass the touch event to the input event handling layer through the input core layer, and then the input event handling layer passes the touch event to IMS. IMS can then send the touch event to the corresponding application or system service for processing.
[0293] In this embodiment, the touch IC determines the abnormal capacitance change in the differential capacitance data of the touch panel and obtains an abnormal data marker based on the abnormal capacitance change. Then, the touch IC obtains the first capacitance data of the touch panel based on the differential capacitance data and sends both the first capacitance data and the abnormal data marker to the touch driver. Upon receiving the first capacitance data and the abnormal data marker, the touch driver first determines the current orientation of the electronic device. If the current orientation is with the touchscreen facing down, it determines the abnormal capacitance change in the first capacitance data based on the abnormal data marker, and then detects a touch operation based on the capacitance change in the first capacitance data excluding the abnormal capacitance change. Thus, when the current orientation of the electronic device is with the touchscreen facing down, i.e., when the user is unlikely to be using the electronic device but accidental touches are likely, the touch driver can filter out the abnormal capacitance change in the first capacitance data before performing touch detection. This reduces the probability of accidental touches while minimizing disruption to the user experience, ensuring the normal operation of the electronic device.
[0294] Figure 25 This is a flowchart of a touch detection method provided in an embodiment of this application. See also... Figure 25 The method may include the following steps:
[0295] Step 2501: The touch IC acquires the raw capacitance data of the touch panel within the current detection cycle.
[0296] The operation of step 2501 is similar to that of step 1801 above, and will not be described again in this embodiment.
[0297] It should be noted that the touch IC can obtain the capacitance value of each sensing capacitor in the touch panel during each detection cycle. In this way, the original capacitance data of the touch panel during the detection cycle can be obtained at the end of the detection cycle, and then steps 2502 to 2508 can be executed to perform touch detection.
[0298] Step 2502: The touch IC obtains the differential capacitance data of the touch panel based on the original capacitance data and the reference capacitance data of the touch panel.
[0299] The operation of step 2502 is similar to that of step 1802 above, and will not be described again in this embodiment.
[0300] Step 2503: The touch IC determines the abnormal capacitance change in the differential capacitance data of the touch panel and obtains an abnormal data marker based on the abnormal capacitance change in the differential capacitance data.
[0301] The operation of step 2503 is similar to that of step 1803 above, and will not be described again in this embodiment.
[0302] Step 2504: The touch IC obtains the first capacitance data of the touch panel based on the differential capacitance data of the touch panel.
[0303] The operation of step 2504 is similar to that of step 1804 above, and will not be described again in this embodiment.
[0304] Step 2505: The touch IC sends the first capacitance data of the touch panel and the abnormal data flag to the touch driver.
[0305] It should be noted that if the touch IC determines in step 2504 that there is no abnormal capacitance change in the differential capacitance data of the touch panel, then there is no need to obtain an abnormal data flag. Accordingly, the touch IC also does not need to send an abnormal data flag to the touch driver in step 2505.
[0306] Step 2506: After receiving the first capacitance data and the abnormal data marker of the touch panel, the touch driver determines whether the current posture of the electronic device is that the touch screen is facing down.
[0307] The operation of step 2506 is similar to that of step 1806 above, and will not be described again in this embodiment.
[0308] It should be noted that if the touch IC does not send an abnormal data flag to the touch driver in step 2505, then the touch driver does not need to execute step 2506 when it only receives the first capacitance data sent by the touch IC. It can directly detect the touch operation based on the first capacitance data. The specific operation is similar to the operation of step 1405 above, and will not be described again in this embodiment.
[0309] Step 2507: When the current orientation of the electronic device is that the touch screen is facing down, the touch driver determines whether the state of the electronic device meets the preset conditions.
[0310] The operation of determining whether the state of the electronic device meets the preset conditions in step 2507 is similar to the operation in step 1706 above, and will not be described again in this embodiment.
[0311] It should be noted that if the touch driver determines in step 2507 that the state of the electronic device does not meet the preset conditions, the touch driver can directly detect the touch operation based on the first capacitance data. The specific operation is similar to the operation in step 1405 above, and will not be described again in this embodiment.
[0312] If the touch driver determines that the state of the electronic device meets the preset conditions, then the following step 2508 is executed.
[0313] Step 2508: When the state of the electronic device meets the preset conditions, the touch driver determines the abnormal capacitance change in the first capacitance data of the touch panel according to the abnormal data mark, and detects the touch operation according to the capacitance change in the first capacitance data other than the abnormal capacitance change.
[0314] In step 2508, the touch driver determines the abnormal capacitance change in the first capacitance data of the touch panel based on the abnormal data marker. The operation of detecting touch operation based on the capacitance change other than the abnormal capacitance change in the first capacitance data is similar to the operation in step 1807 above, and will not be described again in this embodiment.
[0315] In this embodiment, the touch IC determines the abnormal capacitance change in the differential capacitance data of the touch panel and obtains an abnormal data marker based on the abnormal capacitance change. Then, the touch IC obtains the first capacitance data of the touch panel based on the differential capacitance data and sends both the first capacitance data and the abnormal data marker to the touch driver. Upon receiving the first capacitance data and the abnormal data marker, and assuming the current orientation of the electronic device is touchscreen-down and the electronic device's state meets preset conditions, the touch driver determines the abnormal capacitance change in the first capacitance data based on the abnormal data marker, and then detects a touch operation based on the capacitance change in the first capacitance data excluding the abnormal capacitance change. Thus, when the current orientation of the electronic device is touchscreen-down and the electronic device's state meets preset conditions—that is, when the user is unlikely to be using the electronic device but accidental touches are likely—the touch driver can filter out the abnormal capacitance change in the first capacitance data before performing touch detection. This reduces the probability of accidental touches while minimizing impact on user experience and ensuring the normal operation of the electronic device.
[0316] Figure 26 This is a flowchart of a touch detection method provided in an embodiment of this application. See also... Figure 26 The method may include the following steps:
[0317] Step 2601: The electronic device acquires the first capacitance data of the touch screen, which includes the capacitance change of each sensing capacitor in the touch screen.
[0318] The first capacitance data of the touch screen is the first capacitance data of the touch panel in the touch screen.
[0319] In some embodiments, the operation of an electronic device acquiring the first capacitance data of a touchscreen can be as follows: acquiring the original capacitance data of the touchscreen, which includes the capacitance value of each sensing capacitor in the touchscreen; acquiring the differential capacitance data of the touchscreen based on the original capacitance data and reference capacitance data, where the reference capacitance data includes the reference value of each sensing capacitor in the touchscreen and the differential capacitance data includes the capacitance change of each sensing capacitor in the touchscreen; and acquiring the first capacitance data of the touchscreen based on the differential capacitance data. Specific operations can be referred to steps 1501 to 1503, or steps 1701 to 1703, or steps 1801 to 1804, or steps 2501 to 2504 as described above, and will not be elaborated further in this embodiment.
[0320] The raw capacitance data of a touchscreen is the raw capacitance data of the touch panel in the touchscreen.
[0321] The reference capacitance data of the touch screen is the reference capacitance data of the touch panel in the touch screen.
[0322] The differential capacitance data of a touchscreen is the differential capacitance data of the touch panel in the touchscreen.
[0323] Step 2602: The electronic device determines its orientation.
[0324] In some embodiments, step 2601 described above can be performed by the touch IC. After obtaining the first capacitance data of the touch screen, the touch IC can send the first capacitance data to the touch driver. After receiving the first capacitance data, the touch driver can determine the posture of the electronic device.
[0325] The operation of determining the attitude of the electronic device can refer to step 1505, step 1705, step 1806, or step 2506 as described above. This application embodiment will not repeat the details.
[0326] Step 2603: If the electronic device is in the position of the touch screen facing down and if there is an abnormal capacitance condition on the touch screen, then the electronic device determines that no touch operation has been detected, or the electronic device detects the touch operation based on the non-abnormal capacitance change in the first capacitance data.
[0327] In some cases, a touchscreen capacitance anomaly occurs when all capacitance values in the original capacitance data of the touchscreen are greater than or equal to a preset capacitance value. In this case, step 2603 can be performed as follows: if the electronic device is positioned with the touchscreen facing down, then if all capacitance values in the original capacitance data of the touchscreen are greater than or equal to the preset capacitance value, the electronic device determines that no touch operation has been detected. Specific operations can be found in steps 1506 to 1507 above, and will not be repeated in this embodiment.
[0328] In other cases, a touchscreen capacitance anomaly refers to an abnormal capacitance change in the touchscreen's differential capacitance data. In this situation, after acquiring the touchscreen's differential capacitance data, the electronic device can determine the abnormal capacitance change within that data and obtain an anomaly data marker based on it. This anomaly data marker is used to mark the index position of the abnormal capacitance change in the differential capacitance data. Specific operations can be found in steps 1803 or 2503 described above, and will not be repeated in this embodiment.
[0329] In this case, step 2603 can be performed as follows: if the electronic device is in a position where the touchscreen is facing down and if the abnormal data marker is obtained, the electronic device determines the abnormal capacitance change in the first capacitance data based on the abnormal data marker, and detects the touch operation based on the capacitance change in the first capacitance data excluding the abnormal capacitance change. For specific details, please refer to step 1807 above; this embodiment will not elaborate further.
[0330] In some embodiments, step 2603 can be performed as follows: if the electronic device is in a position where the touchscreen is facing down, the electronic device's state meets preset conditions, and the touchscreen exhibits an abnormal capacitance condition, then the electronic device determines that no touch operation has been detected; or the electronic device detects a touch operation based on the non-abnormal capacitance change in the first capacitance data. Specific operations can be referred to steps 1706 to 1708 above, or steps 2507 to 2508 above, and will not be elaborated further in this embodiment.
[0331] In this embodiment, the electronic device can determine its orientation after acquiring the first capacitance data of the touchscreen. When the touchscreen is facing down and there is an abnormal capacitance reading, it can be directly determined that no touch operation was detected, or a touch operation can be detected based on the non-abnormal capacitance changes in the first capacitance data. Thus, in scenarios where users are unlikely to use the electronic device but are prone to accidental touches, by directly stopping the reporting of touch events or filtering out abnormal capacitance changes in the first capacitance data before performing touch detection, the probability of accidental touches can be reduced while minimizing disruption to the user experience, ensuring the normal operation of the electronic device.
[0332] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0333] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0334] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps in the various method embodiments described above.
[0335] This application also provides a computer program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.
[0336] This application also provides a chip system including a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the steps of any method embodiment of this application. The chip system can be a single chip or a chip module composed of multiple chips.
[0337] 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. This computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of 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 via wired (e.g., coaxial cable, fiber optic cable, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave) 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 media can be magnetic media (such as floppy disks, hard disks, magnetic tapes, etc.), optical media (such as digital versatile discs (DVDs), etc.) or semiconductor media (such as solid state disks (SSDs), etc.).
[0338] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0339] The above-described embodiments are optional embodiments provided by this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the technical scope disclosed in this application should be included within the protection scope of this application.
Claims
1. A touch detection method, characterized in that, Applied to an electronic device, the electronic device including a capacitive touchscreen, the touchscreen including a plurality of sensing capacitors, the method includes: Acquire first capacitance data of the touch screen, the first capacitance data including the capacitance change of each sensing capacitor in the touch screen; Determine the orientation of the electronic device; If the electronic device is in the position where the touchscreen is facing down and if the touchscreen has an abnormal capacitance condition, then it is determined that no touch operation was detected, or a touch operation is detected based on the non-abnormal capacitance change in the first capacitance data.
2. The method as described in claim 1, characterized in that, The capacitance anomaly refers to a situation where all capacitance values in the original capacitance data of the touchscreen are greater than or equal to a preset capacitance value; the determination that no touch operation was detected if the electronic device is in a position where the touchscreen is facing down and if the touchscreen exhibits a capacitance anomaly includes: If the electronic device is in the orientation of the touchscreen facing down, then if all capacitance values in the original capacitance data of the touchscreen are greater than or equal to the preset capacitance value, it is determined that no touch operation was detected. The original capacitance data includes the capacitance value of each sensing capacitor in the touchscreen.
3. The method as described in claim 1, characterized in that, The step of obtaining the first capacitance data of the touchscreen includes: Obtain the raw capacitance data of the touch screen, which includes the capacitance value of each sensing capacitor in the touch screen; Based on the original capacitance data and reference capacitance data of the touch screen, the differential capacitance data of the touch screen is obtained. The reference capacitance data includes the reference value of each sensing capacitor in the touch screen, and the differential capacitance data includes the capacitance change of each sensing capacitor in the touch screen. Based on the differential capacitance data of the touchscreen, the first capacitance data of the touchscreen is obtained.
4. The method of claim 3, wherein, The abnormal capacitance condition refers to the presence of abnormal capacitance changes in the differential capacitance data; after acquiring the differential capacitance data of the touchscreen, the process further includes: Determine the abnormal capacitance changes in the differential capacitance data; Anomaly data markers are obtained based on the abnormal capacitance changes in the differential capacitance data. These abnormal data markers are used to mark the index positions of the abnormal capacitance changes in the differential capacitance data.
5. The method of claim 4, wherein, The differential capacitance data is a differential data matrix, and determining the abnormal capacitance changes in the differential capacitance data includes: The abnormal elements in the difference data matrix are determined based on one or more of the characteristics of elements in the same row, elements in the same column, row and column elements, adjacent row elements, and adjacent column elements. The abnormal elements are the abnormal capacitance changes in the difference capacitance data.
6. The method of claim 5, wherein, The step of determining the abnormal elements in the difference data matrix based on one or more of the following: features of elements in the same row, features of elements in the same column, features of elements in the same row and column, features of elements in adjacent rows, and features of elements in adjacent columns, includes: If in the same row of the difference data matrix there are at least a consecutive negative elements and the absolute value of the at least a elements is greater than or equal to a first threshold, then the at least a elements are determined to be abnormal elements, where a is an integer greater than or equal to 2; and / or, If at least b consecutive elements in the same column of the difference data matrix are all negative and the absolute values of the at least b elements are all greater than or equal to a second threshold, then the at least b elements are determined to be the abnormal elements, where b is an integer greater than or equal to 2; and / or, If in the same row of the difference data matrix there are at least c consecutive negative elements and the absolute value of each of the at least c elements is greater than or equal to a third threshold, and if in the same column of the difference data matrix there are at least d consecutive negative elements and the absolute value of each of the at least d elements is greater than or equal to a fourth threshold, then the at least c elements and the at least d elements are determined to be abnormal elements, where c and d are integers greater than or equal to 1 and the other is an integer greater than or equal to 2; and / or, If a row in the difference data matrix contains at least e consecutive negative elements, and the difference between each of these at least e elements and the elements in the adjacent row is greater than or equal to a fifth threshold, then these at least e elements are determined to be abnormal elements, where e is an integer greater than or equal to 2; and / or, If there exists a column in the difference data matrix where at least f consecutive elements are negative, and the difference between each of the at least f elements and the elements in the adjacent column is greater than or equal to the sixth threshold, then the at least f elements are determined to be abnormal elements, where f is an integer greater than or equal to 2.
7. The method of any one of claims 4 to 6, wherein, If the electronic device is in a position where the touchscreen is facing down and if the touchscreen has an abnormal capacitance, then the touch operation is detected based on the non-abnormal capacitance change in the first capacitance data, including: If the electronic device is in the position of the touch screen facing down and if the abnormal data marker is obtained, then the abnormal capacitance change in the first capacitance data is determined according to the abnormal data marker. Touch operations are detected based on the capacitance changes in the first capacitance data, excluding abnormal capacitance changes.
8. The method of claim 7, wherein, The step of determining the abnormal capacitance change in the first capacitance data based on the abnormal data marker includes: Determine the target capacitance change corresponding to the abnormal data marker in the first capacitance data; For any target capacitance change in the first capacitance data, if the target capacitance change is less than the second capacitance change threshold, then the target capacitance change is determined to be an abnormal capacitance change; otherwise, the target capacitance change is determined not to be an abnormal capacitance change.
9. The method of any one of claims 1 to 8, wherein, The step of determining that no touch operation was detected if the electronic device is in the orientation of the touchscreen facing down and if the touchscreen has an abnormal capacitance condition, or detecting a touch operation based on the non-abnormal capacitance change in the first capacitance data, includes: If the electronic device is in the position of the touchscreen facing down, the state of the electronic device meets the preset conditions, and the touchscreen has an abnormal capacitance condition, then it is determined that no touch operation was detected, or a touch operation is detected based on the non-abnormal capacitance change in the first capacitance data.
10. The method of claim 9, wherein, The state of the electronic device includes one or more of the following: the duration of inactivity of the electronic device and the duration of screen illumination of the electronic device. The preset conditions include one or more of the following: the static duration of the electronic device is greater than or equal to a first duration, and the screen-on duration of the electronic device is greater than or equal to a second duration.
11. An electronic device, comprising: The electronic device includes: one or more processors, and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1 to 10.
13. A computer program product, characterised in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1 to 10.