CN110138509B - Data transmission method and data transmission assembly - Google Patents

Data transmission method and data transmission assembly Download PDF

Info

Publication number
CN110138509B
CN110138509B CN201910415419.6A CN201910415419A CN110138509B CN 110138509 B CN110138509 B CN 110138509B CN 201910415419 A CN201910415419 A CN 201910415419A CN 110138509 B CN110138509 B CN 110138509B
Authority
CN
China
Prior art keywords
data
transmission
bit
data group
decimal
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.)
Active
Application number
CN201910415419.6A
Other languages
Chinese (zh)
Other versions
CN110138509A (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.)
BOE Technology Group Co Ltd
Beijing BOE Optoelectronics Technology Co Ltd
Original Assignee
BOE Technology Group Co Ltd
Beijing BOE Optoelectronics 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 BOE Technology Group Co Ltd, Beijing BOE Optoelectronics Technology Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN201910415419.6A priority Critical patent/CN110138509B/en
Publication of CN110138509A publication Critical patent/CN110138509A/en
Application granted granted Critical
Publication of CN110138509B publication Critical patent/CN110138509B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/02Conversion to or from weighted codes, i.e. the weight given to a digit depending on the position of the digit within the block or code word
    • H03M7/04Conversion to or from weighted codes, i.e. the weight given to a digit depending on the position of the digit within the block or code word the radix thereof being two
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0006Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0015Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy

Abstract

The invention provides a data transmission method and a data transmission assembly, relates to the technical field of data transmission, and can avoid data transmission waste. The data transmission method comprises the following steps: the output interface carries out coding operation on each original data group in the original data and converts the original data group into a transmission data group; the highest bit of the transmission data group is a flag bit, the flag bit takes 0 or 1, and the transmission data group starts from the next bit of the flag bit to be the effective binary data corresponding to the original data group. The output interface sends the transmission data group to the input interface and sends the indication signal to the input interface. The indication signal is used to indicate the most significant bit of each transmitted data set. The input interface receives the indication signal and the transmission data set, carries out decoding operation and restores each transmission data set.

Description

