Data processing method and device, equipment and storage medium

By determining the downsampling matrix of the initial matrix of the touch sensor and its forward and backward gradient matrices during touch interaction, a joint gradient matrix is ​​generated for gradient elimination, which solves the problem of poor performance of existing methods and improves the accuracy of touch interaction.

CN115454280BActive Publication Date: 2026-03-31BEIJING ESWIN COMPUTING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-27
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing gradient elimination methods are not effective in touch interaction, affecting the accuracy of touch interaction.

Method used

By acquiring the initial touch data collected by the touch sensor, the downsampling matrix of each initial matrix is ​​determined, and the joint gradient matrix is ​​determined based on the forward gradient matrix and the backward gradient matrix. Gradient elimination processing is then performed to obtain the target matrix after gradient elimination.

Benefits of technology

It achieves piecewise gradient elimination, which reduces the amount of data computation while improving the gradient elimination effect. It has high applicability and can effectively eliminate gradients with large amplitude.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115454280B_ABST
    Figure CN115454280B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a data processing method, device and equipment, and a storage medium. The method comprises: obtaining initial touch data collected by a touch sensor, and determining a down-sampling matrix corresponding to each initial matrix of the initial touch data, the initial touch data being in a matrix form, and each initial matrix corresponding to a row of data in the initial touch data; for each down-sampling matrix, determining a forward gradient matrix and a backward gradient matrix corresponding to the down-sampling matrix, determining a joint gradient matrix based on the forward gradient matrix and the backward gradient matrix, and processing the initial matrix corresponding to the down-sampling matrix based on the joint gradient matrix to obtain a target matrix after gradient elimination; determining target touch data based on the target matrix corresponding to each initial matrix, and performing a corresponding operation based on the target touch data. The embodiments of the present application can improve the effect of gradient elimination and have high applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, device, and storage medium. Background Technology

[0002] With the continuous advancement of technology, more and more smart products are being applied to all aspects of life and production, and touch interaction has become an important human-computer interaction method. In the actual use of smart products, it is necessary to eliminate the gradients caused by display noise and noise generated by various components in the touch data, thereby improving the accuracy of touch interaction.

[0003] However, existing gradient removal methods are ineffective and affect the accuracy of touch interaction. Summary of the Invention

[0004] This application provides a data processing method that can improve the effect of gradient elimination and has high applicability.

[0005] On one hand, embodiments of this application provide a data processing method, the method comprising:

[0006] Acquire the initial touch data collected by the touch sensor, and determine the downsampling matrix corresponding to each initial matrix of the initial touch data. The initial touch data exists in matrix form, and each initial matrix corresponds to a row of data in the initial touch data.

[0007] For each of the above downsampling matrices, determine the forward gradient matrix and the backward gradient matrix corresponding to the downsampling matrix, determine the joint gradient matrix based on the forward gradient matrix and the backward gradient matrix, and process the initial matrix corresponding to the downsampling matrix based on the joint gradient matrix to obtain the target matrix after gradient elimination.

[0008] Target touch data is determined based on the target matrix corresponding to each of the above initial matrices, and corresponding operations are performed based on the target touch data.

[0009] On the other hand, embodiments of this application provide a data processing apparatus, which includes:

[0010] The data acquisition module is used to acquire the initial touch data collected by the touch sensor and determine the downsampling matrix corresponding to each initial matrix of the initial touch data. The initial touch data exists in matrix form, and each initial matrix corresponds to a row of data in the initial touch data.

[0011] The gradient elimination module is used to determine the forward gradient matrix and the backward gradient matrix corresponding to each of the above downsampled matrices, determine the joint gradient matrix based on the forward gradient matrix and the backward gradient matrix, and process the initial matrix corresponding to the downsampled matrix based on the joint gradient matrix to obtain the target matrix after gradient elimination.

[0012] The operation execution module is used to determine the target touch data based on the target matrix corresponding to each of the above initial matrices, and to perform corresponding operations based on the target touch data.

[0013] On the other hand, embodiments of this application provide an electronic device, including a processor and a memory, which are interconnected;

[0014] The aforementioned memory is used to store computer programs;

[0015] The processor described above is configured to execute the data processing method provided in the embodiments of this application when the computer program described above is invoked.

[0016] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program that is executed by a processor to implement the data processing method provided in embodiments of this application.

[0017] On the other hand, embodiments of this application provide a computer program product, which includes a computer program that, when executed by a processor, implements the data processing method provided in embodiments of this application.

[0018] In this embodiment, by determining the target matrix after gradient elimination corresponding to each initial matrix of the initial touch data, piecewise gradient elimination can be achieved for the initial touch data, reducing the amount of data computation while improving the gradient elimination effect. Furthermore, for each initial matrix, the joint gradient matrix is ​​determined by the forward and backward gradient matrices of its downsampled matrix, and then gradient elimination is performed on the corresponding initial matrix based on the joint gradient matrix. This approach is more effective and has higher applicability compared to existing gradient elimination algorithms. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments 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.

