CN111417920A - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN111417920A
CN111417920A CN201880002016.2A CN201880002016A CN111417920A CN 111417920 A CN111417920 A CN 111417920A CN 201880002016 A CN201880002016 A CN 201880002016A CN 111417920 A CN111417920 A CN 111417920A
Authority
CN
China
Prior art keywords
data
compression
touch
offset
difference
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.)
Pending
Application number
CN201880002016.2A
Other languages
Chinese (zh)
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 Goodix Technology Co Ltd
Original Assignee
Shenzhen Goodix 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 Goodix Technology Co Ltd filed Critical Shenzhen Goodix Technology Co Ltd
Publication of CN111417920A publication Critical patent/CN111417920A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The embodiment of the invention provides a data processing method and a data processing device, wherein the data processing method comprises the following steps: acquiring a data unit used by touch data to be transmitted and data compression information used for compressing the touch data; determining a compression offset bit number according to the data unit and the data compression information; and compressing the touch data according to the data unit according to the compression offset digit. By the embodiment of the invention, the purposes of ensuring the data precision, reducing the data quantity of the transmitted touch data and improving the transmission speed and efficiency are achieved.

Description

Data processing method and device Technical Field
The embodiment of the invention relates to the technical field of touch control, in particular to a data processing method and device of touch control data.
Background
In a terminal device using a touch technology, a touch device generally takes charge of calculating and reporting coordinates of a touch point. However, as touch technology has been developed, touch devices are provided with more functions. In order to achieve better touch effect, data acquired by the touch device needs to be transmitted to the master control terminal for processing. Furthermore, the master control end can realize better touch effect by combining more complex algorithms and data of other sensors.
Taking a capacitance type touch control chip TPIC as an example, the TPIC can be regarded as a data acquisition sensor, and acquired data is uploaded to a main control terminal through an I2C interface or an SPI interface, and data processing is performed at the main control terminal. However, in this case, the amount of data to be transmitted is increased by tens of times or more than the amount of data to be transmitted by uploading only the coordinates of the touch points, and even if an SPI interface with a high transmission rate is used, the requirement of transmission time cannot be met.
Therefore, how to reduce the amount of data to be transmitted and improve the transmission speed and efficiency is a problem to be solved.
Disclosure of Invention
Embodiments of the present invention provide a data processing method and apparatus to solve the above problems.
According to a first aspect of the embodiments of the present invention, there is provided a data processing method, including: acquiring a data unit used by touch data to be transmitted and data compression information used for compressing the touch data; determining a compression offset bit number according to the data unit and the data compression information; and compressing the touch data according to the data unit according to the compression offset digit.
According to a second aspect of the embodiments of the present invention, there is also provided a data processing apparatus including: the device comprises an acquisition module, a storage module and a transmission module, wherein the acquisition module is used for acquiring a data unit used by touch data to be transmitted and data compression information used for compressing the touch data; the determining module is used for determining a compression offset digit according to the data unit and the data compression information; and the compression module is used for compressing the touch data according to the compression offset digits and the data units.
According to a third aspect of the embodiments of the present invention, there is also provided a touch chip including the data processing apparatus according to the second aspect.
According to the data processing scheme provided by the embodiment of the invention, the bit number needing to be compressed, namely the compression offset bit number, is determined according to the data unit and the data compression information used by the touch data to be transmitted; and then, according to the compression offset digit, compressing the touch data according to the data unit. In the field of computers, a data unit is usually represented as a certain number of bytes, and one byte occupies 8 bits, and as for touch data, most of low-order bit data is noise jitter data, and progress loss caused by compressing several low-order bits hardly affects the quality of signals. Therefore, within the range of acceptable precision requirement, the purposes of ensuring data precision, reducing the data quantity of the transmitted touch data and improving the transmission speed and efficiency can be achieved by compressing the touch data according to the data unit.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a flow chart illustrating steps of a data processing method according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of a data processing method according to a second embodiment of the present invention;
FIG. 3 is a diagram illustrating a compression process of touch data according to the embodiment shown in FIG. 2;
FIG. 4 is a flowchart illustrating steps of a data processing method according to a third embodiment of the present invention;
fig. 5 is a block diagram of a data processing apparatus according to a fourth embodiment of the present invention;
fig. 6 is a block diagram of a data processing apparatus according to a fifth embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the embodiments of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, but not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative effort belong to the protection scope of the embodiments of the present invention.
Example one
Referring to fig. 1, a flowchart illustrating steps of a data processing method according to a first embodiment of the present invention is shown.
The data processing method of the embodiment comprises the following steps:
step S102: the method comprises the steps of obtaining a data unit used by touch data to be transmitted and data compression information used for compressing the touch data.
In the embodiment of the present invention, the touch data to be transmitted may be various data collected by a touch device such as a touch screen, including but not limited to: at least one of mutual coupling capacitance data, self coupling capacitance data and frequency point noise sampling data. In the computer field, a data unit is usually expressed as a certain number of bytes, e.g., 2 bytes, 4 bytes, 8 bytes, etc., wherein one byte occupies 8 bits. For a certain terminal device, it may express data in fixed data units.
When data compression is required, how to compress the data can be indicated by the data compression information. Wherein, the data compression information includes but is not limited to at least one of the following: compression ratio, information of the number of bits to be compressed, information of the specific bits to be compressed, information of the number of bits to be reserved, information of the specific bits to be reserved, data accuracy requirement information, and the like. In practical application, the data compression information may adopt default settings, or may be set differently for different transmission data according to practical situations.
Step S104: and determining a compression offset bit number according to the data unit and the data compression information.
After the data compression information is obtained, the compression offset bits can be determined according to the data compression requirement indicated by the data compression information and by taking the data unit as a basis.
For example, if the data compression information indicates that the compression rate is 1/16, the compression offset bit number is 1bit for the touch data with a data unit of 2 bytes; for touch data with a data unit of 4 bytes, the compression offset bit number is 2 bits.
Step S106: and compressing the touch data according to the data unit according to the compression offset digit.
After the compression offset bit number is determined, bit compression processing can be performed on the touch data of each data unit.
According to the embodiment, the bit number needing to be compressed, namely the compression offset bit number, is determined according to the data unit and the data compression information used by the touch data to be transmitted; and then, according to the compression offset digit, compressing the touch data according to the data unit. For touch data, most of low-order bit data is noise jitter data, and progress loss caused by compressing several low-order bits hardly influences the quality of signals. Therefore, within the range of acceptable precision requirement, the purposes of ensuring data precision, reducing the data quantity of the transmitted touch data and improving the transmission speed and efficiency can be achieved by compressing the touch data according to the data unit.
Example two
Referring to fig. 2, a flowchart of steps of a data processing method according to a second embodiment of the present invention is shown.
The data processing method of the embodiment comprises the following steps:
step S202: the method comprises the steps of obtaining a data unit used by touch data to be transmitted and data compression information used for compressing the touch data.
In this embodiment, data compression information is taken as a compression rate as an example, but it should be understood by those skilled in the art that data compression information represented in other forms is simply processed and then the scheme of the embodiment of the present invention is also applicable.
Step S204: and determining a compression offset bit number according to the data unit and the data compression information.
Still taking data compression information as an example of a compression rate, if the compression rate is r/S and the number of bits corresponding to a data unit is P, the number of compression offset bits is P x r/S. For convenience of calculation, after the data unit P is determined, S may be set to P, and r may be synchronously enlarged or reduced. If the compression rate is 1/16 and the number of bits corresponding to a data unit is 32, the compression rate can be modified to 2/32.
Based on this, the original bit number corresponding to the touch data is set to be M, if the compression rate is n/M (where n < M), n bits need to be compressed for each touch data, and bit-n-bit-M is reserved. In this way, the bit number needing to be compressed can be quickly determined, and the compression speed and efficiency are improved. In addition, it should be noted that n may be optionally set to 1/4 of M in order to ensure data accuracy.
Step S206: and compressing the touch data according to the data unit according to the compression offset digit.
In this embodiment, for each touch data, the bit number indicated by the compression offset number is cut from the lowest bit of the bit corresponding to the data unit; and realizing compression processing of the touch data by performing seamless connection processing on the touch data after the bit number is cut off. The method for cutting off the bit number is simple to realize and low in realization cost.
The above process is described below by taking the sample data of the mutual coupling capacitance node as an example.
For example, the data unit of the sampled data of each mutual coupling capacitance node is set to be 2Byte, and the corresponding bits are bit 0-bit 15. When the sampled data of each mutual coupling capacitance node is compressed by cutting off low bits:
if the compression ratio is 1/16, 1bit is compressed, bit 1-bit 15 is transmitted, the transmission time T is 1/16 can be reduced, and the influence on the precision is 1bit at the lowest;
if the compression ratio is 2/16, 2 bits are compressed, bit 2-bit 15 is transmitted, the transmission time T is 2/16 can be reduced, and the influence on the precision is 2 bits at the lowest;
……
by analogy, after the sampling data of each mutual coupling capacitance node is compressed according to the data unit, the compressed sampling data are connected seamlessly. Where T represents the original transmission time.
A comparison between before and after the compression process is shown in fig. 3, and fig. 3 shows a data change at a compression rate of 2/16. As can be seen from fig. 3, before the compression process, the sampled data of the mutual coupling capacitance node 1 occupies 16 bits, and the sampled data of the mutual coupling capacitance node 2 also occupies 16 bits, which occupy 32 bits; after the compression processing, the sampling data of the mutual coupling capacitance node 1 occupies 14 bits, the sampling data of the mutual coupling capacitance node 2 also occupies 14 bits, and the two occupy 28 bits.
For another example, the data unit of the sampled data of each mutual coupling capacitance node is set to be 4Byte, and the corresponding bits are bit 0-bit 31. When the sampled data of each mutual coupling capacitance node is compressed by cutting off low bits:
if the compression ratio is 1/32, 1bit is compressed, bit 1-bit 31 is reserved, the transmission time T is reduced by 1/32, and the influence on the precision is 1bit at the lowest;
if the compression ratio is 2/32, 2 bits are compressed, bit 2-bit 32 is reserved, the transmission time T × 2/32 can be reduced, and the influence on the precision is 2 bits at the lowest;
……
by analogy, if the compression ratio is n/32(n <32), n bit is compressed, bit-n-bit 32 is reserved, the transmission time T × n/32 can be reduced, and the influence on the precision is the lowest nbit. Where T represents the original transmission time.
For another example, the data unit of the sampled data of each mutual coupling capacitance node is set to 8Byte, and the corresponding bits are bit0 to bit 63. When the sampled data of each mutual coupling capacitance node is compressed by cutting off low bits:
if the compression ratio is 1/64, 1bit is compressed, bit 1-bit 63 is reserved, the transmission time T is reduced by 1/64, and the influence on the precision is 1bit at the lowest;
if the compression ratio is 2/64, 2 bits are compressed, bit 2-bit 63 is reserved, the transmission time T × 2/64 can be reduced, and the influence on the precision is 2 bits at the lowest;
……
by analogy, if the compression ratio is n/64(n <64), n bit is compressed, bit-n-bit 63 is reserved, the transmission time T × n/64 can be reduced, and the n bit with the lowest influence on the precision is achieved. Where T represents the original transmission time.
It should be noted that, the above process takes compression processing of the sampled data of the mutual coupling capacitance node as an example, but it should be understood by those skilled in the art that the same processing manner can be acquired for both the acquired data of the self coupling capacitance node and the acquired data of the frequency point noise. When the compression processing method is used specifically, one or more (two or more) of sampling data of the mutual coupling capacitor node, acquired data of the self coupling capacitor node and frequency point noise acquired data can be selected to be subjected to the compression processing.
After the compression processing is performed on the touch data, optionally, the following optional step S208 may also be performed.
Step S208: and packaging the compressed touch data into a data packet, and sending the data packet.
And the data packet carries the information of the data unit and the information of the compression offset bit.
In this embodiment, a person skilled in the art may use any appropriate manner to implement encapsulation of the compressed touch data and carrying of corresponding information.
Generally, the touch device uploads the touch data to the main control terminal for processing, and uploads the information (including the information of the data unit and the information of the compression offset bit number) for compressing the touch data to the main control terminal together in a data packet, so that the main control terminal can effectively decompress the touch data to obtain accurate touch data, thereby achieving the precision control of the touch data.
After receiving the data packet, the main control end determines the original bit number of each touch data according to the information of the data unit, and then processes the compressed bit according to the information of the compression offset bit number, for example, uniformly filling the compressed bit with a set numerical value.
According to the embodiment, the bit number needing to be compressed, namely the compression offset bit number, is determined according to the data unit and the data compression information used by the touch data to be transmitted; and then, according to the compression offset digit, compressing the touch data according to the data unit. For touch data, most of low-order bit data is noise jitter data, and progress loss caused by compressing several low-order bits hardly influences the quality of signals. Therefore, within the range of acceptable precision requirement, the purposes of ensuring data precision, reducing the data quantity of the transmitted touch data and improving the transmission speed and efficiency can be achieved by compressing the touch data according to the data unit.
EXAMPLE III
Referring to fig. 4, a flowchart of steps of a data processing method according to a third embodiment of the present invention is shown.
The data processing method of the embodiment comprises the following steps:
step S302: the method comprises the steps of obtaining a data unit used by touch data to be transmitted and data compression information used for compressing the touch data.
In this embodiment, data compression information is taken as information of the number of bits to be compressed as an example, but it should be understood by those skilled in the art that data compression information represented in other forms is simply processed and then the scheme of the embodiment of the present invention is also applicable.
Step S304: and determining a compression offset bit number according to the data unit and the data compression information.
For example, in the present embodiment, if the data compression information indicates that the number of bits to be compressed is 4, it may be determined that the compression offset displacement is 4.
Step S306: acquiring a maximum sampling value and a minimum sampling value in the touch data; calculating the difference value of the maximum sampling value and the minimum sampling value; and pre-compressing and offsetting the touch data according to the data unit, the data compression information and the difference value.
It should be noted that this step is an optional step. Through the step, the pre-compression offset digits are determined in a maximum difference mode, and the pre-compression offset digits of all touch data are the same, so that the purpose of finding the touch data together and storing the touch data differently is achieved, the base number is extracted, and difference information is reserved.
During specific implementation, a feasible way of performing pre-compression offset processing on touch data according to the data unit, data compression information, and the difference value includes: determining the target bit number after compression according to the data compression information; setting at least one level of threshold range according to the target bit number and the original bit number corresponding to the data unit; determining a pre-compression offset digit according to the relation between the difference value and the threshold range; and performing pre-compression offset processing on the touch data according to the pre-compression offset digit. By means of the method for pre-compressing and offsetting the touch data, the same base numbers among all the touch data can be extracted to the maximum extent, and differences among the touch data are reserved to prepare for performing formal compression processing subsequently.
In a specific implementation manner, when at least one level of threshold range is set according to a target bit number and an original bit number corresponding to the data unit, the corresponding N +1 index values can be respectively calculated by taking the target bit number as an initial index value, the original bit number as an index target value and 1 as an index increment step length, with 2 as the base; wherein, N is a positive integer and represents the difference between the original bit number and the target bit number; taking the N +1 exponent values as N +1 thresholds; and setting a corresponding N +1 level threshold range according to the N +1 thresholds. .
For example, if the target bit number is 12 bits and the original bit number is 16 bits, 2 can be calculated separately12、213、214、215、216Five index values, and further, using the five index values as thresholds, corresponding 5 threshold ranges are set, e.g., the difference values<212、212<The difference value<213、213<The difference value<214、214<The difference value<215、215<The difference value<216. The number of bits used for other data units can be set to achieve at least one level of threshold range with reference to the present example, and is not described in detail herein.
After setting at least one threshold range, the pre-compression offset data may be determined based on the difference between the maximum sample value and the minimum sample value, and the relationship of the threshold ranges. For example, if the difference satisfies 213<The difference value<214The touch data needs to be shifted to the right by two bit digits according to the data unit. Taking 8 bits as an example, if the difference is 10101111, after shifting right by two bits, the lower bit "11" is removed, the difference becomes "101011", and the upper bit is complemented by 0 to become "00101011". Most data are finally represented in a binary form in a computer, so that data difference can be embodied in specific positions of bit positions, a threshold range is set, the number of bits needing precompression offset can be directly determined according to the relation between the difference value of the maximum sampling value and the minimum sampling value and the threshold range, the method is simple to implement and can accurately determine, and the method greatly improves the accuracy of precompression offsetAnd touch data preprocessing efficiency.
In order to facilitate uniform processing of all touch data, in an alternative, the pre-compressing offset processing of the touch data according to the pre-compressing offset number may include: acquiring a first difference matrix corresponding to the touch data to be transmitted, wherein the first difference matrix is generated according to the difference between the original sampling value and the minimum sampling value of each touch data; shifting each difference value in the first difference value matrix to the right by a bit indicated by the pre-compression offset number according to the data unit; and generating a corresponding second difference matrix according to each difference value after the right movement.
Through the process, the preprocessing of the touch data to be transmitted is realized to prepare for the subsequent further data compression.
Step S308: and compressing the touch data according to the data unit according to the compression offset digit.
In the case of expressing the touch data by the difference matrix, optionally, this step may be implemented as: and compressing the second difference matrix according to the data unit according to the compression offset bit number. For example, after the processing of step S306, the upper 4 bits of each difference value in the second difference value matrix are 0, the upper 4 bits are discarded, each difference value is compressed from 16 bits to 12 bits, and so on.
Step S310: and packaging the compressed touch data into a data packet, and sending the data packet.
And the data packet carries information of a minimum sampling value and information of a pre-compression offset bit number. When the difference matrix is used for expressing the touch data, the compressed second difference matrix is encapsulated into a data packet, and the data packet is sent, wherein the data packet carries the information of the minimum sampling value and the information of the pre-compression offset digit.
Hereinafter, the above-described process will be described with a specific example.
The example takes the compression processing of mutual coupling capacitance data as an example, but it should be clear to those skilled in the art that the process of the example is also applicable to self coupling capacitance data and frequency point noise sampling data. If a plurality of types of the data need to be compressed, the different data may be compressed by type.
The process of the embodiment includes:
1. and acquiring sampling data of a full-screen mutual coupling capacitance node of the touch screen.
2. And acquiring the minimum value min _ data and the maximum value max _ data in the sampling data.
3. And subtracting the minimum value min _ data from the original value raw _ data of the sampling data of each node in the full-screen mutual coupling capacitance node to obtain a difference matrix diff [ ] (namely, a first difference matrix) corresponding to the full-screen mutual coupling capacitance node.
4. Max _ diff is calculated as max _ data _ min _ data.
5. A pre-compression offset number of bits is determined.
The method comprises the following steps:
if max _ diff<2NThe right shift number right _ shift _ bit is 0;
if 2 isN-1<max_diff<2N+1The right shift number right _ shift _ bit is 1;
if 2 isN+1-1<max_diff<2N+2The right shift number right _ shift _ bit is 2;
……
and the like until the allowed maximum right shift number M-N, wherein M is the original bit number (namely the bit numbers before and after compression), and N is the target bit number (namely the bit number after compression).
Taking the example of compressing 16 bits to 12 bits,
if max _ diff <4096, the right shift number right _ shift _ bit is 0;
if 4096< ═ max _ diff <8192, right shift number right _ shift _ bit is 1;
if 8192< ═ max _ diff <16384, the right shift number right _ shift _ bit is 2;
if 16384< ═ max _ diff <32768, right shift number right _ shift _ bit is 3;
if 32768< ═ max _ diff <65536, the right shift number right _ shift _ bit is 4;
for 16bit compression to 12 bits, the maximum number of bits right shifted is (16-12) bits to 4 bits.
Wherein 4096 corresponds to 2128192 corresponds to 213And 16384 corresponds to 21432768 corresponds to 21565536 corresponds to 216. The number of right shifts is the same for all data. Thus, the right shift number is determined in a manner of the maximum difference.
6. Right shift bit right to diff [ ], resulting in matrix diff _ N _ bit [ ] (i.e., a second difference matrix).
For example, if right _ shift _ bit equals 4, then diff [ ] is right-shifted by right _ shift _ bit to obtain matrix diff _12bit [ ].
7. Compressing diff _ N _ bit [ ] to obtain a compression matrix diff _ N _ bit _ ys [ ]: all nodes have a high byte high (M-N) bit of 0, and the (M-N) bit is discarded, whereby Mbit can be compressed into Nbit with a compression ratio of (M-N)/M.
For example, diff _12bit [ ] is compressed: all nodes are 0 high 4 bits high, and the 4 bits are discarded, whereby 16 bits can be compressed to 12 bits with a compression ratio of 1/4, resulting in a compression matrix diff _12bit _ ys [ ]. But not limited to the above compression forms, and in practical applications, those skilled in the art may also adopt other suitable compression forms, such as compressing the upper four bits of the lower byte, and so on.
8. And encapsulating the compression matrix diff _ N _ bit _ ys [ ] into a data packet, and transmitting the data packet.
Only the minimum value min _ data, right _ shift _ bit number, and compression matrix diff _ N _ bit _ ys [ ] need to be transmitted during transmission.
Still taking the example of compressing 16 bits to 12 bits, the transmitted data packet includes the minimum value min _ data, right _ shift _ bit number, and compression matrix diff _12bit _ ys [ ]; after receiving the data packet, the master control end decompresses according to the compression rule, and can restore the data packet to the original data. Taking 100 data of the cross-coupled capacitance nodes as an example, before compression, 16 bits 100 to 1600 bits are transmitted, and after compression, 12 bits 100+16 bits (minimum value min _ data) + right shift 8 bits to 1224 bits are transmitted. Therefore, the data transmission quantity is effectively reduced.
In practical application, the difference of the same data is generally small, for example, mutual coupling capacitance data, the difference value is generally within 25% of the maximum value, the data consistency of the full screen is good, and the difference between the maximum value and the minimum value is small (the difference between the maximum value and the minimum value in practice is within 4096), so that by the method, the data is compressed, and the effect of basically not losing the precision can be achieved. Even if the maximum-minimum difference is within 8192, only 1bit of precision is lost, and the influence on the signal-to-noise ratio of the overall data is extremely small. Therefore, the data is compressed, the data transmission amount is reduced, and the data precision can be ensured.
According to the embodiment, the bit number needing to be compressed, namely the compression offset bit number, is determined according to the data unit and the data compression information used by the touch data to be transmitted; and then, according to the compression offset digit, compressing the touch data according to the data unit. For touch data, most of low-order bit data is noise jitter data, and progress loss caused by compressing several low-order bits hardly influences the quality of signals. Therefore, within the range of acceptable precision requirement, the purposes of ensuring data precision, reducing the data quantity of the transmitted touch data and improving the transmission speed and efficiency can be achieved by compressing the touch data according to the data unit.
Example four
Referring to fig. 5, a block diagram of a data processing apparatus according to a fourth embodiment of the present invention is shown.
The data processing apparatus of the present embodiment includes: an obtaining module 402, configured to obtain a data unit used by the touch data to be transmitted, and data compression information used to compress the touch data; a determining module 404, configured to determine a compression offset bit number according to the data unit and the data compression information; and a compressing module 406, configured to compress the touch data according to the compression offset bits and according to the data unit.
In practical application, touch data can be collected through the touch screen, and the collected touch data is temporarily stored in a memory or a cache and waits for being transmitted to a main control end; after the touch chip (which can realize the functions of the modules) acquires the data units and the data compression information used by the data to be transmitted in any appropriate manner, the compression offset digits are determined; and then, the touch chip compresses the data according to the compression offset bit number, and then sends the data to the corresponding data storage unit to wait for sending the data to the main control end, or sends the data to the corresponding data reading unit to directly send the data to the main control end through the communication unit.
According to the embodiment, the bit number needing to be compressed, namely the compression offset bit number, is determined according to the data unit and the data compression information used by the touch data to be transmitted; and then, according to the compression offset digit, compressing the touch data according to the data unit. For touch data, most of low-order bit data is noise jitter data, and progress loss caused by compressing several low-order bits hardly influences the quality of signals. Therefore, within the range of acceptable precision requirement, the purposes of ensuring data precision, reducing the data quantity of the transmitted touch data and improving the transmission speed and efficiency can be achieved by compressing the touch data according to the data unit.
EXAMPLE five
Referring to fig. 6, a block diagram of a data processing apparatus according to a fifth embodiment of the present invention is shown.
The data processing apparatus of the present embodiment includes: an obtaining module 502, configured to obtain a data unit used by the touch data to be transmitted, and data compression information used to compress the touch data; a determining module 504, configured to determine a compression offset bit according to the data unit and the data compression information; and a compressing module 506, configured to compress the touch data according to the compression offset bits and the data unit.
Optionally, the compression module 506 comprises: a first compression sub-module 5062, configured to, for each touch data, cut off a bit number indicated by the compression offset number from a lowest bit of bits corresponding to the data unit; and performing seamless connection processing on the touch data with the cut bit digits.
Optionally, the data processing apparatus of this embodiment further includes: a first encapsulating module 508, configured to encapsulate the compressed touch data into a data packet, and send the data packet; and the data packet carries the information of the data unit and the information of the compression offset bit.
Optionally, the data processing apparatus of this embodiment further includes: a difference value calculating module 510, configured to obtain a maximum sampling value and a minimum sampling value in the touch data before the compressing module 506 compresses the touch data according to the compression offset bits and the data unit; calculating a difference value between the maximum sampling value and the minimum sampling value; the pre-offset module 512 is configured to perform pre-compression offset processing on the touch data according to the data unit, the data compression information, and the difference.
Optionally, the pre-shifting module 512 includes: a target determining submodule 5122, configured to determine a target bit number after compression according to the data compression information; a threshold setting submodule 5124, configured to set at least one level of threshold range according to the target bit number and the original bit number corresponding to the data unit; an offset determination submodule 5126, configured to determine a pre-compression offset bit number according to a relationship between the difference value and the threshold range; the offset execution submodule 5128 is configured to perform pre-compression offset processing on the touch data according to the pre-compression offset bit number.
Optionally, the threshold setting sub-module 5124 is configured to use 2 as a base, use the target bit number as an initial exponent value, use the original bit number as an target exponent value, use 1 as an exponential increment step size, and respectively calculate N +1 corresponding exponent values; wherein N is a positive integer and represents a difference between the original bit number and the target bit number; taking the N +1 exponent values as N +1 thresholds; and setting a corresponding N +1 level threshold range according to the N +1 thresholds.
Optionally, the pre-migration module 512 is configured to obtain a first difference matrix corresponding to the touch data to be transmitted, where the first difference matrix is generated according to a difference between an original sampling value of each touch data and the minimum sampling value; shifting each difference in the first difference matrix to the right by the data unit by a bit indicated by the pre-compression offset number; and generating a corresponding second difference matrix according to each difference value after the right movement.
Optionally, the compression module 506 comprises: and a second compression submodule 5064, configured to perform compression processing on the second difference matrix according to the data unit according to the compression offset bit number.
Optionally, the data processing apparatus of this embodiment further includes: a second encapsulating module 514, configured to encapsulate the compressed second difference matrix into a data packet, and send the data packet; and the data packet carries information of the minimum sampling value and information of the pre-compression offset digit.
It should be noted that, for convenience of description, the modules for implementing the corresponding functions are logically divided in this embodiment, but it should be understood by those skilled in the art that, in practical application, a plurality of modules in this embodiment may be independently arranged or may be combined, and when necessary, the function of one module may also be implemented by a plurality of modules.
In addition, in practical application, touch data can be collected through the touch screen, and the collected touch data is temporarily stored in a memory or a cache and waits for being transmitted to the main control terminal; after the touch chip (which may implement the functions of the acquiring module 502, the determining module 504, the difference calculating module 510, the pre-migration module 512, the first packaging module 508, the second packaging module 514, and the like) acquires the data units and the data compression information used by the data to be transmitted in any appropriate manner, the compression migration bits are determined; furthermore, the touch chip may compress the data according to the compression offset bit number through a hardware circuit for compression, such as a DSP circuit (which may implement the functions of the compression module 506 and its sub-modules), and then deliver the compressed data to a corresponding data storage unit to wait for being sent to the main control terminal, or deliver the compressed data to a corresponding data reading unit to directly send the compressed data to the main control terminal through the communication unit.
The data processing apparatus of this embodiment is configured to implement the corresponding data processing method in the foregoing multiple method embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
In addition, an embodiment of the present invention further provides a touch chip, where the data processing apparatus in the fourth or fifth embodiment is disposed in the touch chip.
The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions and/or portions thereof that contribute to the prior art may be embodied in the form of a software product that can be stored on a computer-readable storage medium including any mechanism for storing or transmitting information in a form readable by a computer (e.g., a computer). For example, a machine-readable medium includes Read Only Memory (ROM), Random Access Memory (RAM), magnetic disk storage media, optical storage media, flash memory storage media, electrical, optical, acoustical or other form of propagated signals (e.g., carrier waves, infrared signals, digital signals, etc.), and others, and the computer software product includes instructions for causing a computing device (which may be a personal computer, server, or network device, etc.) to perform the methods described in the various embodiments or portions of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and not to limit the same; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (17)

  1. A method of data processing, comprising:
    acquiring a data unit used by touch data to be transmitted and data compression information used for compressing the touch data;
    determining a compression offset bit number according to the data unit and the data compression information;
    and compressing the touch data according to the data unit according to the compression offset digit.
  2. The method of claim 1, wherein the compressing the touch data in the data unit according to the compression offset bits comprises:
    for each touch data, cutting off the bit number indicated by the compression offset bit number from the lowest bit of the bit number corresponding to the data unit;
    and performing seamless connection processing on the touch data with the cut bit digits.
  3. The method of claim 2, wherein the method further comprises:
    packaging the compressed touch data into a data packet, and sending the data packet; and the data packet carries the information of the data unit and the information of the compression offset bit.
  4. The method of claim 1, wherein prior to the compressing the touch data in the data units according to the compression offset bits, the method further comprises:
    acquiring a maximum sampling value and a minimum sampling value in the touch data;
    calculating a difference value between the maximum sampling value and the minimum sampling value;
    and pre-compressing and offsetting the touch data according to the data unit, the data compression information and the difference value.
  5. The method of claim 4, wherein the pre-compression offset processing the touch data according to the data unit, the data compression information, and the difference value comprises:
    determining the target bit number after compression according to the data compression information;
    setting at least one level of threshold range according to the target bit number and the original bit number corresponding to the data unit;
    determining a pre-compression offset digit according to the relation between the difference value and the threshold range;
    and performing pre-compression offset processing on the touch data according to the pre-compression offset digit.
  6. The method of claim 5, wherein the setting at least one level of threshold range according to the target number of bits and the original number of bits corresponding to the data unit comprises:
    respectively calculating corresponding N +1 exponent values by taking 2 as a base, the target bit number as an exponent initial value, the original bit number as an exponent target value and 1 as an exponent increment step length; wherein N is a positive integer and represents a difference between the original bit number and the target bit number;
    taking the N +1 exponent values as N +1 thresholds;
    and setting a corresponding N +1 level threshold range according to the N +1 thresholds.
  7. The method of any one of claims 4-6,
    the pre-compression offset processing is performed on the touch data according to the pre-compression offset digit, and includes: obtaining a first difference matrix corresponding to the touch data to be transmitted, wherein the first difference matrix is generated according to the difference between the original sampling value of each touch data and the minimum sampling value; shifting each difference in the first difference matrix to the right by the data unit by a bit indicated by the pre-compression offset number; generating a corresponding second difference matrix according to each difference value after the right movement;
    the compressing the touch data according to the data unit according to the compression offset bits includes: and compressing the second difference matrix according to the data unit according to the compression offset bit number.
  8. The method of claim 7, wherein the method further comprises:
    packaging the compressed second difference value matrix into a data packet, and sending the data packet; and the data packet carries information of the minimum sampling value and information of the pre-compression offset digit.
  9. A data processing apparatus comprising:
    the device comprises an acquisition module, a transmission module and a processing module, wherein the acquisition module is used for acquiring a data unit used by touch data to be transmitted and data compression information used for compressing the touch data;
    the determining module is used for determining a compression offset digit according to the data unit and the data compression information;
    and the compression module is used for compressing the touch data according to the compression offset digits and the data units.
  10. The apparatus of claim 9, wherein the compression module comprises:
    the first compression submodule is used for cutting off the bit number indicated by the compression offset digit from the lowest bit of the bit corresponding to the data unit aiming at each touch data; and performing seamless connection processing on the touch data with the cut bit number.
  11. The apparatus of claim 10, wherein the apparatus further comprises:
    the first packaging module is used for packaging the compressed touch data into a data packet and sending the data packet; and the data packet carries the information of the data unit and the information of the compression offset bit.
  12. The apparatus of claim 9, wherein the apparatus further comprises:
    the difference value calculation module is used for acquiring a maximum sampling value and a minimum sampling value in the touch data before the compression module compresses the touch data according to the compression offset digit and the data unit; calculating a difference value between the maximum sampling value and the minimum sampling value;
    and the pre-offset module is used for pre-compressing and offsetting the touch data according to the data unit, the data compression information and the difference value.
  13. The apparatus of claim 12, wherein the pre-shifting module comprises:
    the target determining submodule is used for determining the target bit number after compression according to the data compression information;
    the threshold setting submodule is used for setting at least one level of threshold range according to the target bit number and the original bit number corresponding to the data unit;
    the offset determining submodule is used for determining the pre-compression offset digit according to the relation between the difference value and the threshold range;
    and the offset execution submodule is used for carrying out pre-compression offset processing on the touch data according to the pre-compression offset digit.
  14. The apparatus of claim 13, wherein the threshold setting sub-module is configured to calculate N +1 exponent values with a base 2, the target number of bits as an initial exponent value, the original number of bits as an target exponent value, and 1 as an exponential increment step, respectively; wherein N is a positive integer and represents a difference between the original bit number and the target bit number; taking the N +1 exponent values as N +1 thresholds; and setting a corresponding N +1 level threshold range according to the N +1 thresholds.
  15. The apparatus of any one of claims 12-14,
    the pre-migration module is configured to obtain a first difference matrix corresponding to the touch data to be transmitted, where the first difference matrix is generated according to a difference between an original sampling value of each touch data and the minimum sampling value; shifting each difference in the first difference matrix to the right by the data unit by a bit indicated by the pre-compression offset number; generating a corresponding second difference matrix according to each difference value after the right movement;
    the compression module includes: and the second compression submodule is used for compressing the second difference matrix according to the compression offset bit number and the data unit.
  16. The apparatus of claim 15, wherein the apparatus further comprises:
    the second encapsulation module is used for encapsulating the compressed second difference value matrix into a data packet and sending the data packet; and the data packet carries information of the minimum sampling value and information of the pre-compression offset digit.
  17. A touch chip, comprising: a data processing apparatus as claimed in any one of claims 9 to 16.
