CN103368582A - Data coding and decoding method and device - Google Patents
Data coding and decoding method and device Download PDFInfo
- Publication number
- CN103368582A CN103368582A CN201210104936XA CN201210104936A CN103368582A CN 103368582 A CN103368582 A CN 103368582A CN 201210104936X A CN201210104936X A CN 201210104936XA CN 201210104936 A CN201210104936 A CN 201210104936A CN 103368582 A CN103368582 A CN 103368582A
- Authority
- CN
- China
- Prior art keywords
- data
- length
- fragment
- data fragment
- specific
- 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
Links
- 238000000034 method Methods 0.000 title abstract description 73
- 230000006835 compression Effects 0.000 abstract description 10
- 238000007906 compression Methods 0.000 abstract description 10
- 239000012634 fragment Substances 0.000 description 129
- 230000008569 process Effects 0.000 description 32
- 101100202858 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) SEG2 gene Proteins 0.000 description 15
- 230000005540 biological transmission Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 12
- 239000002699 waste material Substances 0.000 description 11
- 101150080085 SEG1 gene Proteins 0.000 description 7
- 101100421134 Schizosaccharomyces pombe (strain 972 / ATCC 24843) sle1 gene Proteins 0.000 description 7
- 230000009467 reduction Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000011084 recovery Methods 0.000 description 4
- 238000012546 transfer Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 230000000295 complement effect Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000013515 script Methods 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
The invention discloses a coding method, comprising the steps of receiving first data with a first length; dividing the first data into multiple data slots with a first certain length; obtaining at least a compressible data slot with the same data value and at least one non-compressible data slot without the same data value from the multiple data slots; compressing the at least one compressible data slot to obtain at least one compression data slot with a second certain length; generating a coding data slot according to the position and amount of the at least one compression data slot; and sequentially combining the at least one compression data slot, the at least one non-compressible data slot and the coding data slot to generate second data with a second length, wherein the second certain length is smaller than the first certain length.
Description
Technical field
The present invention relates to a kind of coding/decoding method and device, relate in particular to a kind of by the consecutive identical data in the packed data reducing the coding/decoding method of transfer of data waste rate, and correlative coding/code translator.
Background technology
In general, transmission end (Transmitter, TX) and receiving terminal (Receiver, RX) except needs have the mechanism of transmission/receive data, also need to have the mechanism of transmission/receive clock (Clock) information when the transmission of data.When the high-speed interface the transmission of data, in order to improve signal transmission quality, to reduce electromagnetic interference (Electromagnetic interference, EMI), debug mechanism (Error correction) is provided and saves clock circuit, generally can utilize the data that tendency to develop is defeated encoded (encoding) satisfy above demand.
For example, the coding techniques of 8B/10B is crossed the mechanism of reflection (mapping) with 8 data communication device, is converted into 10 character codes that include clock information.Specifically, 8 bit data can be divided into two parts and video, and wherein 5 will be mapped to one 6 bit data, will be mapped to one 4 bit data and remain 3, synthesize 10 character code again.The 8B/10B coding is lower than 5 consecutive identical data values (Consecutive Identical Digit in order to make data have dc balance (DC-free) and to keep, CID) characteristic, the data of 8 of scripts are converted to 10, have the waste of 2 (both with respect to overall data 20%) on the transfer of data.
On the other hand, another kind of 64B/66B coding is to add 2 message in 64 bit data the place aheads in the known technology, so has higher data transmission efficiency.Yet, in the 64B/66B coding data but have an opportunity up to 65 consecutive identical 0 or 1, its data and clock reduction (data and clock recovery) for follow-up decoding running has bad impact.
Therefore, develop a kind of minimum extra bits that adds, and the data after the conversion do not have the consecutive identical logic symbol above certain-length, to promote coding quality and to reduce the coded system that data are wasted, become one of common objective of industry.
Summary of the invention
Therefore, main purpose of the present invention is to provide data coding/decoding method and device.
The present invention discloses a kind of coding method, includes to receive one first data with one first length; Be a plurality of data slots with one first length-specific with this first Data Segmentation; In these a plurality of data slots, obtain at least one compressible data fragment with full identical data value and reach at least one non-compressible data fragment that does not have full identical data value; Compress this at least one compressible data fragment, to obtain at least one packed data fragment with one second length-specific; Position and a quantity according to this at least one packed data fragment produce a coded data fragment; And sequentially merge this at least one packed data fragment, this at least one non-compressible data fragment and this coded data fragment, have one second data of one second length with generation; Wherein, this second length-specific is less than this first length-specific.
The present invention also discloses a kind of code device, includes a processor; One storage device stores a program code, and this program code is used to refer to this processor and carries out one first data that the following steps reception has one first length; Be a plurality of data slots with one first length-specific with this first Data Segmentation; In these a plurality of data slots, obtain at least one compressible data fragment with full identical data value and reach at least one non-compressible data fragment that does not have full identical data value; Compress this at least one compressible data fragment, to obtain at least one packed data fragment with one second length-specific; Position and a quantity according to this at least one packed data fragment produce a coded data fragment; And sequentially merge this at least one packed data fragment, this at least one non-compressible data fragment and this coded data fragment, have one second data of one second length with generation; Wherein, this second length-specific is less than this first length-specific.
The present invention discloses a kind of interpretation method, includes to receive one second data with one second length; Obtain a coded data fragment of these the second data; According to this coded data fragment, in this second data, obtain at least one packed data fragment with one second length-specific and at least one non-compressible data fragment with one first length-specific; Should at least one packed data fragment, be reduced to and have this first length-specific, and have at least one compressible data fragment of full identical data value; And sequentially merge this at least one compressible data fragment and this at least one non-compressible data fragment with this first length-specific, have the first data of one first length with generation; Wherein, this second length-specific is less than this first length-specific.
The present invention also discloses a kind of code translator, includes a processor; One storage device stores a program code, and this program code is used to refer to this processor and carries out following steps: receive one second data with one second length; Obtain a coded data fragment of these the second data; According to this coded data fragment, in this second data, obtain at least one packed data fragment with one second length-specific and at least one non-compressible data fragment with one first length-specific; Should at least one packed data fragment, be reduced to and have this first length-specific, and have at least one compressible data fragment of full identical data value; And sequentially merge this at least one compressible data fragment and this at least one non-compressible data fragment with this first length-specific, have the first data of one first length with generation; Wherein, this second length-specific is less than this first length-specific.
Cooperate detailed description and claims of following diagram, embodiment at this, with on address other purpose of the present invention and advantage and be specified in after.
Description of drawings
Fig. 1 is the schematic diagram of the present invention's one coding flow process.
Fig. 2 is the schematic diagram of the present invention's one decoding flow process.
Fig. 3 is the schematic diagram that the decoding flow process of the coding flow process of Fig. 1 and Fig. 2 is used for data.
Fig. 4 A is the schematic diagram of coding flow process of the coding method of the embodiment of the invention.
Fig. 4 B is the schematic diagram of decoding flow process of the interpretation method of the embodiment of the invention.
Fig. 5 is the schematic diagram of the embodiment of the invention one coding/decoding device.
Wherein, description of reference numerals is as follows:
The X firsthand information
The Y coded data
SEG_cs compressible data fragment
SEG_cs ' packed data fragment
SEG_enc coded data fragment
50 coding/decoding devices
500 processing units
502 storage elements
504 program codes
Embodiment
Please refer to Fig. 1, Fig. 1 is the schematic diagram of coding (encoding) flow process 10 of the embodiment of the invention.Coding flow process 10 can be used to an initial data X encode and a coded data Y, and include following steps:
Step 100: receive the initial data X with first length n.
Step 102: initial data X is divided into a plurality of data slot SEG1-SEGk with one first length-specific b.
Step 104: in a plurality of data slot SEG1-SEGk, obtain at least one compressible data fragment SEG_cs with full identical data value and at least one non-compressible data fragment SEG_us that does not have full identical data value.
Step 106: compress this at least one compressible data fragment SEG_cs, to obtain at least one packed data fragment SEG_cs ' with one second length-specific c.
Step 108: according to position and the quantity of this at least one packed data fragment SEG_cs ', produce a coded data fragment SEG_enc.
Step 110: sequentially merge this at least one packed data fragment SEG_cs ', this at least one non-compressible data fragment SEG_us and this coded data fragment SEG_enc, the coded data Y that has one second length (n+a) with generation.
Step 112: finish.
Wherein, this second length-specific c is less than this first length-specific b.
Accordingly, please refer to Fig. 2, Fig. 2 is the schematic diagram of decoding (decoding) flow process 20 of the embodiment of the invention.Decoding flow process 20 can be used to the coded data Y of coding flow process 10 gained is deciphered, and reduction obtains initial data X, and includes following steps:
Step 200: beginning.
Step 202: receive the coded data Y with the second length (n+a).
Step 204: a coded data fragment SEG_enc who obtains coded data Y.
Step 206: according to coded data fragment SEG_enc, in coded data Y, obtain at least one packed data fragment SEG_cs ' with second length-specific c and have at least one non-compressible data fragment SEG_us of the first length-specific b.
Step 208: at least one packed data fragment SEG_cs ' is reduced to has the first length-specific b, and have at least one compressible data fragment SEG_cs of full identical data value.
Step 210: sequentially merge at least one compressible data fragment SEG_cs and at least one non-compressible data fragment SEG_us with first length-specific b, have the initial data X of the first length n with generation.
Step 212: finish.
Wherein, this second length-specific c is less than this first length-specific b.
At first, according to flow process 10, the present invention is to be first the data slot SEG1-SEGk that the initial data X of n position is divided into length b with length, will have the short packed data fragment SEG_cs ' of compressible data fragment SEG_cs boil down to length of full identical data value among the data slot SEG1-SEGk again.Then, quantity and position according to packed data fragment SEG_cs ', produce coded data fragment SEG_enc with quantity and the position of indication packed data fragment SEG_cs ', and merge packed data fragment SEG_cs ', non-compressible data fragment SEG_us and coded data fragment SEG_enc to obtain the coded data Y of total length (n+a).
Accordingly, according to flow process 20, when deciphering, obtain first the coded data fragment SEG_enc among the coded data Y of total length (n+a) position, obtain according to this again at least one packed data fragment SEG_cs ' and non-compressible data fragment SEG_us among the coded data Y.Then, packed data fragment SEG_cs ' can be reduced at least one compressible data fragment SEG_cs with full identical data value, and can further merge the initial data X that is reduced to script with non-compressible data fragment SEG_us.
Briefly, have more extra bits waste or have long consecutive identical value in transfer of data compared to known coding method, the difficulty of reduction clock or data when causing decoding, coding method of the present invention can effectively utilize the data space that the identical data value is saved in the compress, and encode with less extra adding position, to reduce the cost payout in the transmission, also can reduce by continuous 1 or 0 bit quantity, make transmission more efficient and alleviate the system requirements of receiving terminal clock and data recovery circuit.
Specifically, please refer to Fig. 3, Fig. 3 is the schematic diagram that the decoding flow process 20 of the coding flow process 10 of Fig. 1 and Fig. 2 is used for the initial data X of length n position is converted to the data Y of length (n+a).As shown in Figure 3, when coding, initial data X comprises the non-compressible data SEG_us of length (n-b) position and the compressible data fragment SEG_cs of a length b position, and it can be compressed into the packed data fragment SEG_cs ' of a length c position in cataloged procedure.Thus, among the coded data Y of gained, can save (b-c) individual position behind the coding of a extra bits of adding.Therefore, to there be (b-c+a) individual position to can be used as coded data fragment SEG_enc, it can be in decode procedure, and indication has the data slot SEG_cs ' of what compressions need be reduced back the information such as compressible data fragment SEG_cs of initial data X in coded data Y.Owing to compress in the cataloged procedure, save (b-c) individual position, so the present invention is with the less extra a position of comparable known technology adding, to reduce transmission cost.In Fig. 3, only comprise single compressible fragment SEG_cs as the example explanation take this initial data X, in fact can compressed fragment more, can stay more spaces for being the decoding restore information.
Therefore, Fig. 1,2 coding flow process 10 and decoding flow process 20 can be in cataloged procedures, the fragment that has repetition 0 or 1 in the compress, with the extra position that adds of effective utilization, to reduce the cost payout in the transmission, also can reduce by continuous 1 or 0 bit quantity, make transmission more efficient and alleviate the system requirements of receiving terminal clock and data recovery circuit.Should be noted that those skilled in the art can and decipher the data that flow process 20 is used for different length with coding flow process 10, also different partitioning schemes can be arranged, to meet the demand of different application.
For instance, please refer to table 1-1 and table 1-2, table 1-1 and table 1-2 are the coding schedule that coding flow process 10 shown in Figure 1 is used for one 16/17 (16B/17B) coding methods.As show shown in 1-1 and the table 1-2, length is 16 initial data X[0:15] can be encoded that to be converted to length be 17 coded data Y[0:16] (only need the data at 16 add an extra bits when namely encoding, a=1).Therefore, the excessive data that adds 1 in the 16B/17B coding method shown in table 1-1 and the table 1-2 is encoded, therefore the bits of coded waste (overhead) that causes only is 1/17=5.88%, and 7 continuous 0 or 1 same symbol (Continuous Identical Digit, CID) only may appear at the most.
Table 1-1
Table 1-2
Table 1-1 and table are listed 16 long initial data X[0:15 among the 1-2] various possible cases under corresponding coding result.Wherein d0-d15 represent respectively the coding before initial data X[0:15] each bit data value, Y0-Y16 is coded data Y[0:16 behind the representative coding respectively then] each bit data value, and the binary sequence of each row tail end namely represents the coded data fragment SEG_enc that should add under the situation in each in the table.In this embodiment, can be first with initial data X[0:15 during coding] be divided into four 4 long data slot SEG1-SEG4 (b=4), SEG1=X[0:3 wherein] (be firsthand information X[0:15] before four), by that analogy SEG2=X[4:7], SEG3=X[8-11] and SEG4=X[12-15].
For example, table 1-1 and the situation 1 of table among the 1-2 namely represent firsthand information X[0:15] each data fragment SEG1-SEG4 all without the situation that full 0 or complete 1 occur (being that data slot SEG1-SEG4 is non-compressible data fragment SEG_us), such as X[0:15]={ 1011001010100110}, and SEG1-SEG4={1011}, { 0010}, { 1010}, { 0110}.In the case, can be not compressed during coding, directly at initial data X[0:15] after add the coded data fragment SEG_enc={0} of an extra bits, with indication initial data X[0:15] in and uncompressed data fragment SEG_cs ', and the coded data Y[0:16 behind the generation coding]=X[0:15], 0}={10110010101001100}.
On the other hand, in the situation 4 in table 1-1 and table 1-2, firsthand information X[0:15] in data fragment SEG2 the data (be initial data X[0:15] comprise a compressible data fragment SEG_cs) of full 0 or complete 1 appear, X[0:15 for example]={ 1011000010100110}, and SEG1-SEG4={1011}, { 0000}, { 1010} and { 0110}.At this moment, because its content is full 0, fragment SEG2 is a compressible data fragment SEG_cs, and remainder data fragment SEG1, SEG3 and SEG4 then are non-compressible data fragment SEG_us.Therefore, can be with fragment SEG2={d4 when coding, d5, d6, the packed data fragment SEG2 ' of d7} boil down to length 1 (c=1)={ d4}={0} is with the fragment SEG2 of one originally content repetition of data replacement.Thus, after sequentially merging SEG1, SEG2 ', SEG3, SEG4, coded data Y[0:16] will still have Y[13:16] etc. 4 space can be for coded data fragment SEG_enc.In the present embodiment, coded data fragment SEG_enc can be set as 0011} is with indication coded data Y[0:16] contain a compression fragment SEG_cs ', and be the second fragment SEG2 among four fragment SEG1-SEG4.So firsthand information X[0:15]=will get Y[0:16 behind the 1011000010100110} coding]={ 10110101001100011}.
On the other hand, as the situation 10 of showing among 1-1 and the table 1-2 shows, initial data X[0:15] in data slot fragment SEG2, the SEG3 (namely having two compressible data fragment SEG_cs) of two full 0s or complete 1 also might be arranged, such as initial data X[0:15] be { 1011000011110110}, and SEG1-SEG4={1011}, { 0000}, { 1111}, { 0110}.At this moment, because its content is respectively full 0 and complete 1, fragment SEG2 and SEG3 are compressible data fragment SEG_cs, and remainder data fragment SEG1 and SEG4 then are non-compressible data fragment SEG_us.Therefore, can be with fragment SEG3={d8, d9, d10 when coding, the compression fragment SEG3 ' that d11} boil down to length is 1=d8}={1}, and with fragment SEG2={d4, d5, d6, the compression fragment SEG2 ' of d7} boil down to length 2 (c=2)={ d4, d4 ' }={ 01}.The complement code of Insert Here d4 (complement), can avoid occurring continuous 8 same-sign (CID=8) situation (for example SEG1={1000}, SEG2 '=0}, SEG3 '=0} and SEG4={0001}).Thus, the coded data Y[0:16 after after sequentially merging fragment SEG1, SEG2 ', SEG3 ', SEG4, must encoding] will still have Y[11:16] etc. 6 space can be for coded data fragment SEG_enc.In the present embodiment, coded data fragment SEG_enc can be set as 101001} is with indication coded data Y[0:16] and in include two compression fragments, it lays respectively among four fragment SEG1-SEG4 second and third position.
In addition, please refer to the situation 2 of showing among 1-1 and the table 1-2.When coding, the setting of coded data fragment SEG_enc must consider that also other may make consecutive identical symbol surpass 7 special case situation.For example, as initial data X[0:15]={ 0001001010101000}, then four fragment SEG1-SEG4={0001}, { 0010}, { 1010}, { 1000} is non-compressible fragment, if this moment encode fragment is made as SEG_enc=[0], then the coding after coded data Y[0:16] the four yards Y[13:16 in end]={ 0000}.Then, if the first data before the next coding are X[0:15]=0000000110111010} (situation 3 in the coding schedule), then the second data behind the coding will be Y[0:16]=00001101110100001}, its front four yards Y[0:3] also be { 0000}.Therefore, link the situation that will cause continuous eight same-sign (CID=8) after merging before and after the second data behind two codings.In the said circumstances, can will have the initial data X[0:15 of four non-compressible fragments] coded data Y[0:16 behind the coding] the four yards Y[13:16 in end]={ 0000} replaces with another particular sequence, such as { 1001} (table 1-1 and the situation 2 of table among the 1-2).
Specifically, Fig. 4 A, 4B are coding and the decoding detailed process schematic diagram of 16/17 (16B/17B) coding methods shown in table 1-1 and the table 1-2.Shown in Fig. 4 A, receive firsthand information X[0:15] after, judge respectively first whether data slot SEG1-SEG4 is compressible fragment SEG_cs, and judged result can be expressed as SEG_cs[0:3].Then, if SEG_cs[0:3]=0000} then represents X[0:15] without compressible fragment, so should belong to situation 1 or the situation 2 of showing among 1-1 and the table 1-2.Therefore, can further judge SEG4=X[12:15] whether meet the special case data fragment { 1000} that aforementioned meeting causes CID=8.If, then judge and should encode according to the situation 2 among table 1-1 and the table 1-2, if not, then belong to situation 1.Then, if SEG_cs[0:3] be not full 0 (there is at least one compressible fragment in representative), then further according to SEG_cs[0:3] judge remaining 15 kinds may, it corresponds to respectively situation 3 among table 1-1 and the table 1-2 to situation 17.Specifically, if SEG_cs[0:3] only have one " 1 " value (as 1000}, 0100}, 0010} or 0001}) then corresponding to the table 1-1 and the table 1-2 situation 3 to situation 6.If SEG_cs[0:3] have two 1 values (as 1100}, 1010}, 1001}, 0110}, 0101} or 0011}) then corresponding to the table 1-1 and the table 1-2 situation 7 to situation 12.If SEG_cs[0:3] have three 1 values (1110}, 1101}, 1011} or 0111}) then corresponding to the table 1-1 and the table 1-2 situation 13 to situation 16.At last, if SEG_cs[0:3] be 1 value entirely, then corresponding to the situation 17 of showing 1-1 and table 1-2.For example, if receive X[0:15]=0000000110111111}, then SEG_cs[0:3]=1001} is corresponding to the situation 9 among table 1-1 and the table 1-2, and Y[0:16 behind the coding] should be { 01000110111001101}.
Then, shown in Fig. 4 B, in when decoding, receive the coded data Y[0:16 after the decoding] after, can capture first its last code Y[16], if Y[16]=0, then can judge in the data without the compression fragment, and know that it is corresponding to the situation 1 of table 1-1 and table 1-2.If Y[16]=1, then further capture Y[12:15] to determine whether to show the special case situation 2 among 1-1 and the table 1-2.If Y[12:15] { 1100} then should decipher reduction according to special case situation 2 to meet the special case fragment.If not, further Y[10:13 relatively sequentially then] everybody, to judge that what include in the data compresses fragment and positions thereof.If Y[13]=0, then only include one group of compressible fragment in the representative data, this moment can be further according to Y[14,15] judge that the situation 3 that should be among table 1-1 and the table 1-2 is to the whichever of situation 6.Then, if Y[13]=1 and Y[12]=0, then include two groups of compressible fragments in the representative data, this moment can be further according to Y[11,14,15] judge that the situation 7 that should be among table 1-1 and the table 1-2 is to the whichever of situation 12.If Y[12,13]=1 but Y[11]=0, then include three groups of compressible fragments in the representative data, this moment can be further according to Y[10,14] judge that the situation 13 that should be among table 1-1 and the table 1-2 is to the whichever of situation 16.At last, if Y[11:13]=1 but Y[10]=0, represent then that four groups of fragment SEG1-SEG4 are compressible fragment in the raw data, it is corresponding to the situation 17 among table 1-1 and the table 1-2.For example, if receive Y[0:16]={ 01101010110011011}, then can judge Y[17]=1 and Y[12,13]=11} but Y[11]=0 and Y[14:15] be not equal to 00} (determining it is not situation 2), should corresponding to the situation 13 among table 1-1 and the table 1-2 to situation 16 wherein one.Since Y[10,14]={ 00} is so be the situation 13 among table 1-1 and the table 1-2.So former notebook data X[0:15] should be reduced to { 0000111111111011}.
Yet above-mentioned 16B/17B coding method only is one embodiment of the invention, and coding flow process 10 in fact of the present invention, decoding flow process 20 can be used for the coding and decoding of the data of different length.Please continue reference table 2, table 2 is the coding schedule of one 12/13 (12B/13B) coding methods of the embodiment of the invention.12B/13B coding method shown in the table 2 only adds 1 excessive data and encodes in 12 data, therefore attainable position waste (overhead) only is 1/13=7.7%, and at the most only may 6 continuous same symbols (CID=6) of 0 or 1 that occur.
Table 2
In the 16B/17B of above-described embodiment coding method and 12B/13B coding method, be first a plurality of data slots (as all being 4 data slot) of equal length with data group, yet also visual different application change to some extent.Please continue reference table 3-1 and table 3-2, table 3-1 and table 3-2 are the coding schedule according to one 24/25 (24B/24B) coding methods of the embodiment of the invention.As show shown in 3-1 and the table 3-2, in this embodiment, will want coded data X[0:23] first carry out group according to 4,5,5,5,5 method and cut apart, that is be divided into 5 data fragment SEG1-SEG5, SEG1=X[0:3 wherein], SEG2=X[4:8], SEG3=X[9:13], by that analogy.Table 3-1 and the 24B/24B coding method of table shown in the 3-2 only add 1 excessive data and encode in 24 data, therefore attainable position waste (overhead) only is 1/25=4%, and at the most only may 9 continuous same symbols (CID=9) of 0 or 1 that occur.
Table 3-1
Table 3-2
Further, table 4 is illustrated to show for the different coding method of the embodiment of the invention and the table of the coding techniques of known technology.As shown in table 4, though known 8B/10B coding method only has at the most 5 consecutive identical symbols (CID=5), waste rate in position is up to 20%.Though and known 64B/65B coding method only has 3% position waste rate, reaches as high as 65 consecutive identical symbols.In comparison, the present invention only need increase an extra bits in different embodiment, can realize the coding method of different data lengths, and all has moderate position waste rate and consecutive identical symbol.For example the 24B/25B coding method of the embodiment of the invention, 12B/13B coding method and 16B/17B coding method only have all far below the position waste rate in known 8B/10B coding method 20%, and also have far below the longest continuous 65 same-sign in known 64B/65B coding method.
Table 4
About the realization of coding flow process 10 and decoding flow process 20, can be with reference to figure 5.Fig. 5 is the schematic diagram of the embodiment of the invention one coding/decoding device 50.Coding/decoding device 50 includes a processing unit 500, a storage element 502 and a program code 504.Program code 504 is stored in the storage element 502, in order to realize coding flow process 10 and decoding flow process 20, with function and the associated change of indication processing unit 500 execution corresponding to coding flow process 10 and decoding flow process 20, thereby process the initial data X that coding/decoding device 50 receives, and coding produces coded data Y, or with the received code data Y, be reduced to initial data X with decoding.The skill that realizes coding flow process 10 and decoding flow process 20 by program code 504 should be that those skilled in the art knows, and is not repeated herein.Processing unit 500 and storage element 502 that it should be noted that coding/decoding device 50 can be realized by modes such as hardware, software, half firmwares, and be not subject to the limits.Coding/decoding device 50 can be with in various communicator or other the different electronic products.
Should be noted, spirit of the present invention is to utilize the data space that the identical data value is saved in the compress, encodes with less extra adding position, to reduce the cost payout in the transmission, and reduce by continuous 1 or 0 bit quantity, make transmission more efficient.Those skilled in the art is when modifying according to this or change, and is not subject to the limits.For example, the method that initial data is cut apart is not limited to five equilibrium to be cut apart, and cuts apart also indefinite of length.If contain a large amount of continuous symbols in the known initial data, then can increase cutting apart length, save to reach better space.And the content of coded data fragment also can be according to the different modes arrangement, and prerequisite is to cause long consecutive identical symbol when coded data merges before and after must considering.In addition, in other embodiments, do not limit yet a plurality of compression fragments are separated with the complementary data value.
In sum, have more extra bits waste or have long consecutive identical value in transfer of data compared to known coding method, the difficulty of reduction clock or data when causing decoding, coding method of the present invention can effectively utilize the data space that the identical data value is saved in the compress, and encode with less extra adding position, to reduce the cost payout in the transmission, also can reduce by continuous 1 or 0 bit quantity, make transmission more efficient and alleviate the system requirements of receiving terminal clock and data recovery circuit.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (20)
1. coding method includes:
Reception has one first data of one first length;
Be a plurality of data slots with one first length-specific with this first Data Segmentation;
In these a plurality of data slots, obtain at least one compressible data fragment with full identical data value and reach at least one non-compressible data fragment that does not have full identical data value;
Compress this at least one compressible data fragment, to obtain at least one packed data fragment with one second length-specific;
Position and a quantity according to this at least one packed data fragment produce a coded data fragment; And
Sequentially merge this at least one packed data fragment, this at least one non-compressible data fragment and this coded data fragment, have one second data of one second length with generation;
Wherein, this second length-specific is less than this first length-specific.
2. coding method as claimed in claim 1 is characterized in that, compresses this at least one compressible data fragment, to obtain the step of this at least one packed data fragment with this second length-specific, includes:
In respectively should at least one compressible data fragment, have this full identical data value of this first length-specific, boil down to length is this data value of this second length-specific or the complement code of this data value, to obtain this at least one packed data fragment.
3. coding method as claimed in claim 1 is characterized in that, compresses this at least one compressible data fragment, to obtain the step of this at least one packed data fragment with this second length-specific, includes:
In respectively should at least one compressible data fragment, this full identical data value with this first length-specific, boil down to length is half this data value of this second length-specific, and adding thereafter a complementary data value of this data value, to obtain this at least one packed data fragment.
4. coding method as claimed in claim 1, it is characterized in that, one data length of this coded data fragment is after this first length deducts a total data length of this at least one compressible data fragment and this at least one non-compressible data fragment, to add at least one extra bits.
5. coding method as claimed in claim 1 is characterized in that, sequentially merges this at least one packed data fragment, this at least one non-compressible data fragment and this coded data fragment, to produce the step of these the second data, includes:
When the full identical data value of this first length-specific appears continuously in the data tail end after sequentially merging this at least one packed data fragment, this at least one non-compressible data fragment and this coded data fragment, replace this continuous full identical data value with another specific pieces of data, to produce this second data.
6. code device includes:
One processor;
One storage device stores a program code, and this program code is used to refer to this processor and carries out following steps:
Reception has one first data of one first length;
Be a plurality of data slots with one first length-specific with this first Data Segmentation;
In these a plurality of data slots, obtain at least one compressible data fragment with full identical data value and reach at least one non-compressible data fragment that does not have full identical data value;
Compress this at least one compressible data fragment, to obtain at least one packed data fragment with one second length-specific;
Position and a quantity according to this at least one packed data fragment produce a coded data fragment; And
Sequentially merge this at least one packed data fragment, this at least one non-compressible data fragment and this coded data fragment, have one second data of one second length with generation;
Wherein, this second length-specific is less than this first length-specific.
7. code device as claimed in claim 6, it is characterized in that, this processor be respectively should at least one compressible data fragment in, this full identical data value with this first length-specific, boil down to length is this data value of this second length-specific, to obtain this at least one packed data fragment.
8. code device as claimed in claim 6, it is characterized in that, this processor be respectively should at least one compressible data fragment in, this full identical data value with this first length-specific, boil down to length is half this data value of this second length-specific, and adding thereafter a complementary data value of this data value, to obtain this at least one packed data fragment.
9. code device as claimed in claim 6, it is characterized in that, one data length of this coded data fragment is after this first length deducts a total data length of this at least one compressible data fragment and this at least one non-compressible data fragment, to add an extra bits.
10. code device as claimed in claim 6, it is characterized in that, when the full identical data value of this first length-specific appears continuously in the data tail end after this processor sequentially merges this at least one packed data fragment, this at least one non-compressible data fragment and this coded data fragment, this processor is to replace this continuous full identical data value with another specific pieces of data, to produce this second data.
11. an interpretation method includes:
Reception has one second data of one second length;
Obtain a coded data fragment of these the second data;
According to this coded data fragment, in this second data, obtain at least one packed data fragment with one second length-specific and at least one non-compressible data fragment with one first length-specific;
Should at least one packed data fragment, be reduced to and have this first length-specific, and have at least one compressible data fragment of full identical data value; And
Sequentially merge this at least one compressible data fragment and this at least one non-compressible data fragment with this first length-specific, have the first data of one first length with generation;
Wherein, this second length-specific is less than this first length-specific.
12. interpretation method as claimed in claim 11 is characterized in that, should at least one packed data fragment, and be reduced to and have this first length-specific, and have the step of this at least one compressible data fragment of full identical data value, include:
Obtain respectively a data value of each packed data fragment in this at least one packed data fragment, and with continuous this data value of this first length-specific, as this at least one compressible data fragment.
13. interpretation method as claimed in claim 11 is characterized in that, should at least one packed data fragment, and be reduced to and have this first length-specific, and have the step of at least one this compressible data fragment of full identical data value, include:
Obtain respectively a data value and a complementary data value of each packed data fragment in this at least one packed data fragment, and with continuous this each data value of this first length-specific, as this at least one compressible data fragment.
14. interpretation method as claimed in claim 11, it is characterized in that, this coded data fragment is used to refer to position and the quantity that this at least one packed data fragment is arranged in these the first data, and a data length of this coded data fragment is after this first length deducts a total data length of this at least one compressible data fragment and this at least one non-compressible data fragment, to add an extra bits.
15. interpretation method as claimed in claim 11 is characterized in that, receives the method for these the second data with this second length, includes:
When the tail end of this second data presents a particular profile fragment, this particular profile fragment is substituted by a data slot of the continuously full identical data value with this first length-specific.
16. a code translator includes:
One processor;
One storage device stores a program code, and this program code is used to refer to this processor and carries out following steps:
Reception has one second data of one second length;
Obtain a coded data fragment of these the second data;
According to this coded data fragment, in this second data, obtain at least one packed data fragment with one second length-specific and at least one non-compressible data fragment with one first length-specific;
Should at least one packed data fragment, be reduced to and have this first length-specific, and have at least one compressible data fragment of full identical data value; And
Sequentially merge this at least one compressible data fragment and this at least one non-compressible data fragment with this first length-specific, have the first data of one first length with generation;
Wherein, this second length-specific is less than this first length-specific.
17. code translator as claimed in claim 16, it is characterized in that, this processor is a data value of obtaining respectively each packed data fragment in this at least one packed data fragment, and with continuous this data value of this first length-specific, as this at least one compressible data fragment.
18. code translator as claimed in claim 16, it is characterized in that, this processor is a data value and a complementary data value that obtains respectively each packed data fragment in this at least one packed data fragment, and with continuous this each data value of this first length-specific, as this at least one compressible data fragment.
19. code translator as claimed in claim 16, it is characterized in that, this coded data fragment is used to refer to position and the quantity that this at least one packed data fragment is arranged in these the first data, and a data length of this coded data fragment is after this first length deducts a total data length of this at least one compressible data fragment and this at least one non-compressible data fragment, to add an extra bits.
20. code translator as claimed in claim 16, it is characterized in that, when the tail end of this second data presented a specific pieces of data, this processor was substituted by this specific pieces of data one data slot of the continuously full identical data value with this first length-specific.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210104936XA CN103368582A (en) | 2012-04-11 | 2012-04-11 | Data coding and decoding method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210104936XA CN103368582A (en) | 2012-04-11 | 2012-04-11 | Data coding and decoding method and device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN103368582A true CN103368582A (en) | 2013-10-23 |
Family
ID=49369236
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201210104936XA Pending CN103368582A (en) | 2012-04-11 | 2012-04-11 | Data coding and decoding method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN103368582A (en) |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103646121A (en) * | 2013-12-27 | 2014-03-19 | 税友软件集团股份有限公司 | Identifier code, application method and device |
| CN104811207A (en) * | 2014-01-24 | 2015-07-29 | 联发科技股份有限公司 | Transmitter apparatus, receiver apparatus, data compression method, and data decompression method |
| CN109347484A (en) * | 2018-11-05 | 2019-02-15 | 西安微电子技术研究所 | A kind of 64B/66B encoder tabled look-up based on second level and coding method |
| CN110474711A (en) * | 2018-05-11 | 2019-11-19 | 深圳市华星光电技术有限公司 | Coding method, equipment and readable storage medium storing program for executing |
| WO2021120223A1 (en) * | 2019-12-20 | 2021-06-24 | 华为技术有限公司 | Data sending unit, data receiving unit, data sending method, and data receiving method |
| CN113347667A (en) * | 2021-06-08 | 2021-09-03 | 武汉虹信科技发展有限责任公司 | Bit compression method and system for reporting UCI (uplink control information) |
| CN113557563A (en) * | 2019-03-14 | 2021-10-26 | 夏普Nec显示器解决方案株式会社 | Electronic device and control method of electronic device |
| WO2021237870A1 (en) * | 2020-05-27 | 2021-12-02 | 深圳市大疆创新科技有限公司 | Data encoding method, data decoding method, data processing method, encoder, decoder, system, movable platform, and computer-readable medium |
| CN113765620A (en) * | 2020-06-01 | 2021-12-07 | 南京大学 | Block compression coding method, apparatus, computer equipment and readable storage medium |
| CN114137348A (en) * | 2021-11-29 | 2022-03-04 | 国网湖南省电力有限公司 | Intelligent joint debugging acceptance method and acceptance equipment for power distribution terminal |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020191224A1 (en) * | 2001-05-25 | 2002-12-19 | Takahiro Yagishita | Image encoding method, image encoding apparatus and storage medium |
| CN101222637A (en) * | 2008-02-01 | 2008-07-16 | 清华大学 | Encoding method with signature |
| CN101729194A (en) * | 2008-11-03 | 2010-06-09 | 华为技术有限公司 | Methods, devices and system for coding and decoding data |
-
2012
- 2012-04-11 CN CN201210104936XA patent/CN103368582A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020191224A1 (en) * | 2001-05-25 | 2002-12-19 | Takahiro Yagishita | Image encoding method, image encoding apparatus and storage medium |
| CN101222637A (en) * | 2008-02-01 | 2008-07-16 | 清华大学 | Encoding method with signature |
| CN101729194A (en) * | 2008-11-03 | 2010-06-09 | 华为技术有限公司 | Methods, devices and system for coding and decoding data |
Cited By (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103646121A (en) * | 2013-12-27 | 2014-03-19 | 税友软件集团股份有限公司 | Identifier code, application method and device |
| CN103646121B (en) * | 2013-12-27 | 2016-03-16 | 税友软件集团股份有限公司 | A kind of identification code and using method and device |
| CN104811207A (en) * | 2014-01-24 | 2015-07-29 | 联发科技股份有限公司 | Transmitter apparatus, receiver apparatus, data compression method, and data decompression method |
| CN104811207B (en) * | 2014-01-24 | 2018-05-18 | 联发科技股份有限公司 | Transmitter apparatus, receiver apparatus, data compression method, and data decompression method |
| CN110474711A (en) * | 2018-05-11 | 2019-11-19 | 深圳市华星光电技术有限公司 | Coding method, equipment and readable storage medium storing program for executing |
| CN109347484A (en) * | 2018-11-05 | 2019-02-15 | 西安微电子技术研究所 | A kind of 64B/66B encoder tabled look-up based on second level and coding method |
| CN109347484B (en) * | 2018-11-05 | 2022-07-12 | 西安微电子技术研究所 | 64B/66B encoder based on two-stage table look-up and encoding method |
| CN113557563A (en) * | 2019-03-14 | 2021-10-26 | 夏普Nec显示器解决方案株式会社 | Electronic device and control method of electronic device |
| US11545058B2 (en) | 2019-03-14 | 2023-01-03 | Sharp Nec Display Solutions, Ltd. | Electronic device and control method for electronic device |
| CN113557563B (en) * | 2019-03-14 | 2023-05-12 | 夏普Nec显示器解决方案株式会社 | Electronic device and control method of electronic device |
| CN114730297A (en) * | 2019-12-20 | 2022-07-08 | 华为技术有限公司 | Data sending unit, data receiving unit, data sending method and receiving method |
| WO2021120223A1 (en) * | 2019-12-20 | 2021-06-24 | 华为技术有限公司 | Data sending unit, data receiving unit, data sending method, and data receiving method |
| WO2021237870A1 (en) * | 2020-05-27 | 2021-12-02 | 深圳市大疆创新科技有限公司 | Data encoding method, data decoding method, data processing method, encoder, decoder, system, movable platform, and computer-readable medium |
| CN113765620A (en) * | 2020-06-01 | 2021-12-07 | 南京大学 | Block compression coding method, apparatus, computer equipment and readable storage medium |
| CN113347667A (en) * | 2021-06-08 | 2021-09-03 | 武汉虹信科技发展有限责任公司 | Bit compression method and system for reporting UCI (uplink control information) |
| CN114137348A (en) * | 2021-11-29 | 2022-03-04 | 国网湖南省电力有限公司 | Intelligent joint debugging acceptance method and acceptance equipment for power distribution terminal |
| CN114137348B (en) * | 2021-11-29 | 2023-11-24 | 国网湖南省电力有限公司 | Intelligent joint debugging acceptance method and acceptance equipment for power distribution terminal |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103368582A (en) | Data coding and decoding method and device | |
| CN101702639B (en) | Check value calculation method and device of cyclic redundancy check | |
| CN103858433A (en) | Hierarchical entropy encoding and decoding | |
| CN104808966B (en) | The method and apparatus of efficient coding | |
| CN108737021B (en) | Polar code transmission method and device | |
| CN102970043B (en) | A kind of compression hardware system based on GZIP and accelerated method thereof | |
| CA3069482C (en) | Blockwise parallel frozen bit generation for polar codes | |
| KR102244117B1 (en) | Method and apparatus for processing rate matching of polar codes | |
| EP3528389A1 (en) | Methods and devices for encoding and decoding binary data | |
| CN103546161A (en) | Lossless compression method based on binary processing | |
| CN101022552A (en) | Method and device for realizing Hoffman decodeng | |
| CN1937582B (en) | Method for preprocessing data to be compressed and compressed data transmission method | |
| CN106656195A (en) | Data compression decompression method and data compression decompression system | |
| CN107347000A (en) | A kind of Encoding Realization method of the digital fountain code based on ARM | |
| CN101325418B (en) | Haffman quick decoding method based on probability table look-up | |
| CN111726312A (en) | Differential signal processing apparatus, method of operation thereof, and method of electronic signaling | |
| EP3614592A1 (en) | Encoding method and device | |
| CN102185612A (en) | Run-length coding and decoding methods and devices | |
| EP2621121A2 (en) | Supercharged codes | |
| US6101281A (en) | Method for improving data encoding and decoding efficiency | |
| KR101578608B1 (en) | Apparatus for data encoding for generating universal code and apparatus for data decoding | |
| CN105099571A (en) | Audio communication method | |
| CN102843153A (en) | Parallel encoder of RS (Reed-Solomon) codes with multiple code rates in CCSDS (Consultative Committee for Space Data System) and encoding method | |
| CN102318249A (en) | A kind of interweaving conciliate interweaving method, interleaver and deinterleaver | |
| KR101670606B1 (en) | Binary data compression and decompression method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20131023 |