CN104915699A - Matrix two-dimensional code RS decoding error correction method based on improved GS algorithm - Google Patents

Matrix two-dimensional code RS decoding error correction method based on improved GS algorithm Download PDF

Info

Publication number
CN104915699A
CN104915699A CN201510263384.0A CN201510263384A CN104915699A CN 104915699 A CN104915699 A CN 104915699A CN 201510263384 A CN201510263384 A CN 201510263384A CN 104915699 A CN104915699 A CN 104915699A
Authority
CN
China
Prior art keywords
polynomial
code
algorithm
binary
error correction
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.)
Granted
Application number
CN201510263384.0A
Other languages
Chinese (zh)
Other versions
CN104915699B (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.)
SYSU HUADU INDUSTRIAL SCIENCE AND TECHNOLOGY INSTITUTE
National Sun Yat Sen University
Original Assignee
SYSU HUADU INDUSTRIAL SCIENCE AND TECHNOLOGY INSTITUTE
National Sun Yat Sen University
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 SYSU HUADU INDUSTRIAL SCIENCE AND TECHNOLOGY INSTITUTE, National Sun Yat Sen University filed Critical SYSU HUADU INDUSTRIAL SCIENCE AND TECHNOLOGY INSTITUTE
Priority to CN201510263384.0A priority Critical patent/CN104915699B/en
Publication of CN104915699A publication Critical patent/CN104915699A/en
Application granted granted Critical
Publication of CN104915699B publication Critical patent/CN104915699B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Error Detection And Correction (AREA)

Abstract

The invention provides a matrix two-dimensional code RS decoding error correction method based on an improved GS algorithm. The improved GS algorithm can reduce the complexity of interpolation, so that the efficiency of the algorithm can be improved. Meanwhile, the decoding error correction method studies two encoding modes and a transformation relation thereof of RS codes, so that correction can be carried out on the RS codes by using the transformation process of the two encoding modes, and two-dimensional codes are also enabled to restore original information correctly when circumstances such as dropping, stains, punching, local damages and the like occur.

Description

