Touch screen control method, apparatus, device, storage medium, and product

CN122219795APending Publication Date: 2026-06-16SHENZHEN HE SHENG DA OPTOELECTRONICS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN HE SHENG DA OPTOELECTRONICS CO LTD
Filing Date
2026-03-18
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Traditional touch detection methods typically determine touch points based solely on whether the capacitance value exceeds a preset threshold, making it difficult to distinguish between fingertip touches and large-area accidental touches, leading to a decline in the accuracy of human-computer interaction and user experience.

Method used

The system collects raw capacitance data of the touchscreen sensing electrodes, and distinguishes between fingertip touches and large-area accidental touches through background noise filtering, connected component analysis, and shape eccentricity calculation. The touch type is determined by the area change rate and shape eccentricity.

Benefits of technology

Accurately separates fingertip operations in complex usage scenarios, effectively suppresses large-area accidental touches, and improves the anti-interference capability and operational reliability of the touchscreen.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122219795A_ABST
    Figure CN122219795A_ABST
Patent Text Reader

Abstract

The application relates to a touch screen control method, device, equipment, storage medium and product, which comprises the following steps: collecting original capacitance data of a touch screen electrode, and generating a touch sensing frame after filtering out noise. A continuous area with capacitance exceeding a preset value in the frame is identified, and an initial touch cluster is obtained through connected domain analysis. The cluster in multiple frames is tracked, an area change rate and a shape eccentricity rate are obtained, a touch type is judged according to the area change rate and the shape eccentricity rate, and a fingertip touch is output as an effective touch point, so that the technical problem that a traditional touch detection method usually judges a touch point based on whether a capacitance value exceeds a preset threshold value, and the fingertip touch and a large-area false touch cannot be distinguished is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of touch screen technology, and in particular to touch screen control methods, devices, equipment, storage media, and products. Background Technology

[0002] Capacitive touchscreens identify touch operations by detecting changes in the capacitance of sensing electrodes. In practical use, besides fingertip touches, the touchscreen surface is often unintentionally touched by large conductive surfaces such as palms, elbows, or clothing, generating capacitive sensing. Traditional touch detection methods typically determine touch points based solely on whether the capacitance value exceeds a preset threshold. This method struggles to distinguish between fingertip touches and large-area accidental touches. When a user is operating normally, if their palm naturally rests on the edge of the screen, or their sleeve sweeps across the screen, these invalid contacts can easily be misidentified as valid touch points, leading to cursor jitter, unintended function triggers, and severely impacting the accuracy of human-computer interaction and user experience. Summary of the Invention

[0003] The main technical problem addressed by this application is to provide a touch screen control method, device, equipment, storage medium, and product. It solves the technical problem that traditional touch detection methods usually judge touch points based solely on whether the capacitance value exceeds a preset threshold, which makes it difficult to distinguish between fingertip touches and large-area accidental touches.

[0004] To solve the above-mentioned technical problems, this application adopts a touch screen control method, which includes the following steps: The raw capacitance data of the touch screen's sensing electrodes during the detection period is collected, and the raw capacitance data is filtered out for background noise to obtain touch sensing frames at multiple sampling times. Identify continuous electrode regions in the touch sensing frame whose capacitance values ​​exceed a preset value, and perform connected component analysis on the continuous electrode regions to obtain at least one initial touch blob including a blob shape. The initial touch clumps in multiple consecutive touch sensing frames are correlated and tracked to obtain the area change of the same clump in different frames; The area change rate is calculated based on the area change, and the shape eccentricity is calculated based on the shape of the mass. The touch type of the initial touch mass is determined by the area change rate and the shape eccentricity, and the mass determined to be a fingertip touch is output as a valid touch point.

[0005] Furthermore, the acquisition of raw capacitance data of the touchscreen's sensing electrodes during the detection period includes: Excitation signals are sequentially applied to the sensing electrodes of the touch screen to obtain the sensing electrode response signals corresponding to each sensing electrode; The response signal of the sensing electrode is converted from analog to digital to obtain the capacitance sampling value of each electrode intersection node, wherein the capacitance sampling value includes the node row coordinate and the node column coordinate; The capacitance sample values ​​are arranged in time sequence according to the detection period to obtain the original capacitance data.

[0006] Furthermore, the step of filtering out background noise from the original capacitance data to obtain touch-sensing frames at multiple sampling times includes: The original capacitance data is divided into frames according to the detection period to obtain single-frame baseline data, and the full-screen mean of the single-frame baseline data is calculated to obtain the background baseline threshold. Based on the background baseline threshold, the single-frame baseline data is subjected to full-screen differential processing to obtain background differential data, and the background differential data is subjected to sliding window scanning to obtain the sliding window variance. The background difference data is dynamically thresholded using the sliding window variance to obtain a binarized mask. Spatial filtering is then performed on the single-frame baseline data based on the binarized mask to obtain the touch-sensing frames at the multiple sampling times.