Data transmission method and data transmission assembly
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a data transmission method and a data transmission module.
Background
With the advent of the data age, data transmission is becoming more and more important. Data transmission is the communication process by which data is transferred from one place to another.
Disclosure of Invention
Embodiments of the present invention provide a data transmission method and a data transmission component, which can avoid data transmission waste.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in one aspect, a data transmission method is provided, including: the output interface carries out coding operation on each original data group in the original data and converts the original data group into a transmission data group; the highest bit of the transmission data group is a flag bit, the flag bit is 0 or 1, and the transmission data group starts from the next bit of the flag bit and is the effective binary data corresponding to the original data group.
The output interface sends the transmission data set to an input interface and sends an indication signal to the input interface; the indication signal is used for indicating the highest bit of each transmission data group.
And the input interface receives the indication signal and the transmission data group, performs decoding operation and restores each transmission data group.
Optionally, the encoding operation includes: and comparing the decimal value corresponding to each original data set with a reference value.
And if the decimal value is greater than or equal to the reference value, setting the flag bit to be one of 0 and 1, and starting from the next bit of the flag bit, the transmission data group is binary data of the difference value of the decimal value and the reference value.
And if the decimal value is less than the reference value, setting the flag bit to be the other one of 0 and 1, and removing all binary data of 0 before the first 1 from the original data group corresponding to the transmission data group from the next bit of the flag bit of the transmission data group.
Optionally, if the decimal value corresponding to the original data is greater than or equal to the reference value, the flag bit is set to 1, and if the decimal value corresponding to the original data is smaller than the reference value, the flag bit is set to 0.
Based on this, the decoding operation includes: and identifying each transmission data group according to the indication signal.
For each transmission data group, if the highest bit is 1, adding decimal values corresponding to binary data of other bits except the highest bit in the transmission data group with the reference value to convert the decimal values into binary data; and according to the data storage format of the buffer stored in the restored original data group, performing high bit 0 complementing on the binary data to make the bit number of the binary data accord with the data storage format of the buffer.
For each transmission data group, if the highest bit is 0, the binary data of the rest bits except the highest bit in the transmission data group is unchanged; and according to the data storage format of the buffer stored in the original data group after reduction, performing high bit 0 complementing on the binary data to make the bit number of the binary data accord with the data storage format of the buffer.
Optionally, the reference value is obtained by:
dividing the original data group in the original data into at least one group.
And counting the number of each decimal value according to the decimal value corresponding to the original data group of each group.
Sequencing the decimal values from small to large in a mode of gradually increasing by +1, wherein the smallest decimal value is sequenced to be p, the largest decimal value is sequenced to be n, p and n are integers, and n is larger than p.
Circularly ordering the decimal values into the sum of all the numbers from the p th to the i th and the number corresponding to the rest decimal values, and subtracting to obtain the absolute value of the difference value; performing the operation of +1 once per cycle; i starts from p and is smaller than n.
And acquiring the maximum absolute value according to the absolute values of all the differences.
Based on the maximum absolute value, the value of i is determined.
And determining the decimal value set corresponding to the original data set according to the value of i, wherein the decimal value set is concentrated in the regions ordered from the p-th to the i-th or the regions ordered after the i-th.
If the decimal values corresponding to the original data set are concentrated in the regions ordered from the p-th to the i-th, and the decimal value ordered as the p-th is greater than 0, taking one of the decimal values ordered as the p-th, ordered as the i + p/2, rounded or ordered as the i-th corresponding as a reference value; if the decimal value ordered as pth is equal to 0, taking one of the decimal values ordered as ith + p/2 or ordered as ith as the reference value.
And if the decimal value corresponding to the original data set is concentrated in the area after the ith ordering, taking the decimal value ordered as the (i + 1) th as the reference value.
Optionally, in a case where all bits of the original data group are 0, the transmission data group has only the flag bit; or, in the case that all bits of the original data group are 0, the transmission data group is divided by the flag bit and the next bit after the flag bit.
Optionally, the indication signal is at a high level when corresponding to the most significant bit of each of the transmission data groups, and is at a low level when corresponding to the remaining bits except the most significant bit.
Optionally, the data transmission method further includes: the output interface sends the transmission data group to the input interface, and simultaneously sends a clock signal to the input interface; within each cycle of the clock signal, 1-bit binary data in the transmission data group is transmitted to the input interface.
On the other hand, the data transmission assembly comprises an output interface and an input interface, wherein the output interface and the input interface are connected with a data transmission line and an indication signal line.
The output interface is configured to perform encoding operation on each original data group in original data, convert the original data group into a transmission data group, and transmit the transmission data group to the input interface through the data transmission line; the highest bit of the transmission data group is a flag bit, the flag bit is 0 or 1, and the transmission data group starts from the next bit of the flag bit and is the effective binary data corresponding to the original data group; the output interface sends the transmission data group to the input interface through the data transmission line, and simultaneously sends an indication signal to the input interface through the indication signal line, wherein the indication signal is used for indicating the highest bit of each transmission data group.
The input interface is configured to receive the transmission data sets, perform decoding operation, and restore each of the transmission data sets.
Optionally, the output interface is configured to perform an encoding operation on each original data group, including:
and comparing the decimal value corresponding to each original data set with a reference value. And if the decimal value corresponding to the original data set is greater than or equal to the reference value, setting the flag bit to be one of 0 and 1, and starting from the next bit of the flag bit, the transmission data set is binary data of the difference value between the decimal value and the reference value.
And if the decimal value corresponding to the original data set is smaller than the reference value, setting the flag bit to be the other one of 0 and 1, and removing all binary data of 0 before the first 1 from the next bit of the transmission data set to the original data set corresponding to the transmission data set.
The input interface is configured to receive the transmission data set and perform a decoding operation on the transmission data set, the decoding operation including:
the input interface identifies each of the transmission data sets based on the indication signal.
For each transmission data group, if the highest bit is 1, adding decimal values corresponding to binary data of other bits except the highest bit in the transmission data group with the reference value to convert the decimal values into binary data; and according to the data storage format of the buffer stored in the restored original data group, performing high bit 0 complementing on the binary data to make the bit number of the binary data conform to the data storage format of the buffer.
For each transmission data group, if the highest bit is 0, the binary data of the rest bits except the highest bit in the transmission data group is unchanged; and according to the data storage format of the buffer stored in the original data group after restoration, performing high bit 0 complementing on the binary data to make the bit number of the binary data accord with the data storage format of the buffer.
Optionally, the output interface and the input interface are further connected to a clock signal line. The output interface is further configured to: the transmission data group is sent to the input interface through the data transmission line, and meanwhile, a clock signal is sent to the input interface; within each cycle of the clock signal, 1-bit binary data in the transmission data group is transmitted to the input interface.
The embodiment of the invention provides a data transmission method and a data transmission assembly, wherein an original data group in original data is converted into a transmission data group for transmission by carrying out coding operation in an output interface, so that the transmission data group only contains effective binary data corresponding to the original data group, and the ineffective binary data in the original data group is removed. Compared with a uniform and continuous data transmission mode in the related technology, the non-uniform data transmission method can reduce the transmitted data volume and avoid data volume transmission waste. On the basis, more effective data volume can be transmitted on the premise of not changing the data transmission rate; on the premise of transmitting the same data amount, the data transmission rate can be reduced, so that the transmission quality can be improved and the EMI (Electromagnetic Interference) can be reduced.
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 the drawings without creative efforts.
FIG. 1 illustrates a prior art data transmission method;
fig. 2 is a schematic flowchart of a data transmission method according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a distribution type of a transmission data set according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating another distribution type of the transmission data set according to the embodiment of the present invention;
FIG. 5 is a flowchart illustrating an encoding operation according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating a decoding operation according to an embodiment of the present invention;
FIG. 7 is a schematic diagram illustrating a process for selecting a reference value according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a transmission assembly according to an embodiment of the present 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 only a part of the embodiments of the present invention, and not all of the embodiments. 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.
An interface is a shared boundary for the exchange of information between two separate components in a system. This exchange may occur between software, hardware, external devices, or a combination thereof. The information exchange between the interfaces is realized by data transmission.
In the related art, data transmission between interfaces is performed in a uniform and continuous manner. Taking the example of a display device having 1920 pixels per row, each pixel consisting of three sub-pixels of red (R), green (G) and blue (B), a row of data comprises 1920 × 3 data groups, each data group for example comprising 8 bits of binary data. If 1bit of data is transmitted every clock cycle, then an amount of 1920 × 3 × 8 bits of data is to be transmitted.
Because each data group adopts the same number of bits, the data in some data groups can be only a few bits in actual effectiveness, and therefore, the problem of data quantity transmission waste exists. Still taking the above-mentioned display device as an example, each sub-pixel has 256 gray levels, i.e. 0 to 255 gray levels. If the display device displays a white picture, the gray scales of R, G and B three sub-pixels are 255, and the data of the data group corresponding to the three sub-pixels are 11111111. However, if a monochrome picture is displayed, for example, a red picture is displayed, it is only necessary that the gray scale of the R sub-pixel is 255, the gray scales of the G and B sub-pixels are 0, the data of the data group corresponding to the actual R sub-pixel is 11111111, and the data of the data groups corresponding to the B and G sub-pixels are 00000000. It can be known that the data of the data groups corresponding to the B and G sub-pixels include a plurality of invalid data, but based on the uniform and continuous transmission manner, the interface still transmits 0 of 8 bits in the data groups corresponding to the B and G sub-pixels, which results in a waste of data amount transmission.
For example, as shown in FIG. 1, data set 2, and data set 3 each occupy 8 bits. The binary data corresponding to data group 1 is 10100111, the binary data corresponding to data group 2 is 00000000, and the binary data corresponding to data group 3 is 00110111. The data group 2 includes invalid data of at least 7 bits, and the data group 3 also includes invalid data of 2 bits.
Based on this, the present application proposes a data transmission method, as shown in fig. 2, including:
s10, the output interface performs coding operation on each original data group in the original data, and the original data groups are converted into transmission data groups; the highest bit of the transmission data group is a flag bit, the flag bit takes 0 or 1, and the transmission data group starts from the next bit of the flag bit to be the effective binary data corresponding to the original data group.
The original data is binary data, each original data group in the original data comprises Nbit binary data, and N is a positive integer. For example, N is 8.
For example, the raw data may be stored in a buffer, and the buffer includes one of a register, a Latch (Latch), and a Static Random Access Memory (SRAM).
The output interface reads the original data from the buffer to obtain each original data group in the original data, so that the encoding operation is carried out on the original data groups, and each original data group is converted into a transmission data group.
When the highest bit of the original data group is 1, the 8-bit binary data in the original data group are all effective values; when the most significant bit of the original data group is 0, all the 0's before the first 1 in the original data group are invalid binary data, and all the 0's after the first 1 are valid binary data. For example: if the data of a certain original data set is 00010001, only 10001 is valid data.
Alternatively, in the case where all bits of the original data set are 0, the transmission data set has only flag bits. In this case, the transmission data group occupies only one bit.
Taking the original data sets corresponding to the transmission data set 2, the transmission data set 3, the transmission data set 5, and the transmission data set 6 as 00000000, as shown in fig. 3, when converting these original data sets into transmission data sets, only 1bit of flag bits may be included. Fig. 3 illustrates the flag bit 0, but the flag bit may be 1.
Or, optionally, in the case that all bits of the original data group are 0, the transmission data group includes a flag bit and a next bit after the flag bit. For example, the original data set is 00000000, and when the original data set is converted into the transmission data set, the transmission data set is 00, and only two bits are occupied. The most significant (leftmost) 0 is a flag bit, and the following 0 indicates that the data of the original data group corresponding to the transmission data group is 0. All data of the original data set can be more clearly expressed as 0.
Still taking the original data sets corresponding to the transmission data set 2, the transmission data set 3, the transmission data set 5, and the transmission data set 6 as 00000000 as an example, as shown in fig. 4, when converting these original data sets into transmission data sets, the original data sets may include a flag bit 0 and a valid value 0, that is, 00.
As can be seen from the above description, in the case that all bits of the original data set are 0, no matter whether the converted transmission data set contains 1-bit data or 2-bit data, the original data set can be compressed and more bits can be saved compared to the uniform transmission manner in the related art.
S11, the output interface sends the transmission data group to the input interface and sends the indication signal to the input interface; the indication signal is used to indicate the most significant bit of each transmitted data set.
Since the input interface cannot recognize each transmission data set after receiving the transmission data set, the plurality of transmission data sets can be distinguished from each other according to the indication signal.
Taking fig. 3 and 4 as an example, the indication signal is used to identify each transmission data group by the level of the highest bit corresponding to each transmission data group being different from that of the other bits. Thus, taking fig. 4 as an example, the input interface may identify the 6 transmission data sets in fig. 4, from left to right, where the binary data of the 1 st transmission data set is 11111111, the binary data of the 2 nd and 3 rd transmission data sets are both 00, the binary data of the 4 th transmission data set is 11111111, and the binary data of the 5 th and 6 th transmission data sets are both 00.
And S12, receiving the indication signal and the transmission data group by the input interface, performing decoding operation, and restoring each transmission data group.
After the input interface receives the indication signal and the transmission data sets, each transmission data set is restored into an original data set through decoding operation, and the original data set is stored in a buffer to wait for execution.
The embodiment of the invention provides a data transmission method, which comprises the steps of converting an original data group in original data into a transmission data group and transmitting the transmission data group by carrying out coding operation in an output interface, so that the transmission data group only contains valid binary data corresponding to the original data group, and invalid binary data in the original data group are removed. Compared with a uniform and continuous data transmission mode in the related technology, the non-uniform data transmission method can reduce the transmitted data volume and avoid data volume transmission waste. On the basis, more effective data volume can be transmitted on the premise of not changing the data transmission rate; on the premise of transmitting the same data amount, the data transmission rate can be reduced, so that the transmission quality can be improved and the EMI (Electromagnetic Interference) can be reduced.
Optionally, as shown in fig. 5, the encoding operation includes the following steps:
s20, comparing the decimal value corresponding to each original data set with a reference value; and judging the relation between the decimal value corresponding to each original data set and the reference value. If the decimal value corresponding to the original data set is greater than or equal to the reference value, executing S21; if not, S22 is executed.
And S21, setting the flag bit to be one of 0 and 1, and transmitting the binary data of the data group starting from the next bit of the flag bit as the difference value of the decimal value and the reference value.
After the decimal value corresponding to the original data set subtracts the reference value, the decimal value corresponding to the original data set is relatively reduced, and when the decimal value corresponding to the original data set minus the reference value is converted into a binary system relative to the bit occupied by the binary data of the original data set, the number of the occupied bit is reduced.
Taking the example that the original data groups all include 8-bit data, under the condition that the highest bit is 1, the 8-bit data are all valid data and occupy 8 bits. However, when the decimal value corresponding to the original data set is subtracted from the reference value, there is a possibility that the bit occupied by the binary data of the obtained transmission data set is reduced. For example, if the reference value is 203 and the data of the original data set is 11111111, the decimal value 255 minus the reference value 203 corresponding to the original data set is equal to 52, and the binary value corresponding to 52 is 110100, which takes only 6 bits; and 7 bits are occupied after the mark words are added, and the 7 bits occupied by the transmission data group are smaller than the 8 bits occupied by the corresponding original data group.
The number of bits finally occupied by the transmission data group is determined by considering the difference value between the decimal value corresponding to the original data group and the reference value. When the difference is smaller, the number of bits occupied by the transmission data group is smaller, when the difference is larger, the number of bits occupied by the transmission data group may be equal to the number of bits occupied by the original data group, and after the flag bit is added, the number of bits occupied by the transmission data group may also be larger than the number of bits occupied by the original data group. Still taking the maximum value of the decimal value corresponding to the original data set as 255 as an example, when the reference value is 127, the difference value between the decimal value corresponding to the original data set and the reference value is 128, the binary system is 10010000, and the added mark occupies 9 bits.
Therefore, the reference value should be reasonably selected, and the selection of the reference value should be integrally realized under the condition that the decimal value corresponding to the original data group is greater than the reference value, so that the number of bits of a plurality of transmission data groups converted from a plurality of original data groups in the original data is reduced, and the condition that the number of bits of a plurality of transmission data groups is greater than that of the corresponding original data groups is avoided. The method ensures that the quantity of the bits occupied by the whole transmission data is always smaller than that of the original data from the whole transmission data consisting of a plurality of transmission data groups.
For example, the reference value may select the middle value of the largest decimal corresponding to the original data set. For example, when the original data set corresponds to a maximum decimal of 255, then the intermediate value may be 128. In addition, the reference value may select a decimal minimum decimal value corresponding to a plurality of consecutive raw data sets. Of course, the change may be performed in real time based on actual data.
S22, setting the flag bit to be the other one of 0 and 1, and removing all binary data of 0 before the first 1 from the original data group corresponding to the transmission data group from the next bit of the flag bit.
For example, in the case where the decimal value corresponding to the original data group is equal to or greater than the reference value, the flag is set to 1. And setting the flag bit to be 0 under the condition that the decimal value corresponding to the original data set is smaller than the reference value.
In the case where the decimal value corresponding to the original data group is smaller than the reference value and in the case where the invalid binary data 0 exists in the original data group, only the valid binary data of the original data group is output when the original data group is converted. For example, when the original data set is 00000101, the corresponding decimal value is 5, which is smaller than the reference value. When all binary data after 0 before the first 1 in the original data group is removed is 101, that is, the valid binary data in the original data group is 101, the corresponding transmission data group is a flag bit and 101, and only takes 4 bits. The number of bits occupied by the transmitted data set is reduced by half relative to the bits occupied by the original data set prior to conversion.
And when the decimal value corresponding to the original data set is larger than the reference value, subtracting the reference value from the decimal value corresponding to the original data set to obtain a difference value. In this way, the purpose of reducing the decimal value corresponding to the original data set is achieved, the number of the occupied bits after the smaller decimal value is converted into the binary system is less, and the number of the occupied bits of the whole original data can be further reduced. And when the decimal value corresponding to the original data group is smaller than the reference value, removing all binary data of 0 before the first 1 in the original data group for transmission, and further reducing the number of bits occupied by the whole original data.
And if the decimal value corresponding to the original data is greater than or equal to the reference value, setting the flag bit to be 1, and if the decimal value corresponding to the original data is less than the reference value, setting the flag bit to be 0. Optionally, as shown in fig. 6, the decoding operation includes the following steps:
and S30, identifying each transmission data group according to the indication signal.
The level of the most significant bit of the corresponding transmission data group in the indication signal is different from the levels of the other bits except the most significant bit in the corresponding transmission data group, so that each transmission data group can be distinguished according to the level in the indication signal.
And S31, judging whether the highest bit of each transmission data group is 1. If the highest bit of each transmission data group is 1, executing S32; if not, that is, the highest bit of each transfer data group is 0, then S33 is executed.
S32, adding decimal numerical values corresponding to binary data of other bits except the highest bit in the transmission data group with the reference value, and converting into binary data; and according to the data storage format of the buffer stored in the restored original data group, performing high bit 0 complementing on the binary data to make the bit number of the binary data conform to the data storage format of the buffer.
And if the highest bit of the transmission data group is 1, the decimal value corresponding to the original data group corresponding to the transmission data is greater than the reference value. The decimal value corresponding to the binary data of the rest bits except the highest bit of the transmission data is the difference value between the decimal value corresponding to the original data set and the reference value. Therefore, in the process of restoration, decimal values corresponding to binary data of the rest bits except the highest bit in the transmission data group are added to the reference value. The restored original data set needs to be stored in a buffer. The data storage in the buffer has a fixed format, such as an 8-bit format, and the bit occupied by the restored original data group is not fixed, such as 5-bit, so that in order to correctly store the restored original data group in the buffer, the high bit of the restored original data group needs to be subjected to 0 complementing operation, so that the bit occupied by the high bit of the restored original data group conforms to the data storage format of the buffer. That is, the bits occupied by the restored original data set are reduced to 8 bits, and the format of the bits is the same as the data storage format of the buffer.
S33, keeping the binary data of the rest bits except the highest bit in the transmission data group unchanged; and according to the data storage format of the buffer stored in the restored original data group, performing high bit 0 complementing on the binary data to make the bit number of the binary data accord with the data storage format of the buffer.
And if the highest bit of the transmission data group is 0, the decimal value corresponding to the original data group corresponding to the transmission data group is smaller than the reference value. The binary data of other bits except the highest bit in the transmission data group represents the effective value of the original data, so that the binary data can be stored only by complementing 0 to the high bit according to the data storage format of the buffer stored in the restored original data group.
It should be noted that, for the case that the decimal value corresponding to the original data is greater than or equal to the reference value, the flag bit is set to 0, and the decimal value corresponding to the original data is less than the reference value, the flag bit is set to 1, which is similar to the above decoding and is not described again.
Embodiments of the present invention can quickly distinguish between each transmission data set by identifying the position of the most significant bit of the transmission data set by the indicator signal. By setting the flag bit in the transmission data group and then judging the value of the flag bit, the size relationship between the decimal value corresponding to the original data group corresponding to the transmission data group and the reference value can be determined, and the transmission data group can be conveniently restored.
Based on the above, optionally, as shown in fig. 3 and 4, the indication signal is at a high level corresponding to the most significant bit of each transmission data group, and is at a low level corresponding to the remaining bits except the most significant bit.
That is, a position between two adjacent high levels in the indication signal corresponds to one transmission data group on the data transmission line; the plurality of transmission data sets can thus be distinguished by the location of the high level in the indicator signal.
Alternatively, as shown in fig. 7, the reference value is obtained by:
s40, dividing an original data group in the original data into at least one group;
in the case where the display device displays an image, the raw data groups corresponding to each line in the raw data of the image may be grouped into one group, or the raw data groups corresponding to two or more lines in the raw data of the image may be grouped into one group. When the image is a monochrome picture, all the original data sets may be regarded as one set.
And S41, counting the number of each decimal value according to the decimal value corresponding to the original data group of each group.
S42, sequencing the decimal values from small to large in a mode of gradually increasing by +1, wherein the smallest decimal value is sequenced to be p, the largest decimal value is sequenced to be n, p and n are integers, and n is larger than or equal to p.
Where p may be, for example, 1, the decimal values are ordered in increasing increments of 1, 2, and 3 ….
S43, circularly sequencing the decimal values into the total number from the p th to the i th and the number sum corresponding to the rest decimal values, and subtracting to obtain the absolute value of the difference value; performing the operation of +1 once per cycle; and i starts from p and is less than or equal to n.
And S44, acquiring the maximum absolute value according to the absolute values of all the differences.
The absolute value of the difference value is the largest, the difference between the decimal value number sorted from the p th to the i th and the decimal value number after the i th is the largest, and the result shows that the decimal values corresponding to the original data set are concentrated in the areas sorted from the p th to the i th or the areas after the i th.
And S45, determining the value of i according to the maximum absolute value.
When the value of i is determined, the decimal value ordered as i may be obtained.
And S46, determining whether the decimal values corresponding to the original data set are concentrated in the areas from p to i or in the areas after i according to the value of i.
S47, if the decimal value corresponding to the original data set is concentrated in the region from the p-th to the i-th ordered decimal value, and the decimal value ordered as the p-th is greater than 0, taking one of the decimal value ordered as the p-th, the decimal value ordered as the i + p/2, or the decimal value ordered as the i-th ordered decimal value as a reference value; if the decimal value ordered as pth is equal to 0, taking one of the decimal values ordered as ith + p/2 or ordered as ith as the reference value.
The i + p/2 rounding may be performed one integer before or one integer after the other. For example, when P is 1 and i is 4, 1+4/2 is 2.5, and the rounding may be taken to be 2 before or 3 after.
And S48, if the decimal value corresponding to the original data set is concentrated in the area after the ith, taking the decimal value ordered as the (i + 1) th as the reference value.
Taking p as 1 and n as 7 as an example, when i is 1, dividing the decimal value corresponding to the original data set into two regions, taking the decimal value ordered as the 1 st as one region, and obtaining the decimal number ordered as the 1 st as A1; all the decimal values sorted after 1 (i.e., sorted to 2 nd to 7 th) are taken as another region, and the sum of the numbers corresponding to all the decimal values sorted after 1 st is obtained as B1. And then the absolute value P1 of the difference between A1 and B1 is obtained.
When i takes 2, taking the decimal value ordered from 1 st to 2 nd as a region, and obtaining the sum of the numbers corresponding to the decimal values ordered from 1 st to 2 nd as A2. The remaining decimal values ordered after 2 (i.e., ordered from 3 rd to 7 th) are used as another region, and the sum of the numbers of all decimal values in the other region is B2. And then the absolute value P2 of the difference between A2 and B2 is obtained.
When i takes 3, taking the decimal value ordered from 1 st to 3 rd as a region, and obtaining the sum of the numbers corresponding to the decimal values ordered from 1 st to 3 rd as A3. The remaining decimal values ordered after the 3 rd decimal value (i.e., ordered from the 4 th to the 7 th decimal value) are used as another region, and the sum of the numbers of all the decimal values in the other region is B3. And then the absolute value P3 of the difference between A3 and B3 is obtained.
When i takes 4, taking the decimal value ordered from 1 st to 4 th as a region, and obtaining the sum of the numbers corresponding to the decimal values ordered from 1 st to 4 th as A4. The remaining decimal values after the 4 th decimal value (i.e., sorted into the 5 th to the 7 th decimal values) are used as another area, and the sum of the numbers of all the decimal values in the other area is B4. And then the absolute value P4 of the difference between A4 and B4 is obtained.
When i takes 5, taking the decimal value ordered from 1 st to 5 th as a region, and obtaining the sum of the numbers corresponding to the decimal values ordered from 1 st to 5 th as A5. The remaining decimal values after the 5 th decimal value (i.e., sorted to 6 th to 7 th decimal value) are used as another region, and the sum of the numbers of all the decimal values in the other region is B5. And then the absolute value P5 of the difference between A5 and B5 is obtained.
When i takes 6, taking the decimal value ordered from 1 st to 6 th as a region, and obtaining the sum of the numbers corresponding to the decimal values ordered from 1 st to 6 th as A6. The remaining decimal values ordered after 6 (i.e., ordered as 7) are taken as another region and the sum of the numbers of all decimal values in the other region is B6. And then the absolute value P6 of the difference between A6 and B6 is obtained.
The largest absolute value was obtained by comparing the sizes of P1, P2, P3, P4, P5, and P6.
Illustratively, P5 is the largest absolute value. It is shown that the decimal values corresponding to the original data set are concentrated in the region ordered from 1 st to 5 th, or another region ordered after 5 th (i.e. ordered from 6 th to 7 th). Thus, after i is found to be 5, it is further determined whether the decimal value corresponding to the original data set in the original data is specifically concentrated in the region sorted from 1 st to 5 th or in another region sorted after 5 th. Based on this, it can be determined by judging whether the sum of the numbers of all the decimal values sorted to the 1 st to 5 th is larger than the sum of the numbers of the decimal values of another region sorted after the 5 th.
If so, it is indicated that the decimal value corresponding to the original data set in the original data is concentrated in the region ordered from 1 st to 5 th, and therefore, an appropriate decimal value ordered from 1 st, 2 nd, or 3 rd, or 5 th is used as the reference value. For example, when the decimal values ordered from 1 st to 5 th are 100, 125, 130, 145 and 150, respectively, the decimal value 100 ordered as 1 st may be selected as the reference value, the decimal value 125 ordered as 2 nd or the decimal value 130 ordered as 3 rd may be selected as the reference value, and the decimal value 150 ordered as 5 th may be selected as the reference value. The selected reference values can greatly reduce the decimal value corresponding to the original data set.
If not, the decimal value corresponding to the original data set is concentrated in another area after 5 th. Therefore, the decimal value sorted to the 6 th is taken as the reference value. After the decimal value sorted to the 6 th is taken as a reference value, all decimal values sorted after the 6 th can be reduced, which is favorable for reducing the number of bits occupied by the transmission data group to the maximum extent.
Optionally, the data transmission method further includes: the output interface sends the clock signal to the input interface at the same time as the output interface sends the transmission data set to the input interface. As shown in fig. 3 and 4, in each cycle of the clock signal, 1-bit binary data in the transmission data group is transmitted to the input interface. Each cycle of the clock signal includes a high level and a low level.
The clock signal is used to enable the transmission data set to be transmitted and restored at the correct time.
As shown in fig. 8, an embodiment of the present application further provides a data transmission assembly, which includes an output interface and an input interface, where the output interface and the input interface are both connected to the data transmission line and the indication signal line.
The output interface is configured to perform encoding operation on each original data group in the original data, convert the original data group into a transmission data group, and transmit the transmission data group to the input interface through the data transmission line; the highest bit of the transmission data group is a flag bit, the flag bit is 0 or 1, and the transmission data group starts from the next bit of the flag bit and is effective binary data corresponding to the original data group; the output interface sends the transmission data group to the input interface through the data transmission line, and simultaneously sends an indication signal to the input interface through the indication signal line, wherein the indication signal is used for indicating the highest bit of each transmission data group.
The input interface is configured to receive the transmission data sets, perform decoding operation, and restore each transmission data set.
Optionally, the output interface is configured to perform an encoding operation on each original data group, including:
the output interface is configured to compare the decimal value corresponding to each raw data set to a reference value. For the selection of the reference value, the above description may be referred to, and is not repeated herein.
If the decimal value is greater than or equal to the reference value, the flag bit is set to be one of 0 and 1, and the binary data of the decimal value and the reference value are transmitted from the next bit of the flag bit.
If the decimal value is less than the reference value, the flag bit is set to be the other one of 0 and 1, the transmission data group starts from the next bit of the flag bit to be the binary data of all 0 before the first 1 in the original data group corresponding to the transmission data group.
Setting the flag bit to be 1 when the decimal value corresponding to the original data is greater than or equal to the reference value, and setting the flag bit to be 0 when the decimal value corresponding to the original data is less than the reference value, wherein the input interface is configured to receive the transmission data group and perform decoding operation on the transmission data group, and the decoding operation includes:
the input interface identifies each of the sets of transmission data based on the indication signal.
For each transmission data group, if the highest bit is 1, adding decimal values corresponding to binary data of other bits except the highest bit in the transmission data group with the reference value to convert the decimal values into binary data; and according to the data storage format of the buffer stored in the restored original data group, performing high bit 0 complementing on the binary data to make the bit number of the binary data accord with the data storage format of the buffer.
Aiming at each transmission data group, if the highest bit is 0, the binary data of the rest bits except the highest bit in the transmission data group is unchanged; and according to the data storage format of the buffer stored in the restored original data group, performing high bit 0 complementing on the binary data to make the bit number of the binary data conform to the data storage format of the buffer.
The output interface and the input interface are also connected with a clock signal line.
The output interface is further configured to: the transmission data group is sent to the input interface through the data transmission line, and meanwhile, the clock signal is sent to the input interface; within each cycle of the clock signal, 1-bit binary data in the transmission data group is transmitted to the input interface.
The transmission assembly has the same beneficial effects as the data transmission method, and the details are not repeated herein.
The output Interface and the input Interface each include one of a USB (Universal Serial Bus) Interface, an I2C (Inter-Integrated Circuit) Interface, an SPI (Serial Peripheral Interface) Interface, an LVDS (Low-Voltage Differential Signaling) Interface, an HDMI (High Definition Multimedia Interface) Interface, an MIPI (Mobile Industry Processor Interface), an eDP (Embedded digital display Interface) Interface, and a P2 35 2P (Peer to Peer computing) Interface.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (9)