Based on the matrix two-dimensional code RS decoding error correction method of the GS algorithm improved
Technical field
The present invention relates to Quick Response Code field, more specifically, relating to a kind of matrix two-dimensional code RS decoding error correction method of the GS algorithm based on improving.
Background technology
Quick Response Code has that memory data output is large, confidentiality is high, traceability is high, damage resistance is strong, redundant is large, cost is cheap, interactive strong, the feature such as experience property is good, and can organically combine with the mobile terminal such as smart mobile phone better.According to the coding principle of Quick Response Code, the difference of planform, Quick Response Code can be divided into capable row's formula Quick Response Code and matrix two-dimensional code.Wherein matrix two-dimensional code is higher than the information density of row row formula Quick Response Code, and therefore its range of application is comparatively extensive, and representational matrix two-dimensional code has DataMatrix, MaxiCode, CodeOne, QRCode etc.The introducing of error correcting technique is one of principal feature of Quick Response Code, and owing to using RS systematic code in conventional matrix two-dimensional code, therefore involved decoding error correction algorithm is RS decoding error correction algorithm.
Summary of the invention
The invention provides a kind of matrix two-dimensional code RS decoding error correction method of the GS algorithm based on improving, the GS algorithm improved can reduce the complexity of interpolation, therefore the efficiency of algorithm can be improved, the error correction method of decoding is simultaneously studied two of RS code kinds of coded systems and transforming relationship thereof, thus utilize the conversion process of two kinds of coded systems to correct RS code, make Quick Response Code occurring coming off, stain, the situation such as perforation and local damage time, correctly can reduce raw information.
For realizing above goal of the invention, the technical scheme of employing is:
Based on a matrix two-dimensional code RS decoding error correction method for the GS algorithm improved, the GS algorithm wherein improved comprises Kotter interpolation algorithm and the Roth-Ruckenstein factoring algorithm of improvement, it is characterized in that: described error correction method comprises the following steps:
S1. mask process is gone to image in 2 D code, obtain RS (n, the k) code after removing mask, fill (255-n) individual zero in the last position of RS (n, k) code, structure RS (255,255+k-n) code;
S2. code word RS (255,255+k-n) is passed through in conjunction with finite field gf (q m) middle nonzero element (x 0, x 1..., x 255+k-n-1) form 255+k-n interpolation point (x 0, r 0), (x 1, r 1) ..., (x 255+k-n-1, r 255+k-n-1), then based on (1, k-1)-weighting dictionary inverted sequence table by each interpolation point at least interpolation build a binary polynomial for m time, wherein m is interpolation severe;
S3. utilize the Kotter interpolation algorithm of improvement to ask for minimal polynomial, detailed process is as follows:
S31. first formula is passed through initialization one group of binary polynomial, wherein for initialized jth bar binary polynomial, l mfor the number of this group binary polynomial, for the set of the binary polynomial composition after initialization, i kfor iterations, now i k=0;
S32. formula is passed through cancellation set interior first rank are greater than the binary polynomial of C, wherein C = n m + 1 2 ;
S33. formula is passed through right in the Hasse mixed partial derivative of each binary polynomial calculate, then judge set in the Hasse mixed partial derivative of all binary polynomials whether all equal 0, if all equal 0, then carry out step S36, if be not congruent to 0, carry out step S34;
S34. ask for the minimal polynomial in this group binary polynomial, be shown below:
f = min j ∈ J i k g i k , j
j * = arg min j ∈ J i k g i k , j
Wherein f is the minimal polynomial in this group binary polynomial, j *for the sequence number that minimal polynomial is corresponding;
S35. carry out conversion amendment to the minimal polynomial in this group binary polynomial, formula is as follows:
g i k + 1 , j * = [ xf , f ] D i k = Δ j * ( x - x i ) f , j = j * ,
Remaining binary polynomial also carries out conversion amendment, and formula is as follows:
g i k + 1 , j = [ g i k , j , f ] D i k = Δ j * g i k , j - Δ j f , j ≠ j * ;
S36. the process choosing another group binary polynomial repetition step S31 ~ S35 carries out asking for of this group minimal polynomial, and makes i k=i k+ 1;
If S37. i k=C then stops iteration, now respectively organizes the minimal polynomial g of binary polynomial c,jcomposition set G c, by formula Q (x, y)=min{g c,j| g c,j∈ G cminimal polynomial Q (x, y) in C group binary polynomial is solved;
S4. after trying to achieve Q (x, y), Roth-Ruckenstein factoring algorithm is utilized to carry out decomposing message polynomial m'(x corresponding to acquisition RS code Frequency Domain Coding to Q (x, y));
S5. to message polynomial m'(x) adopt Frequency Domain Coding mode to carry out n position coding, get coding codeword n-th-k+1 after obtaining coding codeword and generate message polynomial m (x) corresponding to time domain coding to n bit word, time domain coding mode is adopted to encode to m (x), RS (n, the k) code of correction can be obtained.
Preferably, in step S4, obtain the message polynomial m'(x that RS code Frequency Domain Coding is corresponding) process specific as follows:
After using Roth-Ruckenstein factoring algorithm to decompose Q (x, y), obtain the factor of some shapes as y-p (x), wherein p (x) is polynomial of one indeterminate, decomposes the polynomial of one indeterminate obtained and forms set L:
L={p (x): (y-p (x)) | Q (x, y) and deg p (x) < k}
Deg p (x) < k represents that the number of times of p (x) is less than k, Frequency Domain Coding mode is adopted to encode to polynomial of one indeterminate all in set L, the code word and RS (n that obtain encoding, k) code compares, and polynomial of one indeterminate corresponding to the minimum code word of Hamming distance is message polynomial m'(x).
Preferably, in step S2, the process of the binary polynomial J (x, y) of structure can be represented by the formula:
J ( x , y ) = min lod ( J ( x , y ) ) { J ( x , y ) &Element; F q [ x , y ] | D &alpha;&beta; J ( x i , r i ) = 0 , i = 0,1 , . . . , n - 1 , &alpha; + &beta; < m ( &alpha; , &beta; &Element; N ) }
D α βj (x i, r i) represent that binary polynomial J (x, y) is at interpolation point (x i, y i) (α, β) rank Hasse mixed partial derivative, F q[x, y] for independent variable be the Polynomial Ring with Two of x and y, F q[x, y] represents that coefficient belongs to finite field gf (q m) in element, F q[x, y] can be expressed as with formula wherein f ab∈ GF (q m).
Preferably, in step S5, to message polynomial m'(x) to adopt Frequency Domain Coding mode to carry out the process of n position coding specific as follows:
( c 0 , c 1 , . . . , c n - 1 ) = &Delta; f ( m &prime; ( x ) ) = ( m ( 1 ) , m ( &alpha; ) , m ( &alpha; 2 ) , . . . , m ( &alpha; n - 1 ) )
Wherein m'(x)=m 0+ m 1x+...+m k-1x k-1, m'(x) and ∈ GF (q m);
(c 0, c 1..., c n-1) be coding codeword, α is finite field gf (q m) primitive element.
Preferably, in step S5, the process of generator polynomial g (x) can be expressed as follows:
g(x)=(x-α l)(x-α l+1)...(x-α l+2t-1)
Wherein n-k=2t, l are integer, and α is primitive element, and the generator matrix that m (x) is corresponding can be expressed as:
G 2 = 1 0 . . . 0 x n - 1 ( mod g ( x ) ) 0 1 . . . 0 x n - 2 ( mod g ( x ) ) . . . . . . . . 0 . . . . 0 0 . . . 0 x n - k ( mod g ( x ) )
Mod g (x) represents generator polynomial g (x) remainder, obtains result and is error correction codeword polynome;
Codeword polynome c (x) after the above-mentioned coding can obtaining message polynomial m (x) correspondence of through type,
c(x)=m(x)+[m(x)x n-kmodg(x)]
The coefficient of codeword polynome c (x) is the codeword vector of time domain coding, by codeword vector, can obtain RS (n, the k) code of correction.
Compared with prior art, the invention has the beneficial effects as follows:
The invention provides a kind of matrix two-dimensional code RS decoding error correction method of the GS algorithm based on improving, the GS algorithm improved can reduce the complexity of interpolation, therefore the efficiency of algorithm can be improved, the error correction method of decoding is simultaneously studied two of RS code kinds of coded systems and transforming relationship thereof, therefore the conversion process of two kinds of coded systems can be utilized to correct RS code, make Quick Response Code occurring coming off, stain, the situation such as perforation and local damage time, also correctly can reduce raw information.
Accompanying drawing explanation
Fig. 1 is the conventional conversion method process flow diagram of RS code two kinds of coded systems.
Fig. 2 is that GS algorithm and list decoding are to the decoding process flow diagram of time domain coding gained code word.
Fig. 3 is the process flow diagram of decoding error correction method.
Embodiment
Accompanying drawing, only for exemplary illustration, can not be interpreted as the restriction to this patent;
Below in conjunction with drawings and Examples, the present invention is further elaborated.
Embodiment 1
Before being described technical scheme of the present invention, first carry out brief introduction to RS code, RS code has two kinds of coded systems: Frequency Domain Coding mode and time domain coding mode.These two kinds of coded systems are by assuming the forms of time and space of code word by original codeword vector c, regard the codeword vector C of Galois field Fourier transform (GFFT) gained corresponding for c as frequency domain form, can prove that both are of equal value according to the character of GFFT conversion.Therefore these two kinds of coded systems can be seen as time domain coding (it doesn't matter even if with the time) and Frequency Domain Coding respectively.The corresponding time domain coding of RS systematic code in Quick Response Code, and the corresponding Frequency Domain Coding of the GS algorithm improved, the RS code word simultaneously removed after mask due to two-dimensional code symbol is shortened code, first will study the transforming relationship between two kinds of coded systems when this makes the code word after removing mask with the GS algorithm improved to two-dimensional code symbol carry out error-correcting decoding.
In prior art, when carrying out the conversion between two kinds of coded systems, as shown in Figure 1, the method comprised the following steps usually is used:
Step 1: by the code word c of time domain coding 2namely c' is become before lower position 2;
Step 2: the generator matrix G obtaining Frequency Domain Coding respectively 1with the generator matrix G of time domain coding 2;
Step 3: to G 2first spin upside down left and right reversion again and obtain G 2';
Step 4: utilization linear algebra asks the method for solution of equations to try to achieve matrix A (n × n) and B (n × n) makes G' 2a=G 1or G 1b=G' 2, i.e. c' 2a=c 1or c 1b=c' 2, thus realize the conversion between two kinds of coding codewords.
But when the code word received is wrong, the method of above-mentioned conversion is obviously unworkable, therefore need to find another method for transformation, if list decoding is to the interpretation method of time domain coding gained code word, this method point shortened code and non-truncated code two kinds of situations are discussed, because GS algorithm is the one of list decoding, and codeword coding principle is identical, therefore the method to GS algorithm and list decoding all applicable, as shown in Figure 2, said method comprising the steps of.
Step 1: judge whether RS (n, k) code is shortened code;
Step 2: if not shortened code, then turn to step 3; If so, then q is filled to the information bit of shortened code m-1-n zero, structure RS (q m-1, k+q m-1-n) code;
Step 3: decoding is carried out to gained RS code word GS algorithm and list decoding and obtains message polynomial m'(x);
Step 4: to message polynomial m'(x) carry out n position coding with RS Frequency Domain Coding, get the n-th-k+1 to n position coding codeword and namely obtain required message polynomial m (x) (message polynomial that time domain coding is corresponding).
Above-mentioned step of converting occurs coming off at Quick Response Code, stain, the situation such as perforation and local damage time, also can normally transform, on the basis of above method, the invention provides a kind of matrix two-dimensional code RS decoding error correction method of the GS algorithm based on improving, the GS algorithm wherein improved comprises Kotter interpolation algorithm and the Roth-Ruckenstein factoring algorithm of improvement, as shown in Figure 3, error correction method comprises the following steps:
S1. mask process is gone to image in 2 D code, obtain the RS (n after removing mask, k) code, due to RS (n, k) code is shortened code, therefore needs to fill (255-n) individual zero in the last position of RS (n, k) code, structure RS (255,255+k-n) code;
S2. code word RS (255,255+k-n) is passed through in conjunction with finite field gf (q m) middle nonzero element (x 0, x 1..., x 255+k-n-1) form 255+k-n interpolation point (x 0, r 0), (x 1, r 1) ..., (x 255+k-n-1, r 255+k-n-1), then based on (1, k-1)-weighting dictionary inverted sequence table by each interpolation point at least interpolation build a binary polynomial for m time, wherein m is interpolation severe;
The process of the binary polynomial J (x, y) built can be represented by the formula:
J ( x , y ) = min lod ( J ( x , y ) ) { J ( x , y ) &Element; F q [ x , y ] | D &alpha;&beta; J ( x i , r i ) = 0 , i = 0,1 , . . . , n - 1 , &alpha; + &beta; < m ( &alpha; , &beta; &Element; N ) }
D α βj (x i, r i) represent that binary polynomial J (x, y) is at interpolation point (x i, y i) (α, β) rank Hasse mixed partial derivative, F q[x, y] for independent variable be the Polynomial Ring with Two of x and y, F q[x, y] represents that coefficient belongs to finite field gf (q m) in element, F q[x, y] can be expressed as with formula wherein f ab∈ GF (q m).
S3. utilize the Kotter interpolation algorithm of improvement to ask for minimal polynomial, detailed process is as follows:
S31. first formula is passed through initialization one group of binary polynomial, wherein for initialized jth bar binary polynomial, l mfor the number of this group binary polynomial, for the set of the binary polynomial composition after initialization, i kfor iterations, now i k=0;
S32. formula is passed through cancellation set interior first rank are greater than the binary polynomial of C, wherein C = n m + 1 2 ;
S33. formula is passed through right in the Hasse mixed partial derivative of each binary polynomial calculate, then judge set in the Hasse mixed partial derivative of all binary polynomials whether all equal 0, if all equal 0, then carry out step S36, if be not congruent to 0, carry out step S34;
S34. ask for the minimal polynomial in this group binary polynomial, be shown below:
f = min j &Element; J i k g i k , j
j * = arg min j &Element; J i k g i k , j
Wherein f is the minimal polynomial in this group binary polynomial, j *for the sequence number that minimal polynomial is corresponding;
S35. carry out conversion amendment to the minimal polynomial in this group binary polynomial, formula is as follows:
g i k + 1 , j * = [ xf , f ] D i k = &Delta; j * ( x - x i ) f , j = j * ,
Remaining binary polynomial also carries out conversion amendment, and formula is as follows:
g i k + 1 , j = [ g i k , j , f ] D i k = &Delta; j * g i k , j - &Delta; j f , j &NotEqual; j * ;
S36. the process choosing another group binary polynomial repetition step S31 ~ S35 carries out asking for of this group minimal polynomial, and makes i k=i k+ 1;
If S37. i k=C then stops iteration, now respectively organizes the minimal polynomial g of binary polynomial c,jcomposition set G c, by formula Q (x, y)=min{g c,j| g c,j∈ G cminimal polynomial Q (x, y) in C group binary polynomial is solved;
S4., after trying to achieve Q (x, y), Roth-Ruckenstein factoring algorithm is utilized to carry out decomposing message polynomial m'(x corresponding to acquisition RS code Frequency Domain Coding to Q (x, y)), specific as follows:
After using Roth-Ruckenstein factoring algorithm to decompose Q (x, y), obtain the factor of some shapes as y-p (x), wherein p (x) is polynomial of one indeterminate, decomposes the polynomial of one indeterminate obtained and forms set L:
L={p (x): (y-p (x)) | Q (x, y) and deg p (x) < k}
Deg p (x) < k represents that the number of times of p (x) is less than k, Frequency Domain Coding mode is adopted to encode to polynomial of one indeterminate all in set L, the code word and RS (n that obtain encoding, k) code compares, and polynomial of one indeterminate corresponding to the minimum code word of Hamming distance is message polynomial m'(x).
The false code of Roth-Ruchenstein algorithm can simply be described as:
Input: interpolation polynomial Q (x, y), D=k-1 (maximum times of p (x))
Export: a series of degree of polynomial is less than or equal to the set L of polynomial of one indeterminate p (x) of D, and each polynomial expression meets (y-p (x)) | Q (x, y)
BEGIN
π[0]=0;deg[0]=-1;Q 0(x,y)=<<Q(x,y)>>;t=1;s=0;
rothrucktree(s);
END
Each coefficient of the recursive resolve polynomial of one indeterminate of rothrucktree (s) // from s
BEGIN
IF Q s(x, 0)=0, then export p [s](x);
ELSEIF(deg[s]<D)
R=Rootlist[Q s(0,y)]
FOR(α∈R)
v=t;t=t+1;
π[v]=s;deg[v]=deg[s]+1;coff[v]=α;
Q v(x,y)=<<Q s(x,xy+α)>>;
rothrucktree(v);
END
Wherein π [s] represents the root of node s, and deg [s] represents the number of times of node s, and coff [s] represents the multinomial coefficient at node s place, p [s](x)=coff [s] x deg [s]+ coff [π [s]] x deg [π [s]]+ ....
S5. to message polynomial m'(x) adopt Frequency Domain Coding mode to carry out n position coding, get coding codeword n-th-k+1 after obtaining coding codeword and generate message polynomial m (x) corresponding to time domain coding to n bit word, time domain coding mode is adopted to encode to m (x), RS (n, the k) code of correction can be obtained.
Wherein to message polynomial m'(x) to adopt Frequency Domain Coding mode to carry out the process of n position coding specific as follows:
( c 0 , c 1 , . . . , c n - 1 ) = &Delta; f ( m &prime; ( x ) ) = ( m ( 1 ) , m ( &alpha; ) , m ( &alpha; 2 ) , . . . , m ( &alpha; n - 1 ) )
Wherein m'(x)=m 0+ m 1x+...+m k-1x k-1, m'(x) and ∈ GF (q m);
(c 0, c 1..., c n-1) be coding codeword, α is finite field gf (q m) primitive element and code word size n=q m-1.
Meanwhile, the process of generator polynomial g (x) can be expressed as follows:
g(x)=(x-α l)(x-α l+1)...(x-α l+2t-1)
Wherein n-k=2t, l are integer, and α is primitive element, and the generator matrix that m (x) is corresponding can be expressed as:
G 2 = 1 0 . . . 0 x n - 1 ( mod g ( x ) ) 0 1 . . . 0 x n - 2 ( mod g ( x ) ) . . . . . . . . 0 . . . . 0 0 . . . 0 x n - k ( mod g ( x ) )
Mod g (x) represents generator polynomial g (x) remainder, obtains result and is error correction codeword polynome;
Codeword polynome c (x) after the above-mentioned coding can obtaining message polynomial m (x) correspondence of through type,
c(x)=m(x)+[m(x)x n-kmodg(x)]
The coefficient of codeword polynome c (x) is the codeword vector of time domain coding, by codeword vector, can obtain RS (n, the k) code of correction.
In such scheme, for arbitrary RS (n, k) code, the maximum error correcting capability of decoding error correction method is:
t max = n - n ( k - 1 ) - 1
For QR code version 1-H symbol, concerning this symbol, finite field gf (2 8) on (26,9,8) RS code be used for error correction.After conventional letter removes mask, then the generator polynomial that this code word is corresponding is:
g(x)=(x-1)(x-α)(x-α 2)...(x-α 16)=x 1743x 16139x 15205x 1478x 1343x 12239x 11123x 10206x 9214x 8147x 724x 699x 5150x 439x 3243x 2163x 2136
The syndrome decoding algorithm used in current Quick Response Code can only correct 8 mistakes at the most to (26,9,8) RS code, but the decoding error correction method that the present invention proposes can break through this restriction, as shown in table 1 according to different its error correcting capabilities of interpolation severe m:
T in table 1RS (26,9,8) code malong with the change of interpolation severe m
Interpolation severe m 1 2 6 30
Error correcting capability t m 9 10 11 12
As can be seen from Table 1, with the GS algorithm improved to RS (26,9,8) code carries out error-correcting decoding, error correction code word number increases gradually along with interpolation severe m, and its error correcting capability is just greater than the error correcting capability of syndrome decoding algorithm as m=1, this makes Quick Response Code can reduce raw information more accurate, better when breakage.
In order to be described technical scheme of the present invention better, the present embodiment has carried out sufficient explanation by the correction procedure of example 1, example 2 pairs of decoding error correction methods.
Example 1
Example 1 illustrates how to carry out error-correcting decoding with decoding error correction method to the RS systematic code in Quick Response Code for interpolation severe 2.
Code word after conventional letter removes mask is:
R=(r 0,r 1,...,r 25)=(α 1932141816931196106238751923316118596153435127248241951232201732)
Namely can form 255 interpolation points altogether, be respectively:
(1, α 19), (α, α 3), (α 2, α 214), (α 3, α 18), (α 4, α 169), (α 5, α 31) (α 6, α 196), (α 7, α 106), (α 8, α 238), (α 9, α 75), (α 10, α 192), (α 11, α 33), (α 12, α 161), (α 13, α 185), (α 14, α 96), (α 15, α 153), (α 16, α 43), (α 17, α 51), (α 18, α 27), (α 19, α 248), (α 20, α 24), (α 21, α 195), (α 22, α 123), (α 23, α 220), (α 24, α 17), (α 25, α 32) and (α 26, 0), (α 27, 0) ..., (α 254, 0);
255 interpolated points form RS (255 altogether, 238,8), the GS algorithm that use improves solves can obtain message polynomial m'(x to the polynomial expression built), use Frequency Domain Coding mode to message polynomial m'(x) carry out 26 codings, and high 9 that get gained code word generate message polynomial m (x) corresponding to time domain coding:
M (x)=α 51+ α 22x+ α 243x 2+ α 247x 3+ α 195x 4+ α 123x 5+ α 220x 6+ α 176x 7+ α 32x 8m (x) time domain coded system is encoded, coding codeword c can be obtained, that is:
c=(c 0,c 1,...,c 25)=(α 3932141981693116910622857192331611849615343512224324719512322017632)
Contrast known by coding codeword c and formula (12), correct for QR code version 1-H symbolic solution except 10 wrong code words after mask by the decoding error correction method of interpolation severe m=2, this can not accomplish with current syndrome decoding algorithm.
Example 2
Suppose that the shortened code of RS (7,4) is RS (5,2):
Suppose that the code word received is c' 3=(α 5, α 4, α 4, α, α 2), then at c' 3last position fill and make for two 0 it become 7 original bit word, i.e. c " 3=(α 5, α 4, α 4, α, α 2, 0,0), use the GS algorithm improved to c " 3carry out decoding, obtain message polynomial m'(x), m'(x)=σ 3x+x 2+ σ 6x 3, adopt Frequency Domain Coding mode to encode to message polynomial:
( 0 , &alpha; 3 , 1 , &alpha; 6 ) 1 1 1 1 1 1 &alpha; &alpha; 2 &alpha; 3 &alpha; 4 1 &alpha; 2 &alpha; 4 &alpha; 6 &alpha; 3 1 &alpha; 3 &alpha; 6 &alpha; 2 &alpha; 6 = ( &alpha; 5 , &alpha; 4 , &alpha; 4 , &alpha; , &alpha; 6 )
Get (α 5, α 4, α 4, α, α 6) high two bit word generate message polynomial m (x) corresponding to time domain codings, m (x)=α+α 6x, to m (x) adopt time domain coding mode to carry out coding codeword (α that coding can obtain RS (5,2) 5, α 4, α 4, α, α 6), with c' 3compare, known its correct for a mistake.
The invention provides a kind of matrix two-dimensional code RS decoding error correction method of the GS algorithm based on improving, the GS algorithm improved can reduce the complexity of interpolation, therefore the efficiency of algorithm can be improved, the error correction method of decoding is simultaneously studied two of RS code kinds of coded systems and transforming relationship thereof, therefore the conversion process of two kinds of coded systems can be utilized to correct RS code, make Quick Response Code occurring coming off, stain, the situation such as perforation and local damage time, also correctly can reduce raw information.
Obviously, the above embodiment of the present invention is only for example of the present invention is clearly described, and is not the restriction to embodiments of the present invention.For those of ordinary skill in the field, can also make other changes in different forms on the basis of the above description.Here exhaustive without the need to also giving all embodiments.All any amendments done within the spirit and principles in the present invention, equivalent to replace and improvement etc., within the protection domain that all should be included in the claims in the present invention.

Claims (5)

1. the matrix two-dimensional code RS decoding error correction method based on the GS algorithm improved, the GS algorithm wherein improved comprises Kotter interpolation algorithm and the Roth-Ruckenstein factoring algorithm of improvement, it is characterized in that: described error correction method comprises the following steps:
S1. mask process is gone to image in 2 D code, obtain RS (n, the k) code after removing mask, fill (255-n) individual zero in the last position of RS (n, k) code, structure RS (255,255+k-n) code;
S2. code word RS (255,255+k-n) is passed through in conjunction with finite field gf (q m) middle nonzero element (x 0, x 1..., x 255+k-n-1) form 255+k-n interpolation point (x 0, r 0), (x 1, r 1) ..., (x 255+k-n-1, r 255+k-n-1), then based on (1, k-1)-weighting dictionary inverted sequence table by each interpolation point at least interpolation build a binary polynomial for m time, wherein m is interpolation severe;
S3. utilize the Kotter interpolation algorithm of improvement to ask for minimal polynomial, detailed process is as follows:
S31. first formula is passed through initialization one group of binary polynomial, wherein for initialized jth bar binary polynomial, l mfor the number of this group binary polynomial, for the set of the binary polynomial composition after initialization, i kfor iterations, now i k=0;
S32. formula is passed through cancellation set interior first rank are greater than the binary polynomial of C, wherein C = n m + 1 2 ;
S33. formula is passed through right in the Hasse mixed partial derivative of each binary polynomial calculate, then judge set in the Hasse mixed partial derivative of all binary polynomials whether all equal 0, if all equal 0, then carry out step S36, if be not congruent to 0, carry out step S34;
S34. ask for the minimal polynomial in this group binary polynomial, be shown below:
f = min j &Element; J i k g i k , j
j * = arg min j &Element; J i k g i k , j
Wherein f is the minimal polynomial in this group binary polynomial, j *for the sequence number that minimal polynomial is corresponding;
S35. carry out conversion amendment to the minimal polynomial in this group binary polynomial, formula is as follows:
g i k + 1 , j * = [ xf , f ] D i k = &Delta; j * ( x - x i ) fj = j * ,
Remaining binary polynomial also carries out conversion amendment, and formula is as follows:
g i k + 1 , j = [ g i k , j , f ] D i k = &Delta; j * g i k , j - &Delta; j fj &NotEqual; j * ;
S36. the process choosing another group binary polynomial repetition step S31 ~ S35 carries out asking for of this group minimal polynomial, and makes i k=i k+ 1;
If S37. i k=C then stops iteration, now respectively organizes the minimal polynomial g of binary polynomial c,jcomposition set G c, by formula Q (x, y)=min{g c,j| g c,j∈ G cminimal polynomial Q (x, y) in C group binary polynomial is solved;
S4. after trying to achieve Q (x, y), Roth-Ruckenstein factoring algorithm is utilized to carry out decomposing message polynomial m'(x corresponding to acquisition RS code Frequency Domain Coding to Q (x, y));
S5. to message polynomial m'(x) adopt Frequency Domain Coding mode to carry out n position coding, get coding codeword n-th-k+1 after obtaining coding codeword and generate message polynomial m (x) corresponding to time domain coding to n bit word, time domain coding mode is adopted to encode to m (x), RS (n, the k) code of correction can be obtained.
2. the matrix two-dimensional code RS decoding error correction method of GS algorithm based on improving according to claim 1, is characterized in that: in step S4, obtains the message polynomial m'(x that RS code Frequency Domain Coding is corresponding) process specific as follows:
After using Roth-Ruckenstein factoring algorithm to decompose Q (x, y), obtain the factor of some shapes as y-p (x), wherein p (x) is polynomial of one indeterminate, decomposes the polynomial of one indeterminate obtained and forms set L:
L={p (x): (y-p (x)) | Q (x, y) and degp (x) < k}
Degp (x) < k represents that the number of times of p (x) is less than k, Frequency Domain Coding mode is adopted to encode to polynomial of one indeterminate all in set L, the code word and RS (n that obtain encoding, k) code compares, and polynomial of one indeterminate corresponding to the minimum code word of Hamming distance is message polynomial m'(x).
3. the matrix two-dimensional code RS decoding error correction method of the GS algorithm based on improving according to claim 1, it is characterized in that: in step S2, the process of the binary polynomial J (x, y) of structure can be represented by the formula:
J ( x , y ) = min lod ( J ( x , y ) ) { J ( x , y ) &Element; F q [ x , y ] | D &alpha;&beta; J ( x i , r i ) = 0 , i = 0,1 , . . . , n - 1 , &alpha; + &beta; < m ( &alpha; , &beta; &Element; N ) }
D α βj (x i, r i) represent that binary polynomial J (x, y) is at interpolation point (x i, y i) (α, β) rank Hasse mixed partial derivative, F q[x, y] for independent variable be the Polynomial Ring with Two of x and y, F q[x, y] represents that coefficient belongs to finite field gf (q m) in element, F q[x, y] can be expressed as with formula wherein f ab∈ GF (q m).
4. the matrix two-dimensional code RS decoding error correction method of GS algorithm based on improving according to claim 1, is characterized in that: in step S5, to message polynomial m'(x) to adopt Frequency Domain Coding mode to carry out the process of n position coding specific as follows:
( c 0 , c 1 , . . . , c n - 1 ) = &Delta; f ( m &prime; ( x ) ) = ( m ( 1 ) , m ( &alpha; ) , ( &alpha; 2 ) , . . . , m ( &alpha; n - 1 ) )
Wherein m &prime; ( x ) = m 0 + m 1 x + . . . + m k - 1 x k - 1 , m'(x)∈GF(q m);
(c 0, c 1..., c n-1) be coding codeword, α is finite field gf (q m) primitive element.
5. the matrix two-dimensional code RS decoding error correction method of the GS algorithm based on improving according to claim 1, it is characterized in that: in step S5, the process of generator polynomial g (x) can be expressed as follows:
g(x)=(x-α l)(x-α l+1)...(x-α l+2t-1)
Wherein n-k=2t, l are integer, and α is primitive element, and the generator matrix that m (x) is corresponding can be expressed as:
G 2 = 1 0 . . . 0 x n - 1 ( mod g ( x ) ) 0 1 . . . 0 x n - 2 ( mod g ( x ) ) &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; . . . 0 &CenterDot; &CenterDot; &CenterDot; 0 &CenterDot; 0 0 . . . 0 x n - k ( mod g ( x ) )
Mod g (x) represents generator polynomial g (x) remainder, obtains result and is error correction codeword polynome;
Codeword polynome c (x) after the above-mentioned coding can obtaining message polynomial m (x) correspondence of through type,
c(x)=m(x)+[m(x)x n-kmodg(x)]
The coefficient of codeword polynome c (x) is the codeword vector of time domain coding, by codeword vector, can obtain RS (n, the k) code of correction.
CN201510263384.0A 2015-05-21 2015-05-21 Matrix two-dimensional code RS decoding error correction methods based on improved GS algorithms Expired - Fee Related CN104915699B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510263384.0A CN104915699B (en) 2015-05-21 2015-05-21 Matrix two-dimensional code RS decoding error correction methods based on improved GS algorithms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510263384.0A CN104915699B (en) 2015-05-21 2015-05-21 Matrix two-dimensional code RS decoding error correction methods based on improved GS algorithms

Publications (2)

Publication Number Publication Date
CN104915699A true CN104915699A (en) 2015-09-16
CN104915699B CN104915699B (en) 2018-02-09

Family

ID=54084748

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510263384.0A Expired - Fee Related CN104915699B (en) 2015-05-21 2015-05-21 Matrix two-dimensional code RS decoding error correction methods based on improved GS algorithms

Country Status (1)

Country Link
CN (1) CN104915699B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105811999A (en) * 2016-02-29 2016-07-27 广东顺德中山大学卡内基梅隆大学国际联合研究院 Improved Koetter-Vardy (KV) algorithm based matrix type two-dimension code Reed-Solomon(RS) decoding error correction method
CN108596001A (en) * 2017-09-21 2018-09-28 北京三快在线科技有限公司 Quick Response Code error-correcting decoding method, device, electronic equipment and computer-readable medium
US20210232093A1 (en) * 2020-01-27 2021-07-29 Texas Instruments Incorporated Projector with phase hologram modulator
TWI783895B (en) * 2022-04-01 2022-11-11 國立勤益科技大學 QR code verification system and method of random RS code

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202550A (en) * 2006-12-15 2008-06-18 株式会社Ntt都科摩 Method and apparatus of multiple numbers computation in RS decoding and decoder and method of decoding
US7870469B1 (en) * 2007-02-12 2011-01-11 Link—A—Media Devices Corporation Parallel inversionless error and erasure processing
CN102075199A (en) * 2009-11-24 2011-05-25 中兴通讯股份有限公司 Implementation method and device for reed-salomon (RS) decoding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202550A (en) * 2006-12-15 2008-06-18 株式会社Ntt都科摩 Method and apparatus of multiple numbers computation in RS decoding and decoder and method of decoding
US7870469B1 (en) * 2007-02-12 2011-01-11 Link—A—Media Devices Corporation Parallel inversionless error and erasure processing
CN102075199A (en) * 2009-11-24 2011-05-25 中兴通讯股份有限公司 Implementation method and device for reed-salomon (RS) decoding

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
LI CHEN 等: ""Performance of Reed-Solomon codes using the Guruswami-Sudan algorithm with improved interpolation efficiency"", 《IET COMMUNICATIONS》 *
梁博: "《万方学位论文》", 21 September 2009 *
祁晓莉: "《中国优秀硕士学位论文全文数据库 信息科技辑(月刊)》", 15 December 2007, 中国学术期刊电子杂志社 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105811999A (en) * 2016-02-29 2016-07-27 广东顺德中山大学卡内基梅隆大学国际联合研究院 Improved Koetter-Vardy (KV) algorithm based matrix type two-dimension code Reed-Solomon(RS) decoding error correction method
CN108596001A (en) * 2017-09-21 2018-09-28 北京三快在线科技有限公司 Quick Response Code error-correcting decoding method, device, electronic equipment and computer-readable medium
WO2019056644A1 (en) * 2017-09-21 2019-03-28 北京三快在线科技有限公司 Two-dimensional code error correction decoding
TWI669917B (en) * 2017-09-21 2019-08-21 大陸商北京三快在線科技有限公司 Method for correcting and decoding two-dimensional code, device, electronic equipment, and computer readable medium
JP2020537363A (en) * 2017-09-21 2020-12-17 北京三快在綫科技有限公司Beijing Sankuai Online Technology Co., Ltd Two-dimensional code error correction decoding
CN108596001B (en) * 2017-09-21 2021-02-02 北京三快在线科技有限公司 Two-dimensional code error correction decoding method and device, electronic equipment and computer readable medium
US11080500B2 (en) 2017-09-21 2021-08-03 Beijing Sankuai Online Technology Co., Ltd Two-dimensional code error correction decoding
US20210232093A1 (en) * 2020-01-27 2021-07-29 Texas Instruments Incorporated Projector with phase hologram modulator
TWI783895B (en) * 2022-04-01 2022-11-11 國立勤益科技大學 QR code verification system and method of random RS code

Also Published As

Publication number Publication date
CN104915699B (en) 2018-02-09

Similar Documents

Publication Publication Date Title
CN1866751B (en) Construction method and device for low density parity codes
Hao et al. Some results on optimal locally repairable codes
US7536629B2 (en) Construction of LDPC (Low Density Parity Check) codes using GRS (Generalized Reed-Solomon) code
CN100592639C (en) Low density parity check coding method, device and parity check matrix generating method
JP2013507807A (en) Method for decoding non-binary codes
CN104915699A (en) Matrix two-dimensional code RS decoding error correction method based on improved GS algorithm
JP6817414B2 (en) Coding and decoding of polar codes extended to non-powers of 2
CN101252360A (en) Structured constitution method of high enclose long low code rate multi-scale LDPC code
US8312344B2 (en) Communication method and apparatus using LDPC code
Cayci et al. Nonbinary polar coding for multilevel modulation
KR101636965B1 (en) Method and device for communicating data across noisy media
CN101355366B (en) Method and apparatus for decoding low density parity check code
EP2309650B1 (en) A systematic encoder with arbitrary parity positions
CN105811999A (en) Improved Koetter-Vardy (KV) algorithm based matrix type two-dimension code Reed-Solomon(RS) decoding error correction method
Flanagan et al. Spectral shape of doubly-generalized LDPC codes: Efficient and exact evaluation
US7398456B2 (en) Information encoding by shortened Reed-Solomon codes
Johnston et al. Construction and performance of algebraic–geometric codes over AWGN and fading channels
Farkašová et al. Construction of error control run length limited codes exploiting some parity matrix properties
Tallini et al. Efficient systematic deletions/insertions of 0’s error control codes
Malofey et al. Enhancing the functionality of the procedures of encoding and decoding BCH codes
CN111313909A (en) LDPC code decoding method and encoding method
Morita et al. Two-dimensional Lee-error-correcting codes on hexagonal signal constellations
Nina et al. LDPC Encoding based on the primitive polynomial
Özbudak et al. Improved probabilistic decoding of interleaved Reed–Solomon codes and folded Hermitian codes
Torshizi et al. Deterministic construction of array QC CS measurement matrices based on Singer perfect difference sets

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180209