[0007] Furthermore, the connected component analysis of the continuous electrode region yields at least one initial touch cluster with a cluster shape, including: The continuous electrode region is traversed by four-neighbor or eight-neighbor adjacency relationships to obtain at least one connected component. For each of the connected components, perform node coordinate space mapping to obtain the set of electrode node coordinates corresponding to each connected component, and perform bounding rectangle fitting on the set of electrode node coordinates to obtain the cluster outline corresponding to each connected component. Based on the outer frame of the cluster, contour edge tracking is performed on the set of electrode node coordinates to obtain the cluster boundary pixel chain corresponding to each connected component. Then, based on the cluster boundary pixel chain, the set of electrode node coordinates is subjected to grid filling statistics to obtain the at least one initial touch cluster including the cluster shape.

[0008] Furthermore, the step of traversing the four-neighbor or eight-neighbor adjacency relationships of the continuous electrode region to obtain at least one connected component includes: The electrode nodes in the continuous electrode region are sequentially scanned to obtain a seed node queue, and the traversal state of the electrode nodes is initialized to obtain a node access flag. The seed node queue includes node row coordinates and node column coordinates, and the node access flag includes visited state and unvisited state. Based on the seed node queue, the node access marker is expanded and updated using four-neighbor or eight-neighbor expansion to obtain the current component node set. Then, the component number is assigned to the current component node set to obtain at least one connected component, wherein the connected component includes the component number and the number of component nodes.

[0009] Furthermore, the step of calculating the area change rate based on the area change, calculating the shape eccentricity based on the shape of the cluster, and determining the touch type of the initial touch cluster using the area change rate and the shape eccentricity, and outputting clusters determined to be fingertip touches as valid touch points, includes: The area change is calculated using temporal difference to obtain the area fluctuation value between adjacent frames, and the area fluctuation value is normalized to obtain the area change rate. The second-order central moment of the shape of the mass is calculated to obtain the major axis and minor axis of the mass, and the ratio of the axis lengths is calculated based on the major axis and minor axis of the mass to obtain the eccentricity of the shape; The area change rate is compared with an area threshold to obtain an area determination flag, and the shape eccentricity is compared with an eccentricity threshold to obtain a shape determination flag; Perform a logical AND operation between the area determination flag and the shape determination flag to obtain the touch type label corresponding to the initial touch block, wherein the touch type label includes a fingertip touch label and a non-fingert touch label; If the touch type label is determined to be a fingertip touch label, then the centroid coordinates of the block corresponding to the fingertip touch label are calculated to obtain the effective touch point output.

[0010] The present invention also provides a touch screen control device, comprising: The acquisition module is used to acquire the raw capacitance data of the touch screen's sensing electrodes during the detection period, and to filter out background noise from the raw capacitance data to obtain touch sensing frames at multiple sampling times. The analysis module is used to identify continuous electrode regions in the touch sensing frame whose capacitance values ​​exceed a preset value, and to perform connected component analysis on the continuous electrode regions to obtain at least one initial touch blob including a blob shape. The tracking module is used to correlate and track the initial touch clumps in multiple consecutive touch sensing frames to obtain the area change of the same clump in different frames; The discrimination module is used to calculate the area change rate based on the area change and the shape eccentricity based on the shape of the mass. The initial touch mass is then used to determine the touch type by using the area change rate and the shape eccentricity, and the mass determined to be a fingertip touch is output as a valid touch point.

[0011] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above methods.

[0012] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the above methods.

[0013] The present invention also provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of any of the above methods.

[0014] The above scheme collects raw capacitance data of the touchscreen's sensing electrodes during the detection period and filters out background noise from the raw capacitance data to obtain touch sensing frames at multiple sampling times. It identifies continuous electrode regions in the touch sensing frames whose capacitance values ​​exceed a preset value and performs connected component analysis on these continuous electrode regions to obtain at least one initial touch cluster with a cluster shape. It then tracks the initial touch clusters in multiple consecutive touch sensing frames to obtain the area change of the same cluster in different frames. Based on the area change, it calculates the area change rate and the shape eccentricity according to the cluster shape. The initial touch clusters are then used to determine the touch type using the area change rate and the shape eccentricity. Clusters identified as fingertip touches are output as valid touch points. This solves the technical problem that traditional touch detection methods typically judge touch points based solely on whether the capacitance value exceeds a preset threshold, making it difficult to distinguish between fingertip touches and large-area false touches. This method can accurately separate fingertip operations from complex touch environments, effectively suppressing false reports caused by large-area false touches while retaining valid touch points, significantly improving the anti-interference capability and operational reliability of the touchscreen in complex usage scenarios. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a flowchart illustrating a touchscreen control method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the implementation process of S1 in one embodiment of the present invention; Figure 3 This is a schematic diagram of the implementation process of S2 in one embodiment of the present invention; Figure 4 This is a schematic diagram of the area variation of the same mass in different frames according to an embodiment of the present invention; Figure 5 This is a structural block diagram of a touch screen control device according to an embodiment of the present invention; Figure 6 This is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.