[0020] Figure 1 This is a flowchart illustrating the data processing method provided in an embodiment of this application;

[0021] Figure 2 This is a schematic diagram of the initial touch data provided in the embodiments of this application;

[0022] Figure 3a This is a schematic diagram of a scenario for determining the forward gradient matrix provided in an embodiment of this application;

[0023] Figure 3b This is a schematic diagram of a scenario for determining the inverse gradient matrix provided in an embodiment of this application;

[0024] Figure 4 This is a schematic diagram of a scenario for determining the joint gradient matrix provided in an embodiment of this application;

[0025] Figure 5 This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this application;

[0026] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0027] 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 some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0028] The data processing method provided in this application can be applied to any touch interaction scenario, such as a smartphone performing corresponding operations based on touch data collected by a touch sensor, or a mechanical device implementing corresponding functions based on touch data collected by a touch sensor. The specific method can be determined based on the actual application scenario requirements and is not limited here.

[0029] See Figure 1 , Figure 1 This is a flowchart illustrating the data processing method provided in an embodiment of this application. Figure 1 As shown, the data processing method provided in this application embodiment may specifically include the following steps:

[0030] Step S11: Obtain the initial touch data collected by the touch sensor, and determine the downsampling matrix corresponding to each initial matrix of the initial touch data.

[0031] The initial touch data collected by the touch sensor exists in matrix form, meaning that the touch sensor can convert the user's touch operation into initial touch data in matrix form.

[0032] The initial touch data collected by the touch sensor has a mapping relationship with each position on the display screen, so the initial touch data can represent the user's touch position on the display screen of the display device through data at different positions.

[0033] like Figure 2 As shown, Figure 2 This is a schematic diagram of the initial touch data provided in the embodiments of this application. Figure 2 The initial touch data shown represents each row of data in a matrix, and each column of data represents a column of data in the matrix. The data at each position represents the pressure value at the corresponding location on the display screen. The pressure value is highest at the center of the touch position, lower at the surrounding positions, and 0 at other positions far from the touch position.

[0034] Each initial matrix in the initial touch data corresponds to a row of data in the initial touch data, that is, each initial matrix is ​​a 1×N matrix, where N depends on the number of columns in the initial touch matrix.

[0035] In other words, after obtaining the initial touch data collected by the touch sensor, each row of data in the initial touch data can be individually determined as an initial matrix.

[0036] After determining the initial matrices for the initial touch data, to reduce the amount of data processing and improve efficiency, a downsampling matrix for each initial matrix can be determined. Specifically, each initial matrix can be downsampled using a low-pass filter, and the filtering result can be used to determine the corresponding downsampling matrix.

[0037] The low-pass filter used to downsample the initial matrix can be a 1-2-1 filter or other types of low-pass filters. The specific type can be determined based on the actual application scenario requirements, and there are no restrictions here.

[0038] Step S12: For each downsampling matrix, determine the forward gradient matrix and backward gradient matrix corresponding to the downsampling matrix, determine the joint gradient matrix based on the forward gradient matrix and backward gradient matrix, and process the initial matrix corresponding to the downsampling matrix based on the joint gradient matrix to obtain the target matrix after gradient elimination.

[0039] In some feasible implementations, for each downsampling matrix, when determining the forward gradient matrix corresponding to the downsampling matrix, for the first data in the downsampling matrix, the forward gradient value corresponding to the location of the data can be determined based on the data.

[0040] As an example, the data can be directly determined as the forward gradient value corresponding to the location of the data, or the data can be determined as the forward gradient value corresponding to the location of the data if the data is less than the first gradient threshold, and the first gradient threshold can be determined as the forward gradient value corresponding to the location of the data if the data is greater than or equal to the first gradient threshold.

[0041] As an example, the difference between the data and the first preset value can be determined as the forward gradient value corresponding to the location of the data. Alternatively, if the difference between the data and the first preset value is less than the first gradient threshold, the difference between the data and the first preset value can be determined as the forward gradient value corresponding to the location of the data. If the difference between the data and the first preset value is greater than or equal to the first gradient threshold, the first gradient threshold can be determined as the forward gradient value corresponding to the location of the data.

[0042] The first preset value can be determined based on the actual application scenario requirements, such as being 0 or 1, and is not restricted here.

[0043] The specific threshold for the first gradient can be determined based on the actual application scenario requirements, such as 20, etc., and is not limited here.

[0044] For each data point in the downsampling matrix except for the first data point, the forward gradient value corresponding to the location of that data point can be determined based on that data point and the data point preceding it.

[0045] As an example, the data difference between the data and the previous data (hereinafter referred to as the first data difference for ease of description) can be determined, and the first data difference can be determined as the forward gradient value corresponding to the location of the data.

[0046] As an example, a first data difference between the data and the previous data can be determined. If the first data difference is less than a first gradient threshold, the first data difference is determined as the forward gradient value corresponding to the location of the data. If the first data difference is greater than or equal to the first gradient threshold, the first gradient threshold is determined as the forward gradient value corresponding to the location of the data.

