General decoding method and system for high-fault-tolerance erasure codes

The decoding matrix is ​​transformed by single-state LU decomposition method and multi-state LU decomposition method, which solves the problem of slow decoding rate and high number of XOR operations during the erasure decoding process, and realizes efficient erasure decoding and is suitable for Various erasure code designs.

CN118984159APending Publication Date: 2024-11-19HUNAN XINGHAN DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411378764.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

The decoding rate of erasure coding is slow during the decoding process, and the number of XOR operations is required, which limits the decoding speed.

Method used

The single-state LU decomposition method and multi-state LU decomposition method are used to transform the decoding matrix rows to generate a decoding scheduling sequence, and convert the decoding matrix into a unit matrix through the minimum row transformation, thereby reducing the number of XOR operations and improving decoding efficiency.

Benefits of technology

Significantly improve decoding efficiency, reduce the number of decoding XOR times, and is suitable for any fault-tolerant erasure coding, which is efficient and versatile.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118984159A_ABST
    Figure CN118984159A_ABST
Patent Text Reader

Abstract

The invention discloses a universal decoding method and system for high-fault-tolerance erasure codes, and particularly belongs to the technical field of data coding and storage, and the method comprises the steps: S1, positioning lost data blocks during storage according to the availability of storage files in a distributed storage system, and according to the positioning of available data blocks and the lost data blocks, carrying out decoding on the lost data blocks; creating a decoding matrix using the distribution matrix; s2, combining data blocks which are not lost in the storage system into a decoding vector; s3, performing row transformation on the decoding matrix to obtain a unit matrix, and generating a decoding scheduling sequence based on the transformation process of the obtained unit matrix; and S4, on the basis of the decoding scheduling sequence, performing XOR transformation on the one-to-one corresponding parts of the rows of the decoding matrix and the decoding vectors to obtain lost data blocks, and completing decoding. The method is suitable for the erasure codes based on the XOR operation, decoding is carried out through the single-state LU decomposition method or the multi-state LU decomposition method, the decoding XOR frequency is reduced, and the decoding efficiency is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data encoding and storage, and in particular to a universal decoding method and system for high-error-tolerance erasure codes. Background Art

[0002] With the rapid development of big data technology and the widespread application of cloud storage technology, massive amounts of data are stored on cloud servers. In this context, data security and reliability are particularly important. In order to efficiently manage these huge data sets, distributed storage technology has emerged. In large-scale distributed storage systems, node disk failures are commonplace. In order to ensure that the system can still maintain high availability and reliability when a node fails, data redundancy technology is usually used. At present, there are two main types of data redundancy technologies: multi-copy technology and erasure coding technology. Compared with multi-copy technology, erasure coding technology can not only provide the same or even higher system availability and reliability, but also reduce storage overhead by half or more, thereby saving storage costs. Taking Reed-Solomon (RS) code as an example, the main advantage of erasure coding technology is that it effectively improves the utilization of storage space, thereby reducing overall storage costs and significantly reducing data redundancy. For example, traditional multi-copy technology provides three copies for each file, resulting in a storage space utilization rate of only 1 / 3 and a data redundancy rate of up to 200%; while the 4+2 erasure code scheme (2 check blocks are calculated by 4 data blocks) can achieve a storage space utilization rate of 2 / 3 and a data redundancy rate of 150%.

[0003] However, erasure coding technology consumes a lot of computing resources during the encoding and decoding process. At present, the decoding process of erasure codes based on the generator matrix usually involves removing the rows corresponding to the lost data blocks from the generator matrix to construct a decoding matrix. Then, the original data is restored by multiplying the inverse matrix of the decoding matrix with the vector composed of the surviving data. Since the time complexity of solving the inverse matrix of the decoding matrix is ​​relatively high (generally O(n 3 )), in the decoding method represented by the open source erasure code library Jerasure, the number of XOR operations required for decoding is relatively large, which limits the decoding speed. Alternatively, the well-known Gaussian elimination method is used, but the computational overhead required is not essentially different from the above method, and the decoding performance is limited.

[0004] Therefore, a decoding method that can improve the decoding rate and reduce the number of decoding XOR operations is urgently needed in the art. Summary of the invention

[0005] The present invention provides an efficient universal decoding algorithm and system for erasure codes, which can solve the problem that the erasure codes have a slow decoding rate and require a large number of XOR operations during the decoding process. The method specifically includes:

[0006] Step S1, locating lost data blocks during storage according to the availability of stored files in the distributed storage system, and creating a decoding matrix using a distribution matrix according to the location of available data blocks and the lost data blocks;

[0007] Step S2, combining the unlost data blocks in the storage system into a decoding vector;

[0008] Step S3, performing row transformation on the decoding matrix to obtain a unit matrix, and generating a decoding scheduling sequence based on the transformation process of obtaining the unit matrix;

[0009] Step S4: Based on the decoding scheduling sequence, perform XOR transformation on the rows of the decoding matrix and the decoding vectors in one-to-one correspondence to obtain the lost data blocks and complete the decoding.

[0010] Optionally, in S3, performing a row transformation on the decoding matrix to obtain a unit matrix, and generating a decoding scheduling sequence based on a transformation process of obtaining the unit matrix includes: performing a row transformation on the decoding matrix using a single-state LU decomposition method to obtain a unit matrix, and generating a decoding scheduling sequence based on a transformation process of obtaining the unit matrix, and the implementation process of the single-state LU decomposition method specifically includes:

[0011] S311, creating a two-dimensional array, the two-dimensional array is used to store the number of 1s eliminated after XORing each pair of rows, and initializing the score array;

[0012] S312, for each pair of rows, after XORing the jth row to the ith row, calculate the difference between the number of 1s in the ith row after XORing and the number of 1s in the original ith row, and store the obtained difference in the score array;

[0013] S313, finding the maximum difference in the score array, and recording the row number index1 and column number index2 corresponding to the maximum difference;

[0014] S314, if both index1 and index2 are 0, no transformation is required and the loop is exited. Otherwise, the index2th row is XORed to the index1th row for row transformation. During the row transformation process, a decoding schedule sequence is generated and the sequence pair (index1, index2) is added to the decoding schedule sequence.

[0015] S315, after performing the row transformation, updating the scores related to the index1th row and the index2th row in the score array;

[0016] S316, repeat operations S312-S315 until index1 and index2 are both 0, and then exit the loop;

[0017] S317, input the obtained decoding scheduling sequence into step S4.