[0017] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0019] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. It should also be understood that, as used in this specification and the appended claims, the term "and / or" refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0020] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of the invention include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0021] It should be understood that the sequence number of each step in the following embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0022] Specifically, such as Figure 1 As shown, Figure 1This invention provides a touchscreen control method according to one embodiment, comprising the following steps: Step S1: Collect the raw capacitance data of the touch screen's sensing electrodes during the detection period, and filter out background noise from the raw capacitance data to obtain touch sensing frames at multiple sampling times.

[0023] Specifically, the electrical signals output by the touchscreen's sensing electrodes in each detection cycle are collected row by row and column by the analog-to-digital converter in the controller, forming a set of discrete digital signals, which is the raw capacitance data. To eliminate random fluctuations introduced by environmental interference, a sliding median filter is applied to the data at the same electrode position within several consecutive cycles. For example, the median value is taken after sorting the eight values ​​from the previous seven historical frames and the current frame, replacing the original data. The filtered capacitance values ​​are arranged into a two-dimensional array according to the electrode coordinates, with each array corresponding to a touch sensing frame at a sampling time. Taking accidental touch of the screen edge by the palm as an example, noise may cause false high values ​​to be generated by local electrodes without filtering. After the above processing, the abnormal points are suppressed, and the sensing frame can more stably reflect the true contact state. This process is executed with each detection cycle.

[0024] Step S2: Identify continuous electrode regions in the touch sensing frame whose capacitance values ​​exceed a preset value, and perform connected component analysis on the continuous electrode regions to obtain at least one initial touch blob including a blob shape.

[0025] Specifically, for the acquired touch-sensing frames, the capacitance value corresponding to each sensing electrode is traversed. Electrodes with values ​​higher than a preset threshold are marked as valid points. Adjacent valid points are grouped into the same continuous electrode region based on four-neighbor or eight-neighbor connectivity. Then, connected component analysis is performed on these regions. Depth-first search or disjoint-set data structure algorithms are used to determine the affiliation of electrodes within each region, forming independent data sets. Each such set corresponds to an initial touch cluster. For example, when a finger touches the screen, multiple sensing electrodes below the contact area have capacitance values ​​exceeding the preset value, connecting to form a compact cluster shape. Conversely, when a sleeve sweeps across the screen edge, it may create a long, narrow, continuous electrode region, which is also identified as an initial touch cluster. The differences in their geometric shapes will be used as a basis for judgment in subsequent processing.

[0026] Step S3: Correlate and track the initial touch clumps in multiple consecutive touch sensing frames to obtain the area change of the same clump in different frames.

[0027] Specifically, in multiple continuously acquired touch sensing frames, a cross-frame association operation is performed on the initial touch clumps identified in each frame. Matching is performed based on the spatial distance between the center coordinates of clumps in adjacent frames. When the Euclidean distance between the center point of a clump in the current frame and the center point of a clump in the previous frame is less than a preset tracking threshold, they are determined to belong to the same physical contact, and a tracking link is established. For successfully associated clump sequences, the number of electrodes covered in each corresponding frame is extracted, and this value is multiplied by the effective area of ​​a single sensing electrode to obtain the actual physical area occupied by the clump at each sampling time. Taking the process of a user's finger moving from a light touch to a press as an example, the initial touch clump covers 16 electrodes when it appears in the first frame, expands to 20 electrodes in the second frame, and reaches 24 electrodes in the third frame. Through the above association method, this can be clearly identified as the same clump, and its area change sequence over time is recorded. If a clump without a corresponding predecessor appears in a new frame, it is considered the start of a new touch event. Figure 4 As shown, the area of ​​the first frame is 30mm. 2 The area of ​​the second frame is 55mm². 2 The area of ​​the third frame is 80mm². 2 The area of ​​frame 4 is 60mm². 2 The area of ​​frame 5 is 25mm. 2 .

[0028] Step S4: Calculate the area change rate based on the area change, and calculate the shape eccentricity based on the shape of the mass. Use the area change rate and the shape eccentricity to determine the touch type of the initial touch mass, and output the mass determined to be a fingertip touch as a valid touch point.

[0029] Specifically, based on the area sequence obtained from the correlation between consecutive frames, the ratio of the area difference between adjacent sampling times to the time interval is calculated to obtain the area change rate of the initial touch blob, which reflects the dynamic characteristics of the expansion or contraction of the contact area. Simultaneously, the electrode distribution occupied by the blob is fitted with a minimum bounding rectangle, and the lengths of the major and minor axes are extracted. The reciprocal of their ratio is defined as the shape eccentricity, used to quantify the compactness of the blob. The calculated area change rate and shape eccentricity are input into a preset discrimination logic. When the area change rate is greater than a first threshold and the shape eccentricity is greater than a second threshold, the initial touch blob is determined to meet the fingertip touch characteristics. Taking a finger tap on the screen as an example, the area increases rapidly at the moment of contact, the area change rate is significant, and the electrode distribution is concentrated in a near-circular shape with a high shape eccentricity, satisfying the criteria and being identified as a valid touch point. While blobs formed by accidental touches at the edge of the palm may have area changes, their elongated shape and low shape eccentricity do not meet the dual-condition discrimination and are therefore excluded. Finally, only the blobs that pass the discrimination are output to the system as valid touch points.