[0047] like Figure 3a As shown, Figure 3a This is a schematic diagram of a scenario for determining the forward gradient matrix provided in an embodiment of this application. If the data corresponding to each position in the sampling matrix are 0, 10, 20, 50, 20, 10, and 0 respectively, and the first gradient threshold is 25, then the first forward gradient value in the forward gradient matrix is ​​0, the second forward gradient value is 10, the third forward gradient value is 10, the fourth forward gradient value is 25 (the difference between the first data is greater than the first gradient threshold), the fifth forward gradient value is -30, the sixth forward gradient value is -10, and the seventh forward gradient value is -10.

[0048] In this embodiment, for each downsampling matrix, when determining the forward gradient matrix of that downsampling matrix, any of the above-described determination methods can be iteratively performed, obtaining an iterative matrix each time. When the number of iterations is reached, the iteration stops, and the iterative matrix at the time of stopping is determined as the final forward gradient matrix.

[0049] In some feasible implementations, for each downsampling matrix, when determining the inverse gradient matrix corresponding to the downsampling matrix, the inverse gradient value corresponding to the position of the last data in the downsampling matrix can be determined based on the last data.

[0050] As an example, the data can be directly determined as the back gradient value corresponding to the location of the data, or the data can be determined as the back gradient value corresponding to the location of the data if the data is less than the second gradient threshold, and the second gradient threshold can be determined as the back gradient value corresponding to the location of the data if the data is greater than or equal to the second gradient threshold.

[0051] As an example, the difference between the data and the second preset value can be determined as the back gradient value corresponding to the location of the data. Alternatively, if the difference between the data and the second preset value is less than the second gradient threshold, the difference between the data and the second preset value can be determined as the back gradient value corresponding to the location of the data. If the difference between the data and the second preset value is greater than or equal to the second gradient threshold, the second gradient threshold can be determined as the back gradient value corresponding to the location of the data.

[0052] The second preset value can be the same as or different from the first preset value. The specific value can be determined based on the actual application scenario requirements and is not restricted here.

[0053] The second gradient threshold and the first gradient threshold can be the same or different, and the specific determination can be based on the actual application scenario requirements, without any restrictions here.

[0054] For each data point in the downsampling matrix except for the last data point, the inverse gradient value corresponding to the location of that data point can be determined based on that data point and the data point immediately following it.

[0055] As an example, the data difference between the data and the next data (hereinafter referred to as the second data difference for ease of description) can be determined, and the second data difference can be determined as the back gradient value corresponding to the location of the data.

[0056] As an example, a second data difference between the data and the next data can be determined. If the second data difference is less than a second gradient threshold, the second data difference is determined as the back gradient value corresponding to the location of the data. If the second data difference is greater than or equal to the second gradient threshold, the second gradient threshold is determined as the back gradient value corresponding to the location of the data.

[0057] After determining the back gradient values ​​at each position, the back gradient matrix corresponding to the downsampling matrix can be determined based on the back gradient values ​​at each position.

[0058] like Figure 3b As shown, Figure 3b This is a schematic diagram of a scenario for determining the back gradient matrix provided in an embodiment of this application. If the data corresponding to each position in the sampling matrix are 0, 10, 20, 50, 20, 10, and 0 respectively, and the second gradient threshold is 25, then the 7th back gradient value in the back gradient matrix is ​​0, the 6th back gradient value is 10, the 5th back gradient value is 10, the 4th back gradient value is 25 (the first data difference is greater than the first gradient threshold), the 3rd back gradient value is -30, the 2nd back gradient value is -10, and the 1st back gradient value is -10.

[0059] In this embodiment, for each downsampling matrix, when determining the inverse gradient matrix of that downsampling matrix, any of the above-described determination methods can be iteratively performed, obtaining an iterative matrix each time. When the number of iterations is reached, the iteration stops, and the iterative matrix at the time of stopping is determined as the final inverse gradient matrix.

[0060] In some feasible implementations, for each downsampling matrix, when determining the joint gradient matrix based on the forward gradient matrix and the backward gradient matrix corresponding to the downsampling matrix, the data corresponding to the same position in the forward gradient matrix and the backward gradient matrix can be fused to obtain fused data, and then the joint gradient matrix can be obtained based on the fused data corresponding to each position.

[0061] For example, the average or sum of two data points can be used to obtain fused data. Alternatively, if both data points are negative or both are positive, the data with the smallest modulus can be determined as fused data. If neither data point is positive or neither is negative, the third preset value can be determined as fused data. Then, the joint gradient matrix can be obtained based on the fused data corresponding to each position.

[0062] The specific third threshold mentioned above can be determined based on the actual application scenario requirements; for example, it can be 0, and no restriction is imposed here.

[0063] The above method for determining the fused data corresponding to each location is only an example. The specific method can be determined based on the actual application scenario requirements, and no restrictions are imposed here.

[0064] Optionally, when determining the joint gradient matrix corresponding to the downsampling matrix, the first position corresponding to the first maximum gradient value in the forward gradient matrix and the second position corresponding to the first maximum gradient value in the backward gradient matrix can be determined, and the gradient fusion matrix can be further determined based on the data from the first position to the second position in the forward gradient matrix and the backward gradient matrix.

[0065] Furthermore, the data in the forward gradient matrix before the first position can be defined as the first matrix, and the data in the backward gradient matrix after the second position can be defined as the second matrix. The final joint gradient matrix is ​​obtained by concatenating the first matrix, the gradient fusion matrix, and the second matrix in that order.

[0066] See Figure 4 , Figure 4 This is a schematic diagram illustrating a scenario for determining the joint gradient matrix provided in an embodiment of this application. For example... Figure 4 The forward gradient matrix and backward gradient matrix shown are 1×8 matrices. If the first maximum gradient value in the forward gradient matrix is ​​A3 and the first maximum gradient value in the backward gradient matrix is ​​B6, then A3-A6 in the forward gradient matrix and B3-B6 in the backward gradient matrix can be merged to obtain a gradient fusion matrix. In this case, the gradient fusion matrix is ​​a 1×4 matrix, which includes data C1-C4.

[0067] Furthermore, the data A1-A2 before A3 in the forward gradient matrix can be defined as the first matrix, and the data B7-B8 after B6 in the backward gradient matrix can be defined as the second matrix. The first matrix, the gradient fusion matrix, and the second matrix are then concatenated to obtain the joint gradient matrix. At this point, the joint gradient matrix is ​​a 1×8 matrix, and its data include A1, A2, C1, C2, C3, C4, B7, and B8.

[0068] When determining the gradient fusion matrix based on the data from the first to the second position in the forward gradient matrix and the backward gradient matrix, for each position from the first to the second position, the fusion data corresponding to that position can be determined based on the data corresponding to that position in the forward gradient matrix (hereinafter referred to as the first data for ease of description) and the data corresponding to that position in the backward gradient matrix (hereinafter referred to as the second data for ease of description).

[0069] If both the first and second data are positive or both are negative, the data with the smallest modulus between the first and second data is determined as the fused data corresponding to that position. If neither the first nor the second data is positive or negative (e.g., the first data is 0 and the second data is negative, or the first data is 0 and the second data is positive, or the first data is positive and the second data is negative, etc.), the fourth preset value is determined as the fused data corresponding to that position.

[0070] The fourth preset value can be determined based on the actual application scenario requirements, and there are no restrictions here.

[0071] In some feasible implementations, for each downsampling matrix, when processing the initial matrix corresponding to the downsampling matrix based on the downsampling matrix to obtain the target matrix after gradient elimination, the joint gradient matrix corresponding to the downsampling matrix can be filtered first to obtain the filtering matrix.

[0072] Specifically, for the first data point in the joint gradient matrix, the initial filtered data corresponding to that data point can be determined based on that data point and the first low-pass filter coefficients. For each data point in the joint gradient matrix other than the first data point, the initial filtered data corresponding to that data point is determined based on that data point, the first low-pass filter coefficients, and the initial filtered data corresponding to the previous data point.

[0073] As an example, the initial filtered data corresponding to each data point in the joint gradient matrix can be determined based on the following method:

[0074]

[0075] Where i is the position index, input[i] is the i-th data in the joint gradient matrix, filtered1[i-1] is the initial filtered data corresponding to the (i-1)-th data in the joint gradient matrix, filtered1[i] is the initial filtered data corresponding to the i-th data in the joint gradient matrix, and low_pass_filter_coeff1 is the first low-pass filter coefficient.

[0076] Furthermore, after obtaining the initial filtered data corresponding to each data in the joint gradient matrix, for each initial filtered data, the target filtered data corresponding to the initial filtered data can be determined based on the initial filtered data, the second low-pass filter coefficients, and the data in the corresponding initial matrix that correspond to the same position as the initial filtered data.

[0077] As an example, the target filtered data corresponding to each initial filtered data can be determined based on the following method:

[0078]

[0079] Where i is the position index, filtered1[i] is the initial filtered data corresponding to the i-th data in the joint gradient matrix, low_pass_filter_coeff2 is the second low-pass filter coefficient, downsampling[i] is the i-th data in the corresponding downsampling matrix, and filtered2[i] is the target filtered data corresponding to the initial filtered data corresponding to the i-th data in the joint gradient matrix.

[0080] After determining the target filtering data, the target filtering data can be combined into a matrix based on the location information corresponding to each target filtering data, and this matrix can be determined as the filtering matrix after filtering the joint gradient matrix.

[0081] The determination of initial and target filtering data can be achieved using a low-pass filter. The low-pass filter can effectively reduce the difference between the corresponding data before and after filtering, and can also reduce the gap between the data at the corresponding positions of the joint gradient matrix and the downsampling matrix, thus making the final target filtering data more reasonable and beneficial for gradient elimination of the corresponding initial matrix.