[0018] Optionally, in S3, performing a row transformation on the decoding matrix to obtain a unit matrix, and generating a decoding scheduling sequence based on a transformation process of obtaining the unit matrix includes: performing a row transformation on the decoding matrix using a multi-state LU decomposition method to obtain a unit matrix, and generating a decoding scheduling sequence based on a transformation process of obtaining the unit matrix, and the implementation process of the multi-state LU decomposition method specifically includes:

[0019] S321, initialize a state list, the state list includes an initial upper triangular matrix and an initial lower triangular matrix, form a two-dimensional array for storing the number of 1s in the matrix eliminated after each pair of rows are XORed, create a variable best_sequence for storing the matrix scheduling sequence, and create a variable min_schedu le for storing the length of the current sequence;

[0020] S322, for each pair of rows, XOR the jth row to the ith row, calculate the difference between the number of 1s in the ith row after XOR and the number of 1s in the original ith row, and store the calculated difference in the score array;

[0021] S323, find the maximum difference from the score array, record the row number in dex1 and column number index2 corresponding to the maximum difference, and record the row that meets the conditions in the state list;

[0022] S324, if both the index1 and the index2 are 0, no transformation is required and the loop is stopped. Otherwise, the first group of states in the state list is popped out, the index2 row is XORed to the index1 row for row transformation to obtain a row transformation matrix, the row transformation matrix is ​​recorded as a scheduling sequence (index1, index2) and added to the variable best_sequence, the length of the current scheduling sequence is calculated and stored in the variable min_schedule;

[0023] S325, repeating the operations S322-S324 on the row transformation matrix, and when the matrix is ​​transformed into a unit matrix, comparing the current sequence length with the shortest sequence length, and selecting the smaller sequence length to retain;

[0024] S326. Obtain the shortest matrix scheduling sequence according to the minimum sequence length, and input the matrix scheduling sequence into step S4 as a decoding scheduling sequence.

[0025] Optionally, in step S4, based on the decoding scheduling sequence, the rows of the decoding matrix and the decoding vectors are transformed in a one-to-one correspondence to obtain the lost data block, and the process of completing the decoding specifically includes:

[0026] Decomposing the decoding matrix into an upper triangular matrix and a lower triangular matrix, wherein rows in the upper triangular matrix and the lower triangular matrix correspond to corresponding parts of the decoding vector;

[0027] Use the single-state LU method or the multi-state LU decomposition method to perform row transformation on the upper triangular matrix and the lower triangular matrix, use the row transformation to eliminate the "1" in the matrix, add each row transformation sequence pair to the decoding scheduling sequence, where the row transformation sequence pair has a one-to-one correspondence with the decoding vector, execute the decoding vector according to the decoding scheduling sequence, and decode the original data.

[0028] The present invention also discloses a universal decoding system for high error-tolerant erasure codes, which includes: a decoding matrix construction module, a decoding vector construction module, a unit matrix calculation module and a decoding module:

[0029] The decoding matrix building module is used to locate the lost data blocks during storage according to the availability of the storage files in the distributed storage system, and to create a decoding matrix using the distribution matrix according to the location of the available data blocks and the lost data blocks;

[0030] The decoding vector construction module is used to combine the non-lost data blocks in the storage system into a decoding vector;

[0031] The identity matrix calculation module is used to perform row transformation on the decoding matrix to obtain the identity matrix, and generate a decoding scheduling sequence based on the transformation process of obtaining the identity matrix;

[0032] The decoding module is used to perform XOR transformation on the one-to-one correspondence between the rows of the decoding matrix and the decoding vectors based on the decoding scheduling matrix, so as to obtain the lost data blocks and complete decoding.

[0033] Optionally, the workflow of the single-state LU decomposition method in the identity matrix calculation module specifically includes:

[0034] A. Create a two-dimensional array, the two-dimensional array is used to store the number of 1s eliminated after XORing each pair of rows, and initialize the score array;

[0035] B. For each pair of rows, after XORing the jth row to the ith row, calculate the difference between the number of 1s in the ith row after XORing and the number of 1s in the original ith row, and store the difference in the score array;

[0036] C. Find the maximum difference in the score array, and record the row number index1 and column number index2 corresponding to the maximum difference;

[0037] D. If both index1 and index2 are 0, no transformation is required and the loop is exited. Otherwise, the index2th row is XORed to the index1th row for row transformation. During the row transformation process, a decoding schedule sequence is generated and the sequence pair (index1, index2) is added to the decoding schedule sequence.

[0038] E. After the row transformation, update the scores of the index1th row and the index2th row in the score array;

[0039] F. Repeat operations BE until index1 and index2 are both 0, and then exit the loop;

[0040] G. Input the obtained decoding scheduling sequence into the decoding module.

[0041] Optionally, the workflow of the multi-state LU decomposition method in the identity matrix calculation module specifically includes:

[0042] A1. Initialize the state list, which includes the initial upper triangular matrix and the initial lower triangular matrix, form a two-dimensional array to store the number of 1s in the matrix that are eliminated after each pair of rows are XORed, create a variable best_sequence to store the matrix scheduling sequence, and create a variable min_schedule to store the length of the current sequence;

[0043] B1. For each pair of rows, XOR the jth row with the ith row, calculate the difference between the number of 1s in the ith row after XOR and the number of 1s in the original ith row, and store the calculated difference in the score array;

[0044] C1. Find the maximum difference from the score array, record the row number index1 and column number index2 corresponding to the maximum difference, and record the row that meets the conditions in the state list;

[0045] D1. If both index1 and index2 are 0, no transformation is required and the loop stops. Otherwise, the first group of states in the state list is popped out, the index2 row is XORed to the index1 row for row transformation to obtain a row transformation matrix, the row transformation matrix is ​​recorded as a scheduling sequence (index1, index2) and added to the variable best_sequence, the length of the current scheduling sequence is calculated and stored in the variable min_schedule;

[0046] E1. Repeat operations B1-D1 on the row transformation matrix. When the matrix is ​​transformed into a unit matrix, compare the current sequence length with the shortest sequence length, and select the smaller sequence length to be retained;

[0047] F1. Obtain the minimum matrix scheduling sequence according to the minimum sequence length, and input the matrix scheduling sequence into the decoding module as a decoding scheduling sequence.

[0048] Optionally, the workflow of the decoding module specifically includes:

[0049] Decomposing the decoding matrix into an upper triangular matrix and a lower triangular matrix, wherein rows in the upper triangular matrix and the lower triangular matrix correspond to corresponding parts of the decoding vector;