[0030] In a specific embodiment, such as Figure 2As shown, the process of acquiring the raw capacitance data of the touchscreen's sensing electrodes during the detection period includes the following steps: S11, apply excitation signals to the sensing electrodes of the touch screen in sequence to obtain the sensing electrode response signals corresponding to each sensing electrode; S12, the response signal of the sensing electrode is converted from analog to digital to obtain the capacitance sampling value of each electrode intersection node, wherein the capacitance sampling value includes the node row coordinate and the node column coordinate; S13, the capacitor sampling values ​​are arranged in time sequence according to the detection period to obtain the original capacitor data.

[0031] Specifically, the acquisition of raw capacitance data of the touchscreen's sensing electrodes during the detection cycle begins with the ordered excitation of the driving electrodes and sensing electrodes that constitute the mutual capacitance array. The signal generation unit inside the controller first applies an AC excitation signal of a specific frequency to the first row of driving electrodes.

[0032] The excitation signal is physically coupled to all sensing electrodes that intersect it perpendicularly. Each sensing electrode generates a weak sensing electrode response signal due to capacitive coupling, the magnitude of which is affected by the capacitance change at the corresponding intersection node.

[0033] The analog front-end circuit integrated in the controller synchronously acquires the response signals of the group of parallel sensing electrodes and converts them from analog to digital through the built-in analog-to-digital converter (ADC), thereby obtaining the entire row of capacitance sampled values ​​associated with the currently excited driving electrode.

[0034] After completing one row of scanning, the controller moves to the next row of driving electrodes and repeats the above excitation and acquisition process until all driving electrodes have been traversed once. This complete traversal is defined as one detection cycle.

[0035] Each capacitance sample value not only contains digitized capacitance information, but also naturally relates to the physical location where the data was generated, namely the node row coordinates (corresponding to the excitation drive electrode number) and node column coordinates (corresponding to the sensing electrode number for signal acquisition).

[0036] All capacitance sampling values ​​acquired within a detection cycle are reorganized into a two-dimensional data matrix according to their acquisition time sequence and inherent row and column coordinate information. This matrix completely records the capacitance state of each node in the entire screen during this detection, thus constituting the original capacitance data.

[0037] Taking the input operation of a user on a handheld device as an example, when a finger approaches a certain area of ​​the screen, the capacitance value of multiple electrode intersection nodes located below that area will attenuate. During the excitation and acquisition process, the amplitude of the response signal of the sensing electrode corresponding to these nodes will decrease accordingly. The capacitance sampling value obtained after analog-to-digital conversion will also be low. Finally, a characteristic low-value area is formed in the original capacitance data matrix arranged according to the detection cycle, which provides a basis for subsequent processing.

[0038] The timing, excitation frequency, and ADC parameters of the entire acquisition process are precisely controlled by the controller firmware to ensure data consistency and timing integrity.

[0039] In a specific embodiment, the step of filtering out background noise from the original capacitance data to obtain touch sensing frames at multiple sampling times includes: The original capacitance data is divided into frames according to the detection period to obtain single-frame baseline data, and the full-screen mean of the single-frame baseline data is calculated to obtain the background baseline threshold. Based on the background baseline threshold, the single-frame baseline data is subjected to full-screen differential processing to obtain background differential data, and the background differential data is subjected to sliding window scanning to obtain the sliding window variance. The background difference data is dynamically thresholded using the sliding window variance to obtain a binarized mask. Spatial filtering is then performed on the single-frame baseline data based on the binarized mask to obtain the touch-sensing frames at the multiple sampling times.

[0040] Specifically, background noise filtering of the acquired raw capacitance data begins with dividing the continuously acquired raw capacitance data stream into independent detection cycles, separating the dataset corresponding to a single scan cycle; this is the single-frame baseline data. For each set of single-frame baseline data, the arithmetic mean of the capacitance samples of all electrode nodes across the entire screen is calculated to obtain a value representing the overall level of the current frame. This value is defined as the background baseline threshold, which reflects the global benchmark determined by both inherent hardware characteristics and environmental interference in the absence of significant touch events.

[0041] Subsequently, using this background baseline threshold as a reference, a subtraction operation is performed on each capacitance sample value in the single-frame baseline data, that is, the background baseline threshold is subtracted from the original value of each node, thus obtaining a new set of data, called background difference data. This set of data highlights local anomalies that deviate from the global average level; valid touch signals or sudden noise will appear as non-zero values ​​at this stage.

