Summary of the invention
In order to solve the problems in the prior art, the present invention provides a kind of methods of network code.
The present invention provides a kind of method of network code, cataloged procedure includes the following steps:
Raw information is divided into 4 isometric packets, uses C respectively by the first step1、C2、C3、C4It indicates, the length of each packet is
L, wherein CiIn sij∈ { 0,1 } indicates CiIn jth position, i ∈ { 1,2,3,4 }, j ∈ { 0,1,2 ... L-1 };
Second step takes systematic code frame, C1、C2、C3、C4For 4 original non-coding packets, it is four verifications after coding
Encode the basis of packet;
Third step, four data packets generated afterwards use C respectively5、C6、C7、C8It indicating, this 4 packets are check code packet, by
C1、C2、C3、C4The code word that exclusive or obtains by turn after 4 non-coding packet displacements is constituted.
As a further improvement of the present invention, it is being set with MDS characteristic using permutation matrix to guarantee that zigzag is decoded
It changes in matrix and implements staggeredly to shift, each of non-coding packet element is all moved to right into specific bit first, it then will be all these
By the result element that moves to right all exclusive or by turn.
As a further improvement of the present invention, in permutation matrix, the result after the displacement of each non-coding data packet is used
Staggeredly the matrix in shift replacement matrix table indicates, (i, j) a element representation wraps C to coding in matrixi+4Middle jth row element
The digit of right shift is completed by this rule to Ci+4Coding, i, j ∈ { 1,2,3,4 }.
As a further improvement of the present invention, in staggeredly shift replacement matrix table, any row or column is not identical
Number, it means that there is no the transfers of identical bit number, avoid un-decodable;In addition, in staggeredly shift replacement matrix table
In, the element that the difference of any two column is included is all different.
As a further improvement of the present invention, staggeredly shift replacement matrix table is as follows:
0 |
1 |
3 |
2 |
2 |
0 |
1 |
3 |
3 |
2 |
0 |
1 |
1 |
3 |
2 |
0 |
The present invention also provides a kind of systems of network code, including:
Divide module and uses C respectively for raw information to be divided into 4 isometric packets1、C2、C3、C4It indicates, each packet
Length is L, wherein CiIn sij∈ { 0,1 } indicates CiIn jth position, i ∈ { 1,2,3,4 }, j ∈ { 0,1,2 ... L-1 };
Processing module, for taking systematic code frame, C1、C2、C3、C4For 4 original non-coding packets, it is four after coding
The basis of a verification packet code word;
Generation module generates four data packets and uses C respectively after being used for5、C6、C7、C8It indicates, this 4 packets are check code
Packet, by C1、C2、C3、C4The code word that exclusive or obtains by turn after 4 non-coding packet displacements is constituted.
As a further improvement of the present invention, it is being set with MDS characteristic using permutation matrix to guarantee that zigzag is decoded
It changes in matrix and implements staggeredly to shift, each of non-coding packet element is all moved to right into specific bit first, it then will be all these
By the result element that moves to right all exclusive or by turn.
As a further improvement of the present invention, in permutation matrix, the result after each uncoded data packet displacement is used
Staggeredly the matrix in shift replacement matrix table indicates, (i, j) a element representation wraps C to coding in matrixi+4Middle jth row element
The digit of right shift is completed by this rule to Ci+4Coding, i, j ∈ { 1,2,3,4 }.
As a further improvement of the present invention, in staggeredly shift replacement matrix table, any row or column is not identical
Number, it means that there is no the transfers of identical bit number, avoid un-decodable;In addition, in staggeredly shift replacement matrix table
In, the element that the difference of any two column is included is all different.
As a further improvement of the present invention, staggeredly shift replacement matrix table is as follows:
0 |
1 |
3 |
2 |
2 |
0 |
1 |
3 |
3 |
2 |
0 |
1 |
1 |
3 |
2 |
0 |
The beneficial effects of the invention are as follows:In the present invention, it by permutation matrix, staggeredly shifts, to original in binary field
Beginning message is encoded, and makes it have MDS property, then use sawtooth pattern (zigzag) decoding technique, reduces decoding complex degree, also
So that additional redundant space is 3bit.Both memory space is saved, and makes the overhead holding pair of each memory node
Claim.
Specific embodiment
The invention discloses a kind of method and systems of network code, and cataloged procedure includes the following steps in the method:
Raw information is divided into 4 isometric packets, uses C respectively by the first step1、C2、C3、C4It indicates, the length of each packet is
L, as shown in Fig. 2, wherein CiIn sij∈ { 0,1 } indicates CiIn jth position, i ∈ { 1,2,3,4 }, j ∈ 0,1,2 ... L-
1};
Second step takes systematic code frame, C1、C2、C3、C4For 4 original non-coding packets, it is 4 verifications volumes after coding
The basis of code packet code word;
Third step, four data packets generated afterwards use C respectively5、C6、C7、C8It indicating, this 4 packets are check code packet, by
C1、C2、C3、C4The code word that exclusive or obtains by turn after 4 non-coding packet displacements is constituted.
Detailed code construction citing:
This part will provide and how use C1C2C3C44 basic non-coding packets constitute C5C6C7C8Detailed process.
It is in order to guarantee zigzag (sawtooth pattern) decoding and MDS characteristic, each of uncoded packet element is all right first
Specific bit is moved, digit is all unequal, therefore the coding packet obtained is likely to mutually independent.Then by all these by moving to right
The code word obtained afterwards is stored in check code packet after exclusive or by turn.
Matrix expression of the result in staggeredly shift replacement matrix table (table 1) after the displacement of each non-coding data packet,
(i, j) a element representation wraps C to coding in matrixi+4In j-th of structural element displacement digit, pass through this rule complete pair
Ci+4Coding, i, j ∈ { 1,2,3,4 }.
Such as:The first row (0,1,3,2) represents coding packet C5Middle structural element C1To C4Ring shift right 0,1,3,2 respectively,
As can be seen that the element of every a line and each column is changed all in accordance with corresponding element in the matrix, therefore we claim this
Matrix is permutation matrix, and for obtained coding result as shown in Figure 1, in Fig. 1, each column in coding packet represent related digit
Phase exclusive or as a result, such as c5First be s1,0, second S1,1With S2,0Exclusive or as a result, successively depositing after exclusive or by turn
Storage.
From in table 1, we obtain a vector as difference to any two column, wherein being interlocked without identical element using being somebody's turn to do
Shift replacement matrix is encoded, and the pattern of coding is sawtooth pattern, and when decoding can be decoded using zigzag, in addition, the code has
There is MDS property, is not in un-decodable situation.If two column make difference after vector element have it is identical, illustrate two column place
Row relative shift of code word in coding is identical, then cannot be guaranteed sawtooth pattern in decoding, and will exist cannot decode former letter
The case where breath, occurs.
0 |
1 |
3 |
2 |
2 |
0 |
1 |
3 |
3 |
2 |
0 |
1 |
1 |
3 |
2 |
0 |
Table 1
In table 1, C1To C4C is constituted by successively shifting5To C8Shift replacement matrix.In permutation matrix, displacement
Number staggeredly changes.
In staggeredly shift replacement matrix table, verifies data packet more storages additionally on the basis of former non-coding packet and open
Pin, it is 3 that all 4 verifications packet overhead digits, which are fixed, compares zigzag decode (ZD) (8,4) code, ZD (8,4)
Expense in code is 12.
In staggeredly shift replacement matrix table, any row or column does not have identical number, it means that there is no phases
Same bit number transfer, avoids un-decodable;In addition, in staggeredly shift replacement matrix table, the difference of any two column is included
Element is all different, this also avoids un-decodable, ensure that zigzag is decoded.
A kind of system of network code is also disclosed, including:
Divide module and uses C respectively for raw information to be divided into 4 isometric packets1、C2、C3、C4It indicates, each packet
Length is L, wherein CiIn sij∈ { 0,1 } indicates CiIn jth position, i ∈ { 1,2,3,4 }, j ∈ { 0,1,2 ... L-1 };
Processing module, for taking systematic code frame, C1、C2、C3、C4For 4 original non-coding packets, it is four after coding
The basis of a verification packet code word;
Generation module generates four data packets and uses C respectively after being used for5、C6、C7、C8It indicates, this 4 packets are check code
Packet, by C1、C2、C3、C4The code word that exclusive or obtains by turn after 4 non-coding packet displacements is constituted.
Within the system, implement in permutation matrix with MDS characteristic using permutation matrix to guarantee that zigzag is decoded
It staggeredly shifts, each of non-coding packet element is all moved to right into specific bit first, then by all these by moving to right to obtain
Result element all exclusive or by turn.
Within the system, matrix of the result in the shift replacement matrix table that interlocks after each uncoded data packet displacement
It indicates, (i, j) a element representation wraps C to coding in matrixi+4The digit of middle jth row element right shift, it is complete by this rule
Pairs of Ci+4Coding, i, j ∈ { 1,2,3,4 }.
Within the system, any row or column does not have identical number, it means that there is no identical bit numbers to turn
It moves, avoids un-decodable;In addition, the element that the difference of any two column is included is all different in staggeredly shift replacement matrix table.
Within the system, staggeredly shift replacement matrix table is as follows:
0 |
1 |
3 |
2 |
2 |
0 |
1 |
3 |
3 |
2 |
0 |
1 |
1 |
3 |
2 |
0 |
The zigzag decoding (ZD-MDS) with MDS property is described below:
Here mainly illustrate in entire decoding process, using the property of MDS in the decoded situation of zigzag, to ZD-MDS
In the visual interpretation of (8,4) code property such as Fig. 2, it is known that any 4 data packets in 8 data packets can restore all original
Non-coding bag data.Here there are 4 class situations:
1,4 check code packets are unspoiled;
2,3 check code packets and 1 uncoded packet are unspoiled;
3,2 check code packets and 2 uncoded packets are unspoiled;
4,1 check code with and 3 it is uncoded packet be unspoiled;
Hereinafter, we will enumerate one of situation and explain in detail:
Type Isosorbide-5-Nitrae coding packet be it is unspoiled, be equivalent to C5To C8Be it is unspoiled, with reference to the left side Fig. 2 XOR operation only
Having a unknown data markers is that oblique line fills frame, and the part is as sawtooth pattern.As long as oblique line is filled where the position of collimation mark note
Coding packet is it is known that then the position decodes to come first.From left to right overstriking font digital representation successively is used in decoding order such as Fig. 2
Out.Detailed decoding process is as follows:It can be it is known that we can be by S because oblique line filling frame portion is divided into1,0With overstriking font mark
It is denoted as 1, likewise, S2,0It can be from C6First in recover, with overstriking font tags be 2.Method decodes respectively according to this
S out3,0And S4,0, it is 3,4 with overstriking font tags.The S come will be decoded again2,0It is updated to middle C5Second, can decode
S1,2, it is 5 with overstriking font tags, other all data bit is successively finally decoded according to this method.It is observed that
If known bits are substituted into certain point by us in this decoding process, each unknown position can be resumed, this mistake
Journey in fact quite slow detour, therefore the referred to as i.e. zigzag decoding of sawtooth pattern decoding.Other three kinds of situations also can be solved successively
Code comes out.
In the present invention, ZD-MDS (8, a 4) code is devised, (n, k)=(8,4), it possesses MDS property and zigzag
Decoding.
In the present invention, C1、C2、C3、C4Referred to as non-coding packet, C5、C6、C7、C8Referred to as check code packet.
Zigzag decoding technique is described below:
As liner code, decoding process is equivalent to solution system of linear equations.It mainly include two processes:Step 1, according to first
Coefficient matrix is converted into simplifying stepped matrix by equal rows operation;Step 2 retreats substitution and successively finds out according to stepped matrix
Known bits position.Step 1 elapsed time is more, therefore our being encoded to of designing is steps, and without step 1, if energy
Enough to decode prime information according to retrogressing substitution method, then this coding/decoding method is known as zigzag decoding (ZD).
We illustrate Zigzag decoding process with example below, if Fig. 3 is the decoding process of (4,2) code.Firstly, by former
The information of beginning is divided into the data packet of two a length of L, i.e. C1And C2。CiElement S in coding packeti,j∈ { 0,1 } indicates CiIn
Jth position, i ∈ { 1,2 }.The two data packets contain the bit of prime information, referred to as non-coding packet.In this example, I
L be assumed to be 4.C3And C4It is for calculating non-coding packet, by constituting the displacement of non-coding packet and binary addition, referred to as
Coding packet.C3It is by C1And C20 is moved to right respectively, then again by column data exclusive or by turn.C4It is by non-coding packet C1And C2Respectively
0 and 1 are moved to right, then again by column data exclusive or by turn.The C of generation3And C4Data length be respectively L=4, L=5.
Assuming that we want from C3And C4Original information is decoded in coding packet, that is, decodes C1And C2It needs as shown in the figure
Zigzag decoding technique.The decoded sequence of digital representation inside bracket, it is known that C4, because of C4First with other letter
No add operation is ceased, so decoding S first1,1,S1,1Bracketed indications be 1;The S that will be decoded1,1It is updated to C3In
One, S1,1It is known that then XOR operation can decode S2,1Therefore S2,1Labeled as 2;S1,2It can be from C4In decode come, will
S1,2Labeled as 3;Then S2,2Labeled as 4;Raw information is successively recovered according to this coding/decoding method.
Coding of the invention has following property:Binary field operation, MDS characteristic, zigzag decoding, overhead digit are symmetrical.
In the present invention, it by permutation matrix, staggeredly shifts, origination message is encoded in binary field, make it
With MDS property, then sawtooth pattern (zigzag) decoding technique is used, reduces decoding complex degree, also make additional redundant space
For 3bit.Both memory space is saved, and the overhead of each memory node is made to keep symmetrical.
The above content is a further detailed description of the present invention in conjunction with specific preferred embodiments, and it cannot be said that
Specific implementation of the invention is only limited to these instructions.For those of ordinary skill in the art to which the present invention belongs, exist
Under the premise of not departing from present inventive concept, a number of simple deductions or replacements can also be made, all shall be regarded as belonging to of the invention
Protection scope.