[0082] Furthermore, the filter matrix is ​​upsampled to obtain an upsampled matrix, ensuring that the number of data points in the upsampled matrix matches the number of data points in the corresponding initial matrix. For each downsampled matrix, the data points at the corresponding positions in the corresponding upsampled matrix are subtracted from the initial matrix corresponding to that downsampled matrix to obtain the gradient-reduced target matrix obtained after processing the initial matrix.

[0083] Step S13: Determine the target touch data based on the target matrix corresponding to each initial matrix, and perform corresponding operations based on the target touch data.

[0084] In some feasible implementations, since the initial touch data collected by the touch sensor exists in matrix form, after determining the target matrix corresponding to each initial matrix, the target matrices can be concatenated based on the row index of each initial matrix in the corresponding initial touch data to obtain the target touch data existing in matrix form.

[0085] For example, if the initial touch data is a 4×M matrix, then four initial matrices can be determined from the initial touch data, and the target matrix corresponding to each initial matrix can be determined based on the method shown in steps S11-S13.

[0086] The target matrices are then concatenated according to their respective row indices from the initial matrices to obtain target touch data in the form of a 4×M matrix.

[0087] After obtaining the target touch data, corresponding operations can be performed based on the target touch data. These operations may include clicking a touch button, opening a webpage link, or manipulating character data. The specific operation can be determined based on the actual application scenario requirements and is not limited here.

[0088] In this embodiment, by determining the target matrix after gradient elimination corresponding to each initial matrix of the initial touch data, piecewise gradient elimination can be achieved for the initial touch data, reducing the amount of data computation while improving the gradient elimination effect. Furthermore, for each initial matrix, a joint gradient matrix is ​​determined using the forward and backward gradient matrices of its downsampled matrix. Gradient elimination is then performed on the corresponding initial matrix based on this joint gradient matrix, which is more effective than existing gradient elimination algorithms. Moreover, since the joint gradient matrix is ​​mainly determined based on the fused gradient matrix corresponding to the forward and backward gradient matrices, the final determined joint gradient matrix can effectively eliminate gradients with large amplitudes, making it highly applicable.

[0089] See Figure 5 , Figure 5 This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this application. The data processing apparatus provided in the embodiments of this application includes:

[0090] The data acquisition module 51 is used to acquire the initial touch data collected by the touch sensor and determine the downsampling matrix corresponding to each initial matrix of the initial touch data. The initial touch data exists in matrix form, and each initial matrix corresponds to a row of data in the initial touch data.

[0091] The gradient elimination module 52 is used to determine the forward gradient matrix and the backward gradient matrix corresponding to each of the above downsampled matrices, determine the joint gradient matrix based on the forward gradient matrix and the backward gradient matrix, and process the initial matrix corresponding to the downsampled matrix based on the joint gradient matrix to obtain the target matrix after gradient elimination.

[0092] The operation execution module 53 is used to determine the target touch data based on the target matrix corresponding to each of the above initial matrices, and to perform corresponding operations based on the target touch data.

[0093] In some feasible implementations, for each of the above downsampling matrices, the gradient elimination module 52 is configured to:

[0094] For the first data in the downsampling matrix, the forward gradient value corresponding to the location of the data is determined based on the data. For each data in the downsampling matrix other than the first data, the forward gradient value corresponding to the location of the data is determined based on the data and the previous data.

[0095] The forward gradient matrix corresponding to the downsampling matrix is ​​determined based on each of the aforementioned forward gradient values;

[0096] For the last data in the downsampling matrix, the back gradient value corresponding to the location of the data is determined based on the data. For each data in the downsampling matrix other than the last data, the back gradient value corresponding to the location of the data is determined based on the data and the data following it.

[0097] The inverse gradient matrix corresponding to the downsampling matrix is ​​determined based on the aforementioned inverse gradient values.

[0098] In some feasible implementations, for each data point in each downsampling matrix except the first data point, the gradient elimination module 52 is configured to:

[0099] Determine the first difference between this data and the preceding data.

[0100] If the first data difference is less than the first gradient threshold, then the first data difference is determined as the forward gradient value corresponding to the location of the data; if the first data difference is greater than or equal to the first gradient threshold, then the first gradient threshold is determined as the forward gradient value corresponding to the location of the data.

[0101] Determine the difference between this data and the second data point following it;

[0102] If the second data difference is less than the second gradient threshold, then the second data difference is determined as the back gradient value corresponding to the location of the data. If the second data difference is greater than or equal to the second gradient threshold, then the second gradient threshold is determined as the back gradient value corresponding to the location of the data.

[0103] In some feasible implementations, the gradient elimination module 52 described above is used for:

[0104] Determine the first position corresponding to the first maximum gradient value in the aforementioned forward gradient matrix and the second position corresponding to the first maximum gradient value in the aforementioned backward gradient matrix;

[0105] Based on the data from the first position to the second position in the aforementioned forward gradient matrix and the aforementioned backward gradient matrix, the gradient fusion matrix is ​​determined.

[0106] Based on the first matrix, the second matrix, and the aforementioned gradient fusion matrix, a joint gradient matrix is ​​determined. The first matrix includes the data in the aforementioned forward gradient matrix before the aforementioned first position, and the second matrix includes the data in the aforementioned backward gradient matrix after the aforementioned second position.

[0107] In some feasible implementations, the gradient elimination module 52 described above is used for:

[0108] For each of the first to second positions, based on the first data in the forward gradient matrix corresponding to that position and the second data in the backward gradient matrix corresponding to that position, the fused data corresponding to that position is determined. If both the first and second data are positive or both are negative, the fused data corresponding to that position is the data with the smallest modulus between the first and second data. If neither the first nor the second data is positive or neither is negative, the fused data corresponding to that position is a preset value.

[0109] The gradient fusion matrix is ​​determined based on the aforementioned fused data.

[0110] In some feasible implementations, for each of the above downsampling matrices, the gradient elimination module 52 is configured to:

[0111] The above joint gradient matrix is ​​filtered to obtain a filter matrix, and the upsampling matrix corresponding to the above filter matrix is ​​determined.

[0112] Subtract the data in the initial matrix corresponding to the downsampling matrix from the data in the upsampling matrix to obtain the target matrix after gradient elimination.

[0113] In some feasible implementations, the gradient elimination module 52 described above is used for:

[0114] For the first data in the joint gradient matrix above, the initial filtered data corresponding to the data is determined based on the data and the first low-pass filter coefficient.

[0115] For each data point in the joint gradient matrix except for the first data point, the initial filter data corresponding to that data point is determined based on that data point, the first low-pass filter coefficients mentioned above, and the initial filter data corresponding to the previous data point of that data point.

[0116] For each of the above initial filtered data, the target filtered data corresponding to the initial filtered data is determined based on the initial filtered data, the second low-pass filter coefficient, and the data in the downsampling matrix that corresponds to the same position as the initial filtered data.

[0117] The filtering matrix is ​​determined based on the target filtering data mentioned above.

[0118] In specific implementation, the above-mentioned device can perform the above-described actions through its built-in functional modules. Figure 1 The implementation methods provided for each step are detailed in the above-mentioned implementation methods, and will not be repeated here.

[0119] See Figure 6 , Figure 6 This is a schematic diagram of the structure of the electronic device provided in an embodiment of this application. For example... Figure 6As shown, the electronic device 600 in this embodiment may include: a processor 601, a network interface 604, and a memory 605. Furthermore, the electronic device 600 may also include: an object interface 603, and at least one communication bus 602. The communication bus 602 is used to implement communication between these components. The object interface 603 may include a display screen and a keyboard; optionally, the object interface 603 may also include a standard wired interface and a wireless interface. The network interface 604 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface). The memory 605 may be a high-speed RAM or non-volatile memory (NVM), such as at least one disk storage device. The memory 605 may also optionally be at least one storage device located remotely from the aforementioned processor 601. Figure 6 As shown, the memory 605, which is a computer-readable storage medium, may include an operating system, a network communication module, an object interface module, and a device control application.

[0120] exist Figure 6 In the illustrated electronic device 600, the network interface 604 provides network communication functionality; the object interface 603 is primarily used to provide an input interface for objects; and the processor 601 can be used to call the device control application stored in the memory 605 to achieve:

[0121] Acquire the initial touch data collected by the touch sensor, and determine the downsampling matrix corresponding to each initial matrix of the initial touch data. The initial touch data exists in matrix form, and each initial matrix corresponds to a row of data in the initial touch data.

[0122] For each of the above downsampling matrices, determine the forward gradient matrix and the backward gradient matrix corresponding to the downsampling matrix, determine the joint gradient matrix based on the forward gradient matrix and the backward gradient matrix, and process the initial matrix corresponding to the downsampling matrix based on the joint gradient matrix to obtain the target matrix after gradient elimination.

[0123] Target touch data is determined based on the target matrix corresponding to each of the above initial matrices, and corresponding operations are performed based on the target touch data.

[0124] In some feasible implementations, for each of the above downsampling matrices, the processor 601 is used to:

[0125] For the first data in the downsampling matrix, the forward gradient value corresponding to the location of the data is determined based on the data. For each data in the downsampling matrix other than the first data, the forward gradient value corresponding to the location of the data is determined based on the data and the previous data.

[0126] The forward gradient matrix corresponding to the downsampling matrix is ​​determined based on each of the aforementioned forward gradient values;

[0127] For the last data in the downsampling matrix, the back gradient value corresponding to the location of the data is determined based on the data. For each data in the downsampling matrix other than the last data, the back gradient value corresponding to the location of the data is determined based on the data and the data following it.

[0128] The inverse gradient matrix corresponding to the downsampling matrix is ​​determined based on the aforementioned inverse gradient values.

[0129] In some feasible implementations, for each data point in each downsampling matrix except the first data point, the processor 601 is configured to:

[0130] Determine the first difference between this data and the preceding data.

[0131] If the first data difference is less than the first gradient threshold, then the first data difference is determined as the forward gradient value corresponding to the location of the data; if the first data difference is greater than or equal to the first gradient threshold, then the first gradient threshold is determined as the forward gradient value corresponding to the location of the data.