[0042] To distinguish genuine touch signals from random noise in background differential data, a sliding window scanning mechanism is introduced. A rectangular window of fixed size, such as 3×3 or 5×5 the size of electrode nodes, moves row by row and column by column across the background differential data matrix. For each local area covered by the window, the variance of all differential values ​​within it is calculated to obtain the sliding window variance at that location. The level of variance directly relates to the degree of signal dispersion within the local area. Touch signals typically exhibit a clustered pattern with strong signals in the center and weak signals at the periphery, resulting in relatively low variance; while isolated spike noise can cause a sharp increase in local variance.

[0043] Using the calculated sliding window variance, a dynamically changing segmentation threshold is set, which is positively correlated with the local variance. This dynamic threshold is used to evaluate the background difference data point by point. If the absolute value of the difference value of a node is greater than the dynamic threshold corresponding to its location, the point is determined to be a valid signal, and the output is 1; otherwise, it is determined to be noise or background fluctuation, and the output is 0. Finally, a binary mask of the same size as the original data is generated.

[0044] Finally, spatial filtering is performed based on this binarized mask. Specifically, the single-frame baseline data is multiplied bitwise with the mask, retaining the original single-frame baseline data value at positions of 1 and setting positions of 0 to zero. After this processing, electrode node data judged as noise interference is effectively suppressed, while potential touch signal areas are preserved and highlighted. The final output is a clear touch-sensing frame with multiple sampling times. Taking the user operating the device in direct sunlight outdoors as an example, strong light may cause the sensor to slowly drift due to background shift. This method effectively eliminates this slowly changing common-mode interference by calculating the background baseline threshold in real time for each frame and performing differential calculation, ensuring the stability of the touch-sensing frame.

[0045] In a specific embodiment, such as Figure 3 As shown, the process of performing connected component analysis on the continuous electrode region to obtain at least one initial touch cluster with a cluster shape specifically includes the following steps: S21, perform a four-neighbor or eight-neighbor adjacency traversal on the continuous electrode region to obtain at least one connected component. S22, perform node coordinate space mapping on each of the connected components to obtain the set of electrode node coordinates corresponding to each connected component, and perform bounding rectangle fitting on the set of electrode node coordinates to obtain the block outline corresponding to each connected component. S23, based on the outer frame of the cluster, perform contour edge tracking on the set of electrode node coordinates to obtain the cluster boundary pixel chain corresponding to each connected component, and perform grid filling statistics on the set of electrode node coordinates based on the cluster boundary pixel chain to obtain the at least one initial touch cluster including the cluster shape.

[0046] Specifically, connected component analysis is performed on the identified continuous electrode region, the core of which lies in determining the spatial connectivity between the valid electrode points within the region. This process begins by traversing the adjacency relationships of each electrode node within the continuous electrode region, determining whether its adjacent nodes belong to the same connected component based on preset four-neighbor or eight-neighbor connection rules. If four-neighbor is used, only the four directly adjacent nodes (top, bottom, left, and right) are considered; if eight-neighbor is used, nodes in the four diagonal directions (top left, top right, bottom left, and bottom right) are additionally included. All valid points are systematically traversed using a depth-first search (DFS) or union-find algorithm, dividing the set of interconnected nodes into independent groups, each group constituting a connected component.

[0047] For each isolated connected component, the coordinates of all its contained electrode nodes are extracted to form a set of electrode node coordinates. This set accurately describes the spatial distribution of the connected component in the touchscreen coordinate system. Based on this coordinate set, a bounding rectangle fitting operation is performed to calculate the smallest axis-aligned rectangle that can completely enclose all coordinates within the set. The coordinates of its upper left and lower right corner nodes are obtained, which constitute the bounding box of the connected component, providing a boundary reference for subsequent geometric feature calculations.

[0048] Based on the obtained outline of the clumping, a more refined contour extraction is performed on the connected component. Using edge tracking algorithms, such as the Sobel operator or Freeman chain code, the outer boundary of the electrode node coordinate set is scanned, recording the sequence of electrode positions that constitute the boundary, forming a closed chain of clumping boundary pixels. This chain clearly outlines the external contour of the initial touch clumping.

[0049] Finally, to fully define the internal structure of the initial touch cluster, filling statistics are performed within the grid area defined by the cluster's outer frame, based on the acquired cluster boundary pixel chain. Using scanline filling or seed filling algorithms, all electrode nodes within the boundary are marked as components of the cluster and included in the final cluster shape data. This process ensures that the initial touch cluster contains not only the original edge points but also all the electrode information filled within it, thus forming a complete clustered data entity with a clearly defined internal and external structure. Taking a user's palm accidentally touching the lower right corner of the screen as an example, the continuous electrode area formed by the contact may present an irregular polygon. After the above process, the scattered valid points within it are correctly assigned to the same connected component. Through boundary tracking and grid filling, the final generated initial touch cluster accurately reflects the actual coverage and shape of the palm contact, providing a reliable basis for subsequent fingertip and accidental touch discrimination.

[0050] In a specific embodiment, the step of traversing the four-neighbor or eight-neighbor adjacency relationships of the continuous electrode region to obtain at least one connected component includes: The electrode nodes in the continuous electrode region are sequentially scanned to obtain a seed node queue, and the traversal state of the electrode nodes is initialized to obtain a node access flag. The seed node queue includes node row coordinates and node column coordinates, and the node access flag includes visited state and unvisited state. Based on the seed node queue, the node access marker is expanded and updated using four-neighbor or eight-neighbor expansion to obtain the current component node set. Then, the component number is assigned to the current component node set to obtain at least one connected component, wherein the connected component includes the component number and the number of component nodes.

[0051] Specifically, to perform connected component segmentation on a continuous electrode region, a systematic scan of all electrode nodes within that region whose capacitance values ​​exceed a preset value is first required. The scanning process typically traverses the entire touchscreen's sensing electrode array in row-first or column-first order. When an unmarked, valid electrode node belonging to the continuous electrode region is detected, its coordinate information—the node's row and column coordinates—is stored in a first-in-first-out (FIFO) seed node queue. This queue is used to initiate the subsequent connected component growth process. Simultaneously, to prevent duplicate processing, a node access marker matrix matching the physical size of the touchscreen is established. Each element in this matrix corresponds to an electrode node, and its state is initialized to "unvisited." Once a node is included in the analysis process, its corresponding marker is immediately updated to "visited."

[0052] The actual construction of the connected component depends on the starting point taken from the seed node queue and is expanded according to the selected four-neighbor or eight-neighbor topology rules. Starting from the first seed node taken, it checks whether its adjacent electrode nodes within the four-neighbor (up, down, left, right) or eight-neighbor (including the four diagonal directions) belong to the same continuous electrode region and whether their node access flag is still "unvisited". If the condition is met, these adjacent nodes that meet the condition are added to the currently growing set, and their status in the node access flag matrix is ​​immediately updated to "visited". At the same time, their own coordinates are also added as new seed points to the tail of the queue so that it can continue to expand outward. This process is repeated until the seed node queue is empty. The complete set of nodes obtained at this time is an independent set of nodes for the current component.

[0053] For each set of component nodes generated through the above expansion process, the system assigns a unique component number, which is used to uniquely identify this connected component throughout the entire processing flow. Furthermore, the total number of electrode nodes contained in this set is counted and recorded as the component node count. The component number and the component node count together constitute the core attribute of the connected component. For example, when a user touches the screen with their finger, a compact, continuous electrode area is formed below the contact area. The algorithm first discovers a node in one corner of this area through sequential scanning, using it as a seed to initiate expansion. Ultimately, all nodes in this area are grouped into a single connected component, assigned the number "1", and its component node count is recorded as "25". If, at this time, the elbow of another hand inadvertently rests on the other side of the screen, forming a second separate contact area, the scanning program will discover a second isolated seed node in subsequent traversals, thus generating a second connected component with the number "2". The entire process ensures that spatially separated touch areas are correctly segmented and identified.

[0054] In a specific embodiment, the step of calculating the area change rate based on the area change, calculating the shape eccentricity based on the shape of the cluster, determining the touch type of the initial touch cluster using the area change rate and the shape eccentricity, and outputting clusters determined to be fingertip touches as valid touch points includes: The area change is calculated using temporal difference to obtain the area fluctuation value between adjacent frames, and the area fluctuation value is normalized to obtain the area change rate. The second-order central moment of the shape of the mass is calculated to obtain the major axis and minor axis of the mass, and the ratio of the axis lengths is calculated based on the major axis and minor axis of the mass to obtain the eccentricity of the shape; The area change rate is compared with an area threshold to obtain an area determination flag, and the shape eccentricity is compared with an eccentricity threshold to obtain a shape determination flag; Perform a logical AND operation between the area determination flag and the shape determination flag to obtain the touch type label corresponding to the initial touch block, wherein the touch type label includes a fingertip touch label and a non-fingert touch label; If the touch type label is determined to be a fingertip touch label, then the centroid coordinates of the block corresponding to the fingertip touch label are calculated to obtain the effective touch point output.

[0055] Specifically, a temporal difference operation is performed on the area change sequence of the initial touch clumps recorded in consecutive frames. This involves calculating the difference between the area of ​​the current frame and the area of ​​the previous frame to obtain the area fluctuation value between adjacent frames. Considering the differences in the absolute value of the area under different touch screen sizes or different sensitivity settings, this area fluctuation value is divided by a normalization factor related to the panel's physical parameters. This factor is usually determined by the effective area of ​​a single electrode and the system sampling rate. After this processing, a dimensionless area change rate is obtained, which is used to measure the relative speed of the expansion or contraction of the contact area.

[0056] Simultaneously, geometric feature analysis is performed on the shape of the same initial touch cluster in a specific frame. A covariance matrix is ​​constructed by calculating the second-order central moments of its electrode node coordinate set, and eigenvalue decomposition is performed on this matrix. Two orthogonal eigenvectors indicate the main directions of the data distribution, with the eigenvector corresponding to the larger eigenvalue defined as the cluster's major axis and the one corresponding to the smaller eigenvalue as the cluster's minor axis. Dividing the length of the cluster's major axis by the length of its minor axis, the resulting axis-to-length ratio, after inverse function transformation, becomes the shape eccentricity. The closer this value is to 1.0, the closer the cluster shape is to a circle; the larger the value, the more elongated it is.

