STAR code encoding method and decoding method

By determining the check bits in the STAR code and adding common factors, the problems of high update complexity and low encoding and decoding efficiency of STAR code are solved, and a more efficient encoding and decoding process is realized, meeting the needs of update-intensive storage applications.

CN113641531BActive Publication Date: 2025-01-10SHANXI PINSHANG NETWORK TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110847153.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-27
Publication Date
2025-01-10
Estimated Expiration
2041-07-27

AI Technical Summary

Technical Problem

The update complexity of STAR codes and the encoding and decoding efficiency are not efficient enough, making it difficult to meet the storage application needs of support for update-intensive workloads.

Method used

By determining the check bits of the second and third test columns and calculating the common factor, only adding common factors to some check bits to improve encoding efficiency and reduce update complexity, the encoding and decoding methods of STAR code are used to Improve the encoding and decoding efficiency of STAR code.

Benefits of technology

有效降低了STAR码的更新复杂度和编码解码复杂度,提高了编码效率,实现了渐近最优的更新复杂度,并提高了STAR码的解码效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113641531B_ABST
    Figure CN113641531B_ABST
Patent Text Reader

Abstract

The present invention relates to a STAR code encoding method and a decoding method thereof. After determining the check bit of the second check column and the check bit of the third check column, a common factor is determined, and finally the common factor is added to the selected check bit of the second check column and the selected check bit of the third check column. Based on this, unlike the traditional STAR code, only when calculating the last two check columns, the common factor will be added to some check bits, which effectively improves the encoding efficiency and reduces the update complexity. After obtaining the erasure condition of the check column of the STAR code to be decoded, the STAR code to be decoded is decoded according to the erasure condition of the check column and the common factor, and the invalid check column is restored. Based on this, according to the addition of the common factor of the STAR code to the selected check bit, the decoding efficiency of the STAR code is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a STAR code encoding method and a STAR code decoding method. Background Art

[0002] Binary Maximum Distance Separable (MDS) array codes are widely used in various storage systems, such as Redundant Arrays of Inexpensive Disks, and have two main advantages: (1) storage redundancy is minimized for a given fault tolerance level; and (2) only XOR operations are involved in encoding and decoding. Specifically, a (n, k, m) binary MDS array code is an array of size m×n, which encodes km information bits to obtain (nk)m check bits, where nm bits (including km information bits and (nk)m check bits) are stored in an m×n array. To satisfy the MDS property, it means that the system can tolerate any r=nk faults in n columns with minimal storage redundancy. To support storage applications with update-intensive workloads (such as databases), it is necessary to construct binary MDS array codes that have smaller encoding / decoding complexity in terms of the number of XORs caused in encoding / decoding, and smaller update complexity in terms of the average number of check bits affected by a single information bit change.

[0003] At present, binary MDS array codes have been well studied. For example, EVENODD, X code and RDP are common binary MDS array codes that can adapt to any erasure of r = 2 columns. In particular, EVENODD code has a well-designed mathematical structure, which has inspired many subsequent studies, such as STAR code and generalized EVENODD code. STAR code uses three check columns, while generalized EVENODD code uses more than two check columns to expand the structure of EVENODD code. At present, an EVENODD+ code has been proposed, which can achieve asymptotically optimal update complexity, but only has r = 2 check columns. Another TIP code has r = 3 check columns and achieves optimal update complexity, but has much higher decoding complexity than existing binary MDS array codes (such as STAR code). STAR code has r = 3 check columns and has three fault tolerance. However, STAR code has high update complexity and encoding and decoding are not efficient enough. Summary of the invention

[0004] Based on this, it is necessary to provide a STAR code encoding method and a STAR code decoding method to address the shortcomings of the STAR code having high update complexity and low encoding and decoding efficiency.

[0005] A STAR code encoding method comprises the steps of:

[0006] determining a check digit of the second check column and a check digit of the third check column;

[0007] Determine the common factors;

[0008] A common factor is added to the selected check digits of the second check column and the selected check digits of the third check column.

[0009] The above-mentioned STAR code encoding method determines the common factor after determining the check bit of the second check column and the check bit of the third check column, and finally adds the common factor to the selected check bit of the second check column and the selected check bit of the third check column. Based on this, unlike the traditional STAR code, the common factor is added to some check bits only when calculating the last two check columns, which effectively improves the encoding efficiency and reduces the update complexity.

[0010] In one embodiment, the check bit of the second check column is as follows:

[0011]

[0012] The check digit of the third check column is as follows:

[0013]