CN201880002016.2A 2018-10-19 2018-10-19 Data processing method and device Pending CN111417920A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/111063 WO2020077625A1 (en) 2018-10-19 2018-10-19 Data processing method and apparatus

Publications (1)

Publication Number Publication Date
CN111417920A true CN111417920A (en) 2020-07-14

Family

ID=70284408

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880002016.2A Pending CN111417920A (en) 2018-10-19 2018-10-19 Data processing method and device

Country Status (2)

Country Link
CN (1) CN111417920A (en)
WO (1) WO2020077625A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626394A (en) * 2021-06-30 2021-11-09 苏州浪潮智能科技有限公司 Data compression method and related device
CN116301415A (en) * 2022-07-28 2023-06-23 荣耀终端有限公司 Method and device for improving touch response speed

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101031021A (en) * 2006-02-27 2007-09-05 索尼株式会社 Image capturing apparatus, imaging circuit, and image capturing method
CN102790999A (en) * 2011-05-19 2012-11-21 中兴通讯股份有限公司 Data compression, transmission, receiving and uncompressing method and corresponding device
CN107961034A (en) * 2016-10-19 2018-04-27 北京东软医疗设备有限公司 The method and device for the treatment of channel data

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1191355A (en) * 1997-12-08 1998-08-26 王国安 Non-loss transformation of text file data compression
CN1251449A (en) * 1998-10-18 2000-04-26 华强 Combined use with reference of two category dictionary compress algorithm in data compaction
CN1241149C (en) * 2003-04-07 2006-02-08 西安交通大学 Compression rate pre-allocation algorithm for JPEG 2000 multi-picture photo

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101031021A (en) * 2006-02-27 2007-09-05 索尼株式会社 Image capturing apparatus, imaging circuit, and image capturing method
CN102790999A (en) * 2011-05-19 2012-11-21 中兴通讯股份有限公司 Data compression, transmission, receiving and uncompressing method and corresponding device
CN107961034A (en) * 2016-10-19 2018-04-27 北京东软医疗设备有限公司 The method and device for the treatment of channel data

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626394A (en) * 2021-06-30 2021-11-09 苏州浪潮智能科技有限公司 Data compression method and related device
CN113626394B (en) * 2021-06-30 2023-08-15 苏州浪潮智能科技有限公司 Data compression method and related device
CN116301415A (en) * 2022-07-28 2023-06-23 荣耀终端有限公司 Method and device for improving touch response speed