[0132] Determine the difference between this data and the second data point following it;

[0133] If the second data difference is less than the second gradient threshold, then the second data difference is determined as the back gradient value corresponding to the location of the data. If the second data difference is greater than or equal to the second gradient threshold, then the second gradient threshold is determined as the back gradient value corresponding to the location of the data.

[0134] In some feasible implementations, the processor 601 described above is used for:

[0135] Determine the first position corresponding to the first maximum gradient value in the aforementioned forward gradient matrix and the second position corresponding to the first maximum gradient value in the aforementioned backward gradient matrix;

[0136] Based on the data from the first position to the second position in the aforementioned forward gradient matrix and the aforementioned backward gradient matrix, the gradient fusion matrix is ​​determined.

[0137] Based on the first matrix, the second matrix, and the aforementioned gradient fusion matrix, a joint gradient matrix is ​​determined. The first matrix includes the data in the aforementioned forward gradient matrix before the aforementioned first position, and the second matrix includes the data in the aforementioned backward gradient matrix after the aforementioned second position.

[0138] In some feasible implementations, the processor 601 described above is used for:

[0139] For each of the first to second positions, based on the first data in the forward gradient matrix corresponding to that position and the second data in the backward gradient matrix corresponding to that position, the fused data corresponding to that position is determined. If both the first and second data are positive or both are negative, the fused data corresponding to that position is the data with the smallest modulus between the first and second data. If neither the first nor the second data is positive or neither is negative, the fused data corresponding to that position is a preset value.

[0140] The gradient fusion matrix is ​​determined based on the aforementioned fused data.

[0141] In some feasible implementations, for each of the above downsampling matrices, the processor 601 is used to:

[0142] The above joint gradient matrix is ​​filtered to obtain a filter matrix, and the upsampling matrix corresponding to the above filter matrix is ​​determined.

[0143] Subtract the data in the initial matrix corresponding to the downsampling matrix from the data in the upsampling matrix to obtain the target matrix after gradient elimination.

[0144] In some feasible implementations, the processor 601 described above is used for:

[0145] For the first data in the joint gradient matrix above, the initial filtered data corresponding to the data is determined based on the data and the first low-pass filter coefficient.

[0146] For each data point in the joint gradient matrix except for the first data point, the initial filter data corresponding to that data point is determined based on that data point, the first low-pass filter coefficients mentioned above, and the initial filter data corresponding to the previous data point of that data point.

[0147] For each of the above initial filtered data, the target filtered data corresponding to the initial filtered data is determined based on the initial filtered data, the second low-pass filter coefficient, and the data in the downsampling matrix that corresponds to the same position as the initial filtered data.

[0148] The filtering matrix is ​​determined based on the target filtering data mentioned above.

[0149] It should be understood that in some feasible implementations, the processor 601 described above may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. The memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information.

[0150] In specific implementation, the aforementioned electronic device 600 can perform the above-described actions through its built-in functional modules. Figure 1 The implementation methods provided for each step are detailed in the above-mentioned implementation methods, and will not be repeated here.

[0151] This application also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement... Figure 1 The methods provided in each step are detailed in the implementation methods provided in the above steps, and will not be repeated here.

[0152] The aforementioned computer-readable storage medium can be an internal storage unit of the data processing apparatus or electronic device provided in any of the foregoing embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device. The aforementioned computer-readable storage medium can also include magnetic disks, optical disks, read-only memory (ROM), or random access memory (RAM), etc. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of the electronic device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0153] This application provides a computer program product, which includes a computer program that is executed by a processor. Figure 1 The methods provided for each step in the process.

[0154] The terms "first," "second," etc., used in the claims, description, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or electronic device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or electronic devices. References to "embodiment" herein mean that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The presentation of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments. The term "and / or" as used in this application's description and appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0155] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Those skilled in the art can implement the described functions using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.

[0156] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. A data processing method, characterized by, The method comprises: acquiring initial touch data collected by a touch sensor, and determining a down-sampling matrix corresponding to each initial matrix of the initial touch data, the initial touch data existing in a matrix form, and each initial matrix corresponding to a row of data in the initial touch data; for each down-sampling matrix, determining a forward gradient matrix and a reverse gradient matrix corresponding to the down-sampling matrix, determining a first position corresponding to a first maximum gradient value in the forward gradient matrix and a second position corresponding to a first maximum gradient value in the reverse gradient matrix, determining a gradient fusion matrix based on data from the first position to the second position in the forward gradient matrix and the reverse gradient matrix, determining a joint gradient matrix based on a first matrix, a second matrix and the gradient fusion matrix, the first matrix comprising data before the first position in the forward gradient matrix, and the second matrix comprising data after the second position in the reverse gradient matrix, and processing the initial matrix corresponding to the down-sampling matrix based on the joint gradient matrix to obtain a target matrix after gradient elimination; determining target touch data based on the target matrix corresponding to each initial matrix, and performing a corresponding operation based on the target touch data.