[0057] The discrimination process consists of two threshold comparison steps. First, the calculated area change rate is compared with a preset area threshold. If the former is greater than the latter, the area judgment flag is output as true; otherwise, it is false. Second, the calculated shape eccentricity is compared with a preset eccentricity threshold. If the former is greater than the threshold, the shape judgment flag is output as true, indicating that the cluster shape is compact. These two judgment flags are not independent but are fed into a logical AND gate for operation. Only when both the area judgment flag and the shape judgment flag are true is the final output touch type label set as a fingertip touch label; otherwise, if either flag is false, the touch type label is a non-fingertip touch label, covering large-area accidental touches such as those on the palm or clothing.

[0058] Once the touch type label of an initial touch cluster is determined to be a fingertip touch label, the system initiates the final positioning procedure. The weighted average of the coordinates of all electrode nodes within the cluster is calculated, with the weight typically taken from the capacitance values ​​of each node, thus obtaining the centroid coordinates of the cluster. These centroid coordinates accurately reflect the position of the valid touch point on the screen and are output as the final result to the operating system's input event queue. For example, if a user quickly taps the screen with their finger, the contact area rapidly increases, the rate of area change exceeds the area threshold, and the contact pattern is concentrated with a shape eccentricity higher than the eccentricity threshold. Meeting both conditions, it is correctly labeled as a fingertip touch, and its centroid coordinates are immediately reported. Conversely, when a sleeve sweeps across the screen, although it may cause area fluctuations, the resulting cluster is elongated with a low shape eccentricity, causing the logic and judgment to fail, and the touch type label is non-fingertip touch; therefore, no valid touch point is output.

[0059] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. It should be noted that the information interaction, execution process, etc. between the above devices / units are based on the same concept as the method embodiments of this application. Their specific functions and technical effects can be found in the embodiment section of the control device, and will not be repeated here.

[0060] Please see Figure 5 , Figure 5 This is a schematic diagram of the framework of an embodiment of the touchscreen control device of this application. Figure 5 As shown, the touchscreen control device includes a data acquisition module 1, used to acquire raw capacitance data of the touchscreen's sensing electrodes during the detection period, and to filter out background noise from the raw capacitance data to obtain touch sensing frames at multiple sampling times; an analysis module 2, used to identify continuous electrode regions in the touch sensing frames whose capacitance values ​​exceed preset values, and to perform connected component analysis on the continuous electrode regions to obtain at least one initial touch cluster with a cluster shape; a tracking module 3, used to perform correlation tracking on the initial touch clusters in multiple consecutive touch sensing frames to obtain the area change of the same cluster in different frames; and a discrimination module 4, used to calculate the area change rate based on the area change, and calculate the shape eccentricity based on the cluster shape, and to determine the touch type of the initial touch cluster by using the area change rate and the shape eccentricity, and output the clusters determined to be fingertip touches as valid touch points.

[0061] The above module is used to execute the steps of the touch screen control method.

[0062] Reference Figure 6 This invention also provides a computer device whose internal structure can be as follows: Figure 6As shown, the computer device includes a processor, memory, display screen, input device, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores the data corresponding to this embodiment. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements the above-described method.

[0063] Those skilled in the art will understand that Figure 6 The structures shown are merely block diagrams of some structures related to the present invention and do not constitute a limitation on the computer devices on which the present invention is applied.

[0064] An embodiment of the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0065] This application provides a computer program product that, when run on an electronic device, enables the electronic device to perform the functions of the various structures of the control device described above, or to implement the steps in the various method embodiments described above.

[0066] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the present invention and embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM, etc.

[0067] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0068] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0069] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations 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 components may be combined or integrated into another system, 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 interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0070] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0071] 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.

[0072] 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 computer-readable storage medium. Based on this understanding, the technical solution of this 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0073] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.

Claims

1. A touchscreen control method, characterized in that, Includes the following steps: The raw capacitance data of the touch screen's sensing electrodes during the detection period is collected, and the raw capacitance data is filtered out for background noise to obtain touch sensing frames at multiple sampling times. Identify continuous electrode regions in the touch sensing frame whose capacitance values ​​exceed a preset value, and perform connected component analysis on the continuous electrode regions to obtain at least one initial touch blob including a blob shape. The initial touch clumps in multiple consecutive touch sensing frames are correlated and tracked to obtain the area change of the same clump in different frames; The area change rate is calculated based on the area change, and the shape eccentricity is calculated based on the shape of the mass. The touch type of the initial touch mass is determined by the area change rate and the shape eccentricity, and the mass determined to be a fingertip touch is output as a valid touch point.

