Touch control processing method, touch control chip and electronic equipment
By collecting induction data in electronic devices and determining peak and boundary sensing points, the problem of touch operations forming multiple peak points on the touch screen is solved, ensuring correct response to touch operations and improving user experience.
Patent Information
- Application Number
- CN202510309285.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-06-27
AI Technical Summary
On the touch screen, actual touch operations may be affected by noise, resulting in the formation of multiple peak points, causing electronic devices to fail to respond to touch operations correctly, affecting the user experience.
By collecting induction data, peak sensing points are determined, and the initial left and right boundary sensing points are determined based on these points. Then traverse the sensing data to determine the boundary sensing points, thereby determining the touch area.
Ensure that electronic devices can correctly respond to user touch operations, improve user experience, and reduce noise impact by combining multiple nearby peak points.
Smart Images

Figure CN120215744A_ABST
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. Background Art
[0002] Touch screens are widely used in intelligent electronic devices such as smart phones, tablet computers, and wearable devices. When a user touches the touch screen, the electronic device determines the peak point based on the change in the sensing capacitance and reports the position of the peak point to respond to the user's touch operation. However, the actual touch operation may be affected by noise and form multiple peak points on the touch screen body. If the positions of multiple peak points are reported, the electronic device may not be able to correctly respond to the touch operation, thus affecting the user experience. Summary of the Invention
[0003] Embodiments of this application provide a touch processing method, an electronic device, and a storage medium, which solve the problem that when multiple peak points are formed on the touch screen during the touch operation, the electronic device may not be able to correctly respond to the touch operation.
[0004] In a first aspect, an embodiment of this application provides a touch processing method applied to an electronic device. The method includes: collecting sensing data, and determining a peak sensing point based on the sensing data, where the sensing data is distributed in an array; determining an initial left boundary sensing point and an initial right boundary sensing point based on the peak sensing point; traversing the sensing data based on the initial left boundary sensing point and the initial right boundary sensing point to determine a boundary sensing point of the sensing data; and determining a touch area based on the boundary sensing point.
[0005] In a possible implementation manner, the determining a 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 and greater than or equal to a preset threshold within the preset matrix area as the peak sensing point.
[0006] In a possible implementation manner, the determining an initial left boundary sensing point and an initial right boundary sensing point based on the peak sensing point includes: for the sensing data on the left of the peak sensing point in the row where the peak sensing point is located, determining the sensing point with the sensing value greater than or equal to the preset threshold and located at the leftmost of the row where the peak sensing point is located as the initial left boundary sensing point; traversing the sensing data on the right of the peak sensing point in the row where the peak sensing point is located, and determining the sensing point with the sensing value greater than or equal to the preset threshold and located at the rightmost of the row where the peak sensing point is located as the initial right boundary sensing point.
[0007] In a possible implementation, 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 row by row 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 a possible implementation, 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 points of each row of the sensing data includes: determining the next row to be traversed based on the first column direction; 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 to determine 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 traversed or a sensing point with a sensing value less than the preset threshold is traversed; 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 to determine 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 traversed or the right sensing point is traversed; 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 a possible implementation, 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 points of each row 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 row to the right to determine 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 traversed or a sensing point with a sensing value less than the preset threshold is traversed; if the sensing value of the right sensing point is less than the preset threshold, traversing the sensing points of the next row to the left to determine 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 traversed or the left boundary sensing point is traversed; determining the rightmost sensing point of the next row with a sensing value greater than or equal to the preset threshold as the target right boundary sensing point of the next row.
[0010] In a 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 points of each row of the sensing data further includes: If the traversal of the sensing data in the first column direction is completed, 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, generate the first boundary of the touch area.
[0011] In a 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 points of each row of the sensing data further includes: Based on the second column direction, traverse the sensing data row by row 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, where the second column direction is opposite to the first column direction; 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, generate the second boundary of the touch area.
[0012] In a possible implementation, the step of determining the touch area based on the boundary sensing points includes: Generating the touch area based on the second boundary.
[0013] In a 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 points of each row of the sensing data further includes: If the traversal of the sensing data in the second column direction is completed, based on the first column direction, traverse the sensing data row by row 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; 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, generate the third boundary of the touch area; If the third boundary is the same as the second boundary, determine that the traversal of the sensing data is completed.
[0014] In a 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 points 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 a 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 completed.
[0015] In a possible implementation, 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, determining that the traversal of the sensing data is completed, where N is greater than or equal to 2.
[0016] In a possible implementation, the step of 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 includes: determining the left sensing point of the next row as the adjacent sensing point to the left of the next row relative to the initial left boundary sensing point, and determining the right sensing point of the next row as the adjacent sensing point to the right of the next row relative to the initial right boundary sensing point.
[0017] In a possible implementation, the method further includes: determining the reporting point of the touch operation based on the sensing data in the touch area.
[0018] In a second aspect, an embodiment of the present application provides a touch chip, which is used to execute the above touch processing method.
[0019] In a third aspect, an embodiment of the present application provides an electronic device, including a touch chip, which is used to execute the above touch processing method, and the electronic device responds to the touch operation based on the reporting point of the touch chip.
[0020] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores program instructions. When the program instructions run on an electronic device, the processor of the electronic device is caused to execute the above touch processing method.
[0021] The touch processing method, electronic device, and storage medium provided by the embodiments of the present application can traverse the sensed data based on the peak sensing points, determine the boundary sensing points formed by the touch operation on the touch screen, 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without creative efforts.
[0023] Figure 1 is a flowchart of a touch processing method provided by an embodiment of the present application.
[0024] Figure 2 is a schematic structural diagram of a touch screen provided by an embodiment of the present application.
[0025] Figure 3 is a schematic diagram of the distribution of sensed data provided by an embodiment of the present application.
[0026] Figure 4 is a flowchart of determining boundary sensing points provided by an embodiment of the present application.
[0027] Figure 5 is a flowchart of determining boundary sensing points provided by another embodiment of the present application.
[0028] Figure 6 is a schematic diagram of determining a touch area provided by an embodiment of the present application.
[0029] Figure 7 is a schematic diagram of determining a touch area provided by an embodiment of the present application.
[0030] Figure 8 is a schematic diagram of determining a touch area provided by an embodiment of the present application.
[0031] Figure 9 is a schematic diagram of determining a touch area provided by an embodiment of the present application.
[0032] Figure 10 is a schematic diagram of the distribution of sensed data provided by another embodiment of the present application.
[0033] Figure 11 is a schematic diagram of determining a touch area provided by another embodiment of the present application.
[0034] Figure 12 It is a schematic diagram for determining a touch area provided by another embodiment of the present application.
[0035] Figure 13 It is a schematic diagram for determining a touch area provided by another embodiment of the present application.
[0036] Figure 14 It is a schematic diagram for determining a touch area provided by another embodiment of the present application.
[0037] Figure 15 It is a schematic diagram of the distribution of induction data provided by another embodiment of the present application.
[0038] Figure 16 It is a schematic diagram for determining a touch area provided by another embodiment of the present application.
[0039] Figure 17 It is a schematic diagram for determining a touch area provided by another embodiment of the present application.
[0040] Figure 18 It is a schematic diagram for determining a touch area provided by another embodiment of the present application.
[0041] Figure 19 It is a schematic diagram for determining a touch area provided by another embodiment of the present application.
[0042] Figure 20 It is a schematic diagram for determining a touch area provided by another embodiment of the present application.
[0043] Figure 21 It is a schematic structural diagram of a touch processing device provided by an embodiment of the present application.
[0044] Figure 22 It is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0045] In the embodiments of the present application, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "exemplary" or "for example" aims to present relevant concepts in a specific manner.
[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. The terms used in the specification of this application are for the purpose of describing specific embodiments only and are not intended to limit this application. It should be understood that unless otherwise stated in this application, " / " means "or". For example, A / B may mean A or B. The "and / or" in this application is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may mean: A exists alone, A and B exist simultaneously, and B exists alone, these three situations. "At least one" means one or more. "Multiple" means two or more than two. For example, at least one of a, b, or c may mean: a, b, c, a and b, a and c, b and c, a, b, and c, these seven situations. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0047] Touch screens are widely used in intelligent electronic devices such as smart phones, tablet computers, and wearable devices. When a user touches the screen, the electronic device determines the peak (peak value) point based on the change of the sensing capacitance and reports the position of the peak point to respond to the user's touch operation. In principle, one finger (or other touch object, such as an active pen) will only have one peak. However, the actual touch operation may be affected by noise, resulting in multiple peak points being formed on the screen by one touch object. If the positions of multiple peak points are all reported, the electronic device may not be able to correctly respond to the touch operation, thus affecting the user experience.
[0048] Therefore, it is necessary to merge multiple adjacent peak points. During the process of merging peak points, it is necessary to search for the connected domain that includes these multiple peak points. The multiple peak points in this connected domain can be merged into one peak point, and only the coordinates of the merged peak point are reported. In addition, the connected domain may not be connected from the perspective of the image. For example, when a user's finger touches the touch screen, it sometimes forms multiple unconnected touch areas, but actually belongs to the same touch. At this time, the unconnected touch areas on the image still belong to the connected domain from the perspective of touch processing and recognition.
[0049] Related technologies usually search in eight directions based on a touch sensing point (such as a peak point), use recursive function calls to determine all peak points, and determine the connected region corresponding to the touch operation, that is, the touch area, based on all peak points. However, the call of the recursive function will cause the code to be pushed onto the stack and nested as the number of connected nodes increases, increasing the stack storage requirements, with a slower processing speed and lower efficiency. In addition, related technologies can also divide the touch area and non-touch area of the touch screen based on boundary calculation. The boundary calculation requires image binaryzation processing, and then the boundary is calculated through differential calculation, with a large amount of data processing and a small amount of effective data processing.
[0050] An embodiment of the present application provides a touch processing method, which can traverse the acquired sensing data based on the peak sensing points, determine the boundary sensing points formed by the touch operation on the touch screen, and determine the touch area corresponding to the touch operation based on the boundary sensing points, so as to ensure that the electronic device can correctly respond to the user's touch operation and effectively improve the user experience. This way of determining the touch area can be implemented using a conventional function, so that the storage space used by the stack does not change with different input data during the running of the code, with a faster processing speed and higher efficiency.
[0051] Refer to Figure 1 As shown, it is a flowchart of a touch processing method provided by an embodiment of the present application. The method is applied to an electronic device, and the touch processing method includes:
[0052] S101, collect sensing data and determine peak sensing points based on the sensing data.
[0053] Refer to Figure 2 As shown, it is a schematic structural diagram of a touch screen provided by an embodiment of the present 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.
[0054] In an embodiment of the present application, when the electronic device is in the powered-on state, it collects sensing data based on a preset sampling rate, and the sampling rate is the number of times of collecting sensing data per second. For example, the preset sampling rate is 60Hz, 120Hz, 240Hz or other frequency values. Obtain a frame of sensing data from the collected multiple sensing data, and determine peak sensing points based on the obtained frame of sensing data.
[0055] When a user touches the touch screen with a finger or a touch object (such as a stylus), the finger or the touch object can generate an induced capacitance with the touch electrode, and the touch screen determines the induction data based on the position where the induced capacitance is generated and the change of the induced capacitance. Among them, the induction data includes the position and the induction value of the induction point. For example, the position where the induced capacitance is generated is determined as the position of the induction point, and the change value of the induced capacitance or the induced capacitance is converted into a digital signal through analog-to-digital conversion to obtain the induction value of the induction point. The induction points are distributed in an array, so the collected induction data is distributed in an array.
[0056] In an embodiment of the present application, the induction data is traversed based on a preset matrix, and the induction point with the largest induction value and greater than or equal to a preset threshold within the preset matrix area is determined as the peak induction 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 in a 2×2 matrix area, the induction values corresponding to the four induction data are 1247, 1036, 520, and 237 respectively, and all four induction values are greater than the preset threshold, then the induction point with the induction value of 1247 is determined as the peak induction point.
[0057] S102, determining an initial left boundary induction point and an initial right boundary induction point based on the peak induction point.
[0058] In an embodiment of the present application, the induction data on the left and right of the row where the peak induction point is located is traversed, and the induction point located at the leftmost of the row where the peak induction point is located and with an induction value greater than or equal to the preset threshold is determined as the initial left boundary induction point, and the induction point located at the rightmost of the row where the peak induction point is located and with an induction value greater than or equal to the preset threshold is determined as the initial right boundary induction point.
[0059] Refer to Figure 3 As shown, it is a schematic diagram of the distribution of the induction data provided by an embodiment of the present application. Figure 3 The induction data in Figure 3 is distributed in an array, that is, it includes multiple row data and multiple column data, Figure 3 and the induction value is used to indicate the induction data in
[0060] The peak induction point in is the induction point corresponding to the induction value of 1247. The induction point located at the leftmost of the row where the peak induction point is located and with an induction value greater than or equal to the preset threshold is the induction point corresponding to the induction value of 848. That is to say, the induction point corresponding to the induction value of 848 is the initial left boundary induction point. The induction point located at the rightmost of the row where the peak induction point is located and with an induction value greater than or equal to the preset threshold is the induction point corresponding to the induction value of 271. That is to say, the induction point corresponding to the induction value of 271 is the initial right boundary induction point. S103, traversing the induction data based on the initial left boundary induction point and the initial right boundary induction point to determine the boundary induction points of the induction data.
[0061] In an embodiment of the present application, the induction data is traversed row by row based on the column direction, the initial left boundary induction point, and the initial right boundary induction point to determine the boundary induction points in the induction data of each row.
[0062] Refer to Figure 4 As shown, it is a flowchart for determining boundary induction points provided by an embodiment of the present application.
[0063] S201, determine the next row to be traversed based on the first column direction.
[0064] In an embodiment of the present application, the induction data is traversed for the first time based on the first column direction. The first next row to be traversed is the row below the row where the peak induction point is located. After that, the next row to be traversed is the row below the row that has been traversed until the induction data of all rows in the first column direction is traversed. For example, the first column direction is from bottom to top. In other embodiments of the present application, the first column direction can also be from top to bottom.
[0065] S202, determine the left induction point of the next row based on the initial left boundary induction point, and determine the right induction point of the next row based on the initial right boundary induction point.
[0066] In an embodiment of the present application, the adjacent induction point to the left of the next row relative to the initial left boundary induction point is determined as the left induction point of the next row, and the adjacent induction point to the right of the next row relative to the initial right boundary induction point is determined as the right induction point of the next row.
[0067] In an embodiment of the present application, the induction point of the next row relative to the initial left boundary induction point is the induction point in the same column as the initial left boundary induction point in the next row. Therefore, the left induction point is the induction point to the left of the induction point in the same column as the initial left boundary induction point. The induction point of the next row relative to the initial right boundary induction point is the induction point in the same column as the initial right boundary induction point in the next row. Therefore, the right induction point is the induction point to the right of the induction point in the same column as the initial right boundary induction point. That is to say, expand one unit position outward from the left boundary induction point and the right boundary induction point of the previous row to obtain the left induction point and the right induction point of the current row. As Figure 3 shown, for example, the left induction point of the row below the row where the peak induction point is located is the induction point with an induction value of 723, and the right induction point is the induction point with an induction value of 1090.
[0068] S203, determine whether the induction value of the left induction point is greater than or equal to the preset threshold. If the induction value of the left induction point is greater than or equal to the preset threshold, the process proceeds to S204; if the induction value of the left induction point is less than the preset threshold, the process proceeds to S206.
[0069] S204. Traverse the sensing points of 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 traversed or a sensing point with a sensing value less than the preset threshold is traversed.
[0070] In an embodiment of the present application, if the sensing value of the left sensing point is greater than or equal to the preset threshold, when traversing to a sensing point to the left based on the left sensing point, determine 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, continue to traverse to the next sensing point to the left. If the sensing value of the sensing point is less than the preset threshold, stop traversing to the left. If the leftmost sensing point of the next row is traversed, also stop traversing to the left.
[0071] S205. Determine the target left boundary sensing point of the next row as the leftmost sensing point of the next row whose sensing value is greater than or equal to the preset threshold.
[0072] As Figure 3 shown, for example, the target left boundary sensing point of the next row of the row where the peak sensing point is located is the sensing point with a sensing value of 723.
[0073] S206. Traverse the sensing points of the next row to the right, and determine 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 traversed or the right sensing point is traversed.
[0074] In an embodiment of the present application, if the sensing value of the left sensing point is less than the preset threshold, when traversing to a sensing point to the right based on the left sensing point, determine 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, continue to traverse to the next sensing point to the right. If the sensing value of the sensing point is greater than or equal to the preset threshold, stop traversing to the right. If the right sensing point of the next row is traversed, also stop traversing to the right.
[0075] S207. Determine the target left boundary sensing point of the next row as the leftmost sensing point of the next row whose sensing value is greater than or equal to the preset threshold.
[0076] S208. Determine whether the sensing value of the right sensing point is greater than or equal to the 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.
[0077] S209. Traverse the sensing points of the next row to the right, and determine 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 traversed or a sensing point with a sensing value less than the preset threshold is traversed.
[0078] In an embodiment of the present application, if the sensed value of the right sensing point is greater than or equal to a preset threshold, when traversing to a sensing point to the right based on the right sensing point, it is determined whether the sensed value of the sensing point is greater than or equal to the preset threshold. If the sensed value of the sensing point is greater than or equal to the preset threshold, continue to traverse to the next sensing point to the right. If the sensed value of the sensing point is less than the preset threshold, stop traversing to the right. If the rightmost sensing point of the next row is traversed, also stop traversing to the right.
[0079] S210, determine the target right boundary sensing point of the next row as the rightmost sensing point of the next row whose sensed value is greater than or equal to the preset threshold.
[0080] S211, traverse the sensing points of the next row to the left, and determine whether the sensed value of each sensing point is greater than or equal to the preset threshold until a sensing point whose sensed value is greater than or equal to the preset threshold is traversed or the left sensing point is traversed.
[0081] In an embodiment of the present application, if the sensed value of the right sensing point is less than the preset threshold, when traversing to a sensing point to the left based on the right sensing point, it is determined whether the sensed value of the sensing point is greater than or equal to the preset threshold. If the sensed value of the sensing point is less than the preset threshold, continue to traverse to the next sensing point to the left. If the sensed value of the sensing point is greater than or equal to the preset threshold, stop traversing to the left. If the left sensing point of the next row is traversed, also stop traversing to the left.
[0082] S212, determine the target right boundary sensing point of the next row as the rightmost sensing point of the next row whose sensed value is greater than or equal to the preset threshold.
[0083] S213, determine whether the traversal of the rows in the first column direction is completed. If the traversal of the rows in the first column direction is not completed, the process returns to S201; if the traversal of the rows in the first column direction is completed, the process proceeds to S214.
[0084] In an embodiment of the present application, if the sensed value of the current row is empty, indicating that there is no sensing point in the current row and the current row actually does not exist, it is determined that the traversal of the rows in the first column direction is completed.
[0085] S214, generate 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.
[0086] In an embodiment of the present application, if the traversal of the sensing data row by row in the first column direction is completed, splice 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 to generate the first boundary of the touch area.
[0087] S215. Traverse the sensing data row by row in the second column direction, and 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.
[0088] In an embodiment of the present application, the second column direction is opposite to the first column direction. That is to say, if the first column direction is from bottom to top, the second column direction is from top to bottom; if the first column direction is from top to bottom, the second column direction is from bottom to top. After the row-by-row traversal in the first column direction in S214 ends, start the row-by-row traversal in the second column direction in S215.
[0089] S216. Generate 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.
[0090] In an embodiment of the present application, if the row-by-row traversal of the sensing data in the second column direction is completed, splice 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 second traversal to generate the second boundary of the touch area.
[0091] S217. If the boundaries of the touch areas generated by the Nth traversal and the (N - 1)th traversal of the sensing data are the same, determine that the traversal of the sensing data is completed. Here, N is an integer greater than or equal to 2.
[0092] The present application Figure 4 The embodiment shown traverses the sensing data row by row based on the peak sensing point, and can accurately determine the boundary sensing points corresponding to the touch area.
[0093] Refer to Figure 5 As shown, it is a flowchart for determining the boundary sensing points provided by another embodiment of the present application.
[0094] Based on the second boundary obtained in S216 in the embodiment of the present application, if the second boundary is different from the first boundary, the process enters S301.
[0095] S301. If the row-by-row traversal of the sensing data in the second column direction is completed, perform a third row-by-row traversal of the sensing data in the first column direction, and 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.
[0096] S302. Generate 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.
[0097] S303, determine whether the third boundary is the same as the second boundary. If the third boundary is the same as the second boundary, the process proceeds to S304; if the third boundary is different from the second boundary, the process proceeds to S305.
[0098] S304, determine that the traversal of the sensing data is completed.
[0099] 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 the target right boundary sensing point for each row in the second column direction during the fourth traversal.
[0100] S306, 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 for each row in the second column direction during the fourth traversal, generate the fourth boundary of the touch area.
[0101] S307, if the boundaries of the touch area generated by the Nth traversal of the sensing data are the same as those generated by the (N - 1)th traversal, determine that the traversal of the sensing data is completed. Here, N is an integer greater than or equal to 2. For example, if the fourth boundary is the same as the third boundary, determine that the traversal of the sensing data is completed. If the fourth boundary is different from the third boundary, continue to perform a fifth traversal of the sensing data based on the same method above until the same boundary is generated.
[0102] That is to say, at least perform two traversals of the sensing data. After generating the same boundary, determine that the traversal of the sensing data is completed. The specific number of traversals depends on the shape of the sensing area. In this application Figure 5 In the shown embodiment, when generating the same boundary by traversing the boundary sensing points, determining the completion of the traversal of the sensing data can ensure the accuracy of the generated touch area boundary.
[0103] S104, determine the touch area based on the boundary sensing points.
[0104] In an embodiment of this application, generate the touch area based on the second boundary, that is, determine the area surrounded by the second boundary as the touch area.
[0105] In an embodiment of this application, the method further includes: determining the reporting point of the touch operation based on the sensing data in the touch area. The electronic device responds to the touch operation based on the reporting point. For example, perform centroid calculation based on the positions of all sensing points in the touch area to determine the reporting point of the touch operation.
[0106] Refer to Figures 6 to 9 As shown, it is a schematic diagram of determining the touch area provided by an embodiment of this application. The sensing value threshold is set to 130, and the sensing points exceeding the threshold belong to the touch area. Figure 6The point A in it is the peak sensing point formed by the user's touch operation on the touch screen. Referring to Figure 3 , it is a schematic diagram of the distribution of the 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 Figure 7 shown, starting from the row where the peak sensing point A is located, the sensing data is traversed for the first time from bottom to top 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 the sensing value 723, the target right boundary sensing point of the first row is the sensing point corresponding to the sensing value 434, the target left boundary sensing point of the second row is the sensing point corresponding to the sensing value 148, the target right boundary sensing point of the second row is the sensing point corresponding to the sensing value 767, the target left boundary sensing point of the third row is the sensing point corresponding to the sensing value 681, and the target right boundary sensing point of the third row is the sensing point corresponding to the sensing value 690. As Figure 7 shown, after the first traversal is completed, the target left boundary sensing points of each row form the first left boundary L1 of the touch area, and the target right boundary sensing points of each row form the first right boundary R1 of the touch area. As Figure 8 shown, starting from the top row of the sensing data, the sensing data is traversed for the second time from top to bottom until the sensing data of the bottom row is traversed. The target right boundary sensing point of the first row is the sensing point corresponding to the sensing value 434, the target left boundary sensing point of the second row is the sensing point corresponding to the sensing value 148, the target right boundary sensing point of the second row is the sensing point corresponding to the sensing value 767, the target left boundary sensing point of the third row is the sensing point corresponding to the sensing value 681, the target right boundary sensing point of the third row is the sensing point corresponding to the sensing value 690, the target left boundary sensing point of the fourth row is the sensing point corresponding to the sensing value 245, and the target right boundary sensing point of the fourth row is the sensing point corresponding to the sensing value 237. As Figure 8 shown, after the second traversal is completed, the target left boundary sensing points of each row form the second left boundary L2 of the touch area, and the target right boundary sensing points of each row form the second right boundary R2 of the touch area. Since the boundary formed by the first left boundary and the first right boundary is different from the boundary formed by the second left boundary and the second right boundary, a third traversal is required.
[0107] As Figure 9As shown, starting from the bottom row of the sensing data, the sensing data is traversed for the third time from bottom to top until the sensing data in the top row is traversed. The target right boundary sensing point in the first row is the sensing point corresponding to the sensing value of 434, the target left boundary sensing point in the second row is the sensing point corresponding to the sensing value of 148, the target right boundary sensing point in the second row is the sensing point corresponding to the sensing value of 767, the target left boundary sensing point in the third row is the sensing point corresponding to the sensing value of 681, the target right boundary sensing point in the third row is the sensing point corresponding to the sensing value of 690, the target left boundary sensing point in the fourth row is the sensing point corresponding to the sensing value of 245, and the target right boundary sensing point in the fourth row is the sensing point corresponding to the sensing value of 237. As Figure 9 As shown, after the third traversal is completed, the target left boundary sensing points in each row form the third left boundary L3 of the touch area, and the target right boundary sensing points in each row form 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 the traversal of the sensing data is completed, the area surrounded by the boundary formed by the third left boundary and the third right boundary is determined as the touch area, and this touch area is a solid connected area.
[0108] Refer to Figure 10 As shown, it is a schematic diagram of the distribution of sensing data provided by another embodiment of the present application. Refer to Figures 11 to 14 As shown, it is a schematic diagram of determining the touch area provided by another embodiment of the present application. The sensing value threshold is set to 130, and the sensing points exceeding the threshold belong to the touch area. Figure 11 The point A in Figure 10 As shown, the peak sensing point A is the sensing point with a sensing value of 546. The initial left boundary sensing point in the row where the peak sensing point A is located is the sensing point corresponding to the sensing value of 220, and the initial right boundary sensing point is the sensing point corresponding to the sensing value of 466. Starting from the row where the peak sensing point A is located, the sensing data is traversed for the first time from bottom to top until the sensing data in the top row is traversed. The target left boundary sensing point in the first row is the boundary sensing point corresponding to the sensing value of 309, the target right boundary sensing point in the first row is the sensing point corresponding to the sensing value of 490, the target left boundary sensing point and the target right boundary sensing point in the second row are both the sensing points corresponding to the sensing value of 351, the target left boundary sensing point in the third row is the sensing point corresponding to the sensing value of 289, the target right boundary sensing point in the third row is the sensing point corresponding to the sensing value of 430, the target left boundary sensing point in the fourth row is the sensing point corresponding to the sensing value of 491, the target right boundary sensing point in the fourth row is the sensing point corresponding to the sensing value of 644, and the target left boundary sensing point and the target right boundary sensing point in the fifth row are both the sensing points corresponding to the sensing value of 150. As Figure 12As shown, 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.
[0109] Starting from the top row of the sensing data, perform a second traversal of the sensing data from top to bottom until the sensing data of the bottom row is traversed. The target left boundary sensing point and the target right boundary sensing point of the first row are both the sensing points corresponding to the sensing value 150. The target left boundary sensing point of the second row is the sensing point corresponding to the sensing value 491, and the target right boundary sensing point of the second row is the sensing point corresponding to the sensing value 644. The target left boundary sensing point of the third row is the sensing point corresponding to the sensing value 289, and the target right boundary sensing point of the third row is the sensing point corresponding to the sensing value 430. The target left boundary sensing point of the fourth row is the sensing point corresponding to the sensing value 225, and the target right boundary sensing point of the fourth row is the sensing point corresponding to the sensing value 351. The target left boundary sensing point of the fifth row is the sensing point corresponding to the sensing value 325, and the target right boundary sensing point of the fifth row is the sensing point corresponding to the sensing value 490. The target left boundary sensing point of the sixth row is the sensing point corresponding to the sensing value 364, and the target right boundary sensing point of the sixth row is the sensing point corresponding to the sensing value 466. The target left boundary sensing point of the seventh row is the sensing point corresponding to the sensing value 255, and the target right boundary sensing point of the seventh row is the sensing point corresponding to the sensing value 460. The target left boundary sensing point of the eighth row is the sensing point corresponding to the sensing value 169, and the target right boundary sensing point of the eighth row is the sensing point corresponding to the sensing value 263. The target left boundary sensing point of the ninth row is the sensing point corresponding to the sensing value 451, and the target right boundary sensing point of the ninth row is the sensing point corresponding to the sensing value 474. As Figure 13 As shown, after the second traversal, the target left boundary sensing points of each row form the third left boundary L3 of the touch area, and the target right boundary sensing points of each row form the second right boundary R2 of the touch area. Since the boundary formed by the first left boundary, the second left boundary, and the first right boundary is different from the boundary formed by the third left boundary and the second right boundary, a third traversal is required.
[0110] Starting from the bottom row of the sensing data, perform the third traversal of the sensing data from bottom to top until the sensing data in the top row is traversed. The target left boundary sensing point in the first row is the sensing point corresponding to the sensing value of 451, and the target right boundary sensing point in the first row is the sensing point corresponding to the sensing value of 474. The target left boundary sensing point in the second row is the sensing point corresponding to the sensing value of 169, and the target right boundary sensing point in the second row is the sensing point corresponding to the sensing value of 263. The target left boundary sensing point in the third row is the sensing point corresponding to the sensing value of 255, and the target right boundary sensing point in the third row is the sensing point corresponding to the sensing value of 460. The target left boundary sensing point in the fourth row is the sensing point corresponding to the sensing value of 364, and the target right boundary sensing point in the fourth row is the sensing point corresponding to the sensing value of 466. The target left boundary sensing point in the fifth row is the sensing point corresponding to the sensing value of 325, and the target right boundary sensing point in the fifth row is the sensing point corresponding to the sensing value of 490. The target left boundary sensing point in the sixth row is the sensing point corresponding to the sensing value of 225, and the target right boundary sensing point in the sixth row is the sensing point corresponding to the sensing value of 351. The target left boundary sensing point in the seventh row is the sensing point corresponding to the sensing value of 289, and the target right boundary sensing point in the seventh row is the sensing point corresponding to the sensing value of 430. The target left boundary sensing point in the eighth row is the sensing point corresponding to the sensing value of 491, and the target right boundary sensing point in the eighth row is the sensing point corresponding to the sensing value of 644. The target left boundary sensing point and the target right boundary sensing point in the ninth row are both the sensing points corresponding to the sensing value of 150. As Figure 14 shown, after the third traversal is completed, the target left boundary sensing points in each row form the fourth left boundary L4 of the touch area, and the target right boundary sensing points in each row form 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 the traversal of the sensing data is completed, the area surrounded by the boundary formed by the third left boundary and the second right boundary is determined as the touch area, and this touch area is a hollow connected area.
[0111] Refer to Figure 15 shown, which is a schematic diagram of the distribution of sensing data provided by another embodiment of the present application. The sensing value threshold is set to 130, and the sensing points exceeding the threshold belong to the touch area. Refer to Figures 16 to 20 shown, which is a schematic diagram of determining the touch area provided by another embodiment of the present application. Figure 16 The point A in is the peak sensing point formed by the user's touch operation on the touch screen. As Figure 15As shown, the peak induction point A is the induction point corresponding to the induction value 615. The initial left boundary induction point of the row where the peak induction point A is located is the induction point corresponding to the induction value 371, and the initial right boundary induction point is the peak induction point A itself. Starting from the row where the peak induction point A is located, the induction data is traversed for the first time from bottom to top until the induction data of the top row is traversed. The target left boundary induction point and the target right boundary induction point of the first row are both the boundary induction points corresponding to the induction value 285. As Figure 17 shown, after the first traversal is completed, the target left boundary induction points of each row form the first left boundary L1 of the touch area, and the target right boundary induction points of each row form the first right boundary R1 of the touch area.
[0112] Starting from the top row of the induction data, the induction data is traversed for the second time from top to bottom until the induction data of the bottom row is traversed. The target left boundary induction point and the target right boundary induction point of the first row are both the induction points corresponding to the induction value 131. The target left boundary induction point and the target right boundary induction point of the second row are both the boundary induction points corresponding to the induction value 285. The target left boundary induction point of the third row is the induction point corresponding to the induction value 371, and the target right boundary induction point of the third row is the induction point corresponding to the induction value 615. The target left boundary induction point of the fourth row is the induction point corresponding to the induction value 293, and the target right boundary induction point of the fourth row is the induction point corresponding to the induction value 611. The target left boundary induction point of the fifth row is the induction point corresponding to the induction value 175, and the target right boundary induction point of the fifth row is the induction point corresponding to the induction value 392. The target left boundary induction point of the sixth row is the induction point corresponding to the induction value 547, and the target right boundary induction point of the sixth row is the induction point corresponding to the induction value 640. The target left boundary induction point of the seventh row is the induction point corresponding to the induction value 220, and the target right boundary induction point of the seventh row is the induction point corresponding to the induction value 132. As Figure 18 shown, after the second traversal is completed, the target left boundary induction points of each row form the second left boundary L2 and the third left boundary L3 of the touch area, and the target right boundary induction points of each row form the second right boundary R2 of the touch area. Since the boundary formed by the first left boundary and the first right boundary is different from the boundary formed by the second left boundary, the third left boundary and the second right boundary, a third traversal is required.
[0113] Starting from the bottom row of the induction data, perform the third traversal of the induction data from bottom to top until the induction data in the top row is traversed. The target left boundary induction point in the first row is the induction point corresponding to the induction value of 220, the target right boundary induction point in the first row is the induction point corresponding to the induction value of 132, the target left boundary induction point in the second row is the induction point corresponding to the induction value of 547, the target right boundary induction point in the second row is the induction point corresponding to the induction value of 640, the target left boundary induction point in the third row is the induction point corresponding to the induction value of 175, the target right boundary induction point in the third row is the induction point corresponding to the induction value of 392, the target left boundary induction point in the fourth row is the induction point corresponding to the induction value of 293, the target right boundary induction point in the fourth row is the induction point corresponding to the induction value of 346, the target left boundary induction point in the fifth row is the induction point corresponding to the induction value of 371, the target right boundary induction point in the fifth row is the induction point corresponding to the induction value of 477, the target left boundary induction point in the sixth row is the induction point corresponding to the induction value of 285, the target right boundary induction point in the sixth row is the induction point corresponding to the induction value of 481, the target left boundary induction point in the seventh row is the induction point corresponding to the induction value of 131, the target right boundary induction point in the seventh row is the induction point corresponding to the induction value of 496, the target left boundary induction point in the eighth row is the induction point corresponding to the induction value of 246, the target right boundary induction point in the eighth row is the induction point corresponding to the induction value of 293, and the target left boundary induction point and the target right boundary induction point in the ninth row are both the induction points corresponding to the induction value of 224. As Figure 19 shown, after the third traversal is completed, the target left boundary induction 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 induction 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.
[0114] Starting from the top row of the sensing data, perform the fourth traversal of the sensing data from top to bottom until the sensing data in the bottom row is traversed. The target left boundary sensing points and target right boundary sensing points in the first row are both the sensing points corresponding to the sensing value 224. The target left boundary sensing point in the second row is the sensing point corresponding to the sensing value 246, and the target right boundary sensing point in the second row is the sensing point corresponding to the sensing value 293. The target left boundary sensing point in the third row is the sensing point corresponding to the sensing value 131, and the target right boundary sensing point in the third row is the sensing point corresponding to the sensing value 496. The target left boundary sensing point in the fourth row is the sensing point corresponding to the sensing value 285, and the target right boundary sensing point in the fourth row is the sensing point corresponding to the sensing value 481. The target left boundary sensing point in the fifth row is the sensing point corresponding to the sensing value 371, and the target right boundary sensing point in the fifth row is the sensing point corresponding to the sensing value 477. The target left boundary sensing point in the sixth row is the sensing point corresponding to the sensing value 293, and the target right boundary sensing point in the sixth row is the sensing point corresponding to the sensing value 346. The target left boundary sensing point in the seventh row is the sensing point corresponding to the sensing value 175, and the target right boundary sensing point in the seventh row is the sensing point corresponding to the sensing value 392. The target left boundary sensing point in the eighth row is the sensing point corresponding to the sensing value 547, and the target right boundary sensing point in the eighth row is the sensing point corresponding to the sensing value 640. The target left boundary sensing point in the ninth row is the sensing point corresponding to the sensing value 220, and the target right boundary sensing point in the ninth row is the sensing point corresponding to the sensing value 132. As Figure 20 shown, after the fourth traversal is completed, the target left boundary sensing points in each row form the sixth left boundary L6 and the seventh left boundary L7 of the touch control area, and the target right boundary sensing points in each row form the fourth right boundary R4 of the touch control 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 the traversal of the sensing data is completed, 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 control area, and this touch control area is an irregular bifurcated connected area.
[0115] Refer to Figure 21 shown, which is a schematic structural diagram of a touch control processing device provided by an embodiment of the present application. In an embodiment of the present application, the touch control processing device 200 may include multiple functional modules composed of computer program segments. The computer program segments in the touch control processing device 200 may be stored in the memory of the electronic device and executed by at least one processor to perform the touch control processing function.
[0116] In an embodiment of the present 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: an acquisition module 201, a first determination module 202, a traversal module 203, and a second determination module 204. The modules in the embodiments of the present application refer to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, and are stored in the memory.
[0117] The acquisition module 201 is used to acquire induction data and determine the peak induction point based on the induction data. Among them, the induction data is distributed in an array.
[0118] The first determination module 202 is used to determine the initial left boundary induction point and the initial right boundary induction point based on the peak induction point.
[0119] The traversal module 203 is used to traverse the induction data based on the initial left boundary induction point and the initial right boundary induction point to determine the boundary induction point of the induction data.
[0120] The second determination module 204 is used to determine the touch area based on the boundary induction point.
[0121] The embodiments of the present application also provide an electronic device 1. Refer to Figure 22 As shown, the electronic device 1 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an Ultra-mobile Personal Computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) device, a Virtual Reality (VR) device, an Artificial Intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, and / or a smart city device. The embodiments of the present application do not impose special restrictions on the specific type of the electronic device 1.
[0122] The electronic device 1 includes, but is not limited to, a touch chip 110, a memory 120, and a touch screen 140 connected through a communication bus 130. The touch chip 110 may be a processor or a chip for processing touch data. Figure 22 This is only an example of the electronic device and does not constitute a corresponding limitation. In other embodiments, the electronic device may include more components than those shown in the figure.
[0123] The memory 120 may include one or more Random Access Memories (RAMs) and one or more Non-Volatile Memories (NVMs). The random access memory can be directly read and written by the processor 110, and can be used to store the operating system or executable programs of other running programs (such as machine instructions), and can also be used to store user and application data, etc. The random access memory can include Static Random-Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM), etc.
[0124] The non-volatile memory can also store executable programs and store user and application data, etc., and can be pre-loaded into the random access memory for direct reading and writing by the processor. The non-volatile memory can include disk storage devices, flash memory.
[0125] The memory 120 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the touch chip 110. The one or more computer programs include a plurality of instructions, and when the plurality of instructions are executed by the touch chip 110, a touch processing method executable on the electronic device 1 can be realized.
[0126] In other embodiments, the electronic device 1 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the electronic device 1.
[0127] The processor may include one or more processing units. For example, the processor may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and / or a Neural-network Processing Unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0128] The touch chip 110 provides computing and control capabilities. For example, the touch chip 110 is used to execute the computer program stored in the memory 120 to implement the above touch processing method.
[0129] The communication bus 130 is at least used to provide a communication channel for mutual communication between the memory 120 and the touch chip 110 in the electronic device 1.
[0130] It can be understood that the structure schematically shown in the embodiments of this application does 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 shown, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0131] The embodiments of this application also provide a computer storage medium. Computer instructions are stored in the computer storage medium. When the computer instructions run on the electronic device, the electronic device is enabled to execute the above relevant method steps to implement the touch processing method in the above embodiments.
[0132] The embodiments of this application also provide a computer program product. When the computer program product runs on a computer, the computer is enabled to execute the above relevant steps to implement the touch processing method in the above embodiments.
[0133] In addition, the embodiments of this application also provide a device. Specifically, this device may be a chip, a component, or a module. The device may include a processor and a memory connected to each other. Among them, the memory is used to store computer execution instructions. When the device runs, the processor may execute the computer execution instructions stored in the memory, so that the chip executes the touch processing method in each of the above method embodiments.
[0134] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be elaborated here.
[0135] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0136] In several embodiments provided in this application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point, the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms.
[0137] The units described as separate components may or may not be physically separated. The components displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0138] In addition, each functional unit in each embodiment of this application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0139] When an integrated unit is implemented in the form of 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 solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.
[0140] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit them. Although the present application has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present application can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. A touch processing method, applied to electronic equipment, characterized in that: The method comprises: Collecting sensing data, and determining a peak sensing point based on the sensing data, wherein the sensing data is distributed in an array; Determine an initial left boundary sensing point and an initial right boundary sensing point based on the peak sensing point; 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; A touch area is determined based on the boundary sensing points.
2. The touch processing method according to claim 1, wherein: The determining of the peak sensing point based on the sensing data comprises: The sensing data is traversed based on a preset matrix, and a sensing point with a maximum sensing value within a preset matrix area and greater than or equal to a preset threshold is determined as the peak sensing point.
3. The touch processing method according to claim 1, wherein: The determining of an initial left boundary sensing point and an initial right boundary sensing point based on the peak sensing point includes: For the sensing data on the left side of the peak sensing point in the row where the peak sensing point is located, a sensing point located on the leftmost side 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; The sensing data to the right of the peak sensing point in the row where the peak sensing point is located are traversed, and a sensing point located at the rightmost side 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.
4. The touch processing method according to claim 1, wherein: The traversing the sensing data based on the initial left boundary sensing point and the initial right boundary sensing point to determine the boundary sensing point of the sensing data includes: The sensing data is traversed row by row 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.
5. The touch processing method according to claim 4, characterized in that: 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: Determine the next row to be traversed based on the first column direction; Determining a left sensing point of the next row based on the initial left boundary sensing point, and determining a 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 the preset threshold, the sensing points in the next row are traversed to the left to determine 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 traversed or a sensing point with a sensing value less than the preset threshold is traversed; If the sensing value of the left sensing point is less than the preset threshold, the sensing points in the next row are traversed to the right to determine whether the sensing value of each sensing point is greater than or equal to the preset threshold, until a sensing point whose sensing value is greater than or equal to the preset threshold is traversed or the right sensing point is traversed; The leftmost sensing point of the next row whose sensing value is greater than or equal to the preset threshold is determined as the target left boundary sensing point of the next row.
6. The touch processing method according to claim 5, characterized in that: 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 sensing value of the right sensing point is greater than or equal to the preset threshold, the sensing points in the next row are traversed to the right to determine 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 traversed or a sensing point whose sensing value is less than the preset threshold is traversed; If the sensing value of the right sensing point is less than the preset threshold, the sensing points in the next row are traversed to the left to determine whether the sensing value of each sensing point is greater than or equal to the preset threshold, until a sensing point whose sensing value is greater than or equal to the preset threshold is traversed or the left sensing point is traversed; The rightmost sensing point of the next row whose sensing value is greater than or equal to the preset threshold is determined as the target right boundary sensing point of the next row.
7. The touch processing method according to 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: If the row-by-row traversal of the sensing data in the first column direction is completed, a first boundary of the touch area is generated 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 process.
8. The touch processing method according to claim 7, 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: Based on the second column direction, the sensing data is traversed row by row 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 process, wherein the second column direction is opposite to the first column direction; A second boundary of the touch area is generated 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.
9. The touch processing method according to claim 8, characterized in that: The determining of the touch area based on the boundary sensing points includes: The touch control area is generated based on the second boundary.
10. The touch processing method according to 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 row-by-row traversal of the sensing data in the second column direction is completed, the sensing data is traversed 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 process; Generate 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 process; If the third boundary is the same as the second boundary, it is determined that the traversal of the sensing data is completed.
11. The touch processing method according to claim 10, 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, based on the second column direction, traverse the sensing data row by row 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 process; Generate a 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 process; If the fourth boundary is the same as the third boundary, it is determined that the traversal of the sensing data is completed.
12. The touch processing method according to claim 8, wherein: The determining of the touch area based on the boundary sensing points includes: If the boundaries of the touch control areas generated by the Nth traversal are the same as those generated by the N-1th traversal, it is determined that the traversal of the sensing data is completed, and N is greater than or equal to 2.
13. The touch processing method according to claim 5, characterized in that: The step of 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, comprises: The adjacent sensing points of the next row to the left of the initial left boundary sensing point are determined as the left sensing points of the next row, and the adjacent sensing points of the next row to the right of the initial right boundary sensing point are determined as the right sensing points of the next row.
14. The touch processing method according to claim 1, wherein: The method further comprises: The reporting point of the touch operation is determined based on the sensing data in the touch area.
15. A touch chip, characterized in that: The touch control chip is used to execute the touch control processing method according to any one of claims 1 to 14.
16. An electronic device, characterized in that: A touch control chip is included, and is used to execute the touch control processing method according to any one of claims 1 to 14, wherein the electronic device responds to touch operations based on the reporting point of the touch control chip.