2. The method of claim 1, wherein, For each down-sampling matrix, determining a forward gradient matrix corresponding to the down-sampling matrix comprises: for a first data in the down-sampling matrix, determining a forward gradient value corresponding to a position of the data based on the data, and for each data in the down-sampling matrix except the first data, determining a forward gradient value corresponding to a position of the data based on the data and a previous data of the data; determining a forward gradient matrix corresponding to the down-sampling matrix based on each forward gradient value; determining a reverse gradient matrix corresponding to the down-sampling matrix comprises: for a last data in the down-sampling matrix, determining a reverse gradient value corresponding to a position of the data based on the data, and for each data in the down-sampling matrix except the last data, determining a reverse gradient value corresponding to a position of the data based on the data and a next data of the data; determining a reverse gradient matrix corresponding to the down-sampling matrix based on each reverse gradient value.

3. The method of claim 2, wherein, For each data in each down-sampling matrix except the first data, the determining a forward gradient value corresponding to a position of the data based on the data and a previous data of the data comprises: determining a first data difference between the data and the previous data of the data; if the first data difference is less than a first gradient threshold, determining the first data difference as the forward gradient value corresponding to the position of the data, and if the first data difference is greater than or equal to the first gradient threshold, determining the first gradient threshold as the forward gradient value corresponding to the position of the data; The determining a reverse gradient value corresponding to a position of the data based on the data and a next data of the data comprises: determining a second data difference between the data and the next data of the data; If the second data difference is less than a second gradient threshold, the second data difference is determined as a reverse gradient value corresponding to a position of the data; if the second data difference is greater than or equal to the second gradient threshold, the second gradient threshold is determined as the reverse gradient value corresponding to the position of the data.

4. The method of claim 1, wherein, The determining the gradient fusion matrix based on the data from the first position to the second position in the forward gradient matrix and the reverse gradient matrix comprises: For each position from the first position to the second position, the fusion data corresponding to the position is determined based on first data corresponding to the position in the forward gradient matrix and second data corresponding to the position in the reverse gradient matrix, wherein if the first data and the second data are both positive numbers or both negative numbers, the fusion data corresponding to the position is the data with the minimum modulus among the first data and the second data; if the first data and the second data are not both positive numbers or both negative numbers, the fusion data corresponding to the position is a preset value; The gradient fusion matrix is determined based on the fusion data.

5. The method of claim 1, wherein, For each down-sampling matrix, the processing of the initial matrix corresponding to the down-sampling matrix based on the joint gradient matrix to obtain the target matrix after gradient elimination comprises: The joint gradient matrix is filtered to obtain a filter matrix, and an up-sampling matrix corresponding to the filter matrix is determined; The data in the initial matrix corresponding to the down-sampling matrix is subtracted from the data in the up-sampling matrix to obtain the target matrix after gradient elimination.

6. The method of claim 5, wherein, The filtering of the joint gradient matrix to obtain the filter matrix comprises: For a first data in the joint gradient matrix, the initial filter data corresponding to the data is determined based on the data and a first low-pass filter coefficient; For each data in the joint gradient matrix except the first data, the initial filter data corresponding to the data is determined based on the data, the first low-pass filter coefficient, and the initial filter data corresponding to a previous data of the data; For each initial filter data, the target filter data corresponding to the initial filter data is determined based on the initial filter data, a second low-pass filter coefficient, and data in the down-sampling matrix corresponding to the same position as the initial filter data. The filter matrix is determined based on the target filter data.

7. A data processing apparatus, characterized by, The apparatus comprises: A data acquisition module is configured to acquire initial touch data collected by a touch sensor, and determine a down-sampling matrix corresponding to each initial matrix of the initial touch data, wherein the initial touch data exists in a matrix form, and each initial matrix corresponds to a row of data in the initial touch data; a gradient elimination module, configured to determine, for each of the down-sampling matrices, a forward gradient matrix and a reverse gradient matrix corresponding to the down-sampling matrix, determine a first position corresponding to a first maximum gradient value in the forward gradient matrix and a second position corresponding to a first maximum gradient value in the reverse gradient matrix, determine a gradient fusion matrix based on data in the forward gradient matrix and the reverse gradient matrix from the first position to the second position, determine a joint gradient matrix based on a first matrix, a second matrix and the gradient fusion matrix, the first matrix comprising data in the forward gradient matrix before the first position, the second matrix comprising data in the reverse gradient matrix after the second position, and process an initial matrix corresponding to the down-sampling matrix based on the joint gradient matrix to obtain a target matrix after gradient elimination; an operation execution module, configured to determine target touch data based on target matrices corresponding to the initial matrices, and execute corresponding operations based on the target touch data.

8. An electronic device, comprising: comprise a processor and a memory, the processor and the memory being connected to each other; the memory is configured to store a computer program; the processor is configured to execute the method in any one of claims 1 to 6 when the computer program is invoked.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Touch input apparatus using a stylus pen and method for removing noise thereof

    KR1020180049630A

  • Pressure signal processing

    US20210141507A1