Summary of the invention
In order to solve the problems in the prior art, the present invention provides a kind of network codes based on cyclic permutation matrices
Method.
A method of the network code based on cyclic permutation matrices, cataloged procedure include the following steps:
Original message is divided into k isometric data packets, uses C respectively by the first step1, C2..., CkIt indicates, each data packet
Length is L, wherein CiIn data element Si,j∈ { 0,1 } indicates CiIn jth position, i ∈ { 1,2,3 ..., k }, j ∈ 0,1,
2,...,L-1};
Second step takes systematic code frame C1,C2..., CkFor k original non-coding packets, all original disappear is contained
Breath, it is the basis of rear n-k check code packet;
Third step, coding checkout code block, rear n-k are known as check code packet, use Ck+1,Ck+2,...,CnIt indicates, by preceding k
The code word that exclusive or generates by turn after a non-coding packet displacement is constituted.
As a further improvement of the present invention, in order to guarantee zigzag decoding and MDS property, using cyclic permutation matrices T,
Each of non-coding packet element is all moved to right into specific bit by matrix row vector, it is then that the element after moving to right is different by turn by arranging
Or.
As a further improvement of the present invention, the specific bit such as cyclic permutation that each non-coding element is moved to right by row vector
Matrix T indicates that (i, j) a element representation wraps C to coding in matrixi+kIn jth row element move to right specific bit, pass through this advise
Then complete to Ci+kCoding, i ∈ { 1,2,3 ..., n-k }, j ∈ { 1,2,3 ..., k }.
As a further improvement of the present invention, in cyclic permutation matrices T, any row or column is all without identical number
Word;In cyclic permutation matrices T, the element that the difference of any two column is included is different from.
As a further improvement of the present invention, cyclic permutation matrices T following k*k matrix when n is maximum value 2k;When n is small
When 2k, the n-k row in k row is arbitrarily taken, composition matrix is (n-k) * k matrix.K*k matrix T is:
The present invention also provides a kind of systems of network code based on cyclic permutation matrices, including:
Divide module, original message is divided into k isometric data packets, uses C respectively1, C2..., CkIt indicates, each data
Packet length is L, wherein CiIn data element Si,j∈ { 0,1 } indicates CiIn jth position, i ∈ { 1,2,3 ..., k }, j ∈ 0,
1,2,...,L-1};
Processing module takes systematic code frame, C for taking systematic code frame1,C2..., CkFor k original non-codings
Packet, contains all origination messages, it is the basis of rear n-k check code packet;
Generation module is used for coding checkout code block, and rear n-k are known as check code packet, uses Ck+1,Ck+2,...,CnIt indicates,
By the code word that exclusive or generates by turn after the displacement of preceding k non-coding packet.
As a further improvement of the present invention, in order to guarantee zigzag decoding and MDS property, using cyclic permutation matrices T,
Each of non-coding packet element is all moved to right into specific bit by matrix row vector, it is then that the element after moving to right is different by turn by arranging
Or.
As a further improvement of the present invention, the specific bit such as cyclic permutation that each non-coding element is moved to right by row vector
Matrix T indicates that (i, j) a element representation wraps C to coding in matrixi+kIn jth row element move to right specific bit, pass through this advise
Then complete to Ci+kCoding, i ∈ { 1,2,3 ..., n-k }, j ∈ { 1,2,3 ..., k }.
As a further improvement of the present invention, in cyclic permutation matrices T, any row or column is all without identical number
Word;In cyclic permutation matrices T, the element that the difference of any two column is included is different from.
As a further improvement of the present invention, cyclic permutation matrices T following k*k matrix when n is maximum value 2k;When n is small
When 2k, the n-k row in k row is arbitrarily taken, composition matrix is (n-k) * k matrix.K*k matrix T is:
The beneficial effects of the invention are as follows:In the present invention, by cyclic permutation matrices T, to message element in binary field
Element is encoded, it is made to meet MDS (n, k) property;By XOR operation after ingenious displacement make can zigzag decoding, reduce
Decoding complex degree;In addition, in an encoding process, the additional redundancy expense of check code packet is allBit is both saved and is deposited
Space is stored up, and the overhead of each memory node is made to keep symmetrical.
Specific embodiment
The invention discloses a kind of method and system of network code based on cyclic permutation matrices, in the method, if
Count ZD-MDS (n, k) (k>4, k≤n≤2k) code, cataloged procedure includes the following steps:
Original message is divided into k isometric data packets, uses C respectively by the first step1, C2..., CkIt indicates, each data packet
Length is L, wherein CiIn data element Si,j∈ { 0,1 } indicates CiIn jth position, i ∈ { 1,2,3 ..., k }, j ∈ 0,1,
2,...,L-1};
Second step takes systematic code frame C1,C2..., CkFor k original non-coding packets, all original disappear is contained
Breath, it is the basis of rear n-k check code packet;
Third step, coding checkout code block, rear n-k are known as check code packet, use Ck+1,Ck+2,...,CnIt indicates, by preceding k
The code word that exclusive or generates by turn after a non-coding packet displacement is constituted.
Detailed code construction:
This part, will be described in detail ZD-MDS (n, k) (k>4, k≤n≤2k) code code construction, be discussed in detail how
Use C1, C2..., CkThis k non-coding packet constitutes Ck+1,Ck+2,...,CnThe detailed process of this n-k check code packet.
In order to guarantee zigzag decoding and MDS property, using cyclic permutation matrices T, by each of non-coding packet member
Element all moves to right specific bit by matrix row vector, then by the element after moving to right by column exclusive or by turn.
Each non-coding element is indicated by the specific bit such as cyclic permutation matrices T that row vector moves to right, in matrix (i, j)
A element representation wraps C to codingi+kIn jth row element move to right specific bit, by this rule complete to Ci+kCoding, i ∈ 1,
2,3 ..., n-k }, j ∈ { 1,2,3 ..., k }.
T in cyclic permutation matrices, the first row (0,1,3,6,10 ...,) indicate check code packet Ck+1In structure
Elements C1To Ck0,1,3,6,10 is moved to right respectively ...,Position, it can be seen that the element of every a line and each column is all in accordance with this
Corresponding element carries out circulation change in matrix, therefore our this matrix is referred to as cyclic permutation matrices.Coding as shown in Figure 1
The result is that n take 10, k take 5 special case, i.e. ZD-MDS (10,5) code.It is every after encoding when node stores check code packet
One column store result after carrying out exclusive or by turn.
In cyclic permutation matrices, every a line is all the digit ring shift right institute by the first row other than the first row
?.
In cyclic permutation matrices, the first row is known as to the base vector of matrix T, by base vector it can be seen that the first two component
It is formed by 0,1, it is big between translocation distance ratio m and the m-1 between m and m+1 component.
In cyclic permutation matrices, data packet more storage overheads additionally on the basis of former non-coding packet are verified,
All k verification packet overhead digits be fixed forPosition saves one compared in zigzag decode (ZD) code
Half, the expense in zigzag decode (ZD) code is (n-k) (k-1)
In cyclic permutation matrices, we obtain a vector as difference to any two column, wherein without identical element, using this
Cyclic permutation matrices are 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, will have k node cannot decode
Occur the case where prime information out
A kind of system of network code based on cyclic permutation matrices is also disclosed, including:
Divide module, for original message to be divided into k isometric data packets, uses C respectively1, C2..., CkIt indicates, it is each
Data packet length is L, wherein CiIn data element Si,j∈ { 0,1 } indicates CiIn jth position, i ∈ { 1,2,3 ..., k }, j ∈
{0,1,2,...,L-1};
Processing module, for taking systematic code frame, C1,C2..., CkFor k original non-coding packets, contain all
Origination message, it is the basis of rear n-k check code packet;
Generation module, coding checkout code block, rear n-k are known as check code packet, use Ck+1,Ck+2,...,CnIt indicates, by preceding
The code word that exclusive or generates by turn after k non-coding packet displacement is constituted.
Within the system, in order to guarantee zigzag decoding and MDS property will be in non-coding packet using cyclic permutation matrices T
Each element move to right specific bit by matrix row vector, then by the element after moving to right by column exclusive or by turn.
Within the system, each non-coding element is indicated by the specific bit such as cyclic permutation matrices T that row vector moves to right, square
(i, j) a element representation wraps C to coding in battle arrayi+kIn jth row element move to right specific bit, by this rule complete to Ci+k's
Coding, i ∈ { 1,2,3 ..., n-k }, j ∈ { 1,2,3 ..., k }.
Within the system, in cyclic permutation matrices T, any row or column is all without identical number;In cyclic permutation
In matrix T, the element that the difference of any two column is included is different from.
Within the system, cyclic permutation matrices T following k*k matrix when n is maximum value 2k;When n is less than 2k, arbitrarily
The n-k row in k row is taken, composition matrix is (n-k) * k matrix.K*k matrix T is:
In the present invention, with ZD-MDS (10,5) for example, including the following steps with cataloged procedure:
Raw information is divided into 5 isometric packets, uses C respectively by the first step1、C2、C3、C4、C5It indicates, the length of each packet
For L;
Second step takes systematic code frame, C1、C2、C3、C4、C5For 5 original non-coding data packets, it is 5 after coding
The basis of check code word;
5 test code packets of third step, generation use C respectively6、C7、C8、C9、C10It indicates, this 5 packets are check code
Packet, by C1、C2、C3、C4、C5It is constituted for 5 non-coding packets.
In the present invention, C1、C2、C3、C4、C5Referred to as non-coding packet, C6、C7、C8、C9、C10Referred to as check code packet.
Zigzag decoding is sawtooth pattern decoding.
The zigzag decoding (ZD-MDS) with MDS property is described below:
Decoding technique in this construction code of the invention still continues to use zigzag decoding, and decoding order is all from the left side
It successively decodes to the right.As soon as then this position subtracts in verification is wrapped when can decode in former data packet comes.Its
Decoding process is illustrated according to (10,5) code.
MDS the and zigzag property of ZD-MDS (10,5) code:Known arbitrary 5 data packets, can recover all
Data packet.Assuming that original encoding packet is C1To C5, check code packet is C6To C10.If known five data packets are:C3、C5、C6、
C7、C9, because of C3、C5It is known that so C6、C7、C9In component s3,jAnd s5,jIt deletes, it is only necessary to decode C1、C2、C4In group
Code can be solved out by part.Specific coding/decoding method and sequence are according to shown in Fig. 2:
As known C6、C7、C9, binary system exclusive or between component, by 0,1 composition, S1,1For C6In first C6,1, such as
Fruit C6It is known that then first can decode first come, be marked with runic 1;S2,1For C7In first, C7It is known that then S2,1
It can decode and, be marked with runic 2;Similarly decode S4,1, it is labeled as 3;S1,2With S2,1Result after exclusive or is C6,2, C6?
Know, then C6,2It is known that s2,1It decodes and in order, then s1,2It can calculate, be labeled as 4 with runic.From left to right successively
It can decode and if only one is unknown for exclusive or item according to the superposition exclusive or decoding of each list.Final decoding from a left side to
Right sequence is according to shown in Fig. 2.
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.
In the present invention, by cyclic permutation matrices T, message element is encoded in binary field, makes its satisfaction
MDS (n, k) property;By XOR operation after ingenious displacement make can zigzag decoding, reduce decoding complex degree;In addition,
In cataloged procedure, the additional redundancy expense of check code packet is allBit not only saves memory space, but also makes each deposit
The overhead for storing up node keeps 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.