[0050] Use the "1" of the single-state LU method or the multi-state LU decomposition method, add each row transformation sequence pair to the decoding scheduling sequence, where the row transformation sequence pair and the decoding vector have a one-to-one correspondence. Execute the decoding vector according to the decoding scheduling sequence to decode the original data.

[0051] Compared with the prior art, the present invention has the following beneficial effects:

[0052] First, the existing erasure code design and encoding and decoding algorithm optimization are mostly designed for a single erasure code, and these optimization algorithms for specific erasure codes cannot be extended to general erasure codes. This method is applicable to erasure codes encoded and decoded by distribution matrices, including Vandermonde RS codes, Cauchy RS codes, generalized EVENODD codes, and generalized RDP codes. This method is applicable to any fault-tolerant erasure code, and is more universal and general than some erasure code encodings and decodings that can only tolerate two or three errors. A decoding matrix is ​​generated according to the position of the binary distribution matrix corresponding to the faulty data block. As long as the decoding matrix generated by the erasure code is reversible, the original data can be restored by this method. The existing common erasure code decoding method generates a decoding matrix from a binary distribution matrix (the matrix is ​​a binary matrix containing only elements 0 and 1) according to the faulty data block, and restores the original data by performing matrix multiplication of the inverse matrix of the decoding matrix with the surviving data. This method requires very high time complexity of matrix inversion and matrix multiplication (the time complexity of matrix inversion and matrix multiplication is O(n 3 ), the computational overhead and time overhead in the decoding process are relatively large. This method uses the single-state LU decomposition method (SLU) and the multi-state LU decomposition method (MLU) to restore the original data block, avoiding the process of matrix inversion and matrix multiplication, thereby greatly reducing the amount of calculation in the decoding process.

[0053] On the other hand, the essence of matrix inversion is Gaussian elimination, which converts the matrix A in the decoding expression into the unit matrix through row transformation, and performs corresponding transformation on the corresponding part of the surviving vector y. The solution equation of the original data vector X to be solved is A*X=y. When the matrix A is transformed into the unit matrix, the vector y' obtained by XOR transformation of the corresponding part of the surviving vector is the lost data block. For the matrix A, the LU decomposition method is used to decompose it into the lower triangular matrix L and the upper triangular matrix U, and then the decoding expression can be converted into the equation: LU*X=y. In order to solve this equation, SLU and MLU are used to calculate the minimum number of row transformations for the lower triangular matrix L and the upper triangular matrix U to ensure that as many "1" as possible are eliminated in one row transformation. This method avoids matrix inversion and matrix multiplication, and transforms the lower triangular matrix and the upper triangular matrix into the unit matrix through the minimum row transformation, that is, the faulty data block is restored through the minimum number of XORs. The present invention is applicable to erasure codes based on XOR operations, and reduces the number of decoding XORs by using the MLU method for decoding, which significantly improves the decoding efficiency. This method is applicable to erasure codes based on distributed matrix encoding and decoding. Compared with traditional erasure code decoding methods, the present invention is not only universal but also highly efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0055] Figure 1 Schematic diagram of encoding and decoding of RS code according to an embodiment of the present invention;

[0056] Figure 2 A schematic diagram of decoding when a RS code data block is lost according to an embodiment of the present invention;

[0057] Figure 3 Schematic diagram of the difference between the matrix inversion solution method of the embodiment of the present invention;

[0058] Figure 4 A schematic diagram of a decoding process implemented in an embodiment of the present invention;

[0059] Figure 5 A schematic diagram of a working example of a multi-state LU decomposition method according to an embodiment of the present invention;

[0060] Figure 6 A schematic diagram of LU decomposition of a 16*16 binary matrix according to an embodiment of the present invention;

[0061] Figure 7This is a graph showing the number of decoding XORs in different coding modes using the Gaussian elimination method when decoding CRS code with the Jerasure library according to an embodiment of the present invention;

[0062] Figure 8 This is a diagram showing the decoding rate data of the Gaussian elimination method in different coding modes when decoding the CRS code with the Jerasure library according to an embodiment of the present invention;

[0063] Fig. 9 This is a data display diagram of the decoding XOR times and decoding rate of the Gaussian elimination method in different coding modes when decoding on the generalized RDP code with the Jerasure library according to the embodiment of the present invention;

[0064] Fig.10 This is a graph showing the number of decoding XORs and decoding rates of the Gaussian elimination method in different coding modes when decoding the generalized EVENODD code with the Jerasure library according to an embodiment of the present invention. DETAILED DESCRIPTION

[0065] Before introducing the present invention, the basic concepts of erasure codes and traditional decoding implementation methods are first explained through specific examples, so as to better explain the concepts of the present invention and demonstrate the advantages of the present invention. The erasure code consists of k data files (devices) and m encoding files in the storage system. When the erasure code adopts the maximum distance separable code (MDS code), the storage system can tolerate the loss of any m files (device failure). When m=2, a variety of MDS codes have been proposed. However, the Reed-Solomon Code is the only universal MDS code that can be applied to any k and m values. The Vandermonde RS code is an erasure code based on the Vandermonde matrix. Its encoding and decoding process requires complex Galois field multiplication and addition, which have considerable computational overhead. The Cauchy RS code (CRS code) is an improved version of the RS code, which is an erasure code based on the Cauchy matrix. The RS code can convert GF(2 w ) domain is converted into logical XOR operations in the GF(2) domain, resulting in more efficient encoding and decoding performance. Bit matrix coding was first described in the original Cauchy RS coding paper. Finite field GF(2 w ) can be represented as a row vector V(e) of size 1*w or a matrix M(e) of size w*w, where each element in the new representation belongs to GF(2). The row vector V(e) corresponds to the binary representation of e, and the i-th row of M(e) is given by the i-1-th row. Applying this representation, the encoding matrix of size k*m can be converted into a new encoding matrix of size wk*wm in GF(2), thus obtaining a binary matrix.

[0066] Encoding and decoding with classic RS code Figure 1For example, the distribution matrix is ​​composed of a 5*5 unit matrix above and a 2*5 generator matrix below. Each data block and check block corresponds to a corresponding row in the distribution matrix. When a data block is lost, the row corresponding to the lost data block is deleted from the distribution matrix, and the first 5 rows (if the number of matrix rows is greater than 5) are selected from the remaining matrix to form a 5*5 decoding matrix. The inverse matrix of the decoding matrix is ​​multiplied by the surviving vector to decode the lost data block. Figure 2 For example, it is shown that when data block D2 and data block D4 fail, the corresponding second and fourth rows in the generation matrix are deleted, and the remaining five rows form a 5*5 decoding matrix (denoted as A). The surviving data blocks and check blocks are combined into a surviving vector, which is also called a decoding vector (denoted as y). The original data block is regarded as an unknown vector (denoted as X). Therefore, the decoding can be expressed as an equation: A*X=y. The original data can be obtained by solving the decoding equation.

[0067] The most common method of matrix inversion and the multi-state LU decomposition process of this method are compared as shown in the figure below. Figure 3 As shown. The process of the matrix inversion method is as follows: the decoding matrix A is generated by deleting the corresponding rows from the generation matrix according to the relationship between the surviving data blocks and the lost data blocks in the distributed storage system. Multiply both sides of the equation A*X=y by the inverse matrix A of the decoding matrix A -1 , the equation becomes A -1 *A*X=A -1 *y, that is, X=A -1 *y, the decoded data vector is the lost data block. The main work required in this method is to find the inverse matrix and matrix multiplication.

[0068] The process of the multi-state LU decomposition method of this method is as follows: the decoding matrix A is decomposed into a lower triangular matrix L and an upper triangular matrix U by the LU decomposition method, that is, A = L*U. The equation A*X = y is transformed into L*U*X = y. The MLU method is used for matrices L and U to generate a scheduling sequence with the minimum number of row transformations required to transform matrices L and U into unit matrices. Matrices L and U are transformed into unit matrices according to the scheduling sequence, and the corresponding parts of the decoding vector are also transformed accordingly. The final vector is the original data.

[0069] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0070] Embodiment 1