[0014] Among them, given an odd number m≥k, Define an (m-1)×(k+3) array code; for j=0, 1, ..., k-1, column j is called the information column, storing information bits b 0,j , b 1,j , …, b m-2,j ; For j = k, k + 1, k + 2, column j is called the check column, which is used to store the check bit; the subscripts of all blocks need to be calculated modulo m; given a (m-1) × k-bit information array b i,j , i = 0, 1, ..., m-2 and j = 0, 1, ..., k-1, define a virtual row b for all j columns m-1,j =0.

[0015] In one embodiment, the common factors include a first common factor b m-1,k+1 and the second common factor b m-1,k+2 ;

[0016] The first common factor is as follows:

[0017]

[0018] The second common factor is as follows:

[0019]

[0020] The first common factor is added to the second check column, and the second common factor is added to the third check column.

[0021] In one embodiment, the process of adding a common factor to a selected check digit of a second check column and a selected check digit of a third check column comprises the steps of:

[0022] Add the common factor to the second test column The parity bit and the third check column A check digit.

[0023] A STAR code encoding device, comprising:

[0024] A check bit determination module, used to determine the check bit of the second check column and the check bit of the third check column;

[0025] A common factor determination module, used for determining common factors;

[0026] The common factor adding module is used to add the common factor to the selected check digits of the second check column and the selected check digits of the third check column.

[0027] The encoding device of the STAR code above determines the check bits of the second check column and the third check column, then determines the common factor, and finally adds the common factor to the selected check bits of the second check column and the selected check bits of the third check column. Based on this, unlike the traditional STAR code, the common factor is added to part of the check bits only when calculating the last two check columns, which effectively improves the encoding efficiency and reduces the update complexity.

[0028] A computer storage medium stores computer instructions, which, when executed by a processor, implement the STAR code encoding method of any of the above embodiments.

[0029] The computer storage medium, after determining the check digits of the second check column and the third check column, determines the common factor, and finally adds the common factor to the selected check digits of the second check column and the selected check digits of the third check column. Based on this, unlike the traditional STAR code, only when calculating the last two check columns, the common factor is added to some check digits, which effectively improves the coding efficiency and reduces the update complexity.

[0030] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the STAR code encoding method of any of the above embodiments is implemented.

[0031] The above-mentioned computer device, after determining the check digit of the second check column and the check digit of the third check column, determines the common factor, and finally adds the common factor to the selected check digit of the second check column and the selected check digit of the third check column. Based on this, unlike the traditional STAR code, the common factor is added to part of the check digits only when calculating the last two check columns, which effectively improves the coding efficiency and reduces the update complexity.

[0032] A STAR code decoding method comprises the steps of:

[0033] Obtain the erasure status of the information column and check column of the STAR code to be decoded;

[0034] The STAR code to be decoded is decoded according to the erasure status of the information column and the check column and the common factor, and the invalid information column and the check column are restored.

[0035] The above-mentioned STAR code decoding method, after obtaining the erasure status of the information column and the check column of the STAR code to be decoded, decodes the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor, and restores the invalid information column and the check column. Based on this, according to the addition of the common factor of the STAR code in the selected check bit, the decoding efficiency of the STAR code is improved.

[0036] In one embodiment, the process of decoding the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor includes the steps of:

[0037] When all three parity columns are erased, reverse decoding is performed according to the encoding method of the STAR code in any of the above embodiments to restore the invalid parity columns.

[0038] In one embodiment, the process of decoding the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor includes the steps of:

[0039] When the second check column and the third check column are erased, the invalid information column and the check column are restored based on the common factor according to the decoding method of the EVENODD+ code.

[0040] In one embodiment, the process of decoding the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor includes the steps of:

[0041] When the first parity column is erased, determining the syndrome bit according to the common factor;

[0042] Determine the start bit according to the syndrome bit;

[0043] The failed information bits are restored according to the start bits to restore the failed information column and the check column.

[0044] In one embodiment, the process of decoding the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor includes the steps of:

[0045] When no parity column is erased, the syndrome bits are determined based on the common factors;

[0046] Find the starting point in the syndrome bits and repair the second erased information column;

[0047] The first and third erased information columns are restored according to the decoding method of the EVENODD+ code.

[0048] A STAR code decoding device, comprising:

[0049] An erasure determination module is used to obtain the erasure status of the information column and the check column of the STAR code to be decoded;

[0050] The information column and check column recovery module is used to decode the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor, and recover the invalid information column and the check column.

[0051] The above-mentioned STAR code decoding device, after obtaining the erasure status of the information column and the check column of the STAR code to be decoded, decodes the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor, and restores the invalid information column and the check column. Based on this, according to the addition of the common factor of the STAR code to the selected check bit, the decoding efficiency of the STAR code is improved.

[0052] A computer storage medium stores computer instructions, which, when executed by a processor, implement the STAR code decoding method of any of the above embodiments.