Also Published As

Publication number Publication date
WO2020077625A1 (en) 2020-04-23

Similar Documents

Publication Publication Date Title
CN112822491B (en) Image data encoding and decoding method and device
CN109756536B (en) Data transmission method, device and system
CN104219229B (en) The transmission method and device of virtual desktop data
US10817460B2 (en) RDMA data sending and receiving methods, electronic device, and readable storage medium
CN104199951B (en) Web page processing method and device
CN104378117A (en) Data compression method and device and data transmission method and system
CN101667843B (en) Methods and devices for compressing and uncompressing data of embedded system
WO2020125527A1 (en) Data compression method, apparatus, computer device and storage medium
CN111417920A (en) Data processing method and device
CN113556813B (en) Uplink data transmission method, device and system
CN115567589A (en) Compression transmission method, device, equipment and storage medium of JSON data
CN113220651B (en) Method, device, terminal equipment and storage medium for compressing operation data
CN104052992A (en) Image processing method and electronic equipment
WO2021147319A1 (en) Data processing method, apparatus, device, and medium
CN113613289A (en) Bluetooth data transmission method, system and communication equipment
CN101483844A (en) Method and system for indexing mobile telephone number
CN114979093B (en) RTP-based data transmission method, device, equipment and medium
CN114900796B (en) Longitude and latitude coordinate compression method based on Beidou short message transmission
CN105630999A (en) Data compressing method and device of server
CN113242041A (en) Data hybrid compression method and system thereof
CN114979707B (en) Data transmission method and device
CN115499338B (en) Data processing method, device, medium and cloud network observation system
CN113342306B (en) 2-path audio mixing method and processing terminal
CN113726616B (en) Method, device and system for detecting abnormal data in real time based on power internet of things
CN116470927B (en) Data processing method, device, equipment and storage medium

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