1. A method of data transmission, comprising:
the output interface carries out coding operation on each original data group in the original data and converts the original data group into a transmission data group; the highest bit of the transmission data group is a flag bit, the flag bit is 0 or 1, and the transmission data group starts from the next bit of the flag bit and is the effective binary data corresponding to the original data group; the output interface sends the transmission data set to an input interface and sends an indication signal to the input interface; the indication signal is used for indicating the highest bit of each transmission data group;
the input interface receives the indication signal and the transmission data groups, performs decoding operation and restores each transmission data group; wherein the content of the first and second substances,
the encoding operation comprises:
comparing the decimal value corresponding to each original data set with a reference value;
if the decimal value corresponding to the original data set is greater than or equal to the reference value, setting the flag bit to be one of 0 and 1, and starting from the next bit of the flag bit, the transmission data set is binary data of the difference value between the decimal value and the reference value;
and if the decimal value corresponding to the original data set is smaller than the reference value, setting the flag bit to be the other one of 0 and 1, and removing all binary data of 0 before the first 1 from the next bit of the transmission data set to the original data set corresponding to the transmission data set.
2. The data transmission method according to claim 1, wherein the flag bit is set to 1 if the decimal value corresponding to the original data is greater than or equal to the reference value, and the flag bit is set to 0 if the decimal value corresponding to the original data is less than the reference value;
the decoding operation comprises:
identifying each of the transmission data sets based on an indication signal;
for each transmission data group, if the highest bit is 1, adding decimal values corresponding to binary data of other bits except the highest bit in the transmission data group with the reference value to convert the decimal values into binary data; according to the data storage format of a buffer stored in the restored original data group, performing high bit 0 complementing on the binary data to enable the bit number of the binary data to be consistent with the data storage format of the buffer;
for each transmission data group, if the highest bit is 0, the binary data of the rest bits except the highest bit in the transmission data group is unchanged; and according to the data storage format of the buffer stored in the original data group after restoration, performing high bit 0 complementing on the binary data to make the bit number of the binary data accord with the data storage format of the buffer.
3. The data transmission method according to claim 1, wherein the reference value is obtained by:
dividing the original data group in the original data into at least one group;
counting the number of each decimal value according to the decimal value corresponding to the original data group of each group;
sequencing each decimal value from small to large in a mode of gradually increasing by +1, wherein the smallest decimal value is sequenced to be p, the largest decimal value is sequenced to be n, p and n are integers, and n is larger than p;
circularly ordering the decimal values into the sum of all the numbers from the p th to the i th and the number corresponding to the rest decimal values, and subtracting to obtain the absolute value of the difference value; performing the operation of +1 once per cycle; i begins to take a value from p, and i is smaller than n;
obtaining the maximum absolute value according to the absolute values of all the difference values;
determining the value of i according to the maximum absolute value;
according to the value of i, determining that the decimal values corresponding to the original data set are concentrated in the regions ordered from the p th to the i th or the regions ordered after the i th;
if the decimal values corresponding to the original data set are concentrated in the regions ordered from the p-th to the i-th, and the decimal value ordered as the p-th is greater than 0, taking one of the decimal values ordered as the p-th, ordered as the i + p/2, rounded or ordered as the i-th corresponding as a reference value; if the decimal value ordered as the pth is equal to 0, taking one of the decimal values ordered as the ith + p/2 or the decimal value ordered as the ith as a reference value;
and if the decimal value corresponding to the original data set is concentrated in the area after the ith ordering, taking the decimal value ordered as the (i + 1) th as the reference value.
4. The data transmission method according to claim 1, wherein the transmission data group has only the flag bit in a case where all bits of the original data group are 0; alternatively, the first and second liquid crystal display panels may be,
and under the condition that all bits of the original data group are 0, the transmission data group comprises the flag bit and the next bit after the flag bit.
5. The data transmission method according to claim 1, wherein the indication signal is high when corresponding to a most significant bit of each of the transmission data groups, and is low when corresponding to the remaining bits except the most significant bit.
6. The data transmission method according to claim 1, further comprising: the output interface sends the transmission data group to the input interface, and simultaneously sends a clock signal to the input interface; within each cycle of the clock signal, 1-bit binary data in the transmission data group is transmitted to the input interface.
7. A data transmission assembly is characterized by comprising an output interface and an input interface, wherein the output interface and the input interface are connected with a data transmission line and an indication signal line;
the output interface is configured to perform encoding operation on each original data group in original data, convert the original data group into a transmission data group, and transmit the transmission data group to the input interface through the data transmission line; the highest bit of the transmission data group is a flag bit, the flag bit is 0 or 1, and the transmission data group starts from the next bit of the flag bit and is the effective binary data corresponding to the original data group; the output interface sends the transmission data group to the input interface through the data transmission line, and simultaneously sends an indication signal to the input interface through the indication signal line, wherein the indication signal is used for indicating the highest bit of each transmission data group;
the input interface is configured to receive the transmission data groups, perform decoding operation, and restore each transmission data group; wherein the content of the first and second substances,
the output interface is configured to perform an encoding operation on each raw data set, including:
comparing the decimal value corresponding to each original data set with a reference value; if the decimal value is greater than or equal to the reference value, setting the flag bit to be one of 0 and 1, and starting from the next bit of the flag bit, the transmission data group is binary data of the difference value of the decimal value and the reference value;
and if the decimal value is less than the reference value, setting the flag bit to be the other one of 0 and 1, and removing all binary data of 0 before the first 1 from the original data group corresponding to the transmission data group from the next bit of the flag bit of the transmission data group.
8. The data transmission assembly of claim 7,
the input interface is configured to receive the transmission data set and perform a decoding operation on the transmission data set, the decoding operation including:
the input interface identifies each transmission data group according to the indication signal;
for each transmission data group, if the highest bit is 1, adding decimal values corresponding to binary data of other bits except the highest bit in the transmission data group with the reference value to convert the decimal values into binary data; according to the data storage format of the buffer stored in the restored original data group, performing high bit 0 complementing on the binary data to make the bit number of the binary data conform to the data storage format of the buffer;
for each transmission data group, if the highest bit is 0, the binary data of the rest bits except the highest bit in the transmission data group are unchanged; and according to the data storage format of the buffer stored in the original data group after restoration, performing high bit 0 complementing on the binary data to make the bit number of the binary data accord with the data storage format of the buffer.
9. The data transmission assembly of claim 7, wherein the output interface and the input interface are further connected to a clock signal line;
the output interface is further configured to: the transmission data group is sent to the input interface through the data transmission line, and meanwhile, a clock signal is sent to the input interface; in each cycle of the clock signal, 1-bit binary data in the transmission data group is transmitted to the input interface.
CN201910415419.6A 2019-05-17 2019-05-17 Data transmission method and data transmission assembly Active CN110138509B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910415419.6A CN110138509B (en) 2019-05-17 2019-05-17 Data transmission method and data transmission assembly

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910415419.6A CN110138509B (en) 2019-05-17 2019-05-17 Data transmission method and data transmission assembly

Publications (2)

Publication Number Publication Date
CN110138509A CN110138509A (en) 2019-08-16
CN110138509B true CN110138509B (en) 2022-07-01

Family

ID=67571324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910415419.6A Active CN110138509B (en) 2019-05-17 2019-05-17 Data transmission method and data transmission assembly

Country Status (1)

Country Link
CN (1) CN110138509B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111800248B (en) * 2020-05-28 2023-03-14 韦臣龙 Communication method and device based on virtual carrier data mode
CN112331135B (en) 2020-11-05 2021-09-24 Tcl华星光电技术有限公司 Display panel and driving method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141627A (en) * 2015-09-17 2015-12-09 北京金山安全软件有限公司 Data sending and receiving method, device and equipment
CN105790853A (en) * 2014-12-26 2016-07-20 北京奇虎科技有限公司 Method and device for transmitting character data through sound wave

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5748763A (en) * 1993-11-18 1998-05-05 Digimarc Corporation Image steganography system featuring perceptually adaptive and globally scalable signal embedding

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105790853A (en) * 2014-12-26 2016-07-20 北京奇虎科技有限公司 Method and device for transmitting character data through sound wave
CN105141627A (en) * 2015-09-17 2015-12-09 北京金山安全软件有限公司 Data sending and receiving method, device and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
采用PLC的气动测量系统串行通信数据压缩算法研究;刘笃喜等;《现代制造工程》;20080418(第04期);全文 *

