Construction of local repair codes and faulty node repair method based on complete cyclic difference sets
Through the local repair code construction method based on complete loop difference set, the exclusive-OR operation of the association matrix and the check matrix is used to solve the problems of complex local repair code construction and low code rate, and efficiently repairing faulty nodes in distributed storage systems.
Patent Information
- Application Number
- CN202211217665.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-09-30
AI Technical Summary
The existing local repair code has complex construction and low code rate, making it difficult to effectively repair faulty nodes in distributed storage systems.
The local repair code construction method based on the complete loop difference set is adopted, and the correlation matrix and the check matrix are constructed, and the fault nodes are repaired by using XOR operations, reducing the computational complexity and improving the code rate.
The constructed local repair code has the minimum distance to the optimal boundary and has a high code rate. It can effectively repair single-node or multi-node faults, reduce computing complexity, and improve data storage efficiency and reliability.
Smart Images

Figure CN115632664B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and in particular relates to a local repair code construction based on complete cyclic difference sets and a fault node repair method. Background Art
[0002] In distributed storage systems, replication strategies result in significant storage overhead, so erasure codes are often used to ensure data integrity. Redundancy schemes based on erasure codes offer higher storage efficiency than replication strategies. However, when a storage node fails, traditional erasure codes, particularly Maximum Distance Separable (MDS) codes, require reading large amounts of data from the remaining nodes, resulting in excessively high repair bandwidth overhead. To ensure data reliability and the effectiveness of node repair, Gopalan et al. proposed Locally Repairable Codes (LRCs), which can effectively repair failed nodes and reduce the cost of repairing them. Current research on local repair codes in distributed storage systems has shown that their construction presents several difficulties, such as complex construction and low bitrate. Therefore, constructing LRCs with optimal minimum distance and high bitrate has become a key focus of current local repair code research. Summary of the Invention
[0003] The object of the present invention is to provide a method for constructing a local repair code based on a complete cyclic difference set, so as to solve the problems of complex construction and low code rate of most local repair codes in the prior art.
[0004] In order to achieve the above tasks, the present invention adopts the following technical solutions:
[0005] In one aspect, the present invention provides a method for constructing a local repair code based on a complete cyclic difference set, which specifically comprises the following steps:
[0006] Step 1: Given a (v,m,1) complete cyclic difference set D, D≡{a1,a2,...,a m}, let set A b ={a1+b,a2+b,...,a m +b}, 0≤b≤v-1, set S={1,2,...,v}, according to the definition of cyclic difference set, v=q 2 +q+1, m=q+1, q is a prime number;
[0007] Step 2: Construct the correlation matrix of the local repair code based on the complete cyclic difference set Let the i-th (i=b+1,1≤i≤v) row in the association matrix M represent the i-th storage node in the local repair code, and the j-th column represent the j-th data block stored by the node, 1≤j≤v. If the set That is, if the i-th node stores the j-th coding block, the value of the i-th row and j-th column of the association matrix is 1;
[0008] Step 3: Construct a local repair code of the complete cyclic difference set based on the correlation matrix M obtained in step 2.
[0009] Furthermore, the step 3 is specifically as follows:
[0010] Adding a unit matrix before the correlation matrix M yields the generator matrix G of the constructed local repair code = [I b |M], thus obtaining the parameter n=2(q 2 +q+1), k=q 2 +q+1, r=q+1, t=q+1 local repair code.
[0011] Furthermore, the step 3 specifically includes the following sub-steps:
[0012] Step A: Replace all the 1s on the main diagonal of the incidence matrix M obtained in step 2 with 0s to obtain matrix M1; then replace all the 1s on the upper right subdiagonal of the incidence matrix M obtained in step 2 with 0s. According to the double diagonal property of the complete cyclic difference set, the element in the lower left corner of the incidence matrix M is 1, which is also replaced with 0 to obtain matrix M2;
[0013] Step B: Concatenate the two matrices M1 and M2 to obtain the correlation matrix M′=[M1|M2]. Concatenate the correlation matrix with the identity matrix to obtain the check matrix H1=[M′|I].
[0014] Step C, constructing a local repair code of a complete cyclic difference set from the check matrix H1=[M′|I], whose parameters satisfy n=3(q 2 +q+1), k=2(q 2 +q+1), r=2q, t=q.
[0015] Furthermore, the step 3 specifically includes the following sub-steps:
[0016] Step a: multiply the correlation matrix M obtained in step 2 by the Kronecker product of the all-1 row vector to obtain the check matrix of the local repair code in represents the Kronecker product of the matrix, 1 r represents a row vector of all 1s of length r;
[0017] Step b, constructing a local repair code of a complete cyclic difference set from the check matrix H2, whose parameters satisfy n=(q+1)(q 2 +q+1), k=q(q 2 +q+1), r=(q+1) 2-1, t=q+1, where q is a prime number.
[0018] On the other hand, the present invention also provides a method for repairing a faulty node, wherein the method repairs the faulty node using the constructed local repair code of the complete cyclic difference set, comprising the following steps:
[0019] Determine whether the fault is a single-node fault or a multi-node fault. If it is a single-node fault, use the single-node fault repair method; if it is a multi-node fault, use the multi-node fault repair method;
[0020] Single-node fault repair method: Based on the relationship between the codeword and the generator matrix or the check matrix, a codeword repair set is obtained. When a node in the local repair code fails, the repair relationship is used to perform an XOR operation to complete the repair of the failed node.
[0021] Multi-node fault repair method: If the information bit and the check bit fail at the same time and are in the same repair set, sequential repair is selected, that is, the information bit is repaired first, and then the codeword in the repair set of the repaired information bit is used to perform XOR to repair the check bit; if multiple information bits fail at the same time, parallel repair is performed, that is, the repair is performed simultaneously using the repair set of the faulty node.
[0022] Compared with the prior art, the present invention has the following technical features:
[0023] (1) In the method for constructing a local repair code disclosed in the present invention, the first method studies the construction of a local repair code based on a complete cyclic difference set. Compared with existing local repair codes, the constructed local repair code not only achieves the optimal minimum distance, but also has a higher code rate and lower complexity. When the availability t = 2, the code rate of the local repair code obtained by the second method meets the optimal boundary condition. The code rate of the local repair code constructed by the third method is further improved compared with the second method.
[0024] (2) The present invention uses a complete cyclic difference set to construct a local repair code. The constructed local repair code is a binary local repair code. Only XOR operations are used in the process of encoding, decoding and repairing faulty nodes, which greatly reduces the complexity of the operation, simplifies the construction algorithm, and saves time.
[0025] (3) The binary local repair code constructed by the present invention can repair single-node or multi-node failures and has good repair locality. It only needs to find the row index corresponding to the value of 1 in the fault column in the remaining columns of the matrix, which is the coding block required to restore the faulty node. The faulty node can be repaired, which is conducive to the efficient transmission of data in the system and plays a very important role in data storage.
[0026] (4) The binary local repair code constructed by the present invention improves the locality of the local repair code by expanding the correlation matrix and multiplying the correlation matrix with the Kronecker, thereby greatly improving the code rate. DETAILED DESCRIPTION
[0027] First, the technical terms appearing in this invention are explained:
[0028] Cyclic difference set: a set of m mutually non-complementary integers modulo a positive integer v. m}(mod v) is called a (v,m,λ) cyclic difference set if for every d≠0(mod v), there are exactly λ ordered pairs in D such that d≡a i -a j (mod v), where v is called the modulus of the cyclic difference set, m is called the size of the cyclic difference set, and the three parameters satisfy the relationship m(m-1)=λ(v-1).
[0029] Complete cyclic difference set: When λ = 1, the modulus v of a cyclic difference set of size m satisfies v = m 2 -m+1, such a cyclic difference set is a complete cyclic difference set.
[0030] Data repair: To ensure the reliability of data storage, data is currently typically encoded in large distributed storage. When a node fails, the new node will connect to a subset of undamaged nodes to download and rebuild the data stored in the damaged node. This process is called data repair.
[0031] Repair bandwidth: The bandwidth consumed during the data repair process is called repair bandwidth.
[0032] Generator matrix: Assume that the first k symbols of a codeword represent information symbols, and the generator matrix of the local repair code can be expressed as G = [I k |M], where I k is the k×k identity matrix, M is the finite field F q The k×(nk) incidence matrix on .
[0033] Check matrix: Let matrix H be a (nk)×n row full rank matrix, and C be a finite field F q Linear code on . If C is H·x T = 0 in the finite field F q The solution space on , then the matrix H is called the check matrix of the linear code C.
[0034] Minimum distance of code: For any two different non-zero code words w and v in the (n, k) block code C, the minimum distance of the block code C is expressed as For LRCs, the minimum distance d of the code means that any d-1 faulty nodes in the system can be recovered.
[0035] Sequential repair: Repair the faulty nodes one by one. Any previously repaired faulty node can be used to repair the remaining faulty nodes.
[0036] Parallel repair: In parallel mode, failed nodes can be repaired simultaneously.
[0037] The present invention provides a method for constructing a local repair code based on a complete cyclic difference set. The method constructs a local repair code using an incidence matrix of a complete cyclic difference set. The specific steps are as follows:
[0038] Step 1: Given a (v,m,1) complete cyclic difference set D, D≡{a1,a2,...,a m}(mod v), let set A b ={a1+b,a2+b,...,a m +b}(modv)(0≤b≤v-1), set S={1,2,...,v}, according to the definition of complete cyclic difference set, v=m 2 -m+1=q 2 +q+1, m=q+1, q is a prime number;
[0039] Step 2: Construct the correlation matrix of the local repair code based on the complete cyclic difference set Let the i-th (i=b+1,1≤i≤v) row in the association matrix M represent the i-th storage node in the local repair code, and the j-th (1≤j≤v) column represent the j-th data block stored in the node. If the set That is, if the i-th node stores the j-th coding block, the value of the i-th row and j-th column of the association matrix is 1;
[0040] Step 3: Add a unit matrix before the correlation matrix M to obtain the generator matrix G of the constructed local repair code = [I b |M],I b The columns in M correspond to information symbols, while the columns in M correspond to parity check symbols. Since M is the correlation matrix of the local repair code constructed based on the complete cyclic difference set, each row has a Hamming weight q+1, that is, each information symbol has t=q+1 repair sets; each column of M has a Hamming weight q+1, and any two different columns of M are the same in at most one position. Therefore, the locality of the local repair code constructed based on the complete cyclic difference set is r=q+1, and the parameter n=2(q 2 +q+1), k=q 2 +q+1, r=q+1, t=q+1 local repair code.
[0041] As a preferred implementation of the present invention, the present invention provides a second method for constructing a local repair code based on a complete cyclic difference set. This method utilizes the properties of a complete cyclic difference set to extend the incidence matrix to construct a local repair code. Step 1 of this method is the same as Step 1 and Step 2 of the first method of the present invention above, and further includes the following steps:
[0042] (1) Replace all the 1s on the main diagonal of the incidence matrix M obtained in step 2 with 0s to obtain the matrix M1; then replace all the 1s on the upper right subdiagonal of the incidence matrix M obtained in step 2 with 0s. According to the double diagonal property of the complete cyclic difference set, the element in the lower left corner of the incidence matrix M is 1, and replace it with 0 to obtain the matrix M2;
[0043] (2) Concatenate the two matrices M1 and M2 to obtain the correlation matrix M′ = [M1|M2]. Concatenate the correlation matrix with the identity matrix to obtain the check matrix H1 = [M′|I].
[0044] (3) The parameters of the local repair code constructed by the check matrix H1 = [M′|I] satisfy n = 3 (q 2 +q+1), k=2(q 2 +q+1), r=2q, t=q.
[0045] As a preferred implementation of the present invention, the present invention provides a third method for constructing a local repair code based on a complete cyclic difference set. Step 1 of this method is the same as step 1 and step 2 of the first method of the present invention, and further includes the following steps: constructing a new local repair code by multiplying the correlation matrix M obtained in step 2 with the Kronecker product of the all-one row vector, which greatly improves the code rate. The parity check matrix of the newly constructed local repair code is in the form of in represents the Kronecker product of the matrix, 1 r represents a row vector of all 1s of length r. Therefore, the parameter constructed by the check matrix H2 is n=(q+1)(q 2 +q+1), k=q(q 2 +q+1), r=(q+1) 2 -1, t = q + 1 local repair code, where q is a prime number.
[0046] Of the three methods for constructing local repair codes disclosed in this invention, the first method studies the construction of local repair codes based on complete cyclic difference sets. Compared with existing local repair codes, the constructed local repair code not only achieves the optimal minimum distance, but also has a higher code rate and lower complexity. When the availability t = 2, the code rate of the local repair code obtained by the second method meets the optimal boundary conditions. The code rate of the local repair code constructed by the third method is further improved compared to the second method.
[0047] The following examples are provided to illustrate the implementation of the method of the present invention:
[0048] It should be noted that in the embodiment, n represents the code length of the local repair code in the distributed storage system, k represents the dimension of the local repair code, r represents the locality of the local repair code, and t represents the availability of the local repair code. In addition, the repair method when a node fails is also analyzed.
[0049] Example 1
[0050] In the method of constructing a local repair code based on a complete cyclic difference set, when q = 2, according to the formula v = 7, m = 3, a (7, 3, 1)-cyclic difference set can be obtained, the set S = {1, 2, 3, 4, 5, 6, 7}, A0 = {1, 2, 4} (that is, when b = 0), A b The corresponding relationship between (0≤b≤v-1) and S is shown in Table 1. Table 1 is the set A in the method of local repair code based on complete cyclic difference set constructed by the present invention. b ={a1+b,a2+b,...,a m +b}(modv)(0≤b≤v-1) and the set S={1,2,...,v}.
[0051] Table 1A b Correspondence with S
[0052]
[0053]
[0054] According to A b The corresponding relationship with S is used to obtain the incidence matrix M constructed based on the complete cyclic difference set.
[0055]
[0056] According to the generating matrix G=[I b The parameters of the local repair code constructed by |Μ are n=14, k=7, r=3, t=3, and the minimum distance of the code is d=4. 14Representing the column vector of the local repair code generation matrix G, g1=g8-g5-g7=g9-g2-g6=g 11 -g3-g4. For the information symbol c1 corresponding to g1, the corresponding repair relationship can be obtained: c1=c8-c5-c7=c9-c2-c6=c 11 -c3-c4. Therefore, the repair set of c1 is: Similarly, repair sets of other information symbols can be obtained.
[0057] The repair process for multiple node failures using the local repair code constructed in Example 1 is as follows:
[0058] (1) If c1 and c9 fail at the same time, since the information bit and the check bit fail at the same time and are in the same repair set, sequential repair should be selected, that is, first in the repair set or Choose any one of them to repair the information bit c1, and then use c1, c2, and c6 to perform XOR to repair the check bit c9.
[0059] (2) If information bits c1 and c2 fail at the same time, the repair processes of the two information bits do not interfere with each other. In this case, parallel repair is preferred, and the repair set of c1 can be used at the same time. or Choose a repair information bit c1 from the repair set of c2 or Select any one of the repair information bits c2.
[0060] Example 2
[0061] In the extended matrix based on the complete cyclic difference set, all the ones in the main diagonal of the incidence matrix M in Example 1 are replaced with zeros to obtain the matrix M1;
[0062]
[0063] Then replace all the 1s in the upper right subdiagonal of the correlation matrix M with 0s. The element in the lower left corner of the correlation matrix M is 1, and it is replaced with 0 to obtain the matrix M2;
[0064]
[0065] Cascade the two matrices to obtain the incidence matrix M′=[M1|M2];
[0066]
[0067] After concatenating the correlation matrix M′ with the identity matrix, we get the check matrix H1. Based on the check matrix H1, we can construct a local repair code with parameters n=21, k=14, r=4, and t=2. If a node fails, the repair method for the failed node is: if the information bit c1 fails, then according to the check matrix H1, the information bit c1 can be expressed as c1=c 19 -c6-c8-c 12 =c 21 -c3-c9-c 13 , so the repair set of information bits can be expressed as The same method can be used to repair the remaining symbols when they are invalid.
[0068] Example 3
[0069] When constructing a local repair code using the incidence matrix M of the complete cyclic difference set and the Kronecker product of the all-ones row vector, when q = 3, we know that v = 13 and m = 4. Based on the parameters, we can obtain a (13, 4, 1)-cyclic difference set, where S = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) and A0 = {1, 2, 9, 11}. Therefore, based on the correspondence between the sets, its incidence matrix M can be expressed as:
[0070]
[0071] Perform Kronecker product of the correlation matrix M and {1,1,1,1} to obtain the check matrix: According to the Kronecker product of the incidence matrix M and the all-one row vector, a local repair code (n=52, k=39, r=15, t=4) can be constructed, and the minimum distance of this code is d=5.
Claims
1. A method for constructing a local repair code based on a complete cyclic difference set, characterized in that: The specific steps include: Step 1: Given a (v,m,1) complete cyclic difference set D, D≡{a1,a2,...,a m }, let set A b ={a1+b,a2+b,...,a m +b}, 0≤b≤v-1, set S={1,2,...,v}, according to the definition of cyclic difference set, v=q 2 +q+1, m=q+1, q is a prime number; Step 2: Construct the correlation matrix of the local repair code based on the complete cyclic difference set Let the i-th row in the association matrix M represent the i-th storage node in the local repair code, i=b+1,1≤i≤v; the j-th column represents the j-th data block stored by the node, 1≤j≤v, if the set That is, if the i-th node stores the j-th coding block, the value of the i-th row and j-th column of the association matrix is 1; Step 3: Construct a local repair code of the complete cyclic difference set based on the correlation matrix M obtained in step 2.
2. The method for constructing a local repair code based on a complete cyclic difference set according to claim 1, wherein: The specific operations of step 3 are as follows: Adding a unit matrix before the correlation matrix M yields the generator matrix G of the constructed local repair code = [I b |M], thus obtaining the parameter n=2(q 2 +q+1), k=q 2 +q+1, r=q+1, t=q+1 local repair code.
3. The method for constructing a local repair code based on a complete cyclic difference set according to claim 1, wherein: The step 3 specifically includes the following sub-steps: Step A: Replace all the 1s on the main diagonal of the incidence matrix M obtained in step 2 with 0s to obtain matrix M1; then replace all the 1s on the upper right subdiagonal of the incidence matrix M obtained in step 2 with 0s. According to the double diagonal property of the complete cyclic difference set, the element in the lower left corner of the incidence matrix M is 1, which is also replaced with 0 to obtain matrix M2; Step B: Concatenate the two matrices M1 and M2 to obtain the correlation matrix M′=[M1|M2]. Concatenate the correlation matrix with the identity matrix to obtain the check matrix H1=[M′|I]. Step C, constructing a local repair code of a complete cyclic difference set from the check matrix H1=[M′|I], whose parameters satisfy n=3(q 2 +q+1), k=2(q 2 +q+1), r=2q, t=q.
4. The method for constructing a local repair code based on a complete cyclic difference set according to claim 1, wherein: The step 3 specifically includes the following sub-steps: Step a: multiply the correlation matrix M obtained in step 2 by the Kronecker product of the all-1 row vector to obtain the check matrix of the local repair code in represents the Kronecker product of the matrix, 1 r represents a row vector of all 1s of length r; Step b, constructing a local repair code of a complete cyclic difference set from the check matrix H2, whose parameters satisfy n=(q+1)(q 2 +q+1), k=q(q 2 +q+1), r=(q+1) 2 -1, t=q+1, where q is a prime number.
5. A method for repairing a faulty node, characterized in that: The method uses the local repair code of the complete cyclic difference set constructed according to any one of claims 1 to 3 to repair the faulty node, comprising the following steps: Determine whether the fault is a single-node fault or a multi-node fault. If it is a single-node fault, use the single-node fault repair method; if it is a multi-node fault, use the multi-node fault repair method; Single-node fault repair method: Based on the relationship between the codeword and the generator matrix or the check matrix, a codeword repair set is obtained. When a node in the local repair code fails, the repair relationship is used to perform an XOR operation to complete the repair of the failed node. Multi-node fault repair method: If the information bit and the check bit fail at the same time and are in the same repair set, sequential repair is selected. That is, the information bit is repaired first, and then the check bit is repaired by XORing the codewords in the repair set with the repaired information bit. If multiple information bits fail at the same time, they are repaired in parallel, i.e., they are repaired using the repair sets of the failed nodes at the same time.