[0071] A general decoding method for highly error-tolerant erasure codes, such as Figure 4 As shown, the method includes,

[0072] Step S1, locate the lost data blocks during storage according to the availability of the stored files in the distributed storage system, and create a decoding matrix using the distribution matrix according to the location of the available data blocks and the lost data blocks. In a distributed storage system, data is usually stored in multiple nodes in a dispersed manner. In the case of data block loss, the system first needs to determine which data blocks are available and which data blocks are lost. Based on the location information of the available and lost data blocks, a matrix for decoding the lost data blocks is created using the distribution matrix. The purpose of this step is to provide the necessary mathematical tools and foundation for the decoding process.

[0073] Step S2, combine the data blocks that are not lost in the storage system into a decoding vector. After determining which data blocks are available, it is necessary to organize these available data blocks into a decoding vector. In the storage system, it can be considered that the data blocks are numbered in sequence. In the data blocks that are not lost, the present invention forms a decoding vector in a head-to-tail splicing manner according to the order of the data blocks. For example, in a storage system, 4 data block encodings (numbered D1, D2, D3, and D4) generate 2 check blocks (numbered C1 and C2 respectively). If D1 and D3 are lost, they are directly spliced ​​and combined in the order of D2, D4, C1, and C2 to form a decoding vector. At the same time, the lost data blocks will be regarded as unknown vectors that need to be decoded. All available data blocks are combined into a decoding vector in the order corresponding to the decoding matrix. The original data block is used as an unknown vector for solving in subsequent steps.

[0074] Step S3, perform a row transformation on the decoding matrix to obtain a unit matrix, and generate a decoding scheduling sequence based on the transformation process of obtaining the unit matrix. Perform a row transformation on the decoding matrix using a single-state LU decomposition method and a multi-state LU decomposition method to transform the matrices L and U into unit matrices. By using the LU decomposition method, the decoding matrix is ​​decomposed into a lower triangular matrix L and an upper triangular matrix U. Use a single-state LU method or a multi-state LU method on matrices L and U to generate a scheduling sequence that transforms matrices L and U into unit matrices. Use the generated scheduling sequence to convert the L and U matrices into unit matrices.

[0075] In this embodiment, the decoding matrix can be decomposed into an upper triangular matrix U and a lower triangular matrix L. The upper triangular matrix and the lower triangular matrix are transformed into a unit matrix through row transformation using a single-state U decomposition method or a multi-state LU decomposition method. In this process, there will be a series of row transformation sequences (each element in this sequence is a pair of row subscripts), and this row transformation sequence is used as the basis for the decoding vector operation in S4. The row subscripts in the obtained row transformation sequence correspond to the decoding vector one by one, and an XOR operation is performed on the corresponding part of the decoding vector according to the row subscripts in the sequence. When the sequence is executed, the decoding vector restores the original data.

[0076] Step S4, based on the decoding scheduling sequence, the rows of the decoding matrix and the one-to-one corresponding parts of the decoding vector are XOR-transformed to obtain the lost data block and complete the decoding. The rows of the decoding matrix correspond to the corresponding parts of the decoding vector, and the decoding vector is transformed accordingly. The vector finally converted is the lost data block, and the decoding is completed. On the basis of the previous steps, the rows of the decoding matrix are used to correspond to the various parts of the decoding vector, and the decoding vector is subjected to a series of transformations identical to the L and U matrices to finally obtain the lost data block. Each row of the decoding matrix corresponds to a part of the decoding vector. According to the row transformations made by the L and U matrices, the decoding vector is transformed accordingly to solve the unknown data block. The vector finally converted is the originally lost data block. At this point, the decoding process is completed and the lost data is restored. Specifically, the decoding matrix is ​​decomposed into an upper triangular matrix and a lower triangular matrix, the rows in the matrix correspond to various parts of the vector, and the single-state LU method is used on the upper triangular matrix and the lower triangular matrix to eliminate as many "1"s as possible in one row transformation, and the lost data block is solved with the least number of XOR times; or the multi-state LU method is used to transform the triangular matrix into a unit matrix with the least number of XOR times, and the lost data block is solved with the least number of XOR times.

[0077] There are three main methods for performing row transformation (Gaussian elimination method) on matrices in a finite field: 1) swapping any two rows of the matrix; 2) multiplying any row of the matrix by a non-zero constant k; 3) multiplying any row of the matrix by a non-zero constant k and adding it to any other row.

[0078] The present invention is aimed at an erasure code based on XOR. The decoding matrix is ​​a matrix of a binary domain and contains only elements 0 and 1. Therefore, when performing row transformation, three transformations of a finite field are transformed into two operations of a binary domain: 1) exchanging any two rows of the matrix; 2) XORing any row of the matrix to any other row.