Also Published As

Publication number Publication date
CN110138509A (en) 2019-08-16

Similar Documents

Publication Publication Date Title
US8085274B2 (en) Video data compression
CN110138509B (en) Data transmission method and data transmission assembly
US9088746B2 (en) Video data transmitter apparatus and video data receiver apparatus for transmission system using multi-value amplitude modulation
US9607407B2 (en) Variable-width differential memory compression
US7668383B2 (en) Image processing, compressing, decompressing, transmitting, sending and receiving devices and methods, programs thereof and displaying device
CN100454334C (en) Multi-gradation monochromatic image display method, multi-gradation monochromatic image display device, computer, monochromatic display device, re-conversion adapter, and video card
US10580343B2 (en) Display data transmission method and apparatus, display panel drive method and apparatus
US5247589A (en) Method for encoding color images
CN100586182C (en) Apparatus and method for image processing, compression, decompression, transfer, transmission and reception, and display device
US8224103B2 (en) Image encoding method and device, image decoding method and device, and imaging device
US8565542B2 (en) Data processing apparatus and data processing method
JP5384210B2 (en) Data transmission device, data reception device, and data transmission system
CN100591125C (en) System and method for video data compression
CN108668170B (en) Image information processing method and device, and storage medium
US9549142B2 (en) Video data transmitter apparatus and video data receiver apparatus for transmission system using multi-value amplitude modulation
JP2008165160A (en) Apparatus for converting gray scale and method for same
WO2015108218A1 (en) Graphic processing device and method
CN115359751A (en) Gamma debugging method and device and computer readable storage medium
CN101065760B (en) System and method for processing image data
US11763418B2 (en) Image processing device, image processing method, and computer program
CN113422955B (en) HEIF image encoding method, HEIF image decoding method, HEIF image encoding device, HEIF image decoding device, HEIF image encoding program, HEIF image decoding program, and HEIF image decoding program
CN114697738B (en) HDCP KEY value encoding and decoding method, device, equipment and storage medium
CN117392931B (en) Display device debugging method and device
CN114153409B (en) Grating operation circuit, device, display control system and display device
CN211478425U (en) Picture storage device and 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
GR01 Patent grant