[0053] After obtaining the erasure status of the information column and the check column of the STAR code to be decoded, the computer storage medium decodes the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor, and restores the invalid information column and the check column. Based on this, the decoding efficiency of the STAR code is improved by adding the check bit in the selected state according to the common factor of the STAR code.

[0054] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the STAR code decoding method of any of the above embodiments is implemented.

[0055] After obtaining the erasure status of the information column and the check column of the STAR code to be decoded, the computer device decodes the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor, and restores the invalid information column and the check column. Based on this, the decoding efficiency of the STAR code is improved by adding the check bit in the selected state according to the common factor of the STAR code. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 A flow chart of a STAR code encoding method according to an embodiment;

[0057] Figure 2 A flow chart of a STAR code encoding method according to another embodiment;

[0058] Figure 3 A module structure diagram of a STAR code encoding device according to another embodiment;

[0059] Figure 4 A flowchart of a STAR code decoding method according to an embodiment;

[0060] Figure 5 A flowchart of a STAR code decoding method according to another embodiment;

[0061] Figure 6 A flowchart of a STAR code decoding method according to another embodiment;

[0062] Figure 7 A module structure diagram of a STAR code decoding device according to an embodiment;

[0063] Figure 8 A schematic diagram of the internal structure of a computer according to an embodiment. DETAILED DESCRIPTION

[0064] In order to better understand the purpose, technical solution and technical effect of the present invention, the present invention is further explained below in conjunction with the accompanying drawings and embodiments. At the same time, it is stated that the embodiments described below are only used to explain the present invention and are not used to limit the present invention.

[0065] An embodiment of the present invention provides a STAR code encoding method.

[0066] Figure 1 FIG. 1 is a flow chart of a STAR code encoding method according to an embodiment of the present invention. Figure 1 As shown, a STAR code encoding method according to an embodiment includes steps S100 to S102:

[0067] S100, determining a check bit of a second check column and a check bit of a third check column;

[0068] S101, determine the common factors;

[0069] S102, adding a common factor to a selected check digit of the second check column and a selected check digit of the third check column.

[0070] It should be noted that in each embodiment of this specific implementation method, in order to facilitate the distinction between the STAR code implemented under the encoding / decoding method of the STAR code in each embodiment and the traditional STAR code, the STAR code implemented under the encoding / decoding method of the STAR code in each embodiment is collectively referred to as "STAR+ code" to facilitate the description of the embodiments.

[0071] For a given odd number m ≥ k, Define an (m-1)×(k+3) array code; for j=0, 1, ..., k-1, column j is called the information column, storing information bits b 0,j , b 1,j , …, b m-2,j ; For j = k, k + 1, k + 2, column j is called the check column, which is used to store the check bit; the subscripts of all blocks need to be calculated modulo m; given a (m-1) × k-bit information array b i,j , i = 0, 1, ..., m-2 and i = 0, 1, ..., m-2, define a virtual row b for all j columns m-1,j =0.

[0072] Based on the above, the check digit in column k is:

[0073]

[0074] The check digits in columns k+1 and k+2 are:

[0075]

[0076] and

[0077]

[0078] Among them, column k represents the first check column, column k+1 represents the second check column, and column k+2 represents the third check column.

[0079] After determining each check column and check bit, the common factor is added to the selected check bit to realize the STAR+ code, which is different from the traditional STAR code (adding the common factor to all check bits). The selected check bit is only part of the check bit.

[0080] In one embodiment, the common factors include a first common factor b m-1,k+1 and the second common factor b m-1,k+2 ;

[0081] The first common factor is as follows:

[0082]

[0083] The second common factor is as follows:

[0084]

[0085] The first common factor is added to the second check column, and the second common factor is added to the third check column.

[0086] In one embodiment, Figure 2 FIG. 1 is a flow chart of a STAR code encoding method according to another embodiment, Figure 2 As shown, the process of adding the common factor to the selected check digit of the second check column and the selected check digit of the third check column in step S101 includes step S200:

[0087] S200, add the common factor to the second test column The parity bit and the third check column A check digit.

[0088] Based on this, in STAR+(m, k), we only replace the two common factors b in the k+1 column and the k+2 column respectively. m-1,k+1 and b m-1,k+2 Add to The STAR code uses two common factors b m-1,k+1 and b m-1,k+2 Add to all check bits in the second and third check columns respectively. This distinction makes the update complexity of STAR+(m, k) asymptotically optimal. Table 1 below describes an example of STAR+(9, 3), where the two common factors b 8,4 and b 8,5 Added to the first two check digits of the 4th column and the last two check digits of the 5th column respectively.

[0089] Table 1 STAR+(9,3) table (where the common factor b 8,4 =b 7,1 +b 6,2 , b 8,6 =b 0,1 +b 1,2 )