[0079] For the decoding equation A*X=y, two operations in the binary field are used to transform the rows of the decoding matrix A, and the decoding vector y is also transformed accordingly. When the matrix A becomes the unit matrix, the decoding vector is the vector that needs to be solved.

[0080] In the process of Gaussian elimination decoding, the non-zero elements on the main diagonal are used to eliminate other non-zero elements, and the decoding matrix is ​​transformed into the unit matrix. In this process, the purpose of each transformation is only to eliminate one "1" in the decoding matrix, but there are many "1"s in the binary distribution matrix, and there may be a row transformation combination that can eliminate multiple "1"s. By finding a row transformation that eliminates more "1"s, reducing the number of row transformations required to transform the decoding matrix into the unit matrix, the number of XOR operations in decoding can be reduced and the decoding rate can be improved.

[0081] Perform LU decomposition on the decoding matrix A, that is, A = L*U, L is the lower triangular matrix, and U is the upper triangular matrix, then the system of equations is transformed into: L*U*X = y. If Gaussian elimination is still used for decoding, the elimination strategy is: for the lower triangular matrix, select the diagonal elements in turn to eliminate the elements with the value of "1" below the column where it is located; for the upper triangular matrix, select the diagonal elements in turn to eliminate the elements with the value of "1" above the column where it is located. This is the biggest disadvantage of Gaussian elimination: only one "1" can be eliminated at a time of row transformation.

[0082] This method proposes a single-state LU decomposition method (SLU) and a multi-state LU decomposition method (MLU). That is, the matrix L and U obtained after decomposition are used to generate a matrix scheduling sequence using the SLU and MLU methods. In this embodiment, the matrix is ​​an n*n square matrix, and each row transformation can eliminate the most "1" in the current state of the matrix. The number of possible row transformation pairs in the matrix is ​​n*(n-1) / 2 pairs, and the pair that can eliminate the most "1" among these row transformation pairs is selected.

[0083] The SLU in this method is to select a pair of row combinations with the smallest row subscript for row transformation from the row combinations that can eliminate the most "1" in the current matrix. The row combination transformation to be selected has only one state (i.e., single state), and does not take into account that other combinations that can eliminate the most "1" may require fewer row transformations in subsequent transformations. The MLU in this method takes this problem into consideration, and selects as many row combinations that can eliminate the most "1" in the matrix as possible to retain. There are multiple states (i.e., multiple states) for the number of row combinations to be selected, and each state is tried on the matrix. Through this attempt, the matrix scheduling sequence with the least number of row transformations is found.

[0084] In this embodiment, the single-state LU decomposition method and the multi-state LU decomposition method are two methods applied to the decoding matrix to convert it into the unit matrix, wherein the single-state is to retain only one pair of row combinations for each row transformation, and the multi-state is to retain multiple pairs of row combinations for selection each time, which can be understood as a multi-state being an optimized version of the single-state, and one of the two methods is used. The characteristic of the single-state LU decomposition is that it only considers eliminating as many "1"s in the decoding matrix as possible for each row transformation, and uses as few row transformations as possible to convert the decoding matrix into the unit matrix, and the number of decoding XORs required is also reduced.

[0085] The purpose of the multi-state LU decomposition method is to find the minimum number of row transformations required to convert from the decoding matrix to the unit matrix, and the minimum number of decoding XORs required. The multi-state LU decomposition method is an optimized version of the single-state LU decomposition. In the process of decoding and solving the lost data block, only one method can be selected. Both methods can achieve decoding, but the multi-state method aims to find the minimum number of decoding XORs required for the decoding process.

[0086] The SLU and MLU erasure code decoding method based on the distribution matrix of the present invention will be described in a more preferred embodiment. The matrix scheduling sequence of the SLU is constructed by the following iterative algorithm:

[0087] S311, initialize the score array: create a two-dimensional array scores, the two-dimensional array is used to store the number of 1s eliminated after XORing each pair of rows, and initialize the score array; S312, calculate the score array: for each pair of rows (the i-th row and the j-th row), XOR the j-th row to the i-th row, calculate the difference between the number of 1s in the i-th row after XORing and the number of 1s in the original i-th row, and store the obtained difference in the score array scores[i][j]; S313, find the maximum score: find the maximum difference in the score array, record it as max, and record the row number index1 and column number index2 corresponding to the maximum difference; S314, determine the termination condition: if the row number and column number corresponding to the maximum difference are both 0, it means that there is no need to continue the transformation, jump out of the loop, and the algorithm ends, otherwise XOR the index2-th row to the index1-th row for row transformation; S315, update the score array: after the row transformation is performed, it is necessary to update the affected part of the score array, that is, update the column number corresponding to the index2-th row. S316: repeat operations S312-S315 to continue the next round of calculation of score arrays and row transformation operations until the termination condition is met.

[0088] Through SLU, we can select the best elimination combination during the decoding process, thereby reducing the number of row transformations when the decoding matrix is ​​transformed into the unit matrix, thereby reducing the number of XOR operations and improving the decoding rate. However, we found that in SLU, the number of combined subscripts with the maximum number of "1" in the selected elimination LU matrix is ​​always only one pair, and the first row transformation will affect the subsequent matrix transformation. However, in the entire LU matrix, there may be multiple groups of row transformations that can eliminate the same number of "1". In this case, we choose to retain multiple groups of row transformations and use the MLU method to complete the process of converting the decoding matrix into the unit matrix.

[0089] The idea of ​​the MLU method is to retain multiple groups of row transformations. When performing LU decomposition of the matrix, for example, there is more than one group of "1" row combinations that can eliminate k. We choose to retain as many combinations as possible, rather than just retaining one pair of combinations. We perform row transformations on each pair of retained row combinations. We continue to use this method to retain as many combinations as possible on the matrix that has undergone a row transformation. When the path of the first transformation to the unit matrix is ​​traced back, the matrix scheduling series obtained is the minimum number of row transformations required to transform the matrix row into the unit matrix. The matrix scheduling sequence of the SLU is constructed by the following iterative algorithm:

