Touch control processing method, touch control chip, and electronic device
Patent Information
- Application Number
- TW114113442
- Authority / Receiving Office
- TW · TW
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2025-03-14
- Filing Date
- 2025-04-09
- Publication Date
- 2026-09-21
- Estimated Expiration
- 2045-04-08
AI Technical Summary
Touchscreens in smart electronic devices often report multiple peak points due to noise interference, leading to incorrect responses to touch operations and degraded user experience.
A touch processing method that iteratively determines boundary sensing points based on peak sensing points, merging adjacent complex peak points and identifying connected components to accurately define the touch area, using conventional functions to maintain efficient processing speed.
Ensures correct response to touch operations by accurately determining the touch area, improving user experience through fast and efficient processing.
Smart Images

Figure TWG2TB001912169_001 
Figure TWG2TB001912169_002 
Figure TWG2TB001912169_003
Abstract
Description
Technical Field
[0001] This application relates to the field of touch technology, and in particular to a touch processing method, a touch chip, and an electronic device. Prior Technology
[0002] Touchscreens are widely used in smart electronic devices such as smartphones, tablets, and wearable devices. When a user touches the touchscreen, the electronic device determines the peak point based on the change in capacitance and reports the position of the peak point to respond to the user's touch operation. However, actual touch operations may be affected by noise, resulting in multiple peak points on the touchscreen. If the positions of all multiple peak points are reported, the electronic device may not be able to respond to the touch operation correctly, thus affecting the user experience. Summary of the Invention
[0003] This application provides a touch processing method, an electronic device, and a storage medium to solve the problem that when a touch operation forms multiple peak points on a touch screen, the electronic device may not be able to respond correctly to the touch operation.
[0004] In a first aspect, embodiments of this application provide a touch processing method applied to an electronic device. The method includes: collecting sensing data; determining peak sensing points based on the sensing data, wherein the sensing data is distributed in an array; determining initial left boundary sensing points and initial right boundary sensing points based on the peak sensing points; traversing the sensing data based on the initial left boundary sensing points and the initial right boundary sensing points to determine boundary sensing points of the sensing data; and determining a touch area based on the boundary sensing points.
[0005] In one possible implementation, determining the peak sensing point based on the sensing data includes: traversing the sensing data based on a preset matrix, and determining the sensing point with the largest sensing value within the preset matrix area that is greater than or equal to a preset threshold as the peak sensing point.
[0006] In one possible implementation, determining the initial left boundary sensing point and the initial right boundary sensing point based on the peak sensing point includes: for the sensing data to the left of the peak sensing point in the row where the peak sensing point is located, determining the sensing point whose sensing value at the leftmost end of the row where the peak sensing point is located is greater than or equal to a preset threshold as the initial left boundary sensing point; and traversing the sensing data to the right of the peak sensing point in the row where the peak sensing point is located, determining the sensing point whose sensing value at the rightmost end of the row where the peak sensing point is located is greater than or equal to the preset threshold as the initial right boundary sensing point.
[0007] In one possible implementation, the step of traversing the sensing data based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing points of the sensing data includes: traversing the sensing data line by line based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing points of each row of the sensing data.
[0008] In one possible implementation, the step of traversing the sensing data row by row based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing point of each row of the sensing data includes: determining the next row to be traversed based on the direction of the first column; determining the left sensing point of the next row based on the initial left boundary sensing point, and determining the right sensing point of the next row based on the initial right boundary sensing point; if the sensing value of the left sensing point is greater than or equal to a preset threshold, traversing the sensing points of the next row to the left, determining whether the sensing value of each sensing point is greater than or equal to the preset threshold, until the boundary of the next row is reached or a sensing point with a sensing value less than the preset threshold is reached; if the sensing value of the left sensing point is less than the preset threshold, traversing the sensing points of the next row to the right, determining whether the sensing value of each sensing point is greater than or equal to the preset threshold, until a sensing point with a sensing value greater than or equal to the preset threshold is reached or a right sensing point is reached; and determining the leftmost sensing point of the next row with a sensing value greater than or equal to the preset threshold as the target left boundary sensing point of the next row.
[0009] In one possible implementation, the step of traversing the sensing data line by line based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing point of each line of the sensing data further includes: if the sensing value of the right sensing point is greater than or equal to the preset threshold, traversing the sensing points of the next line to the right, determining whether the sensing value of each sensing point is greater than or equal to the preset threshold, until the boundary of the next line is reached or a sensing point with a sensing value less than the preset threshold is reached; if the sensing value of the right sensing point is less than the preset threshold, traversing the sensing points of the next line to the left, determining whether the sensing value of each sensing point is greater than or equal to the preset threshold, until a sensing point with a sensing value greater than or equal to the preset threshold is reached or the left boundary sensing point is reached; and determining the rightmost sensing point of the next line with a sensing value greater than or equal to the preset threshold as the target right boundary sensing point of the next line.
[0010] In one possible implementation, the step of traversing the sensing data row by row based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing point of each row of the sensing data further includes: if the row-by-row traversal of the sensing data in the first column direction is completed, generating the first boundary of the touch area based on the initial left boundary sensing point and the initial right boundary sensing point of the row where the peak sensing point is located, and the target left boundary sensing point and the target right boundary sensing point of each row in the first column direction during the first traversal.
[0011] In one possible implementation, the step of traversing the sensing data row by row based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing point of each row of the sensing data further includes: traversing the sensing data row by row based on the second column direction to determine the target left boundary sensing point and the target right boundary sensing point of each row in the second column direction during the second traversal, wherein the second column direction is opposite to the first column direction; and generating the second boundary of the touch area based on the initial left boundary sensing point and the initial right boundary sensing point of the row where the peak sensing point is located, and the target left boundary sensing point and the target right boundary sensing point of each row in the second column direction.
[0012] In one possible implementation, determining the touch area based on the boundary sensing point includes: generating the touch area based on the second boundary.
[0013] In one possible implementation, the step of traversing the sensing data row by row based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing point of each row of the sensing data further includes: if the row-by-row traversal of the sensing data in the second column direction is completed, traversing the sensing data row by row based on the first column direction to determine the target left boundary sensing point and the target right boundary sensing point of each row in the first column direction during the third traversal; generating a third boundary of the touch area based on the initial left boundary sensing point and the initial right boundary sensing point of the row where the peak sensing point is located, and the target left boundary sensing point and the target right boundary sensing point of each row in the first column direction during the third traversal; if the third boundary is the same as the second boundary, determining that the traversal of the sensing data is completed.
[0014] In one possible implementation, the step of traversing the sensing data row by row based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing point of each row of the sensing data further includes: if the third boundary is different from the second boundary, traversing the sensing data row by row based on the second column direction to determine the target left boundary sensing point and the target right boundary sensing point of each row in the second column direction during the fourth traversal; generating the fourth boundary of the touch area based on the initial left boundary sensing point and the initial right boundary sensing point of the row where the peak sensing point is located, and the target left boundary sensing point and the target right boundary sensing point of each row in the second column direction during the fourth traversal; if the fourth boundary is the same as the third boundary, determining that the traversal of the sensing data is complete.
[0015] In one possible implementation, determining the touch area based on the boundary sensing point includes: if the boundary of the touch area generated by the Nth traversal is the same as that generated by the (N-1)th traversal, it is determined that the traversal of the sensing data is complete, where N is greater than or equal to 2.
[0016] In one possible implementation, determining the left sensing point of the next row based on the initial left boundary sensing point and the right sensing point of the next row based on the initial right boundary sensing point includes: determining the adjacent sensing point to the left of the next row relative to the initial left boundary sensing point as the left sensing point of the next row, and determining the adjacent sensing point to the right of the next row relative to the initial right boundary sensing point as the right sensing point of the next row.
[0017] In one possible implementation, the method further includes: determining the reporting point of the touch operation based on the sensing data in the touch area.
[0018] Secondly, embodiments of this application provide a touch chip for performing the above-described touch processing method.
[0019] Thirdly, embodiments of this application provide an electronic device, including a touch chip, for performing the above-described touch processing method, wherein the electronic device responds to touch operations based on the reporting of points by the touch chip.
[0020] Fourthly, embodiments of this application provide a computer storage medium storing program instructions that, when executed on an electronic device, cause the processor of the electronic device to perform the aforementioned touch processing method.
[0021] The touch processing method, electronic device, and storage medium provided in this application embodiment can traverse the collected sensing data based on peak sensing points, determine the boundary sensing points formed on the touch screen by the touch operation, and determine the touch area corresponding to the touch operation based on the boundary sensing points, thereby ensuring that the electronic device can correctly respond to the user's touch operation and effectively improving the user experience. Simple Explanation of the Diagram
[0022] Figure 1 is a flowchart of a touch processing method provided in an embodiment of this application. Figure 2 is a schematic diagram of the structure of a touch screen provided in an embodiment of this application. Figure 3 is a schematic diagram of the distribution of sensing data provided in an embodiment of this application. Figure 4 is a flowchart illustrating the determination of boundary sensing points according to an embodiment of this application. Figure 5 is a flowchart of determining boundary sensing points according to another embodiment of this application. Figure 6 is a schematic diagram of determining the touch area according to an embodiment of this application. Figure 7 is a schematic diagram of determining the touch area according to an embodiment of this application. Figure 8 is a schematic diagram of determining the touch area according to an embodiment of this application. Figure 9 is a schematic diagram of determining the touch area according to an embodiment of this application. Figure 10 is a schematic diagram of the distribution of sensing data provided in another embodiment of this application. Figure 11 is a schematic diagram of determining the touch area according to another embodiment of this application. Figure 12 is a schematic diagram of determining the touch area according to another embodiment of this application. Figure 13 is a schematic diagram of determining the touch area according to another embodiment of this application. Figure 14 is a schematic diagram of determining the touch area according to another embodiment of this application. Figure 15 is a schematic diagram of the distribution of sensing data provided in another embodiment of this application. Figure 16 is a schematic diagram of determining the touch area according to another embodiment of this application. Figure 17 is a schematic diagram of determining the touch area according to another embodiment of this application. Figure 18 is a schematic diagram of determining the touch area according to another embodiment of this application. Figure 19 is a schematic diagram of determining the touch area according to another embodiment of this application. Figure 20 is a schematic diagram of determining the touch area according to another embodiment of this application. Figure 21 is a schematic diagram of the structure of a touch processing device provided in an embodiment of this application. Figure 22 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Implementation
[0023] The terms "first" and "second" used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this application's specification is for the purpose of describing particular embodiments only and is not intended to limit the application. It should be understood that, unless otherwise stated, " / " in this application means "or". For example, A / B can mean A or B. "And / or" in this application 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 alone, A and B simultaneously, and B alone. "At least one" refers to one or a plurality. "Plural" refers to two or more. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, and a, b, and c. Where there is no conflict, the following embodiments and features described herein can be combined with each other.
[0025] Touchscreens are widely used in smart electronic devices such as smartphones, tablets, and wearable devices. When a user touches the screen, the electronic device determines the peak point based on changes in capacitance and reports the peak point position to respond to the user's touch operation. In principle, a finger (or other touch object, such as an active stylus) should only have one peak. However, actual touch operations may be affected by noise, causing a single touch object to form multiple peak points on the screen. If the positions of all multiple peak points are reported, the electronic device may not be able to respond to touch operations correctly, thus affecting the user experience.
[0026] Therefore, it is necessary to merge adjacent complex peak points. During the peak point merging process, it is necessary to search for connected components that include the complex peak point. The complex peak points in this connected component can be merged into a single peak point, and only the coordinates of the merged peak point are reported. In addition, connected components may not be connected from an image perspective. For example, when a user touches a touchscreen, multiple disconnected touch areas may be formed, but they actually belong to the same touch. In this case, the disconnected touch areas on the image are still considered connected components from the perspective of touch processing and recognition.
[0027] Related technologies typically perform eight-directional searches based on a single touch-sensing point (e.g., a peak point), using recursive function calls to determine all peak points and then identifying the connected components corresponding to the touch operation, i.e., the touch area. However, recursive function calls lead to code stack nesting as the number of connected nodes increases, increasing storage requirements, resulting in slower processing speeds and lower efficiency. Furthermore, related technologies can also segment the touchscreen's touch and non-touch areas based on boundary calculations. Boundary calculations require image binarization and then boundary calculations using difference methods, resulting in a large amount of data processing and relatively little effective data processing.
[0028] This application provides a touch processing method that iterates through the collected sensor data based on peak sensing points to determine the boundary sensing points formed by the touch operation on the touch screen, and determines the touch area corresponding to the touch operation based on the boundary sensing points. This ensures that the electronic device can correctly respond to the user's touch operation, effectively improving the user experience. This method of determining the touch area can be implemented using conventional functions, so that the storage space used by the code stack does not change with different input data during the operation, resulting in fast processing speed and high efficiency.
[0029] Referring to Figure 1, a flowchart of a touch processing method provided in an embodiment of this application is shown. The method is applied in an electronic device, and the touch processing method includes:
[0030] S101, collect sensing data and determine the peak sensing point based on the sensing data.
[0031] Referring to Figure 2, a schematic diagram of a touch screen structure is provided according to an embodiment of this application. The touch screen 140 of the electronic device includes a touch layer 141, and the touch layer 141 forms a plurality of sensing points through touch electrodes.
[0032] In one embodiment of this application, the electronic device, when powered on, collects sensor data based on a preset sampling rate, which is the number of times sensor data is collected per second. For example, the preset sampling rate is 60Hz, 120Hz, 240Hz, or other frequency values. A frame of sensor data is obtained from the collected complex sensor data, and a peak sensing point is determined based on the obtained frame of sensor data.
[0033] When a user touches a touchscreen with their finger or a touch object (such as a stylus), the finger or touch object generates capacitance with the touch electrodes. The touchscreen determines sensing data based on the location of this capacitance and changes in capacitance. This sensing data includes the location of the sensing point and the sensing value. For example, the location of the sensing point is determined by the location of the capacitance, and the change in capacitance or the capacitance value itself is converted from analog to digital to obtain the sensing value of the sensing point. Since the sensing points are distributed in an array, the collected sensing data is also distributed in an array.
[0034] In one embodiment of this application, the sensing data is traversed based on a preset matrix, and the sensing point with the largest sensing value within the preset matrix region that is greater than or equal to a preset threshold is determined as the peak sensing point. For example, the preset matrix can be a 2×2 matrix or a 3×3 matrix, and the preset threshold is 100, 120, 130, or other values. If, within a 2×2 matrix region, the sensing values corresponding to four sensing data are 1247, 1036, 520, and 237, respectively, and all four sensing values are greater than the preset threshold, then the sensing point with a sensing value of 1247 is determined as the peak sensing point.
[0035] S102, determine the initial left boundary sensing point and the initial right boundary sensing point based on the peak sensing point.
[0036] In one embodiment of this application, the sensing data to the left and right of the row where the peak sensing point is located is traversed, and the sensing point located at the leftmost end of the row where the peak sensing point is located and whose sensing value is greater than or equal to a preset threshold is determined as the initial left boundary sensing point, and the sensing point located at the rightmost end of the row where the peak sensing point is located and whose sensing value is greater than or equal to the preset threshold is determined as the initial right boundary sensing point.
[0037] Referring to Figure 3, this is a schematic diagram of the distribution of sensing data provided in an embodiment of this application. The sensing data in Figure 3 is distributed in an array, that is, it includes multiple rows of data and multiple columns of data. The sensing data is indicated by sensing values in Figure 3. The peak sensing point in Figure 3 is the sensing point corresponding to sensing value 1247. The sensing point located at the leftmost position of the row containing the peak sensing point and whose sensing value is greater than or equal to a preset threshold is the sensing point corresponding to sensing value 848. That is, the sensing point corresponding to sensing value 848 is the initial left boundary sensing point. The sensing point located at the rightmost position of the row containing the peak sensing point and whose sensing value is greater than or equal to a preset threshold is the sensing point corresponding to sensing value 271. That is, the sensing point corresponding to sensing value 271 is the initial right boundary sensing point.
[0038] S103, based on the initial left boundary sensing point and the initial right boundary sensing point, traverse the sensing data to determine the boundary sensing points of the sensing data.
[0039] In one embodiment of this application, the sensing data is traversed row by row based on the column direction, the initial left boundary sensing point, and the initial right boundary sensing point to determine the boundary sensing points in each row of sensing data.
[0040] Referring to Figure 4, a flowchart for determining boundary sensing points is provided in one embodiment of this application.
[0041] S201, determine the next row to be traversed based on the direction of the first column.
[0042] In one embodiment of this application, the sensing data is traversed for the first time based on the first column direction. The next row to be traversed is the row following the row containing the peak sensing point. After that, the next row to be traversed is the row following the row that has been traversed, until the sensing data of all rows in the first column direction has been traversed. For example, the first column direction is from bottom to top. In other embodiments of this application, the first column direction can also be from top to bottom.
[0043] S202, determine the left sensing point of the next row based on the initial left boundary sensing point, and determine the right sensing point of the next row based on the initial right boundary sensing point.
[0044] In one embodiment of this application, the adjacent sensing point to the left of the initial left boundary sensing point in the next row is determined as the left sensing point of the next row, and the adjacent sensing point to the right of the initial right boundary sensing point in the next row is determined as the right sensing point of the next row.
[0045] In one embodiment of this application, the sensing point in the next row relative to the initial left boundary sensing point is the sensing point in the same column as the initial left boundary sensing point in that next row. Therefore, the left sensing point is the sensing point to the left of the sensing point in the same column as the initial left boundary sensing point. Similarly, the sensing point in the next row relative to the initial right boundary sensing point is the sensing point in the same column as the initial right boundary sensing point in that next row. Therefore, the right sensing point is the sensing point to the right of the sensing point in the same column as the initial right boundary sensing point. In other words, the left and right boundary sensing points of the previous row are each extended by one unit to obtain the left and right sensing points of the current row. As shown in Figure 3, for example, the left sensing point of the row below the row where the peak sensing point is located is a sensing point with a sensing value of 723, and the right sensing point is a sensing point with a sensing value of 1090.
[0046] S203, determine whether the sensing value of the left sensing point is greater than or equal to a preset threshold. If the sensing value of the left sensing point is greater than or equal to the preset threshold, the process proceeds to S204; if the sensing value of the left sensing point is less than the preset threshold, the process proceeds to S206.
[0047] S204, traverse the sensing points in the next row to the left, and determine whether the sensing value of each sensing point is greater than or equal to a preset threshold, until the boundary of the next row is reached or the sensing point with a sensing value less than the preset threshold is reached.
[0048] In one embodiment of this application, if the sensing value of the left sensing point is greater than or equal to a preset threshold, when traversing to the left from the left sensing point to a sensing point, it is determined whether the sensing value of the sensing point is greater than or equal to the preset threshold. If the sensing value of the sensing point is greater than or equal to the preset threshold, the traversal to the left continues to the next sensing point. If the sensing value of the sensing point is less than the preset threshold, the traversal to the left stops. The traversal to the left also stops after traversing the leftmost sensing point of the next row.
[0049] S205, the leftmost sensing point in the next row with a sensing value greater than or equal to a preset threshold is determined as the target left boundary sensing point of the next row.
[0050] As shown in Figure 3, for example, the target left boundary sensing point in the row below the row where the peak sensing point is located is a sensing point with a sensing value of 723.
[0051] S206, traverse the sensing points in the next row to the right, and determine whether the sensing value of each sensing point is greater than or equal to a preset threshold, until a sensing point with a sensing value greater than or equal to the preset threshold or a right sensing point is reached.
[0052] In one embodiment of this application, if the sensing value of the left sensing point is less than a preset threshold, when traversing to the right from the left sensing point to a sensing point, it is determined whether the sensing value of the sensing point is greater than or equal to the preset threshold. If the sensing value of the sensing point is less than the preset threshold, the traversal to the right to the next sensing point continues. If the sensing value of the sensing point is greater than or equal to the preset threshold, the traversal to the right stops. If the traversal reaches the right sensing point of the next row, the traversal to the right also stops.
[0053] S207, The leftmost sensing point in the next row with a sensing value greater than or equal to a preset threshold is determined as the target left boundary sensing point of the next row.
[0054] S208, determine whether the sensing value of the right sensing point is greater than or equal to a preset threshold. If the sensing value of the right sensing point is greater than or equal to the preset threshold, the process proceeds to S209; if the sensing value of the right sensing point is less than the preset threshold, the process proceeds to S211.
[0055] S209, traverse the sensing points in the next row to the right, and determine whether the sensing value of each sensing point is greater than or equal to a preset threshold, until the boundary of the next row is reached or the sensing point with a sensing value less than the preset threshold is reached.
[0056] In one embodiment of this application, if the sensing value of the right sensing point is greater than or equal to a preset threshold, when traversing to the right from the right sensing point to a sensing point, it is determined whether the sensing value of the sensing point is greater than or equal to the preset threshold. If the sensing value of the sensing point is greater than or equal to the preset threshold, the traversal to the right to the next sensing point continues. If the sensing value of the sensing point is less than the preset threshold, the traversal to the right stops. The traversal to the right also stops after traversing all the rightmost sensing points of the next row.
[0057] S210, the rightmost sensing point in the next row with a sensing value greater than or equal to a preset threshold is determined as the target right boundary sensing point of the next row.
[0058] S211, traverse the sensing points in the next row to the left, and determine whether the sensing value of each sensing point is greater than or equal to the preset threshold, until the sensing point with a sensing value greater than or equal to the preset threshold or the left sensing point is reached.
[0059] In one embodiment of this application, if the sensing value of the right sensing point is less than a preset threshold, when traversing to the left from the right sensing point to a sensing point, it is determined whether the sensing value of the sensing point is greater than or equal to the preset threshold. If the sensing value of the sensing point is less than the preset threshold, the traversal to the left to the next sensing point continues. If the sensing value of the sensing point is greater than or equal to the preset threshold, the traversal to the left stops. If the traversal reaches the left sensing point of the next row, the traversal to the left also stops.
[0060] S212, the rightmost sensing point in the next row with a sensing value greater than or equal to a preset threshold is determined as the target right boundary sensing point of the next row.
[0061] S213, determine whether the rows in the first column have been traversed. If the rows in the first column have not been traversed, the process returns to S201; if the rows in the first column have been traversed, the process proceeds to S214.
[0062] In one embodiment of this application, if the sensing value of the current row is empty, it means that there is no sensing point in the current row and the current row does not actually exist. Then it is determined that the traversal of the rows in the first column direction has been completed.
[0063] S214, based on the initial left boundary sensing point and initial right boundary sensing point of the row where the peak sensing point is located, and the target left boundary sensing point and target right boundary sensing point of each row in the first column direction during the first traversal, the first boundary of the touch area is generated.
[0064] In one embodiment of this application, if the row-by-row traversal of the sensing data in the first column direction is completed, the initial left boundary sensing point and the initial right boundary sensing point of the row where the peak sensing point is located, as well as the target left boundary sensing point and the target right boundary sensing point of each row in the first column direction during the first traversal, are spliced together to generate the first boundary of the touch area.
[0065] S215, based on the second column direction, the sensing data is traversed row by row to determine the target left boundary sensing point and target right boundary sensing point in each row of the second column direction during the second traversal.
[0066] In one embodiment of this application, the direction of the second column is opposite to that of the first column. That is, if the direction of the first column is from bottom to top, then the direction of the second column is from top to bottom; if the direction of the first column is from top to bottom, then the direction of the second column is from bottom to top. After the row-by-row traversal of the first column direction is completed in S214, the row-by-row traversal of the second column direction is started in S215.
[0067] S216, based on the initial left boundary sensing point and initial right boundary sensing point of the row where the peak sensing point is located, and the target left boundary sensing point and target right boundary sensing point of each row in the second column direction, generate the second boundary of the touch area.
[0068] In one embodiment of this application, if the row-by-row traversal of the sensing data in the second column direction is completed, the initial left boundary sensing point and the initial right boundary sensing point of the row where the peak sensing point is located, as well as the target left boundary sensing point and the target right boundary sensing point of each row in the second column direction during the second traversal, are spliced together to generate the second boundary of the touch area.
[0069] S217, If the boundary of the touch area generated by the Nth traversal of the sensing data is the same as that generated by the (N-1)th traversal, then the traversal of the sensing data is considered complete. Here, N is an integer greater than or equal to 2.
[0070] The embodiment shown in Figure 4 of this application uses a line-by-line traversal of the sensing data based on peak sensing points to accurately determine the boundary sensing points corresponding to the touch area.
[0071] Referring to Figure 5, this is a flowchart of determining boundary sensing points according to another embodiment of this application.
[0072] In this embodiment of the application, the second boundary obtained in S216 is used for judgment. If the second boundary is different from the first boundary, the process proceeds to S301.
[0073] S301, if the row-by-row traversal of the sensing data in the second column direction is completed, based on the first column direction, the sensing data is traversed a third time to determine the target left boundary sensing point and target right boundary sensing point in each row in the first column direction during the third traversal.
[0074] S302, based on the initial left boundary sensing point and initial right boundary sensing point of the row where the peak sensing point is located, and the target left boundary sensing point and target right boundary sensing point of each row in the first column direction during the third traversal, the third boundary of the touch area is generated.
[0075] S303, determine if the third boundary is the same as the second boundary. If the third boundary is the same as the second boundary, proceed to S304; if the third boundary is different from the second boundary, proceed to S305.
[0076] S304, confirm that the traversal of the sensing data is complete.
[0077] S305, based on the second column direction, perform a fourth row-by-row traversal of the sensing data to determine the target left boundary sensing point and target right boundary sensing point in each row of the second column direction during the fourth traversal.
[0078] S306, based on the initial left boundary sensing point and initial right boundary sensing point of the row where the peak sensing point is located, and the target left boundary sensing point and target right boundary sensing point of each row in the second column direction during the fourth traversal, the fourth boundary of the touch area is generated.
[0079] S307, if the boundary of the touch area generated by the Nth traversal of the sensing data is the same as that generated by the (N-1)th traversal, it is determined that the traversal of the sensing data is complete. Here, N is an integer greater than or equal to 2. For example, if the fourth boundary is the same as the third boundary, it is determined that the traversal of the sensing data is complete. If the fourth boundary is different from the third boundary, the sensing data is traversed a fifth time using the same method, until the same boundary is generated.
[0080] In other words, the sensing data is traversed at least twice to generate identical boundaries before the traversal of the sensing data is considered complete. The specific number of traversals depends on the shape of the sensing area. The embodiment shown in Figure 5 of this application ensures the accuracy of the generated touch area boundary by determining the completion of the sensing data traversal when generating identical boundaries through traversing the boundary sensing points.
[0081] S104, determine the touch area based on the boundary sensing points.
[0082] In one embodiment of this application, a touch area is generated based on a second boundary, that is, the area formed around the second boundary is defined as the touch area.
[0083] In one embodiment of this application, the method further includes: determining a reporting point for a touch operation based on sensing data in the touch area. The electronic device responds to the touch operation based on the reporting point. For example, the reporting point for the touch operation is determined by calculating the centroid based on the positions of all sensing points in the touch area.
[0084] Referring to Figures 6 to 9, this is a schematic diagram of determining the touch area according to an embodiment of this application. The sensing value threshold is set to 130, and sensing points exceeding the threshold belong to the touch area. Point A in Figure 6 is the peak sensing point formed on the touch screen by the user's touch operation. Referring to Figure 3, this is a schematic diagram of the distribution of sensing data corresponding to the touch operation. The initial left boundary sensing point of the row where the peak sensing point A is located is the sensing point corresponding to the sensing value 848, and the initial right boundary sensing point is the sensing point corresponding to the sensing value 271. As shown in Figure 7, starting from the row containing the peak sensing point A, the sensing data is traversed from bottom to top for the first time until the sensing data of the top row is traversed. The target left boundary sensing point of the first row is the boundary sensing point corresponding to sensing value 723, the target right boundary sensing point of the first row is the sensing point corresponding to sensing value 434, the target left boundary sensing point of the second row is the sensing point corresponding to sensing value 148, the target right boundary sensing point of the second row is the sensing point corresponding to sensing value 767, the target left boundary sensing point of the third row is the sensing point corresponding to sensing value 681, and the target right boundary sensing point of the third row is the sensing point corresponding to sensing value 690. As shown in Figure 7, after the first traversal is completed, the target left boundary sensing point of each row forms the first left boundary L1 of the touch area, and the target right boundary sensing point of each row forms the first right boundary R1 of the touch area. As shown in Figure 8, starting from the top row of the sensing data, the sensing data is traversed a second time from top to bottom until the bottom row of sensing data is traversed. The target right boundary sensing point for the first row is the sensing point corresponding to sensing value 434; the target left boundary sensing point for the second row is the sensing point corresponding to sensing value 148; the target right boundary sensing point for the second row is the sensing point corresponding to sensing value 767; the target left boundary sensing point for the third row is the sensing point corresponding to sensing value 681; the target right boundary sensing point for the third row is the sensing point corresponding to sensing value 690; the target left boundary sensing point for the fourth row is the sensing point corresponding to sensing value 245; and the target right boundary sensing point for the fourth row is the sensing point corresponding to sensing value 237. As shown in Figure 8, after the second traversal, the target left boundary sensing point of each row forms the second left boundary L2 of the touch area, and the target right boundary sensing point of each row forms the second right boundary R2 of the touch area. Since the boundaries formed by the first left and first right boundaries are different from the boundaries formed by the second left and second right boundaries, a third traversal is required.
[0085] As shown in Figure 9, starting from the bottom row of the sensing data, the sensing data is traversed a third time from bottom to top until the top row of sensing data is traversed. The resulting target right boundary sensing point for the first row is the sensing point corresponding to sensing value 434; the target left boundary sensing point for the second row is the sensing point corresponding to sensing value 148; the target right boundary sensing point for the second row is the sensing point corresponding to sensing value 767; the target left boundary sensing point for the third row is the sensing point corresponding to sensing value 681; the target right boundary sensing point for the third row is the sensing point corresponding to sensing value 690; the target left boundary sensing point for the fourth row is the sensing point corresponding to sensing value 245; and the target right boundary sensing point for the fourth row is the sensing point corresponding to sensing value 237. As shown in Figure 9, after the third traversal, the target left boundary sensing point of each row forms the third left boundary L3 of the touch area, and the target right boundary sensing point of each row forms the third right boundary R3 of the touch area. The boundary formed by the third left boundary and the third right boundary is the same as the boundary formed by the second left boundary and the second right boundary. Therefore, after traversing the sensing data, the area surrounded by the boundary formed by the third left boundary and the third right boundary is determined as the touch area, which is a solid connected area.
[0086] Referring to Figure 10, this is a schematic diagram of the distribution of sensing data provided in another embodiment of this application. Referring to Figures 11 to 14, this is a schematic diagram of determining the touch area provided in another embodiment of this application. The sensing value threshold is set to 130, and sensing points exceeding the threshold belong to the touch area. Point A in Figure 11 is the peak sensing point formed on the touch screen by the user's touch operation. As shown in Figure 10, peak sensing point A is a sensing point with a sensing value of 546. The initial left boundary sensing point of the row where peak sensing point A is located is the sensing point corresponding to a sensing value of 220, and the initial right boundary sensing point is the sensing point corresponding to a sensing value of 466. Starting from the row containing peak sensing point A, the sensing data is traversed from bottom to top for the first time until the top row of sensing data is traversed. The target left boundary sensing point of the first row is the boundary sensing point corresponding to sensing value 309, and the target right boundary sensing point of the first row is the sensing point corresponding to sensing value 490. The target left and right boundary sensing points of the second row are both corresponding to sensing value 351. The target left boundary sensing point of the third row is the sensing point corresponding to sensing value 289, and the target right boundary sensing point of the third row is the sensing point corresponding to sensing value 430. The target left boundary sensing point of the fourth row is the sensing point corresponding to sensing value 491, and the target right boundary sensing point of the fourth row is the sensing point corresponding to sensing value 644. The target left and right boundary sensing points of the fifth row are both corresponding to sensing value 150. As shown in Figure 12, after the first traversal, the target left boundary sensing points of each row form the first left boundary L1 and the second left boundary L2 of the touch area, and the target right boundary sensing points of each row form the first right boundary R1 of the touch area.
[0087] Starting from the top row of the sensor data, a second traversal is performed from top to bottom until the bottom row of sensor data is traversed. The results show that the left and right boundary sensor points of the target in the first row are both corresponding to a sensor value of 150; the left boundary sensor point in the second row is corresponding to a sensor value of 491; the right boundary sensor point is corresponding to a sensor value of 644; the left boundary sensor point in the third row is corresponding to a sensor value of 289; the right boundary sensor point is corresponding to a sensor value of 430; the left boundary sensor point in the fourth row is corresponding to a sensor value of 225; the right boundary sensor point is corresponding to a sensor value of 351; and the fifth row... The sensor point corresponding to the sensing value 325 in the fifth row is the sensor point corresponding to the sensing value 490 in the sixth row; the sensor point corresponding to the sensing value 364 in the sixth row is the sensor point corresponding to the sensing value 466 in the sixth row; the sensor point corresponding to the sensing value 255 in the seventh row is the sensor point corresponding to the sensing value 460 in the seventh row; the sensor point corresponding to the sensing value 169 in the eighth row is the sensor point corresponding to the sensing value 263 in the eighth row; the sensor point corresponding to the sensing value 451 in the ninth row is the sensor point corresponding to the sensing value 474 in the ninth row. As shown in Figure 13, after the second traversal, the sensor point corresponding to the left boundary of the target in each row forms the third left boundary L3 of the touch area, and the sensor point corresponding to the right boundary of the target in each row forms the second right boundary R2 of the touch area. Since the boundaries formed by the first left boundary, the second left boundary, and the first right boundary are different from the boundaries formed by the third left boundary and the second right boundary, a third traversal is required.
[0088] Starting from the bottom row of the sensing data, perform a third traversal of the sensing data from bottom to top until the top row of sensing data is completed. The left boundary sensing point of the target in the first row is the sensing point corresponding to sensing value 451, and the right boundary sensing point is the sensing point corresponding to sensing value 474. The left boundary sensing point of the target in the second row is the sensing point corresponding to sensing value 169, and the right boundary sensing point is the sensing point corresponding to sensing value 263. The left boundary sensing point of the target in the third row is the sensing point corresponding to sensing value 255, and the right boundary sensing point is the sensing point corresponding to sensing value 460. The left boundary sensing point of the target in the fourth row is the sensing point corresponding to sensing value 364, and the right boundary sensing point is the sensing point corresponding to sensing value 466. The target left boundary sensor in the fifth row corresponds to the sensor value 325, and the target right boundary sensor in the fifth row corresponds to the sensor value 490. The target left boundary sensor in the sixth row corresponds to the sensor value 225, and the target right boundary sensor in the sixth row corresponds to the sensor value 351. The target left boundary sensor in the seventh row corresponds to the sensor value 289, and the target right boundary sensor in the seventh row corresponds to the sensor value 430. The target left boundary sensor in the eighth row corresponds to the sensor value 491, and the target right boundary sensor in the eighth row corresponds to the sensor value 644. The target left boundary sensor in the ninth row corresponds to the sensor value 150. As shown in Figure 14, after the third traversal, the target left boundary sensor in each row forms the fourth left boundary L4 of the touch area, and the target right boundary sensor in each row forms the third right boundary R3 of the touch area. The boundary formed by the third left boundary and the second right boundary is the same as the boundary formed by the fourth left boundary and the third right boundary. Therefore, after traversing the sensing data, the area surrounded by the boundary formed by the third left boundary and the second right boundary is determined as the touch area, which is a hollow connected area.
[0089] Referring to Figure 15, this is a schematic diagram of the distribution of sensing data provided in another embodiment of this application. The sensing value threshold is set to 130, and sensing points exceeding the threshold belong to the touch area. Referring to Figures 16 to 20, this is a schematic diagram of determining the touch area provided in another embodiment of this application. Point A in Figure 16 is the peak sensing point formed on the touch screen by the user's touch operation. As shown in Figure 15, peak sensing point A is the sensing point corresponding to sensing value 615, the initial left boundary sensing point of the row where peak sensing point A is located is the sensing point corresponding to sensing value 371, and the initial right boundary sensing point is peak sensing point A itself. Starting from the row where peak sensing point A is located, the sensing data is traversed from bottom to top for the first time until the sensing data of the top row is traversed. The target left boundary sensing point and target right boundary sensing point of the first row are both boundary sensing points corresponding to sensing value 285. As shown in Figure 17, after the first traversal is completed, the target left boundary sensing point of each row forms the first left boundary L1 of the touch area, and the target right boundary sensing point of each row forms the first right boundary R1 of the touch area.
[0090] Starting from the top row of the sensing data, a second traversal is performed from top to bottom until the bottom row of sensing data is completed. The results show that the left and right boundary sensing points of the target in the first row are both corresponding to sensing values of 131; the left and right boundary sensing points of the target in the second row are both corresponding to sensing values of 285; the left boundary sensing point of the target in the third row is corresponding to sensing value 371; the right boundary sensing point of the target in the third row is corresponding to sensing value 615; and the left boundary sensing point of the target in the fourth row is corresponding to sensing value 293. The corresponding sensing points are as follows: the right boundary sensing point of the target in the fourth row corresponds to the sensing value 611; the left boundary sensing point of the target in the fifth row corresponds to the sensing value 175; the right boundary sensing point of the target in the fifth row corresponds to the sensing value 392; the left boundary sensing point of the target in the sixth row corresponds to the sensing value 547; the right boundary sensing point of the target in the sixth row corresponds to the sensing value 640; the left boundary sensing point of the target in the seventh row corresponds to the sensing value 220; and the right boundary sensing point of the target in the seventh row corresponds to the sensing value 132. As shown in Figure 18, after the second traversal, the left boundary sensing points of the target in each row form the second left boundary L2 and the third left boundary L3 of the touch area, and the right boundary sensing points of the target in each row form the second right boundary R2 of the touch area. Since the boundaries formed by the first left boundary and the first right boundary are different from the boundaries formed by the second left boundary, the third left boundary, and the second right boundary, a third traversal is required.
[0091] Starting from the bottom row of the sensing data, the sensing data is traversed a third time from bottom to top until the top row of sensing data is traversed. The left boundary sensing point of the target in the first row is the sensing point corresponding to sensing value 220, and the right boundary sensing point is the sensing point corresponding to sensing value 132. The left boundary sensing point of the target in the second row is the sensing point corresponding to sensing value 547, and the right boundary sensing point is the sensing point corresponding to sensing value 640. The left boundary sensing point of the target in the third row is the sensing point corresponding to sensing value 175, and the right boundary sensing point is the sensing point corresponding to sensing value 392. The left boundary sensing point of the target in the fourth row is the sensing point corresponding to sensing value 293, and the right boundary sensing point is the sensing point corresponding to sensing value 346. The target left boundary sensor point in the fifth row corresponds to the sensor value 371, and the target right boundary sensor point in the fifth row corresponds to the sensor value 477. The target left boundary sensor point in the sixth row corresponds to the sensor value 285, and the target right boundary sensor point in the sixth row corresponds to the sensor value 481. The target left boundary sensor point in the seventh row corresponds to the sensor value 131, and the target right boundary sensor point in the seventh row corresponds to the sensor value 496. The target left boundary sensor point in the eighth row corresponds to the sensor value 246, and the target right boundary sensor point in the eighth row corresponds to the sensor value 293. The target left and right boundary sensor points in the ninth row both correspond to the sensor value 224. As shown in Figure 19, after the third traversal, the target left boundary sensor points in each row form the fourth left boundary L4 and the fifth left boundary L5 of the touch area, and the target right boundary sensor points in each row form the third right boundary R3 of the touch area. The boundary formed by the second left boundary, the third left boundary, and the second right boundary is different from the boundary formed by the fourth left boundary, the fifth left boundary, and the third right boundary. Therefore, a fourth traversal is required.
[0092] Starting from the top row of the sensor data, the sensor data is traversed four times from top to bottom until the bottom row is traversed. The results show that the left and right boundary sensor points of the target in the first row are both corresponding to the sensor value 224; the left boundary sensor point in the second row is corresponding to the sensor value 246; the right boundary sensor point is corresponding to the sensor value 293; the left boundary sensor point in the third row is corresponding to the sensor value 131; the right boundary sensor point is corresponding to the sensor value 496; the left boundary sensor point in the fourth row is corresponding to the sensor value 285; the right boundary sensor point is corresponding to the sensor value 481; and the fifth row... The sensor point corresponding to the sensing value 371 in the fifth row is the sensor point corresponding to the sensing value 477 in the sixth row; the sensor point corresponding to the sensing value 293 in the sixth row is the sensor point corresponding to the sensing value 346 in the sixth row; the sensor point corresponding to the sensing value 175 in the seventh row is the sensor point corresponding to the sensing value 392 in the seventh row; the sensor point corresponding to the sensing value 547 in the eighth row is the sensor point corresponding to the sensing value 640 in the eighth row; the sensor point corresponding to the sensing value 220 in the ninth row is the sensor point corresponding to the sensing value 132 in the ninth row. As shown in Figure 20, after the fourth traversal, the sensor points on the left boundaries of the target in each row form the sixth left boundary L6 and the seventh left boundary L7 of the touch area, and the sensor points on the right boundaries of the target in each row form the fourth right boundary R4 of the touch area. The boundary formed by the sixth left boundary, the seventh left boundary, and the fourth right boundary is the same as the boundary formed by the fourth left boundary, the fifth left boundary, and the third right boundary. Therefore, after completing the traversal of the sensing data, the area surrounded by the boundary formed by the sixth left boundary, the seventh left boundary, and the fourth right boundary is determined as the touch area. This touch area is an irregularly bifurcated connected region.
[0093] Referring to Figure 21, this is a schematic diagram of the structure of a touch processing device provided in an embodiment of this application. In one embodiment of this application, the touch processing device 200 may include a plurality of functional modules composed of computer program segments. The computer program segments in the touch processing device 200 may be stored in the memory of an electronic device and executed by at least one processor to perform touch processing functions.
[0094] In one embodiment of this application, the touch processing device 200 can be divided into multiple functional modules according to the functions it performs. The functional modules of the touch processing device 200 may include: a data acquisition module 201, a first determination module 202, a traversal module 203, and a second determination module 204. In this embodiment, a module refers to a series of computer program segments that can be executed by at least one processor and perform a fixed function, and which are stored in memory.
[0095] The acquisition module 201 is used to acquire sensing data and determine peak sensing points based on the sensing data. The sensing data is distributed in an array.
[0096] The first determining module 202 is used to determine the initial left boundary sensing point and the initial right boundary sensing point based on the peak sensing point.
[0097] The traversal module 203 is used to traverse the sensing data based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing points of the sensing data.
[0098] The second determining module 204 is used to determine the touch area based on the boundary sensing points.
[0099] This application also provides an electronic device 1. Referring to FIG22, the electronic device 1 may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device and / or smart city device. This application does not impose any special restrictions on the specific type of electronic device 1.
[0100] Electronic device 1 includes, but is not limited to, a touch chip 110, a memory 120, and a touch screen 140 connected via a communication bus 130. The touch chip 110 may be a processor or a chip for processing touch data. Figure 22 is merely an example of an electronic device and does not constitute a limitation thereof; in other embodiments, the electronic device may include more components than those shown.
[0101] Memory 120 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 110 and can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs, as well as user and application data. The RAM may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.
[0102] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct read and write operations by the processor. Non-volatile memory can include disk memory and flash memory.
[0103] Memory 120 is used to store one or more computer programs. One or more computer programs are configured to be executed by touch chip 110. The one or more computer programs include a number of instructions, which, when executed by touch chip 110, enable touch processing methods to be performed on electronic device 1.
[0104] In other embodiments, the electronic device 1 further includes an external memory interface for connecting to external memory to expand the storage capacity of the electronic device 1.
[0105] A processor may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video transcoder, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0106] The touch chip 110 provides computing and control capabilities. For example, the touch chip 110 is used to execute computer programs stored in memory 120 to implement the touch processing method described above.
[0107] The communication bus 130 is used to provide a channel for communication between the memory 120 and the touch chip 110 in the electronic device 1.
[0108] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 1. In other embodiments of this application, the electronic device 1 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 hardware and software.
[0109] This application also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the touch processing method in the above embodiments.
[0110] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the touch processing method described in the above embodiments.
[0111] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and memory; wherein, the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the touch processing methods in the above-described method embodiments.
[0112] In this embodiment, the electronic device, computer storage medium, computer program product or chip are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding method provided above, and will not be repeated here.
[0113] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, the division of the above functional modules is only used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0114] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or elements may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interface; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0115] The units described as separate components may or may not be physically separate. A component shown as a unit can be a single physical unit or multiple physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0116] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0117] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts or all or part of the technical solutions that contribute to the prior art, can be embodied in the form of software products. The software products are stored in a storage medium and include several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, and other media capable of storing program code.
[0118] In summary, this invention meets the requirements for an invention patent, and therefore a patent application is filed in accordance with the law. However, the above description is only a preferred embodiment of this invention, and any equivalent modifications or variations made by those skilled in the art in accordance with the spirit of this invention should be covered within the scope of the following patent application.
[0119] 1: Electronic devices 110: Touch chip 120: Memory 130: Communication Bus 140: Touchscreen 141: Touch Layer 200: Touch processing device 201: Data Acquisition Module 202: First Determined Module 203: Traversing the module 204: Second Determined Module S101-S104: Steps S201-S217: Steps S301-S307: Steps
Claims
1. A touch processing method, applied to an electronic device, wherein, The method includes: collecting sensing data; determining peak sensing points based on the sensing data, wherein the sensing data is distributed in an array; determining initial left boundary sensing points and initial right boundary sensing points based on the peak sensing points; traversing the sensing data row by row based on the initial left boundary sensing points and the initial right boundary sensing points to determine the boundary sensing points of each row of the sensing data, including: determining the next row to be traversed based on the direction of the first column; determining the left sensing point of the next row based on the initial left boundary sensing point, and determining the right sensing point of the next row based on the initial right boundary sensing point; if the sensing value of the left sensing point is greater than or equal to a preset threshold, traversing the sensing points of the next row to the left, determining whether the sensing value of each sensing point is greater than or equal to the preset threshold, until the boundary of the next row is reached or a sensing point with a sensing value less than the preset threshold is reached; and determining a touch area based on the boundary sensing points.
2. The touch processing method as described in claim 1, wherein, The step of determining the peak sensing point based on the sensing data includes: traversing the sensing data based on a preset matrix, and determining the sensing point with the largest sensing value within the preset matrix area that is greater than or equal to a preset threshold as the peak sensing point.
3. The touch processing method as described in claim 1, wherein, The step of determining the initial left boundary sensing point and the initial right boundary sensing point based on the peak sensing point includes: traversing the sensing data to the left of the peak sensing point in the row containing the peak sensing point, and determining the sensing point whose sensing value at the leftmost end of the row containing the peak sensing point is greater than or equal to a preset threshold as the initial left boundary sensing point; and traversing the sensing data to the right of the peak sensing point in the row containing the peak sensing point, and determining the sensing point whose sensing value at the rightmost end of the row containing the peak sensing point is greater than or equal to the preset threshold as the initial right boundary sensing point.
4. The touch processing method as described in claim 1, wherein, The step of traversing the sensing data line by line based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing point of each line of sensing data further includes: if the sensing value of the left sensing point is less than the preset threshold, traversing the sensing points of the next line to the right, determining whether the sensing value of each sensing point is greater than or equal to the preset threshold, until a sensing point with a sensing value greater than or equal to the preset threshold or the right sensing point is reached; and determining the leftmost sensing point of the next line with a sensing value greater than or equal to the preset threshold as the target left boundary sensing point of the next line.
5. The touch processing method as described in claim 4, wherein, The step of traversing the sensing data line by line based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing point of each line of sensing data further includes: if the sensing value of the right sensing point is greater than or equal to the preset threshold, traversing the sensing points of the next line to the right, determining whether the sensing value of each sensing point is greater than or equal to the preset threshold, until the boundary of the next line is reached or a sensing point with a sensing value less than the preset threshold is reached; if the sensing value of the right sensing point is less than the preset threshold, traversing the sensing points of the next line to the left, determining whether the sensing value of each sensing point is greater than or equal to the preset threshold, until a sensing point with a sensing value greater than or equal to the preset threshold is reached or a left sensing point is reached; and determining the rightmost sensing point of the next line with a sensing value greater than or equal to the preset threshold as the target right boundary sensing point of the next line.
6. The touch processing method as described in claim 5, wherein, The step of traversing the sensing data row by row based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing point of each row of the sensing data further includes: if the row-by-row traversal of the sensing data in the first column direction is completed, generating the first boundary of the touch area based on the initial left boundary sensing point and the initial right boundary sensing point of the row where the peak sensing point is located, and the target left boundary sensing point and the target right boundary sensing point of each row in the first column direction during the first traversal.
7. The touch processing method as described in claim 6, wherein, The step of traversing the sensing data row by row based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing point of each row of the sensing data further includes: traversing the sensing data row by row based on the second column direction to determine the target left boundary sensing point and the target right boundary sensing point of each row in the second column direction during the second traversal, wherein the second column direction is opposite to the first column direction; and generating the second boundary of the touch area based on the initial left boundary sensing point and the initial right boundary sensing point of the row where the peak sensing point is located, and the target left boundary sensing point and the target right boundary sensing point of each row in the second column direction.
8. The touch processing method as described in claim 7, wherein, Determining the touch area based on the boundary sensing point includes: generating the touch area based on the second boundary.
9. The touch processing method as described in claim 8, wherein, The step of traversing the sensing data row by row based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing point of each row of the sensing data further includes: if the row-by-row traversal of the sensing data in the second column direction is completed, traversing the sensing data row by row based on the first column direction to determine the target left boundary sensing point and the target right boundary sensing point of each row in the first column direction during the third traversal; generating the third boundary of the touch area based on the initial left boundary sensing point and the initial right boundary sensing point of the row where the peak sensing point is located, and the target left boundary sensing point and the target right boundary sensing point of each row in the first column direction during the third traversal; if the third boundary is the same as the second boundary, determining that the traversal of the sensing data is completed.
10. The touch processing method as described in claim 9, wherein, The step of traversing the sensing data row by row based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing point of each row of the sensing data further includes: if the third boundary is different from the second boundary, traversing the sensing data row by row based on the second column direction to determine the target left boundary sensing point and the target right boundary sensing point of each row in the second column direction during the fourth traversal; generating the fourth boundary of the touch area based on the initial left boundary sensing point and the initial right boundary sensing point of the row where the peak sensing point is located, and the target left boundary sensing point and the target right boundary sensing point of each row in the second column direction during the fourth traversal; if the fourth boundary is the same as the third boundary, determining that the traversal of the sensing data is complete.
11. The touch processing method as described in claim 7, wherein, The step of determining the touch area based on the boundary sensing points includes: if the boundary of the touch area generated by the Nth traversal is the same as that generated by the (N-1)th traversal, it is determined that the traversal of the sensing data is completed, where N is greater than or equal to 2.
12. The touch processing method as described in claim 4, wherein, The step of determining the left sensing point of the next row based on the initial left boundary sensing point and the right sensing point of the next row based on the initial right boundary sensing point includes: determining the adjacent sensing point to the left of the next row relative to the initial left boundary sensing point as the left sensing point of the next row, and determining the adjacent sensing point to the right of the next row relative to the initial right boundary sensing point as the right sensing point of the next row.
13. The touch processing method as described in claim 1, wherein, The method further includes: determining the reporting point of the touch operation based on the sensing data in the touch area.
14. A touch chip, wherein, The touch chip is used to perform the touch processing method as described in any one of claims 1 to 13.
15. An electronic device, wherein, Includes a touch chip for performing a touch processing method as described in any one of claims 1 to 13, wherein the electronic device responds to touch operations based on a report from the touch chip.
Citation Information
Patent Citations
Contact information acquiring method and touch control module
CN105739733A
Input device and touch position detecting method thereof
TW201220158A