[0090]

[0091] In order to better explain the effect of the embodiment of the present invention, the update complexity of STAR+(m, k) is specifically evaluated below.

[0092] If the information bit changes, you need to update a check bit in column k and the check bits in columns k+1 and k+2. Therefore, the update complexity is If m>>k, the update complexity is close to the optimal value Therefore, when m is much larger than k, the update complexity is asymptotically optimal, and the update complexity of STAR code is If m>k, it is strictly greater than STAR+(m, k). Table 2 below shows the update complexity of STAR code and STAR+(m, k) when k=7 and m is between 7 and 53. When m>7, STAR+(m, k) has a smaller update complexity than STAR code, and this advantage increases with the increase of m. Since m=49 is not a prime number, the update complexity of STAR code is not shown in Table 2.

[0093] Note that in STAR+(m, k) only the common factors are added to some of the check bits in the last two check columns, while in STAR codes the common factors are added to all the check bits in the last two check columns. Compared to STAR codes, STAR+(m, k) has lower encoding / decoding complexity.

[0094] Table 2 Update complexity of STAR+(m, 7) and STAR codes

[0095]

[0096] In the encoding method of the STAR code of any of the above embodiments, after determining the check bit of the second check column and the check bit of the third check column, the common factor is determined, and finally the common factor is added to the selected check bit of the second check column and the selected check bit of the third check column. Based on this, unlike the traditional STAR code, the common factor is added to part of the check bits only when calculating the last two check columns, which effectively improves the encoding efficiency and reduces the update complexity.

[0097] The embodiment of the present invention also provides a STAR code encoding device.

[0098] Figure 3 FIG. 4 is a block diagram of a STAR code encoding device according to another embodiment of the present invention. Figure 3 As shown, a STAR code encoding device according to an embodiment includes a module 100, a module 101 and a module 102:

[0099] A check bit determination module 100, used to determine the check bit of the second check column and the check bit of the third check column;

[0100] A common factor determination module 101, used to determine common factors;

[0101] The common factor adding module 102 is used to add the common factor to the selected check digits of the second check column and the selected check digits of the third check column.

[0102] The encoding device of the STAR code above determines the check bits of the second check column and the third check column, then determines the common factor, and finally adds the common factor to the selected check bits of the second check column and the selected check bits of the third check column. Based on this, unlike the traditional STAR code, the common factor is added to part of the check bits only when calculating the last two check columns, which effectively improves the encoding efficiency and reduces the update complexity.

[0103] The embodiment of the present invention also provides a STAR code decoding method.

[0104] Figure 4 FIG. 4 is a flowchart of a STAR code decoding method according to an embodiment of the present invention. Figure 4 As shown, it includes step S300 and step S301:

[0105] S300, obtaining the erasure status of the information column and the check column of the STAR code to be decoded;

[0106] S301, decoding the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor, and restoring the invalid information column and the check column.

[0107] In step S300, the erasure of the information column and the check column of each STAR code to be decoded includes the complete erasure and partial erasure of the check column. Among them, the STAR code to be decoded (STAR+ code) includes three check columns. The decoding algorithm of STAR+(m, k) is used to recover the erasure of any three columns, thereby proving its MDS property. The following Theorem 1 shows a key property of the decoding algorithm of STAR+(m, k).

[0108] Theorem 1: For

[0109] consider According to equation (1) and equation (2), the former can be expressed as:

[0110]

[0111] Consider b m-1,k+1 and b m-1,j =0, j=0, 1, ..., k-1, the above equation becomes the following:

[0112]

[0113] Using the same parameters and methods, we can also obtain This completes the proof of Theorem 1.

[0114] Among them, the two-column erasure decoding of STAR+(m, k) can be regarded as a special case of the three-column erasure decoding, so only the decoding algorithm for three-column erasure can be studied. Assuming that three columns f, g, and h are erased, where 0≤f<g<h≤k+2, a decoding algorithm is proposed to reconstruct all erased bits from the remaining k columns. Based on different erasure patterns, the reconstruction can be divided into four cases: (i) three-column parity column erasure, i.e., f=k, g=k+1, h=k+2; (ii) two-column parity column erasure, i.e., 0≤f≤k-1 and k≤g<h≤k+2; (iii) one-column parity column erasure, i.e., 0≤f<g≤k-1 and k≤h≤k+2; (iv) no parity column erasure, i.e., 0≤f<g<h≤k-1.

[0115] In one embodiment, the process of decoding the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor in step S301 includes the steps of:

[0116] When all three parity columns are erased, reverse decoding is performed according to the encoding method of the STAR code in any of the above embodiments to restore the invalid parity columns.

[0117] The STAR code encoding method of any of the above embodiments is applied, and the decoding method is the same as defined in equations (1), (2) and (3) in the STAR code encoding method of any of the embodiments.

[0118] For two-column check column erasure, three modes are included: (i) g = k + 1, h = k + 2, (ii) g = k, h = k + 2, (iii) g = k, h = k + 1. For mode (i) and mode (ii), the invalid information column f can be restored using the traditional decoding method in EVENODD+ code. The decoding process of g = k, h = k + 1 is similar to the decoding method of g = k, h = k + 2. Among them, the traditional decoding method in EVENODD+ code has been disclosed and will not be repeated here.

[0119] Based on this, in one of the embodiments, the process of decoding the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor in step S301 includes the following steps:

[0120] When the second check column and the third check column are erased, the invalid information column and the check column are restored based on the common factor according to the decoding method of the EVENODD+ code.

[0121] When the first parity column is erased, Figure 5 FIG. 4 is a flowchart of a STAR code decoding method according to another embodiment. Figure 5As shown, the process of decoding the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor in step S301 includes steps S400 to S402:

[0122] S400, when the first parity column is erased, determining a syndrome bit according to a common factor;

[0123] S401, determining a start bit according to the syndrome bit;

[0124] S402, restore the invalid information bits according to each start bit to restore the invalid information column and the check column.

[0125] The decoding algorithm when the first parity column is erased (i.e., h = k, 0 ≤ f < g ≤ k-1). The following Lemma 2 shows how to obtain b m-1,k+1 +b m-1,k+2 .

[0126] Lemma 2.

[0127] Calculate b m-1,k+1 +b m-1,k+2 pass

[0128]

[0129] Equation (4) is derived from equations (2) and (3); equation (5) is derived from is an even number; Equation (6) is because {-j, 1-j, ..., m-1-j} = {0, 1, ..., m-1} mod m. Based on this, the proof of Theorem 2 is completed.

[0130] For i = 0, 1, ..., m-2, by i,k+1 and b i,k+2 Subtract all the information bits in the k-2 surviving information columns from the original information column to obtain the following 2m-2 syndrome bits:

[0131]

[0132]

[0133] According to Lemma 2, (b -1-f,f +b -1-g,g )+(b -1+f,f +b -1+g,g ).

[0134] Consider the case of f>0. When f>0, in equation (7), when i=f-1 (because 0≤f-1≤k-3), we have

[0135] p f-1,1 =b-g+f-1,g +(b -1-f,f +b -1-g,g ) (9)

[0136] In equation (7), when i = g-1 (because 0 ≤ g-1 ≤ k-2), we have

[0137] p g-1,1 =b -f+g-1,f +(b -1-f,f +b -1-g,g ) (10)

[0138] Similarly, in equation (8) when i = mf-1 (because m-k+1≤mf-1≤m-2), we have

[0139] p m-f-1,1 =b g-f-1,g +(b -1+f,f +b -1+g,g ) (11)

[0140] In equation (8), when i = mg-1 (because mk≤mg-1≤m-3), we have

[0141] p m-g-1,1 =b f-g-1,f +(b -1+f,f +b -1+g,g ) (12)

[0142] The bits in equations (9), (10), (11) and (12) are the starting bits. Starting from the starting bit in equation (9), the following information bits can be calculated. First, calculate the bit p f-1,1 and p -2g+f-1,2 and to obtain:

[0143] b -2g+2f-1,f +(b -1-f,f +b -1-g,g )+ε(b -1+f,f +b -1+g,g ),

[0144] where ε∈{0,1}. Then, we find b in equation (7): -2g+2f-1,f By adding the i=3f-2g-1 bit in equation (7) to the above equation, we can obtain:

[0145] η(b -1-f,f +b -1-g,g )+ε(b -1+f,f +b -1+g,g )+b -3f-2g-1,g ,

[0146] where η∈{0,1}. By repeating the above process times, you can get:

[0147]

[0148]

[0149]

[0150] in is a non-negative integer. Recall that there is no term b in equation (7) and equation (8) respectively. -1-f,f +b -1-g,g and b -1+f,f +b -1+g,g .if:

[0151] or

[0152] or

[0153] or

[0154]

[0155] Then the above process ends. Similarly, we can get:

[0156]

[0157] or:

[0158]

[0159] in is a non-negative integer. By adding the selected bits in equation (7) and equation (8), until

[0160] or

[0161] or

[0162] or

[0163]

[0164] For the starting position p in equation (11) -f-1,2 , you can get:

[0165]

[0166] or:

[0167]

[0168] in is a non-negative integer,

[0169] or

[0170] or

[0171] or

[0172]

[0173] For the starting position p in equation (12) -g-1,2 , you can get:

[0174] or