2. The touchscreen control method according to claim 1, characterized in that, The acquisition of raw capacitance data of the touchscreen's sensing electrodes during the detection period includes: Excitation signals are sequentially applied to the sensing electrodes of the touch screen to obtain the sensing electrode response signals corresponding to each sensing electrode; The response signal of the sensing electrode is converted from analog to digital to obtain the capacitance sampling value of each electrode intersection node, wherein the capacitance sampling value includes the node row coordinate and the node column coordinate; The capacitance sample values ​​are arranged in time sequence according to the detection period to obtain the original capacitance data.

3. The touchscreen control method according to claim 1, characterized in that, The step of filtering out background noise from the original capacitance data to obtain touch sensing frames at multiple sampling times includes: The original capacitance data is divided into frames according to the detection period to obtain single-frame baseline data, and the full-screen mean of the single-frame baseline data is calculated to obtain the background baseline threshold. Based on the background baseline threshold, the single-frame baseline data is subjected to full-screen differential processing to obtain background differential data, and the background differential data is subjected to sliding window scanning to obtain the sliding window variance. The background difference data is dynamically thresholded using the sliding window variance to obtain a binarized mask. Spatial filtering is then performed on the single-frame baseline data based on the binarized mask to obtain the touch-sensing frames at the multiple sampling times.

4. The touchscreen control method according to claim 1, characterized in that, The connected component analysis of the continuous electrode region yields at least one initial touch cluster with a cluster shape, including: The continuous electrode region is traversed by four-neighbor or eight-neighbor adjacency relationships to obtain at least one connected component. For each of the connected components, perform node coordinate space mapping to obtain the set of electrode node coordinates corresponding to each connected component, and perform bounding rectangle fitting on the set of electrode node coordinates to obtain the cluster outline corresponding to each connected component. Based on the outer frame of the cluster, contour edge tracking is performed on the set of electrode node coordinates to obtain the cluster boundary pixel chain corresponding to each connected component. Then, based on the cluster boundary pixel chain, the set of electrode node coordinates is subjected to grid filling statistics to obtain the at least one initial touch cluster including the cluster shape.

5. The touchscreen control method according to claim 4, characterized in that, The step of traversing the four-neighbor or eight-neighbor adjacency relationships of the continuous electrode region to obtain at least one connected component includes: The electrode nodes in the continuous electrode region are sequentially scanned to obtain a seed node queue, and the traversal state of the electrode nodes is initialized to obtain a node access flag. The seed node queue includes node row coordinates and node column coordinates, and the node access flag includes visited state and unvisited state. Based on the seed node queue, the node access marker is expanded and updated using four-neighbor or eight-neighbor expansion to obtain the current component node set. Then, the component number is assigned to the current component node set to obtain at least one connected component, wherein the connected component includes the component number and the number of component nodes.

6. The touchscreen control method according to any one of claims 1-5, characterized in that, The process of calculating the area change rate based on the area change and the shape eccentricity based on the shape of the cluster, and then using the area change rate and the shape eccentricity to determine the touch type of the initial touch cluster, outputting clusters determined to be fingertip touches as valid touch points, includes: The area change is calculated using temporal difference to obtain the area fluctuation value between adjacent frames, and the area fluctuation value is normalized to obtain the area change rate. The second-order central moment of the shape of the mass is calculated to obtain the major axis and minor axis of the mass, and the ratio of the axis lengths is calculated based on the major axis and minor axis of the mass to obtain the eccentricity of the shape; The area change rate is compared with an area threshold to obtain an area determination flag, and the shape eccentricity is compared with an eccentricity threshold to obtain a shape determination flag; Perform a logical AND operation between the area determination flag and the shape determination flag to obtain the touch type label corresponding to the initial touch block, wherein the touch type label includes a fingertip touch label and a non-fingert touch label; If the touch type label is determined to be a fingertip touch label, then the centroid coordinates of the block corresponding to the fingertip touch label are calculated to obtain the effective touch point output.

7. A touchscreen control device, characterized in that, The touchscreen control method for performing any one of claims 1 to 6 includes: The acquisition module is used to acquire the raw capacitance data of the touch screen's sensing electrodes during the detection period, and to filter out background noise from the raw capacitance data to obtain touch sensing frames at multiple sampling times. The analysis module is used to identify continuous electrode regions in the touch sensing frame whose capacitance values ​​exceed a preset value, and to perform connected component analysis on the continuous electrode regions to obtain at least one initial touch blob including a blob shape. The tracking module is used to correlate and track the initial touch clumps in multiple consecutive touch sensing frames to obtain the area change of the same clump in different frames; The discrimination module is used to calculate the area change rate based on the area change and the shape eccentricity based on the shape of the mass. The initial touch mass is then used to determine the touch type by using the area change rate and the shape eccentricity, and the mass determined to be a fingertip touch is output as a valid touch point.

8. A computer device, characterized in that, The device includes a memory and a processor that are coupled to each other, the memory storing program instructions and the processor executing the program instructions to implement the touchscreen control method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The device stores program instructions that can be executed by a processor, the program instructions being implemented to implement the touchscreen control method according to any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, enables the implementation of the steps of the touchscreen control method as described in any one of claims 1 to 6.