[0090] S321. Initialization: Initialize a state list states, including the initial state (initial L and U matrices), which is used to store the row combinations that can eliminate the most "1". Create a two-dimensional array scores to store the number of "1"s eliminated after each pair of rows is XORed. Create a variable best_sequence to store the matrix scheduling sequence. Create a variable min_schedule to store the length of the current sequence. S322. For each pair of rows (the i-th row and the j-th row, XOR the j-th row to the i-th row, calculate the difference between the number of 1s in the i-th row after XOR and the number of 1s in the original i-th row, and store the calculated difference in the score array scores[i][j]; S323. Find the maximum difference from the score array, record the row number index1 and column number index2 corresponding to the maximum difference, and record the rows that meet the conditions in the state list; in this embodiment, the conditions that need to be met are: the maximum number of "1"s that can be eliminated by one row transformation is the maximum difference, and the row sequence number of the row combination that meets this maximum difference; S324. If both the index1 and the index2 are 0, no transformation is required and the loop is stopped, otherwise the state list is saved. The first group of states in the table pops up, and the index2 row is XORed to the index1 row to obtain a row transformation matrix, and the row transformation matrix is ​​recorded as a scheduling sequence (index1, index2) and added to the variable best_sequence, and the length of the current scheduling sequence is calculated and stored in the variable min_schedule; S325, the row transformation matrix repeats operations S322-S324, and when the matrix is ​​transformed into a unit matrix, the current sequence length and the shortest sequence length are compared, and the smaller sequence length is selected; S326, the minimum matrix scheduling sequence is obtained according to the minimum sequence length. When all the reserved row combination states of the matrix are tried and completed, the minimum matrix scheduling sequence is obtained.

[0091] Figure 5The execution process of the MLU method is shown, and the steps of each attempt are represented by a tree structure diagram. This method is applicable to any binary triangular matrix and can find the minimum number of XOR operations required to transform it into the identity matrix. First, for a given triangular matrix, find the row combination that can eliminate the most "1". For each combination, try it in the way shown in the example to generate a new matrix. Then, repeat the operation of the first step for these new matrices, find the row combination that can eliminate the most "1", and try to generate a new matrix again. This process is repeated, and each generated matrix is ​​checked until all matrices have been tried. At each step, it is necessary to check whether the current matrix has become the identity matrix. If it is found that a new matrix has become the identity matrix in any step, the path of the matrix is ​​traced back to find the minimum number of row transformations from the initial triangular matrix to the identity matrix. At this point, the attempt for the remaining matrices can be stopped because the optimal solution has been found.

[0092] The execution process of SLU and MLU is explained through the following two embodiments. Figure 6 It shows that a 16*16 binary matrix is ​​decomposed into the product of the lower triangular matrix L and the upper triangular matrix U. The following uses the upper triangular matrix U as an example to give the matrix scheduling sequence and show the superiority of MLU. According to the matrix scheduling sequence generation steps of SLU and MLU, each row transformation chooses to eliminate the row combination that can eliminate the most "1" in the current matrix. The matrix scheduling sequence for transforming the U matrix into the unit matrix is ​​as follows, where, Indicates that the i-th row of the matrix is ​​XORed to the j-th row of the matrix. Using Gaussian elimination method to convert the U matrix into the unit matrix requires 62 row transformations. There are 62 non-diagonal elements in the matrix that are "1". Each row transformation uses the elements on the diagonal to eliminate the "1" above it, so a total of 62 row transformations are required.

[0093] Using the SLU method to convert the U matrix into a unit matrix requires 45 row transformations:

[0094] Using the MLU method to convert the U matrix into a unit matrix requires a total of 41 row transformations:

[0095] Through the examples of the two decoding methods, SLU and MLU, the number of row transformations required to convert the decoding matrix into the unit matrix during the decoding process is reduced. Similarly, for the L matrix, the number of row transformations required using the Gaussian elimination method is 55 times, the number of row transformations required using the SLU method is 38 times, and the number of row transformations required using the MLU method is 36 times. Therefore, the total number of row transformations required for Gaussian elimination of the LU decomposition matrix is ​​117 times, the total number of row transformations required using the SLU method is 83 times, and the total number of row transformations required using the MLU method is 77 times. In terms of examples, the SLU method reduces the number of row transformations by 29% compared to the Gaussian elimination method, and the MLU method reduces the number of row transformations by 34% compared to the Gaussian elimination method.

[0096] There is a one-to-one correspondence between the decoding matrix and the survivor vectors, and there is also a one-to-one correspondence between the triangular matrix obtained after the decoding matrix LU decomposition and the survivor vectors. Therefore, the matrix is ​​transformed in rows, and the corresponding survivor vectors are XORed. When the matrix is ​​transformed into a unit matrix, the obtained survivor matrix is ​​the original data for decoding. That is, reducing the number of row transformations of the matrix transformation into a unit matrix is ​​to reduce the number of XOR operations of the data during the decoding process. The present invention is applicable to any erasure code based on XOR operation. The present invention uses a distribution matrix for decoding, and finds the minimum number of XOR operations to convert the decoding matrix into a unit matrix through an iterative algorithm of matrix LU decomposition, which can further reduce the number of XOR operations required for the decoding of the present invention. Compared with the traditional implementation method, the present invention is both universal and efficient.

[0097] Figure 7 The data comparison chart of the number of XOR decoding on different coding combinations of Cauchy RS code by SLU, MLU algorithm in the present invention, Jerasure library, and Gaussian elimination method (Gauss) is shown. Compared with Jerasure and Gauss, MLU reduces the number of XORs by 22.3% and 22.1% in RS(20,15), 23.9% and 24.8% in RS(14,10), and 30.0% and 25.1% in RS(9,6). In RS(6,4), MLU performs similarly to Jerasure and Gauss.

[0098] Figure 8The data comparison chart of the decoding rate of the SLU, MLU algorithm in the present invention and the Jerasure library and Gaussian elimination method (Gauss) on different coding combinations of Cauchy RS codes is shown. In the present invention, the decoding matrix row transformation plan generated by SLU and MLU is prepared before decoding, and the corresponding decoding plan is selected according to the faulty data block during the decoding process. Compared with Jerasure and Gauss, the proposed MLU method improves the decoding speed by 1.68 times and 1.80 times in RS(20,15); 1.85 times and 2.17 times in RS(14,10); 1.34 times and 1.39 times in RS(9,6); and 1.16 times and 1.24 times in RS(6,4).

[0099] Fig. 9 and Fig.10 The number of decoding XOR operations and decoding speed of generalized EVENODD code and generalized RDP code under different coding parameters are shown respectively. It can be clearly seen from the figure that in generalized EVENODD code and generalized RDP code, SLU and MLU have faster decoding speed and fewer decoding XOR operations than Jerasure and Gauss. Specifically, in the generalized EVENODD code containing 10 data blocks, MLU reduces the number of decoding XOR operations by 42.3% and increases the decoding speed by 2.12 times; in the generalized RDP code, MLU reduces the number of decoding XOR operations by 39.4% and increases the decoding speed by 2.17 times.

[0100] The performance tests of CRS codes, generalized EVENODD codes, and generalized RDP codes show that SLU and MLU have wide applicability. They are suitable for various erasure codes generated by generator matrices and can be widely used in storage systems.

[0101] Embodiment 2

[0102] The present invention also discloses a universal decoding system for high error-tolerant erasure codes, the system comprising: a decoding matrix building module, a decoding vector building module, a unit matrix calculation module and a decoding module:

[0103] The decoding matrix building module is used to locate the lost data blocks during storage according to the availability of the storage files in the distributed storage system, and to create a decoding matrix using the distribution matrix according to the location of the available data blocks and the lost data blocks.

[0104] The decoding vector construction module is used to combine the data blocks that are not lost in the storage system into a decoding vector; the unit matrix calculation module is used to perform row transformation on the decoding matrix to obtain the unit matrix, and generate a decoding scheduling sequence based on the transformation process of obtaining the unit matrix; the workflow of the single-state LU decomposition method in the unit matrix calculation module specifically includes: A. creating a two-dimensional array, the two-dimensional array is used to store the number of 1s eliminated after XORing each pair of rows, and initialize the score array; B. for each pair of rows, after XORing the jth row to the ith row, calculate the number of 1s in the ith row after XORing and the number of 1s in the original ith row The difference in the number of 1s in the row, and the obtained difference is stored in the score array; C. Find the maximum difference in the score array, and record the row number index1 and column number index2 corresponding to the maximum difference; D. If index1 and index2 are both 0, no transformation is required, and the loop is jumped out, otherwise the index2th row is XORed to the index1th row for row transformation; E. After the row transformation, the scores related to the index1th row and the index2th row in the score array are updated; F. Repeat operations BE until index1 and index2 are both 0, and the loop is jumped out. G. Input the obtained decoding scheduling sequence into the decoding module.

[0105] The workflow of the multi-state LU decomposition method in the unit matrix calculation module specifically includes: A1. Initialize the state list, the state list includes the initial upper triangular matrix and the initial lower triangular matrix, form a two-dimensional array to store the number of 1s in the matrix eliminated after each pair of rows are XORed, create a variable best_sequence to store the matrix scheduling sequence, create a variable min_schedule to store the length of the current sequence; B1. For each pair of rows, XOR the jth row to the ith row, calculate the difference between the number of 1s in the ith row after XOR and the number of 1s in the original ith row, and store the calculated difference in the score array; C1. Find the maximum difference from the score array, record the row number index1 and column number index2 corresponding to the maximum difference, and store the full difference in the score array; The rows that meet the conditions are recorded in the state list; D1. If both index1 and index2 are 0, no transformation is required and the loop is stopped. Otherwise, the first group of states in the state list is popped out, and the index2 row is XORed to the index1 row for row transformation to obtain a row transformation matrix. The row transformation matrix is ​​recorded as a scheduling sequence (index1, index2) and added to the variable best_sequence. The length of the current scheduling sequence is calculated and stored in the variable min_schedule; E1. Repeat operations B1-D1 on the row transformation matrix. When the matrix is ​​transformed into a unit matrix, compare the current sequence length and the shortest sequence length, and choose to retain the smaller sequence length; F1 obtains the minimum matrix scheduling sequence based on the minimum sequence length.

[0106] The decoding module is used to perform XOR transformation on the rows of the decoding matrix and the corresponding parts of the decoding vector based on the decoding scheduling sequence to obtain the lost data block and complete the decoding. The rows of the decoding matrix correspond to the corresponding parts of the decoding vector, and the upper triangular matrix and the lower triangular matrix are transformed based on the decoding matrix to obtain the lost data block.

[0107] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A general decoding method for highly error-tolerant erasure codes, characterized in that: The decoding method comprises: Step S1, locating lost data blocks during storage according to the availability of stored files in the distributed storage system, and creating a decoding matrix using a distribution matrix according to the location of available data blocks and the lost data blocks; Step S2, combining the unlost data blocks in the storage system into a decoding vector; Step S3, performing row transformation on the decoding matrix to obtain a unit matrix, and generating a decoding scheduling sequence based on the transformation process of obtaining the unit matrix; Step S4: Based on the decoding scheduling sequence, perform XOR transformation on the rows of the decoding matrix and the decoding vectors in one-to-one correspondence to obtain the lost data blocks and complete the decoding.

2. The universal decoding method for high error-tolerant erasure codes according to claim 1, characterized in that: In step S3, performing a row transformation on the decoding matrix to obtain a unit matrix, and generating a decoding scheduling sequence based on the transformation process of obtaining the unit matrix includes: performing a row transformation on the decoding matrix using a single-state LU decomposition method to obtain a unit matrix, and generating a decoding scheduling sequence based on the transformation process of obtaining the unit matrix, and the implementation process of the single-state LU decomposition method specifically includes: S311, creating a two-dimensional array, the two-dimensional array is used to store the number of 1s eliminated after XORing each pair of rows, and initializing the score array; S312, for each pair of rows, after XORing the jth row to the ith row, calculate the difference between the number of 1s in the ith row after XORing and the number of 1s in the original ith row, and store the obtained difference in the score array; S313, finding the maximum difference in the score array, and recording the row number index1 and column number index2 corresponding to the maximum difference; S314, if both index1 and index2 are 0, no transformation is required and the loop is exited. Otherwise, the index2th row is XORed to the index1th row for row transformation. During the row transformation process, a decoding schedule sequence is generated and the sequence pair (index1, index2) is added to the decoding schedule sequence. S315, after performing the row transformation, updating the scores related to the index1th row and the index2th row in the score array; S316, repeat operations S312-S315 until index1 and index2 are both 0, and then exit the loop; S317, input the obtained decoding scheduling sequence into step S4.

3. The universal decoding method for high error-tolerant erasure codes according to claim 1, characterized in that: In step S3, performing a row transformation on the decoding matrix to obtain a unit matrix, and generating a decoding scheduling sequence based on the transformation process of obtaining the unit matrix includes: performing a row transformation on the decoding matrix using a multi-state LU decomposition method to obtain a unit matrix, and generating a decoding scheduling sequence based on the transformation process of obtaining the unit matrix, and the implementation process of the multi-state LU decomposition method specifically includes: S321, initialize a state list, the state list includes an initial upper triangular matrix and an initial lower triangular matrix, form a two-dimensional array for storing the number of 1s in the matrix eliminated after each pair of rows are XORed, create a variable best_sequence for storing the matrix scheduling sequence, and create a variable min_schedu le for storing the length of the current sequence; S322, for each pair of rows, XOR the jth row to the ith row, calculate the difference between the number of 1s in the ith row after XOR and the number of 1s in the original ith row, and store the calculated difference in the score array; S323, find the maximum difference from the score array, record the row number in dex1 and column number index2 corresponding to the maximum difference, and record the row that meets the conditions in the state list; S324, if both the index1 and the index2 are 0, no transformation is required and the loop is stopped. Otherwise, the first group of states in the state list is popped out, the index2 row is XORed to the index1 row for row transformation to obtain a row transformation matrix, the row transformation matrix is ​​recorded as a scheduling sequence (index1, index2) and added to the variable best_sequence, the length of the current scheduling sequence is calculated and stored in the variable min_schedule; S325, repeating the operations S322-S324 on the row transformation matrix, and when the matrix is ​​transformed into a unit matrix, comparing the current sequence length with the shortest sequence length, and selecting the smaller sequence length to retain; S326. Obtain the shortest matrix scheduling sequence according to the minimum sequence length, and input the matrix scheduling sequence into step S4 as a decoding scheduling sequence.

4. The universal decoding method for high error-tolerant erasure codes according to claim 1, characterized in that: In step S4, based on the decoding scheduling sequence, the rows of the decoding matrix and the decoding vectors corresponding to each other are XOR-transformed to obtain the lost data blocks. The decoding process specifically includes: Decomposing the decoding matrix into an upper triangular matrix and a lower triangular matrix, wherein rows in the upper triangular matrix and the lower triangular matrix correspond to corresponding parts of the decoding vector; The upper triangular matrix and the lower triangular matrix are subjected to row transformation using a single-state LU method or a multi-state LU decomposition method, and "1" in the matrix is ​​eliminated using row transformation. Each row transformation sequence pair is added to a decoding scheduling sequence, wherein the row transformation sequence pair has a one-to-one correspondence with a decoding vector. The decoding vector is executed according to the decoding scheduling sequence to decode the original data.

5. A universal decoding system for high-error-tolerance erasure codes, the system being used to implement the decoding method according to any one of claims 1 to 4, characterized in that: The system includes: a decoding matrix building module, a decoding vector building module, a unit matrix calculation module and a decoding module: The decoding matrix building module is used to locate the lost data blocks during storage according to the availability of the storage files in the distributed storage system, and to create a decoding matrix using the distribution matrix according to the location of the available data blocks and the lost data blocks; The decoding vector construction module is used to combine the non-lost data blocks in the storage system into a decoding vector; The identity matrix calculation module is used to perform row transformation on the decoding matrix to obtain the identity matrix, and generate a decoding scheduling sequence based on the transformation process of obtaining the identity matrix; The decoding module is used to perform XOR transformation on the one-to-one correspondence between the rows of the decoding matrix and the decoding vectors based on the decoding scheduling matrix, so as to obtain the lost data blocks and complete decoding.

6. The universal decoding system for highly error-tolerant erasure codes according to claim 5, characterized in that: The workflow of the single-state LU decomposition method in the unit matrix calculation module specifically includes: A. Create a two-dimensional array, the two-dimensional array is used to store the number of 1s eliminated after XORing each pair of rows, and initialize the score array; B. For each pair of rows, after XORing the jth row to the ith row, calculate the difference between the number of 1s in the ith row after XORing and the number of 1s in the original ith row, and store the difference in the score array; C. Find the maximum difference in the score array, and record the row number index1 and column number index2 corresponding to the maximum difference; D. If both index1 and index2 are 0, no transformation is required and the loop is exited. Otherwise, the index2th row is XORed to the index1th row for row transformation. During the row transformation process, a decoding schedule sequence is generated and the sequence pair (index1, index2) is added to the decoding schedule sequence. E. After the row transformation, update the scores of the index1th row and the index2th row in the score array; F. Repeat operations BE until index1 and index2 are both 0, and then exit the loop; G. Input the obtained decoding scheduling sequence into the decoding module.

7. The universal decoding system for highly error-tolerant erasure codes according to claim 5, characterized in that: The workflow of the multi-state LU decomposition method in the unit matrix calculation module specifically includes: A1. Initialize the state list, which includes the initial upper triangular matrix and the initial lower triangular matrix, form a two-dimensional array to store the number of 1s in the matrix that are eliminated after each pair of rows are XORed, create a variable best_sequence to store the matrix scheduling sequence, and create a variable min_schedule to store the length of the current sequence; B1. For each pair of rows, XOR the jth row with the ith row, calculate the difference between the number of 1s in the ith row after XOR and the number of 1s in the original ith row, and store the calculated difference in the score array; C1. Find the maximum difference from the score array, record the row number index1 and column number index2 corresponding to the maximum difference, and record the row that meets the conditions in the state list; D1. If both index1 and index2 are 0, no transformation is required and the loop stops. Otherwise, the first group of states in the state list is popped out, the index2 row is XORed to the index1 row for row transformation to obtain a row transformation matrix, the row transformation matrix is ​​recorded as a scheduling sequence (index1, index2) and added to the variable best_sequence, the length of the current scheduling sequence is calculated and stored in the variable min_schedule; E1. Repeat operations B1-D1 on the row transformation matrix. When the matrix is ​​transformed into a unit matrix, compare the current sequence length with the shortest sequence length, and select the smaller sequence length to be retained; F1. Obtain the minimum matrix scheduling sequence according to the minimum sequence length, and input the matrix scheduling sequence into the decoding module as a decoding scheduling sequence.

8. The universal decoding system for highly error-tolerant erasure codes according to claim 5, characterized in that: The workflow of the decoding module specifically includes: Decomposing the decoding matrix into an upper triangular matrix and a lower triangular matrix, wherein rows in the upper triangular matrix and the lower triangular matrix correspond to corresponding parts of the decoding vector; The upper triangular matrix and the lower triangular matrix are subjected to row transformation using a single-state LU method or a multi-state LU decomposition method, so as to eliminate "1" in the matrix in one row transformation, and each row transformation sequence pair is added to a decoding scheduling sequence, wherein the row transformation sequence pair has a one-to-one correspondence with a decoding vector, and the decoding vector is executed according to the decoding scheduling sequence to decode the original data.

Citation Information

Cited By

  • Coded data collaborative restoration method and device with balanced load

    CN119396618A