[0175] or

[0176] or

[0177]

[0178] Since there is no b for i=m-1 in equation (7) -f+i,f +b -g+i,g , in equation (8) there is no b for i = m-1 f+i,f +b g+i,g . -1-f,f +b -1-g,g and the m-1 bits in equation (7) are put into the first group, and b -1+f,f +b -1+g,g The m-1 bits in equation (8) are put into the second group. Given an integer t, satisfying 0≤t≤m-1, we can always find a binary integer containing b in the first group. (-f+i)mod m,f =b t,f or b (-g+i)mod m,g =b t,g and can find a bit containing b in the second group (f+i)mod m,f =b t,f or b (g+i)mod m,g =b t,g For each starting bit, recursively select a bit in equation (7) or equation (8) that can be offset until the remaining bit is b -f-1,f , b -g-1,g , b f-1,f , b g-1,gTherefore, all 2(m-1) syndrome bits in equation (7) and equation (8) use the starting bit in equation (9), (10), (11) and equation (12) to calculate one bit, and each bit in equation (7) and equation (8) is used only once in calculating the bit of the starting bit in equation (9), (10), (11) and equation (12). The 2(m-1) bits can be divided into four groups in equation (7) and equation (8). The bits in each group are used to calculate the bits starting from the starting bit. S 1 , S 2 , S 3 and S 4 Respectively represent the starting position p f-1,1 、p g-1,1 、p -f-1,2 and p -g-1,2 Related groups.

[0179] Lemma 3. Let group S 1 , S 2 , S 3 and S 4 The number of digits is |S 1 |、|S 2 |、|S 3 | and |S 4 |, with |S 1 |=|S 3 |, and |S 2 |=|S 4 |.

[0180] Proof: First prove that |S 1 |=|S 3 |. The sum in equation (13) is or The sum in equation (14) is or End. If Then there is Otherwise, if Then there is On the other hand, if Then there is if Then there is The number of syndrome bits in equation (13) and equation (14) are:

[0181]

[0182] and

[0183]

[0184] Therefore, we have:

[0185]

[0186] For the starting position p -f-1,2 , there are bits in equation (17) or equation (18). If the subscript in equation (17) is or Then the sum in equation (17) ends. Similarly, if the subscript in equation (18) is or Then the sum in equation (18) ends. If have In addition, if have On the other hand, if have if have Therefore, there is

[0187]

[0188] For two starting bits p g-1,1 and p -g-1,2 , using the same parameters, we can also prove that |S 2 |=|S 4 |. Proof completed.

[0189] According to Lemma 3, |S 1 |=|S 3 | and |S 2 |=|S 4 |. Since there are 2(m-1) syndrome bits, and each syndrome bit is in a group, we get |S 1 |+|S 3 |=|S 2 |=|S 4 |=m-1.

[0190] From p f-1,1 The starting position of can be obtained:

[0191] η(b -1-f,f +b -1-g,g )+ε(b -1+f,f +b -1+g,g )+b -1-f,f ,

[0192] if|S 1 |=2f·(2g-2f) -1 mod m, (21)

[0193] η(b -1-f,f +b -1-g,g )+ε(b -1+f,f +b -1+g,g )+b-1+f,f ,

[0194] if|S 1 |=2(mf)·(2g-2f) -1 mod m, (22)

[0195] η(b -1-f,f +b -1-g,g )+ε(b -1+f,f +b -1+g,g )+b -1+g,g ,

[0196] if|S 1 |=2(f-2g)·(2g-2f) -1 mod m+1, (23)

[0197] And further get:

[0198]

[0199] Similarly, for p -f-1,1 The starting position of can be obtained:

[0200]

[0201] According to Lemma 3, |S 1 |=|S 3 |, together with equation (24) and equation (25), we can get from p f-1,1 and p -f-1,2 The two starting bits of p can be used to calculate two different information bits. Similarly, it can be proved that g-1,1 and p -g-1,2 Two start bits calculate two different information bits. Therefore, four information bits b are obtained from four start bits. -1+g,g , b -1+f,f , b -1-f,f and b -1-g,g , and further calculate b -1-f,f +b -1-g,g and b -1+f,f +b -1+g,g The other information bits in columns f and g can be calculated in the same manner as conventional STAR codes, which will not be described in detail here.

[0202] When f=0, there are two start bits b g-1,0 +b -1-g,g and b -g-1,0 +b -1+g,g , and only two bits b need to be calculated by the same method as above for f>0 -1-g,g and b -1+g,g .

[0203] Consider the example in Table 1. Assume that columns f=1, g=2 and l=3 fail. By subtracting the information bits of column 0 from the check bits of columns 4 and 5, the following bits are obtained:

[0204] b 7,2 +b 8,4 , b 0,1 +b 8,4 , b 1,1 +b 0,2 , b 2,1 +b 1,2 ,

[0205] b 3,1 +b 2,2 , b 4,1 +b 3,2 , b 5,1 +b 4,2 , b 6,1 +b 5,2 ,

[0206] b 1,1 +b 2,2 , b 2,1 +b 3,2 , b 3,1 +b 4,2 , b 4,1 +b 5,2 ,

[0207] b 5,1 +b 6,2 , b 6,1 +b 7,2 , b 7,1 +b 8.5 , b 0,2 +b 8,5 ,

[0208] By summing all the above bits, we can get b 8,4 +b 8,5 =b 7,1 +b 6,2 +b 0,1 +b 1,2 When f>0, there are four start bits b 7,2 +b 8,4 , b 0,1 +b 8,4 , b 7,1 +b 8,5 and b 0,2 +b 8,5 . From the starting position b 7,2 +b 8,4 To begin with, we can calculate b 0,1 pass:

[0209] (b7,2 +b 8,4 )+(b 6,1 +b 7,2 )+(b 6,1 +b 5,2 )+(b 4,1 +b 5,2 )+(b 4,1 +b 3,2 )+(b 2,1 +b 3,2 )+(b 2,1 +b 1,2 )+(b 8,4 +b 8,5 )=b 0,1

[0210] And use b 0,1 +(b 0,1 +b 8,4 ) Calculate b 8,4 Once b 8,4 Knowing that, we can calculate b 8,5 All other information bits can be decoded iteratively to complete the decoding.

[0211] When no checksum column is erased, Figure 6 A flowchart of a STAR code decoding method according to another embodiment is shown in FIG. Figure 6 As shown, the process of decoding the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor in step S301 includes steps S500 to S502:

[0212] S500, when no check column is erased, determining a syndrome bit according to a common factor;

[0213] S501, finding a starting point in the syndrome bits, and repairing the second erasure information column;

[0214] S502: Restore the first erasure information column and the third erasure information column according to the decoding method of the EVENODD+ code.

[0215] Considering that three information columns f, g and h are erased, where 0≤f<g<h≤k-1, and it is desired to restore the information bits in columns f, g and h, a decoding method of a STAR code according to another embodiment is as follows.

[0216] Step 1: Calculate b using Theorem 1 m-1,k+1 and b m-1,k+2 .

[0217] Step 2: By m-1,k+1 、b m-1,k+2 The following 3p-1 syndromes are calculated by subtracting the information bits in the k-3 surviving information columns from the 3(p-1) check bits:

[0218] b i,f +b i,g +b i,h for 0≤i≤p-2,

[0219] b i-f,f +b i-g,g +b i-h,h for 0≤i≤p-1,

[0220] b i+f,f +b i+g,g +b i+h,h for 0≤i≤p-1.

[0221] Step 3: Find a starting point in column g and fix column g.

[0222] Step 4: Repair columns f and h using the decoding algorithm in EVENODD+.

[0223] After executing the above four steps, the three erased information columns can be restored. The method of finding the starting point of column g is similar to the traditional RTP code recovery method, which will not be repeated here.

[0224] In the proof of Lemma 2, b is computed by summing all 2(m-1) check bits in columns k+1 and k+2. m-1,k+1 +b m-1,k+2 is a key point in the decoding algorithm. By Lemma 2, if there is an even number of b in the k+1 column (k+2 column) m-1,k+1 (b m-1,k+2 ), we can always get b m-1,k+1 +b m-1,k+2 This is also the m-1,k+1 Add to the front of k+1 column Check digit, and b m-1,k+2 Add to the k+2 column However, the number of check bits in the k+1 column (or k+2 column), respectively, contains b m-1,k+1 (b m-1,k+2 ) should not be less than Because it is necessary to ensure that any k-1 information columns plus the k+1th column can recover all information bits. In the decoding algorithm for any three information columns erased, the b given in Theorem 1 m-1,k+1 and b m-1,k+2 The calculation of 2 is crucial because the decoding algorithm can be simplified to that of traditional RTP.

[0225] Also note that in traditional STAR codes, the number of information columns should be a prime number, and the number of rows is equal to the number of information columns minus 1. However, this constraint is relaxed in STAR+(m, k). When k=m, STAR+(m, k) is simplified to STAR code.

[0226] In the STAR code decoding method of any of the above embodiments, after obtaining the erasure status of the information column and the check column of the STAR code to be decoded, the STAR code to be decoded is decoded according to the erasure status of the information column and the check column and the common factor, and the invalid information column and the check column are restored. Based on this, the decoding efficiency of the STAR code is improved by adding the check bit in the selected state according to the common factor of the STAR code.

[0227] The embodiment of the present invention also provides a STAR code decoding device.

[0228] Figure 7 FIG. 1 is a module structure diagram of a STAR code decoding device according to an embodiment of the present invention. Figure 7 As shown, a STAR code decoding device according to an embodiment includes a module 200 and a module 201:

[0229] An erasure determination module 200 is used to obtain the erasure status of the information column and the check column of the STAR code to be decoded;

[0230] The information column and check column recovery module 201 is used to decode the STAR code to be decoded according to the erasure status of the information column and check column and the common factor, and recover the invalid information column and check column.

[0231] The above-mentioned STAR code decoding device, after obtaining the erasure status of the information column and the check column of the STAR code to be decoded, decodes the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor, and restores the invalid information column and the check column. Based on this, according to the addition of the common factor of the STAR code to the selected check bit, the decoding efficiency of the STAR code is improved.

[0232] An embodiment of the present invention further provides a computer storage medium on which computer instructions are stored. When the instructions are executed by a processor, the STAR code encoding method or STAR code decoding method of any of the above embodiments is implemented.

[0233] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0234] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to execute all or part of the methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, RAM, ROM, magnetic disks or optical disks.

[0235] Corresponding to the above-mentioned computer storage medium, in one embodiment, a computer device is also provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements any one of the STAR code encoding methods or STAR code decoding methods in the above-mentioned embodiments.

[0236] The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a STAR code encoding method or a STAR code decoding method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0237] After obtaining the erasure status of the information column and the check column of the STAR code to be decoded, the computer device decodes the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor, and restores the invalid information column and the check column. Based on this, the decoding efficiency of the STAR code is improved by adding the check bit in the selected check bit according to the common factor of the STAR code.

[0238] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0239] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A STAR code encoding method, characterized in that: Includes steps: Determining a check digit of the second check column and a check digit of the third check column; Determine the common factors; adding the common factor to the selected check digit of the second check column and the selected check digit of the third check column; The common factors include a first common factor b m-1,k+1 and the second common factor b m-1,k+2 ; The first common factor is as follows: The second common factor is as follows: Wherein, the first common factor is added to the second check column, and the second common factor is added to the third check column; Where, given an odd number m≥k, gcd(m,l)=1,l=1,2,…,k-1, define (m-1)×(k+3) array code; for j=0,1,…,k-1, column j is called information column, storing information bit b 0,j , b 1,j , …, b m-2,j ; For j = k, k + 1, k + 2, column j is called the check column, which is used to store the check bit; the subscripts of all blocks need to be calculated modulo m; given a (m-1) × k-bit information array b i,j , i = 0, 1, ..., m-2 and j = 0, 1, ..., k-1, define a virtual row b for all j columns m-1,j =0.

2. The STAR code encoding method according to claim 1, characterized in that: The check digit of the second check column is as follows: The check digit of the third check column is as follows:

3. The STAR code encoding method according to claim 2, characterized in that: The process of adding the common factor to the selected check digit of the second check column and the selected check digit of the third check column comprises the steps of: Add the common factor to the second check column The parity bit and the third parity column A check digit.

4. A STAR code decoding method, characterized in that: Includes steps: Obtain the erasure status of the information column and check column of the STAR code to be decoded; Decoding the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor, and restoring the invalid information column and the check column; The common factors include a first common factor b m-1,k+1 and the second common factor b m-1,k+2 ; The first common factor is as follows: The second common factor is as follows: The process of decoding the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor comprises the steps of: When all three parity columns are erased, reverse decoding is performed according to the encoding method of the STAR code as claimed in any one of claims 1 to 3 to restore the invalid parity column.

5. The STAR code decoding method according to claim 4, characterized in that: The process of decoding the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor comprises the steps of: When the second check column and the third check column are erased, the invalid information column and the check column are restored based on the common factor according to the decoding method of the EVENODD+ code.

6. The STAR code decoding method according to claim 4, characterized in that: The process of decoding the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor comprises the steps of: When the first parity column is erased, determining a syndrome bit according to the common factor; Determining a start bit according to the syndrome bit; The failed information bits are restored according to the start bits to restore the failed information column and the check column.

7. The STAR code decoding method according to claim 4, characterized in that: The process of decoding the STAR code to be decoded according to the erasure status of the information column and the check column and the common factor comprises the steps of: When no parity column is erased, determining a syndrome bit according to the common factor; Finding a starting point in the syndrome bits and repairing a second erasure information column; The first erasure information column and the third erasure information column are restored according to the decoding method of the EVENODD+ code.

Citation Information

Patent Citations

  • Network coding method and system based on circulant permutation matrix

    CN105356968A

  • Polar code encoding and decoding method and apparatus

    CN107425857A