CN114327151A - Touch data conversion method and device, computer equipment and storage medium - Google Patents

Touch data conversion method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114327151A
CN114327151A CN202210006251.5A CN202210006251A CN114327151A CN 114327151 A CN114327151 A CN 114327151A CN 202210006251 A CN202210006251 A CN 202210006251A CN 114327151 A CN114327151 A CN 114327151A
Authority
CN
China
Prior art keywords
touch
data
host
format
coordinates
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210006251.5A
Other languages
Chinese (zh)
Other versions
CN114327151B (en
Inventor
欧阳宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Kangyong Technology Co ltd
Original Assignee
Shenzhen Kangyong Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kangyong Technology Co ltd filed Critical Shenzhen Kangyong Technology Co ltd
Priority to CN202210006251.5A priority Critical patent/CN114327151B/en
Priority claimed from CN202210006251.5A external-priority patent/CN114327151B/en
Publication of CN114327151A publication Critical patent/CN114327151A/en
Application granted granted Critical
Publication of CN114327151B publication Critical patent/CN114327151B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Position Input By Displaying (AREA)

Abstract

The invention discloses a touch data conversion method, a touch data conversion device, computer equipment and a storage medium, wherein the touch data conversion method comprises the following steps: and detecting the original data format of the input touch signal, acquiring a detection result, and analyzing the original data format corresponding to the touch signal into a universal data format based on the detection result and a corresponding protocol analysis algorithm. And converting the general data format into squared touch difference data with a complete channel for calculating coordinates by adopting a format conversion algorithm. And acquiring a host corresponding to the touch signal by adopting a characteristic matching algorithm, and outputting the touch difference data of the nine-square grid to the host for the host to reversely obtain a touch coordinate based on the touch difference data of the nine-square grid. The method greatly facilitates rapid import and switching of different touch IC modules, verification and mass production, effectively shortens the mass production period, and facilitates rapid popularization of the application of the touch IC modules to the host computer needing to read the touch difference.

Description

Touch data conversion method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of touch technologies, and in particular, to a touch data conversion method and apparatus, a computer device, and a storage medium.
Background
The touch control chip (IC) is very widely applied to a plurality of fields such as consumer electronics, kitchen appliances, bathroom appliances, household appliances such as air conditioners and the like, automobile theft prevention, LED application, lamp decoration and lamp application, solar photoelectric application, sound equipment, mobile terminal tablet computers, smart grids and smart home Internet of things. Most of the reported data format protocols of the existing touch IC are coordinate + event data formats, but many hosts connected with the touch IC are adapted to read touch difference (or original value, where the touch difference and the original value can be converted to each other) data to calculate coordinates. When data of different touch control ICs are required to be quickly led into a host or mass production of the touch control ICs is required to realize test operation, incompatibility of data format reading is inevitable, and the operation can be realized only after format conversion is carried out on data formats input by the touch control ICs. How to improve data compatibility between different touch ICs and a host becomes an urgent problem to be solved.
Disclosure of Invention
Embodiments of the present invention provide a touch data conversion method, an apparatus, a computer device, and a storage medium, so as to solve a problem of improving data compatibility between different touch ICs and a host.
A touch data conversion method, comprising:
detecting an original data format of an input touch signal and acquiring a detection result, and analyzing the original data format corresponding to the touch signal into a universal data format based on the detection result and a corresponding protocol analysis algorithm;
converting the general data format into squared touch difference data with a complete channel for calculating coordinates by adopting a format conversion algorithm;
and acquiring a host corresponding to the touch signal by adopting a characteristic matching algorithm, and outputting the touch difference data of the nine-square grid to the host for the host to reversely obtain a touch coordinate based on the touch difference data of the nine-square grid.
A touch data conversion apparatus comprising:
the analysis data format module is used for detecting the original data format of the input touch signal, acquiring a detection result, and analyzing the original data format corresponding to the touch signal into a general data format based on the detection result and a corresponding protocol analysis algorithm;
the conversion data format module is used for converting the general data format into Sudoku touch difference data with a complete channel for calculating coordinates by adopting a format conversion algorithm;
and the output difference data module is used for acquiring a host corresponding to the touch signal by adopting a characteristic matching algorithm, outputting the Sudoku touch difference data to the host and reversely obtaining touch coordinates by the host based on the Sudoku touch difference data.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the touch data conversion method when executing the computer program.
A computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the touch data conversion method described above.
According to the touch data conversion method, the touch data conversion device, the computer equipment and the storage medium, the touch modules in different coordinate forms reported by the touch IC manufacturer are applied to various hosts reading the touch difference data architecture, so that the rapid introduction and switching of different touch IC modules, verification and mass production are greatly facilitated, the mass production period is effectively shortened, and the application of the touch IC modules to the hosts needing to read the touch differences is facilitated.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a schematic diagram of an application environment of a touch data conversion method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a Sudoku format of Sudoku touch difference data in the touch data conversion method according to an embodiment of the invention;
FIG. 3 is another flow chart of a touch data transformation method according to an embodiment of the invention;
FIG. 4 is a schematic diagram of a touch data conversion device according to an embodiment of the invention;
FIG. 5 is a schematic diagram of a computer device in an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In an embodiment, as shown in fig. 1, a touch data conversion method is provided, which specifically includes the following steps:
and S10, detecting the original data format of the input touch signal, acquiring a detection result, and analyzing the original data format corresponding to the touch signal into a general data format based on the detection result and a corresponding protocol analysis algorithm.
Specifically, the touch screen is used for sensing the touch of a finger, and when the finger touches a specific position on the screen, an accurate electronic signal is transmitted to the screen. The principle of the touch screen is that when a finger or other foreign objects contact the touch screen, two conductive layers which are originally isolated from each other form contact at the position of a touch point, the resistance changes, the corresponding voltage value also changes, touch signals in X and Y directions are generated, and the touch signals are converted into digital pulse signals through analog/digital (A/D) and then transmitted to a control machine (host) for processing.
Different modules or modules generate communication signals with different communication data formats, most of the communication signals are I2C and SPI (Serial Peripheral Interface), in order to quickly identify touch signals generated by different manufacturers, a protocol analysis algorithm can be adopted, the algorithm records the formats of the touch signals into a format recording table based on different manufacturers in advance, and each input touch signal is matched with the format recording table so as to match the manufacturers. And the corresponding signal analysis algorithm can be obtained according to the matched production merchants, so that the touch signals with different input formats can be unified into a universal data format.
The touch data conversion device provided by the embodiment comprises a plurality of hardware bus input interfaces, such as a bus I2C, or data input interfaces with different SPIs, such as data input interfaces with voltages of 1.8V, 3.3V, and the like.
In this embodiment, the generic data format may be set to the original coordinate + event format. The original coordinates are coordinates of the touch signal, and the event is all data related to the coordinates, such as resolution of the coordinates, sum of channels (original pixel number) on rows and columns, and touch value, and the like. Further, after detecting the corresponding touch IC manufacturer, the system may invoke an embedded algorithm to parse into a fixed generic data format, including but not limited to the following:
1. coordinate X, 2 BYTE type data;
2. coordinate Y, 2 BYTE type data;
3. event, 1 BYTE type data.
Preferably, the method for detecting the original data format of the input touch signal and obtaining the detection result specifically includes the following steps:
and detecting at least one of a frame length, frame data, a frame check position, a characteristic character in the frame or a frame data convolution characteristic corresponding to any frame in the touch signals, and acquiring the type of the touch module as a detection result.
Specifically, the present embodiment can be used for matching the touch signal to obtain the touch module type (factory format of the manufacturer) to perform the following detection methods including, but not limited to:
1. a frame length;
2. frame header data;
3. frame tail data;
4. checking the position of the frame in the current frame;
5. fixed characteristic characters or data in the frame, which can identify a certain touch IC manufacturer;
6. the convolution value characteristics of all data of the frame, and the like.
And S20, converting the general data format into Sudoku touch difference data with a complete channel for calculating coordinates by adopting a format conversion algorithm.
Specifically, a full channel means that the squared difference touch data includes channels (original pixel numbers) on rows and columns. The present embodiment may employ a control unit having a data matching algorithm, such as an STM32MCU, to implement data conversion.
The nine-square grid touch difference data is data used by the host computer to calculate and obtain final touch coordinates. In the embodiment, the unified original coordinate + event data format is converted into squared touch difference data corresponding to the gravity center of the original coordinate. When calculating the gravity center, taking P (r, c) as the center, wherein r, c is the channel position of the row and the column of the center position, and taking the data in the range of 1 row/1 column (Sudoku) to participate in the calculation.
The coordinates and the gravity center are corresponding, taking the nine-square grid as shown in FIG. 2 as an example, P (r, c) is expanded by 1 row and 1 column, and the channel position (r, c) of X2/Y2; the size represents the number of original pixels defined for each channel (RX or TX direction), typically 64, and can also be calculated from the resolution and the number of channels in rows and columns, usually called TX and RX.
The coordinate value calculated by the above coordinate calculation formula is listed
Equation one:
X=((x1_y1*(c-1))+(x1*(c-1))+(x1_y3*(c-1))+(y1*c)+(x2_y2*c)+(y3*c))+(x3_y1*(c+1))+(x3*(c+1))+(x3_y3*(c+1)))/(x1_y1+x1+x1_x3+y1+x2_y2+y3+x3_y1+x3+x3_y3)*X_Size+0.5*X_Size;
Y=((x1_y1*(r-1))+(y1*(r-1))+(x3_y1*(r-1))+(x1*r)+(x2_y2*r)+(x3*r))+(x1_y3*(r+1))+(y3*(r+1))+(x3_y3*(r+1)))/(x1_y1+x1+x1_x3+y1+x2_y2+y3+x3_y1+x3+x3_y3)*Y_Size+0.5*Y_Size;
in particular, the following calculation may be used to obtain an approximation of the X, Y coordinates.
Equation two:
X=((x1*(c-1))+(x2_y2*c)+(x3*(c+1))/(x1+x2_y2+x3)*X_Size+0.5*X_Size;
Y=((y1*(r-1))+(x2_y2*r)+(y3*(r+1)))/(y1+x2_y2+y3)*Y_Size+0.5*Y_Size;
the following contents can be derived for the calculation relationship of the coordinates reported by the touch IC:
equation three:
Tx_Nums*X_Size=X_Resulotion;
Rx_Nums*Y_Size=Y_Resulotion;
wherein Tx _ Nums is the number of TX channels of the touch module ITO, and Rx _ Nums is the number of RX channels of the touch module ITO. X _ Resultion and Y _ Resultion are the maximum values of the X, Y reported values, typically the resolution of the display or touch area.
From equation three, equation four can be derived:
X_Size=X_Resulotion/Tx_Nums;
Y_Size=Y_Resulotion/Rx_Nums;
equation five can be derived from equation two and equation four:
X*Tx_Nums/X_Resulotion=((x1*(c-1))+(x2_y2*c)+(x3*(c+1))/(x1+x2_y2+x3)+0.5;
Y*Rx_Nums/Y_Resulotion=((y1*(r-1))+(x2_y2*r)+(y3*(r+1)))/(y1+x2_y2+y3)+0.5;
since the essence of the coordinate formula is to calculate the barycentric position of a finger touch for one area, i.e., to calculate the barycentric position in the X direction and the barycentric position in the Y direction, respectively, it can be assumed that the Sum of all touch quantities in the X direction is X _ Diff _ Sum and the Sum of all touch quantities in the Y direction is Y _ Diff _ Sum.
Then there is equation six:
X_Diff_Sum=x1+x2_y2+x3;
Y_Diff_Sum=y1+x2_y2+y3;
the values of X _ Diff _ Sum and Y _ Diff _ Sum for a normal touch can each take on the order of 3000. That is, X _ Diff _ Sum — Y _ Diff _ Sum — 3000;
a particular value of Sum/2 may be taken for x2_ y2, i.e., x2_ y2 equals Sum/2;
equation seven can be obtained:
x1+x3=Sum/2;
y1+y3=Sum/2;
equation eight can be derived from equations six and seven:
X*Tx_Nums/X_resulotion=((x1*(c-1))+(x2_y2*c)+(x3*(c+1))/(x1+x2_y2+x3)+0.5;
Y*Rx_Nums/Y_resulotion=((y1*(r-1))+(x2_y2*r)+(y3*(r+1)))/(y1+x2_y2+y3)+0.5;
further optimization can result in equation nine:
X1=(Sum/2)*(1-(X*Tx_Nums/(X_Resolution)-c));
X3=(Sum/2)*(X*Tx_Nums/(X_Resolution)-c);
y1=(Sum/2)*(1-(Y*Rx_Nums/(Y_Resolution)-r));
y3=(Sum/2)*(Y*Rx_Nums/(Y_Resolution)-r);
wherein
c=[X*Tx_Nums/(X_Resolution]
R=[Y*Rx_Nums/(Y_Resolution]
In the above formula [ ] is a rounded symbol.
According to the method for taking the gravity center approximation, the data values of the coordinate points P (x1, y1), P (x3, y1), P (x1, y3) and P (x3, y3) on the screen can be respectively represented by the following equation ten:
x1_y1=aver(x1,y1);
X3_y1=aver(x3,y1);
X1_y3=aver(x1,y3);
X3_y3=aver(x3,y3);
where aver is the average.
One complete frame of squared touch difference data can be obtained by equations nine and ten.
And S30, acquiring a host corresponding to the touch signal by adopting a characteristic matching algorithm, outputting the touch difference data of the Sudoku to the host, and reversely obtaining touch coordinates by the host based on the touch difference data of the Sudoku.
Specifically, after the host computer which needs to read the touch difference data reads the squared figure touch difference data, a gravity center algorithm, namely a position where the finger touches a certain area is deviated to a certain direction, can be adopted to reversely calculate the touch coordinate.
Practical examples of S20-S30 are as follows:
if the number of channels touching the touch screen TP on the IC is 22x12, the original coordinates are provided as (500, 1000); sum of touch values is 3000; resolution X _ Resolution 1080 and Resolution Y _ Resolution 2340.
Then from the above it can be derived: the channel position of the finger touch is
C=500*12/1080=[5.555555555555555]=5;
R=1000*22/2340=[9.401709401709402]=9;
The following data can be obtained from equation nine:
X1=(Sum/2)*(1-0.555555555555555)=666.666;
X2=(Sum/2)=1500;
X3=(Sum/2)*0.555555555555555=833.333;
y1=(Sum/2)*(1-0.401709401709402))=897.435;
Y2=(Sum/2)=1500;
y3=(Sum/2)*0.401709401709402=602.564;
and combining equation ten to obtain nine-grid touch difference data, wherein the nine-grid touch difference data are obtained as shown in the following table:
782 897 890
667 1500 833
635 602 718
table one
The coordinate calculation process from the squared figure is reversed as follows:
since Tx1_ Nums is 12, X _ Resolution is 1080.
There is thus the following equation eleven:
X_Size=1080/12=90;
Y_Size=2340/22=106.363;
the coordinates can be calculated by substituting the touch difference data of the nine-square grids into a formula-gravity center algorithm:
X=(4*782+4*667+4*635+897*5+1500*5+602*5+890*6+883*6+718*6)/(782+667+635+897+1500+602+890+883+718)*X_Size+0.5*X_Size=5.053*90+90*0.5=499.5;
Y=(782*8+897*8+890*8+667*9+1500*9+833*9+635*10+602*10+718*10)/(782+667+635+897+1500+602+890+883+718)*Y_Size+0.5*Y_Size=995.512;
because the coordinate error between the coordinate X calculated by the nine-grid touch difference data according to the gravity center algorithm and the input original X coordinate is only (500-499.5)/1000-0.0005, and the error of Y is (1000-995.512)/2340-0.0019, the error in actual use is lower, the calculation accuracy of decimal data is higher when the calculation is actually performed by using a continuous equation, and the error rate of the coordinate actually used in the actual measurement is not more than 0.001.
According to the touch data conversion method, the touch data conversion device, the computer equipment and the storage medium, the touch modules in different coordinate forms reported by the touch IC manufacturer are applied to various hosts reading the touch difference data architecture, so that the rapid introduction and switching of different touch IC modules, verification and mass production are greatly facilitated, the mass production period is effectively shortened, and the application of the touch IC modules to the hosts needing to read the touch differences is facilitated.
In a particular embodiment, the generic data format includes raw coordinates and events. As shown in fig. 3, in step S20, the method for converting the generic data format into the squared difference touch data with a complete channel for calculating coordinates by using the format conversion algorithm specifically includes the following steps:
and S21, acquiring corresponding central channel position coordinates (r, c) based on the original coordinates and the event.
And S22, taking the position coordinates (r, c) of the central channel as a center, and acquiring the original data of the Sudoku corresponding to the Sudoku formed by all adjacent coordinates of a row and a column which are externally expanded around.
And S23, acquiring nine-square grid touch difference data corresponding to the gravity center corresponding to the original coordinate based on the original nine-square grid data.
In a specific embodiment, after acquiring the squared figure touch difference data corresponding to the center of gravity corresponding to the original coordinate, the method further includes the following steps:
and rounding the touch difference data of the nine-square grid.
In a specific embodiment, the host reversely obtains the touch coordinate based on the squared figure touch difference data, which specifically includes the following steps:
the host machine reversely obtains touch coordinates through a gravity center algorithm based on the Sudoku touch difference data, wherein the touch coordinates comprise a gravity center position in the X direction and a gravity center position in the Y direction.
In a specific embodiment, the host machine reversely obtains the touch coordinate through a gravity center algorithm based on the nine-square grid touch difference data, and specifically includes the following steps:
based on the Sudoku touch difference data, the touch coordinates are obtained by adopting the following formula in the gravity center algorithm:
X=(ΣSumCOLm*m/ΣSumCOLm)*size+size*0.5。
Y=(ΣSumROWn*n/ΣSumROWn)*size+size*0.5。
wherein, SumROWn represents the sum of touch values of each row, n represents a row number, sumcolom represents the sum of touch values of each column, m represents a column number, and size represents the original pixel number defined by each channel in the row direction or the column direction.
In a specific embodiment, the obtaining of the host corresponding to the touch signal by using the feature matching algorithm specifically includes the following steps:
and sending broadcast data to all controllers, and detecting at least one of frame length, frame data, frame check position, characteristic characters in the frame or frame data convolution characteristics corresponding to any frame in handshake data returned by each controller, so as to obtain the controller matched with the touch signal as a host.
Specifically, the detection method using the controller for matching handshake data and touch signal as the host includes, but is not limited to, the following detection methods:
1. frame length
2. Frame header data
3. Data of frame tail
4. Frame check position in current frame
5. The frame is associated with fixed characteristic characters or data that identify a touch IC manufacturer.
6. The convolution value characteristics of all data of the frame, and the like.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
According to the touch data conversion method, the touch data conversion device, the computer equipment and the storage medium, the touch modules in different coordinate forms reported by the touch IC manufacturer are applied to various hosts reading the touch difference data architecture, so that the rapid introduction and switching of different touch IC modules, verification and mass production are greatly facilitated, the mass production period is effectively shortened, and the application of the touch IC modules to the hosts needing to read the touch differences is facilitated.
In an embodiment, a touch data conversion apparatus is provided, and the touch data conversion apparatus corresponds to the touch data conversion method in the above embodiment one to one. As shown in fig. 4, each functional module is explained in detail as follows:
and the analysis data format module 10 is configured to detect an original data format of the input touch signal, acquire a detection result, and analyze the original data format corresponding to the touch signal into a general data format based on the detection result and a corresponding protocol analysis algorithm.
And a conversion data format module 20, configured to convert the general data format into squared touch difference data with a complete channel for calculating coordinates by using a format conversion algorithm.
And the output difference data module 30 is used for acquiring a host corresponding to the touch signal by adopting a feature matching algorithm, outputting the touch difference data of the nine-square grid to the host and reversely obtaining the touch coordinate by the host based on the touch difference data of the nine-square grid.
For specific limitations of the touch data conversion device, reference may be made to the above limitations of the touch data conversion method, which are not described herein again. The modules in the touch data conversion device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for data related to the touch data conversion method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a touch data conversion method.
In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the touch data conversion method of the above embodiments, such as S10 to S30 shown in fig. 2. Alternatively, the processor, when executing the computer program, implements the functions of the respective modules/units of the touch data conversion apparatus in the above-described embodiments, such as the functions of the modules 10 to 30 shown in fig. 4. To avoid repetition, further description is omitted here.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program is executed by a processor to implement the touch data conversion method of the above-described embodiments, such as S10 to S30 shown in fig. 2. Alternatively, the computer program is executed by a processor to implement the functions of each module/unit in the touch data conversion apparatus in the above-described apparatus embodiments, for example, the functions of the modules 10 to 30 shown in fig. 4. To avoid repetition, further description is omitted here.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments of the present application may include non-volatile and/or volatile memory, among others. 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 a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A touch data conversion method, comprising:
detecting an original data format of an input touch signal and acquiring a detection result, and analyzing the original data format corresponding to the touch signal into a universal data format based on the detection result and a corresponding protocol analysis algorithm;
converting the general data format into squared touch difference data with a complete channel for calculating coordinates by adopting a format conversion algorithm;
and acquiring a host corresponding to the touch signal by adopting a characteristic matching algorithm, and outputting the nine-square-grid touch difference data to the host for the host to reversely obtain a touch coordinate based on the nine-square-grid touch difference data.
2. The touch data conversion method of claim 1, wherein the detecting a raw data format of the input touch signal and obtaining a detection result comprises:
and detecting at least one of a frame length, frame data, a frame check position, a characteristic character in the frame or a frame data convolution characteristic corresponding to any frame in the touch signal, and acquiring the type of the touch module as the detection result.
3. The touch data conversion method of claim 1, wherein the generic data format comprises raw coordinates and events;
the converting the generic data format into squared touch difference data with complete channels for calculating coordinates using a format conversion algorithm includes:
acquiring corresponding central channel position coordinates (r, c) based on the original coordinates and the event;
taking the position coordinates (r, c) of the central channel as a center, and acquiring the original data of the Sudoku corresponding to the Sudoku formed by extending all adjacent coordinates of a row and a column around the Sudoku;
and acquiring nine-square-grid touch difference data corresponding to the gravity center corresponding to the original coordinate based on the nine-square-grid original data.
4. The touch data conversion method according to claim 1, further comprising, after the acquiring the squared touch difference data corresponding to the center of gravity corresponding to the original coordinates:
and performing rounding calculation on the nine-square-grid touch difference data.
5. The touch data conversion method of claim 1, wherein the host machine reversely obtains touch coordinates based on the squared touch difference data, comprising:
and the host machine reversely obtains the touch coordinate through a gravity center algorithm based on the Sudoku touch difference data, wherein the touch coordinate comprises a gravity center position in the X direction and a gravity center position in the Y direction.
6. The touch data conversion method of claim 5, wherein the host machine reversely obtains the touch coordinates through a gravity center algorithm based on the squared touch difference data, comprising:
based on the Sudoku touch difference data, acquiring the touch coordinate by adopting the following formula in a gravity center algorithm:
X=(ΣSumCOLm*m/ΣSumCOLm)*size+size*0.5;
Y=(ΣSumROWn*n/ΣSumROWn)*size+size*0.5;
wherein, SumROWn represents the sum of touch values of each row, n represents a row number, sumcolom represents the sum of touch values of each column, m represents a column number, and size represents the original pixel number defined by each channel in the row direction or the column direction.
7. The touch data conversion method of claim 1, wherein the obtaining the host corresponding to the touch signal by using the feature matching algorithm comprises:
and sending broadcast data to all controllers, and detecting at least one of frame length, frame data, frame check position, characteristic characters in the frame or frame data convolution characteristics corresponding to any frame in handshake data returned by each controller, so as to obtain the controller matched with the touch signal as a host.
8. A touch data conversion apparatus, comprising:
the analysis data format module is used for detecting the original data format of the input touch signal and acquiring a detection result, and analyzing the original data format corresponding to the touch signal into a general data format based on the detection result and a corresponding protocol analysis algorithm;
the conversion data format module is used for converting the general data format into Sudoku touch difference data with a complete channel for calculating coordinates by adopting a format conversion algorithm;
and the output difference data module is used for acquiring a host corresponding to the touch signal by adopting a characteristic matching algorithm, outputting the touch difference data of the nine-grid to the host and reversely obtaining touch coordinates by the host based on the touch difference data of the nine-grid.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the touch data conversion method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the touch data conversion method according to any one of claims 1 to 7.
CN202210006251.5A 2022-01-05 Touch data conversion method and device, computer equipment and storage medium Active CN114327151B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210006251.5A CN114327151B (en) 2022-01-05 Touch data conversion method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210006251.5A CN114327151B (en) 2022-01-05 Touch data conversion method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114327151A true CN114327151A (en) 2022-04-12
CN114327151B CN114327151B (en) 2024-08-02

Family

ID=

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116339546A (en) * 2023-05-23 2023-06-27 深圳曦华科技有限公司 Method and device for processing original data of touch screen, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016082624A1 (en) * 2014-11-28 2016-06-02 北京百度网讯科技有限公司 Method and device for providing image presentation information
CN109144396A (en) * 2018-09-05 2019-01-04 广州视源电子科技股份有限公司 Touch information processing method, device, equipment and storage medium
CN111078053A (en) * 2019-12-20 2020-04-28 京东方科技集团股份有限公司 Touch data reporting method, device and storage medium
CN113537218A (en) * 2021-07-27 2021-10-22 京东数科海益信息科技有限公司 Image recognition method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016082624A1 (en) * 2014-11-28 2016-06-02 北京百度网讯科技有限公司 Method and device for providing image presentation information
CN109144396A (en) * 2018-09-05 2019-01-04 广州视源电子科技股份有限公司 Touch information processing method, device, equipment and storage medium
CN111078053A (en) * 2019-12-20 2020-04-28 京东方科技集团股份有限公司 Touch data reporting method, device and storage medium
CN113537218A (en) * 2021-07-27 2021-10-22 京东数科海益信息科技有限公司 Image recognition method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116339546A (en) * 2023-05-23 2023-06-27 深圳曦华科技有限公司 Method and device for processing original data of touch screen, electronic equipment and storage medium
CN116339546B (en) * 2023-05-23 2023-08-29 深圳曦华科技有限公司 Method and device for processing original data of touch screen, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US8592698B2 (en) Capacitive touch system and data transmission method in a capacitive touch system
US10396785B2 (en) Reduction of capacitive touch sense electrode sample value change when electrode scan period is changed
CN116126580A (en) Touch display control method, device, equipment and storage medium
CN101594133A (en) Semiconductor integrated circuit, control method and information processor
CN114327151A (en) Touch data conversion method and device, computer equipment and storage medium
CN109634455B (en) Calibration method and calibration system based on touch screen
CN114327151B (en) Touch data conversion method and device, computer equipment and storage medium
CN102043530B (en) Coordinate point calibration method of touch panel
KR101080512B1 (en) A Touch Screen Compensation System and Method Thereof
CN107481595B (en) FPGA experiment board debugging system
KR100909468B1 (en) Method for representing multipoint contacting at touch panel in screen
CN102087569B (en) Method for amending linearity error of touch-control panel
CN107894857B (en) Touch processing device, electronic system and touch processing method thereof
CN105141874B (en) Method and apparatus scaling signal picture and scale register mapping
CN106407062B (en) industrial control chip debugging system and debugging method
CN107122084B (en) Method and device for identifying touch operation on infrared touch screen and terminal equipment
CN115656640A (en) Capacitance detection method and capacitance detection device
CN115509396A (en) Capacitance detection method and capacitance detection device
CN111356977A (en) Method for processing writing strokes and related equipment
CN108595375A (en) a kind of filtering method, device and storage medium
CN102043691B (en) Contactor control device and controller, method of testing and test macro
CN110162207B (en) Signal processing method of touch sensing device and touch sensing device
CN105335043A (en) Window switching method and electronic apparatus executing same
TWI763859B (en) Sensing method of touch recognition device and sensing module thereof
CN108334217B (en) Detection updating method of touch system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant