A three-redundancy MDS array code encoding method for data recovery

The encoding data packets p, q, and r are generated by the triple-redundant MDS array code compilation method, which simplifies the encoding and decoding process, solves the problems of high encoding complexity and intolerance of three data loss in the existing technology, and realizes fast and accurate data recovery.

CN114625571BActive Publication Date: 2026-04-10UNIV OF SCI & TECH BEIJING
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UNIV OF SCI & TECH BEIJING
Filing Date
2022-03-14
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing data recovery methods are complex in the coding process and cannot effectively tolerate the loss of three data points, which limits the reliability and efficiency of the storage system.

Method used

A triple-redundant MDS array code compilation method is adopted. By generating encoded data packets p, q, and r, and utilizing the binary coding coefficient matrix Aj and the cyclic shift matrix CL+1, the encoding and decoding process is simplified, enabling rapid recovery of the three data packets.

Benefits of technology

It reduces the complexity of encoding and decoding, enables fast and accurate recovery of three data packets, and has a wider range of applications and comprehensive coverage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114625571B_ABST
    Figure CN114625571B_ABST
Patent Text Reader

Abstract

The application discloses a three-redundancy MDS array code compiling method for data recovery, relates to the technical field of data recovery, and can repair three lost data on the basis of reducing the complexity of a simple encoding and decoding process. j The corresponding binary encoding coefficient matrix A j Three encoding data packets p, q and r are generated; when data loss occurs in the original data packet, data decoding and recovery are performed by using the original data packet and the encoding data packet of the remaining data. The application has the advantages of simple calculation and tolerance of three data packet losses under the condition that the number of XOR operations approaches the optimum.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data restoration, and more particularly to the technical field of a data recovery method based on a three-redundancy MDS array code. BACKGROUND

[0002] With the rapid development of the Internet and the Internet of Things technology, the amount of data generated by the business and academic communities is increasing day by day. In the academic community, the total amount of data generated in the fields of biology, astronomy, earth science, etc. has already reached the PB level. In the business community, the total amount of data that needs to be processed and stored is exceptionally large, such as web search, cloud storage, and cloud computing. As the scale of the storage system is gradually expanding, the complexity is also increasing, and its reliability is difficult to guarantee.

[0003] To prevent data loss caused by various hardware failures in the storage system, storage management software used in production environments uses some kind of data redundancy technology to protect data. Data redundancy technology usually includes multi-mirroring and erasure code technology. Multi-mirroring replicates data multiple times and distributes multiple copies on different nodes of the storage system. Only when all storage nodes storing data copies fail at the same time will data loss occur, sacrificing storage efficiency to ensure data reliability. For example, Google's GFS and its open source version HDFS store three copies of each piece of data, so that any two nodes in the system fail at the same time without causing data loss.

[0004] Some existing encoding methods that can implement 3 data recovery have complex encoding process operations, and some solutions that are simple can only tolerate 2 data loss. SUMMARY

[0005] The purpose of the present application is to achieve the repair of 3 lost data on the basis of reducing the complexity of the encoding and decoding process. In order to solve the above technical problems, the present application provides a three-redundancy MDS array code encoding method for data recovery.

[0006] The present application specifically adopts the following technical solutions to achieve the above purpose:

[0007] A three-redundancy MDS array code encoding method for data recovery, comprising the following steps:

[0008] Step S1: Obtain k original data packets, and mark the k original data packets as m j , where 1≤j≤k, each data packet is represented by an M*L matrix, where L satisfies the following condition: L+1 is a prime number;

[0009] Step S2: Obtain the binary encoding coefficient matrix A j corresponding to each original data packet m j , Aj is an (L+1) *(L+1) matrix;

[0010] Step S3: generating the encoding data packets p, q and r in the following way:

[0011]

[0012]

[0013]

[0014] where G is a juxtaposition of an L*L identity matrix I L and an L*1 all-zero column vector, i.e. G = [I L 0 L*1 ];

[0015] Step S4: when data loss occurs in the original data packet, data decoding recovery is performed with the original data packet and the encoding data packet of the remaining data.

[0016] Preferably, the method for obtaining the binary encoding coefficient matrix A j is as follows:

[0017] converts the j into a binary vector (b j,w ,b j,w-1 ,...,b j,1 ,b j,0 );

[0018] A j = b j,w C L+1 w+1 +b j,w-1 C L+1 w +…+b j,1 C L+1 2 +b j,0 C L+1 +b j ′I L+1 ;

[0019] where b j ′ = mod(b j,w +b j,w-1 +…+b j,1 +b j,0 ,2), C L+1 is a cyclic shift matrix

[0020] Preferably, in the step S3, the method for generating 3 encoding data packets includes the following steps:

[0021] Step S301: a total of Layer data, i is the data layer number, n i is the total number of data of the i-th layer data, 1≤j≤k, Initialize the 0-th layer data t 0,1 ,…,t 0,j ,t 0,j+1 , where t 0,j+1 =m j , t 0,1 is an M*L all-zero matrix;

[0022] Step S302: Starting from i=1, respectively calculate until t i-1,2a-1 and t i-1,2a bit by bit to get the i-th layer data t i,a , that is, t i,a =t i-1,2a-1 +t i-1,2a , where a is an integer and takes from 1 to n i -1 step by step, if n i-1 is even, if n i-1 is odd,

[0023] Step S303: The method for obtaining p is:

[0024] Step S304: Obtain the matrix where, Add a column of all 0 vectors to the right of s i to get s i ', that is, s i '=s i G;

[0025] Step S305: The method for obtaining q and r is:

[0026] s i ' is right-circulated by column i+1, and the last column of the obtained M*(L+1) matrix is deleted to obtain the matrix x i , that is, x i =s i 'C L+1 i+1 G T ; Obtain Obtain q=x+s;

[0027] s i ' is right-circulated by column mod(2(i+1),L+1), and the last column of the obtained M*(L+1) matrix is deleted to obtain the matrix y i , that is, yi = s i ′C L+1 2(i+1) G T ; obtaining r = y + s.

[0028] Preferably, in the step S305, the method for obtaining q and r is:

[0029] Initializing x′ and y′, both are M*(L+1) zero matrix, initializing

[0030] Xoring x′ with s i ′ bit by bit, and then right-circulating the obtained M*(L+1) matrix by 1 column, and reassigning the obtained to x′, i.e. x′ = (x′ + s i ′)C L+1 , i = i-1, iterating until i = 0 to obtain the final x′; deleting the last column of x′ to obtain x, i.e. x = x′G T ; obtaining q = x + s;

[0031] Xoring y′ with s i ′ bit by bit, and then right-circulating the obtained M*(L+1) matrix by 2 columns, and reassigning the obtained to y′, i.e. y′ = (y′ + s i ′)C L+1 2 , i = i-1, iterating until i = 0 to obtain the final y′; deleting the last column of y′ to obtain y, i.e. y = y′G T ; obtaining r = y + s.

[0032] Preferably, in the step S4, when one original data packet is lost and no coded data packet is lost, the method for data decoding recovery is:

[0033] The lost original data packet is denoted as m j1 , and the remaining original data packets are xored bit by bit to obtain an M*L matrix p′;

[0034] Xoring p′ with the coded data packet p bit by bit, and decoding and recovering to obtain the original data packet m j1 , i.e. m j1 = p + p′.

[0035] Preferably, when one original data packet is lost and a coded data packet is lost, the method for data decoding recovery is:

[0036] The lost original data packet is denoted as m j1 , and k zero data packets m j ′ are initialized, 1≤j≤k, and m jAssignment, m j ′=m j , j≠j1; m j Considering ' as the original data packet, generate three encoded data packets according to the method for generating encoded data packets p, q, and r, and label them as p', q', and r' respectively;

[0037] If the encoded data packet p is used to restore the data: m j1 =p+p′;

[0038] If the encoded data packet q is used to restore the data:

[0039] m j1 =(q'+q)H T D1H;

[0040] in, or m L+1 It is a modulo (L+1) multiplicative order of 2;

[0041] If we use the encoded data packet r to reconstruct the evolutionary data:

[0042] m j1 =(r'+r)H T D1H;

[0043] in, or m L+1 It is a modular (L+1) multiplication order of 2; H = [I L*L 1 L*1 ] T ;

[0044] After decoding and recovering the original data packet, the lost encoded data packet is restored.

[0045] Preferably, when two original data packets are lost, the data decoding and recovery method is as follows:

[0046] Let m be the two lost raw data packets. j1 and m j2 Initialize k all-zero data packets m j ′, 1≤j≤k, for m j Assignment, m j ′=m j j≠j1 and j≠j2; let m j Consider ' as the original data packet, and generate three encoded data packets according to the method for generating encoded data packets p, q and r, and label them as p', q' and r' respectively; p″=p'+p,q″=q'+q,r″=r'+r;

[0047] If the encoded data packet p is lost, use Gaussian elimination to solve the problem. get [m j1 ,m j2 ];

[0048] If the encoded data packet q is lost, solve get [m j1 ,m j2 ];

[0049] If the encoded data packet r is lost, solve get [m j1 ,m j2 ];

[0050] After the original data packet is recovered by decoding, restore the lost encoded data packet.

[0051] Preferably, when three original data packets are lost, the method of data decoding recovery is:

[0052] The three lost original data packets are denoted as m j1 , m j2 and m j3 ; initialize k zero data packets m j ', 1≤j≤k, assign values to m j ', m j '=m j , j≠j1 and j≠j2 and j≠j3; take m j ' as an original data packet and generate three encoded data packets according to the method of generating encoded data packets p, q and r and mark them as p', q' and r' respectively;

[0053]

[0054] m j1 =p″+m j2 +m j3 ;

[0055] wherein p″=p'+p, q″=q'+q, r″=r'+r;

[0056]

[0057] or

[0058]

[0059] or

[0060] m L+1 is the modulo (L+1) multiplication order of 2; H=[I L*L 1 L*1 ]T .

[0061] The beneficial effects of the present application are as follows:

[0062] The technical scheme of the present application can realize the recovery of 3 lost data packets, and the complexity is obviously reduced compared to other encoding and decoding methods that can recover 3 data packets; the data recovery covers a comprehensive case, and in the case of a total of 3 lost data packets, the original data packets and the encoded data packets can be quickly and accurately recovered; due to the reduced method complexity, it is easy to implement, has strong usability, and has a wider application range. BRIEF DESCRIPTION OF DRAWINGS

[0063] Fig. 1 is a flowchart of the present application;

[0064] Fig. 2 is a data structure diagram for obtaining p in Example 1;

[0065] Fig. 3 is a data structure diagram for obtaining q and r in Example 1. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.

[0067] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed application, but only represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative labor are within the scope of protection of the present application.

[0068] Example 1

[0069] As shown in Figs. 1 to 3 , the present embodiment provides a three-redundancy MDS array code encoding and decoding method for data recovery, and specifically, the data involved in the method are all vector data, and the method comprises the following steps:

[0070] Step S1: obtaining k original data packets, marking the k original data packets as m j , where 1≤j≤k, each data packet is represented by an M*L matrix, where L satisfies the following condition: L+1 is a prime number; for example, L is selected as 16, and the result of 16+1 is 17, which is a prime number, i.e. it meets the requirements.

[0071] Step S2: obtaining each original data packet m j The corresponding binary coding coefficient matrix A j , A j is a (L+1) *(L+1) matrix; in the step S2 of the embodiment, the binary coding coefficient matrix A j is obtained by the following method:

[0072] Step S201: converting the j into a binary vector (b j,w ,b j,w-1 ,...,b j,1 ,b j,0 ), the conversion method is: j=b j,w *2 w +b j,w-1 *2 w-1 +…+b j,1 *2+b j,0 ;

[0073] Step S202: determining the binary coding coefficient matrix A j from the binary vector:

[0074] A j =b j,w C L+1 w+1 +b j,w-1 C L+1 w +…+b j,1 C L+1 2 +b j,0 C L+1 +b j ′I L+1 ;

[0075] b j ′=mod(b j,w +b j,w-1 +…+b j,1 +b j,0 ,2);

[0076] wherein C L+1 is a cyclic shift matrix In addition, b j ′ is determined by a mod function, that is, b j,0 ′ is 1 when there is an odd number of 1s from b j,w to b j , otherwise it is 0.

[0077] Step S3: generating three coded data packets, respectively denoted as p, q and r, in the following manner:

[0078]

[0079]

[0080]

[0081] wherein G is a juxtaposition of L*L identity matrix I L and L*1 all-zero column vector, i.e. G=[I L 0 L*1 ];

[0082] Step S4: When data loss occurs in the original data packet, data decoding recovery is performed using the original data packet and the encoded data packet of the remaining data.

[0083] Another commonly used matrix in the present embodiment is H=[I L*L 1 L*1 ] T .

[0084] According to the conventional operation, when generating 3 encoded data packets P, bitwise XOR is sequentially performed in the order of j being 1-k, that is, m1+m2 is first performed, and the result is added to m3, and so on until m k This method is complicated in calculation, and does not help the subsequent q and r calculation, which all need to be operated in a large amount.

[0085] In order to simplify the calculation steps, in the present embodiment, the method for generating 3 encoded data packets in step S3 includes the following steps:

[0086] Step S301: A total of layers of data are set, i is the number of data layers, n i is the total number of data of the i-th layer of data, 1≤j≤k, the 0-th layer of data t 0,1 ,…,t 0,j ,t 0,j+1 is initialized, wherein t 0,j+1 =m j , t 0,1 is a M*L all-zero matrix;

[0087] Step S302: Starting from i=1, the following operations are calculated respectively until t i-1,2a-1 is sequentially XORed with t i-1,2a to obtain the i-th layer of data t i,a , i.e. t i,a =t i-1,2a-1 +t i-1,2a , wherein a is an integer and is taken from 1 to n i -1 level by level, and if ni-1 is even, if n i-1 is odd,

[0088] The method for obtaining p is as follows:

[0089] For a specific example of the present embodiment, refer to Figs. 2-3 , in which there are 31 original data packets, i.e. K=31, is a general operator symbol, representing rounding down, and the opposite represents rounding up. Therefore, the maximum value of i is i.e. 4. After initialization, the total number of data n0 of the 0th layer is 32, t 0,1 , t 0,2 ,...,t 0,32 are respectively 0, m1,...,m 31 ; then, starting from i=1, n1=16, the first layer of data is calculated, for example, starting from a=1, t 1,1 =t 0,1 +t 0,2 , then the case of a=2 is calculated to obtain t 1,2 =t 0,3 +t 0,4 , and so on until a=16-1, i.e. t 1,15 =t 0,29 +t 0,30 ; it is determined that n i-1 is even, so t 1,16 =t 0,31 +t 0,32 ; this is repeated until the 4th layer of data is obtained to obtain t 4,1 and t 4,2 , so as to calculate p=t 4,1 +t 4,2 ;

[0090] Step S304: obtaining matrix wherein, a column of all 0 vectors is added to the right side of s i to obtain s i ', i.e. s i '=s i G;

[0091] Step S305: the method for obtaining q and r is as follows:

[0092] s i ' is circularly shifted to the right by i+1 positions in column, and the last column of the obtained M*(L+1) matrix is deleted to obtain matrix x ii.e.x i = s i ′C L+1 i+1 G T ; obtaining q = x + s;

[0093] s i ′ is circularly shifted right by mod(2(i+1),L+1) bits, and the last column of the obtained M*(L+1) matrix is deleted to obtain a matrix y i , i.e.y i = s i ′C L+1 2(i+1) G T ; obtaining r = y + s.

[0094] On the basis of the calculation of p, Fig. 3 the inter-packet XOR result t of the original data packets contained in each circled node set in i,j has been obtained when the coded data packet p is generated, and can be directly taken, that is, the intermediate data generated when p is calculated by the method can be used to calculate q and r, reducing the XOR operation and in turn reducing the complexity.

[0095] Specifically, s i , i takes values of 0-4, and s i ′ is calculated in turn according to the steps, and then x is calculated to obtain q. When r is calculated, s i ′ is circularly shifted right by mod(2(i+1),17) bits, and the last column is deleted to obtain an 8*16 binary matrix, i.e., y i , and r is obtained in this way.

[0096] Preferably, as another feasible solution, in the step S305, the method for obtaining q and r is:

[0097] x′ and y′ are initialized, both of which are M*(L+1) all-zero matrices, and x′ = y′ = 0. In this embodiment, i is initialized to 4;

[0098] x′ is XORed with s i ′ bit by bit, and the obtained M*(L+1) matrix is circularly shifted right by 1 bit, L is 16 in this embodiment, and the obtained is re-assigned to x′, i.e., x′ = (x′ + s i ′)C L+1 , i = i-1, and iteration is performed until i = 0 to obtain the final x′; the last column of x′ is deleted to obtain x, i.e., x = x′G T; q = x + s; in summary, from i = 4, iteration, each time the completion of the calculation of i value of 1 to start the next round of calculation, until i = 0 iteration is completed, the following calculation of r is the same.

[0099] XOR y' with s i , and then the resulting M*(L+1) matrix is right-circulated by 2 bits by column, and the resulting is re-assigned to y', that is, y' = (y' + s i )C L+1 2 , i = i - 1, and as above, iteration until i = 0 to get the final y'; delete the last column of y' to get y, that is, y = y'G T ; r = y + s.

[0100] In the prior art, the basic principle of erasure code is to first divide the original data into k parts, then calculate r parts of redundant information through certain encoding rules, and finally store the data and redundancy in k+r nodes in the storage system. The maximum distance separable erasure code ensures that when no more than r nodes in the storage system fail, the data redundancy on any k surviving nodes is read, and the k parts of the original data can be recovered through a specific decoding operation. Reed-Solomon code is a widely used MDS erasure code in storage systems, but its encoding and decoding need to be performed on the algebraic structure of the binary extension field. Array code is a kind of erasure code whose encoding and decoding process only needs XOR operation on the binary field, that is, XOR operation. Some commonly used array codes can guarantee MDS characteristics while the implementation complexity required for encoding and decoding is significantly lower than that of RS code.

[0101] Row diagonal parity code is a classic 2-redundancy MDS array code, that is, r = 2. The number of XOR operations required in its encoding process can approach the theoretical optimum, but it can only tolerate up to 2 data node losses. Some existing multi-redundancy MDS array codes have many limitations in parameter selection, and the number of XOR operations required in the encoding process cannot approach the theoretical optimum. The purpose of the present embodiment is to eliminate the defects of the prior art, so that it can tolerate 3 data node losses while keeping the complexity low, that is, the number of XOR operations required in the encoding process approaches the theoretical optimum.

[0102] Embodiment 2

[0103] The present embodiment is based on the technical solution of embodiment 1, and the specific method steps of embodiment 1 are not repeated. As described in embodiment 1, the present technical solution can tolerate 3 data packet losses. The original data packet in the present embodiment is an 8*16 matrix.

[0104] As a preferred solution of the present embodiment, when one original data packet is lost and no encoded data packet is lost, the data decoding recovery method in step S4 is:

[0105] The lost original data packet is denoted as m j1 The remaining original data packets are subjected to bitwise XOR to obtain the M*L matrix p'; here, the method of calculating p is the same as normal, but one data of the original data packet is lost;

[0106] p' is subjected to bitwise XOR with the encoded data packet p to recover the original data packet m j1 , that is, m j1 = p + p'.

[0107] In addition, when one original data packet is lost and an encoded data packet is lost, the method of data decoding recovery is:

[0108] The lost original data packet is denoted as m j1 , and k all-zero data packets m j ' are initialized, that is, 0 8*16 In this embodiment, k is 31, 1≤j≤k, and m j ' is assigned a value, m j ' = m j , j≠j1; m j ' is regarded as an original data packet, and three encoded data packets are generated according to the method of generating encoded data packets p, q and r and are marked as p', q' and r' respectively; that is, the original data packet m j of the lost data packet is normally substituted into the calculation of p, q and r, and the position corresponding to the lost data packet is an all-zero matrix.

[0109] If the lost original data packet m j1 is recovered using the encoded data packet p, m j1 = p + p'.

[0110] If the lost original data packet m T is recovered using the encoded data packet q, m L+1 = (q' + q)H j1 D1H, where, or m 254 is the modulo (L+1) multiplication order of 2; generally, D1=A 17 17 ; if D1 is composed of more than 8 matrices in {C 2 ,C 17 16 ,C 17 17}, then D1 is reset to 1 17*17 +A j1 254 , 1 (L+1)*(L+1)This is a general notation for representing a matrix of all ones. (C) 17 As mentioned above, this is a cyclic displacement matrix.

[0111] If the encoded data packet r is used to reconstruct the original data packet m, the lost original data packet m... j1 =(r′+r)H T D1H, where, or m L+1 It is a modulo (L+1) multiplication order of 2; similarly, typically, in this embodiment, D1 = A j1 2*254 If D1 is composed of {C 17 C 17 2 ,…, C 17 16 C 17 17 If more than 8 matrices are added together in a given number, then reset D1 = 1. 17*17 +A j1 2*254 , 1 (L+1)*(L+1) This is a general notation for representing a matrix of all ones. (C) 17 As mentioned above, this is a cyclic displacement matrix.

[0112] As can be seen from the above, when an original data packet is lost, the data can be restored using any encoded data packet. In other words, a maximum of two encoded data packets can be lost. Including the original data packet that has already been lost, this scheme can tolerate the loss of three data packets.

[0113] After decoding and recovering the original data packet, the lost encoded data packet is restored. Specifically, the encoded data packet can be recalculated based on the recovered original data packet, or the calculation can be performed using p′, q′, and r′, as well as the recovered data m. j1 The encoded data packet can be restored in the following way, which requires less computation, by directly supplementing the restored data part with the already obtained p′, q′, and r′:

[0114] p = p' + m j1 ;

[0115] q=q′+m j1 GA j1 G T ;

[0116] r = r′ + m j1 GA j1 2 G T ;

[0117] In another case, when two original data packets are lost, the method of data decoding recovery is:

[0118] The two lost original data packets are denoted as m j1 and m j2 ; initialize k all-zero data packets m j ′, 1≤j≤k, assign values to m j ′, m j ′=m j , j≠j1 and j≠j2; take m j ′ as original data packets, generate three encoded data packets according to the method of generating encoded data packets p, q and r, and mark them as p′, q′ and r′ respectively; p″=p′+p, q″=q′+q, r″=r′+r;

[0119] If the encoded data packet p is lost, [m j1 , m j2 ] satisfy the following conditions:

[0120]

[0121] The restoration can be solved by Gaussian elimination method, for example, the following steps are executed:

[0122] Step a.1: calculate r″′=q″(H T A j1 G T )+r″, it can be proved by the cyclic shift network coding property that

[0123] r″′=m j2 GA j2 (A j1 +A j2 )G T

[0124] Step a.2: set If D 11 is composed of more than 8 matrices in {C 17 , C 17 2 , …, C 17 16 , C 17 17}, then reset D 11 =1 17*17 +D 11 , calculate m j2 =r″′H T D 11 H;

[0125] Step a.3: calculate q″′=q″+m j2 GAj2 G T ;

[0126] Step a.4: Set If D 12 is composed of more than 8 matrices in {C 17 ,C 17 2 ,…,C 17 16 ,C 17 17}, reset D 12 =1 17*17 +D 12 , compute m j1 =q″′H T D 12 H;

[0127] If the coded data packet q is lost, solve to get [m j1 ,m j2 ]; refer to the following steps:

[0128] Step b.1: Compute r″′=p″(GA j1 2 G T )+r″, it can be proved from the cyclic shift network coding property that

[0129] r″′=m j2 G(A j1 2 +A j2 2 )G T =m j2 G(A j1 +A j2 ) 2 G T

[0130] Step b.2: Set If D 21 is composed of more than 8 matrices in {C 17 ,C 17 2 ,…,C 17 16 ,C 17 17}, reset D 21 =1 17*17 +D 21 , compute m j2 =r″′H T D 21 H;

[0131] Step b.3: Calculate m j1 = p" + m j2 ;

[0132] If the coded data packet r is lost, solve by Gaussian elimination to get [m j1 , m j2 ]; the solving method can refer to the following steps:

[0133] Step c.1: Calculate q'" = p"(GA j1 G T ) + q", which can be proved by the cyclic shift network coding property

[0134] q'" = m j2 G(A j1 + A j2 )G T

[0135] Step c.2: Set If D 31 is composed of more than 8 matrices in {C 17 , C 17 2 ,..., C 17 16 , C 17 17}, then reset D 31 = 1 17*17 + D 21 , calculate m j2 = q'"H T D 31 H;

[0136] Step c.3: Calculate m j1 = p" + m j2 ;

[0137] As can be seen from the above, when two original data packets are lost, data recovery can be performed only by any two coded data packets, that is, running on this basis, 1 coded data packet is lost, so the total number of allowable lost data packets in this case is still 3.

[0138] After the original data packet is recovered by decoding recovery, the lost coded data packet is restored. Specifically, the coded data packet can be recalculated according to the recovered original data packet, or the recovered data m j1 and m j2 are recovered in the following way, which has smaller calculation amount, and directly supplements the recovered data part in p', q' and r' that have been obtained:

[0139] p = p' + mj1 +m j2 ;

[0140] q=q'+m j1 GA j1 G T +m j2 GA j2 G T ;

[0141] r=r'+m j1 GA j1 2 G T +m j2 GA j2 2 G T ;

[0142] On the other hand, when three original data packets are lost, the method for data decoding recovery is:

[0143] The three lost original data packets are denoted as m j1 , m j2 and m j3 ; initialize k all-zero data packets m j ', 1≤j≤k, assign values to m j ', m j '=m j , j≠j1 and j≠j2 and j≠j3; take m j ' as an original data packet, and generate p', q' and r' respectively for p, q and r generated by the method for generating 3 encoded data packets; p"=p'+p, q"=q'+q, r=r'+r;

[0144]

[0145] or

[0146] Specifically, generally If D2 is composed of more than 8 matrices in {C 17 ,C 17 2 ,…,C 17 16 ,C 17 17}, then reset D2=[(A j1 + Aj2)(Aj2+Aj3)]2mL+1-2+1L+1*(L+1);

[0147]

[0148] or

[0149] In particular, generally If D3 is composed of more than 8 matrices in {C 17 ,C 17 2 ,…,C 17 16 ,C 17 17} added together, then reset D3 = [(A j1 + Aj2)(Aj2+Aj3)]2mL+1-2+1L+1*(L+1); where mL+1 is the modulo (L+1) multiplication order of 2;

[0150]

[0151] The calculation obtains m j1 = p" + m j2 + m j3 , and thus completes data recovery.

Claims

1. A method for encoding a triple-redundant MDS array code for data recovery, the method comprising: The method comprises the following steps: Step S1: obtaining k original data packets, marking the k original data packets as m j , 1≤j≤k, each data packet is represented by an M*L matrix, where L satisfies the following conditions: L+1 is a prime number; Step S2: obtaining each of the original data packets m j The corresponding binary coding coefficient matrix A j , A j is an (L+1)*(L+1) matrix; Step S3: generating the coded data packets p, q and r in the following way: where G is the concatenation of L*L identity matrix I L and L*1 all-zero column vector, i.e. G = [I L 0 L*1 ]; Step S4: when data loss occurs in the original data packets, using the original data packets and the coded data packets of the remaining data to recover the data by data coding; the method of data coding recovery is: The three original data packets lost are denoted as m j1 , m j2 , and m j3 ; k all-zero data packets m j ' are initialized, 1≤j≤k, and values are assigned to m j ', m j ' = m j , j≠j1 and j≠j2 and j≠j3; m j ' is regarded as an original data packet, and three encoded data packets are generated according to the method of generating encoded data packets p, q, and r, and are denoted as p', q', and r', respectively; m j1 = p" + m j2 + m j3 ; Wherein, p" = p' + p, q" = q' + q, r" = r' + r; or or m L+1 Modulus (L+1) multiplication order; H = [I L*L 1 L*1 ] T .

2. The method of claim 1, wherein, A method for obtaining the binary encoding coefficient matrix A j is: convert the j to a binary vector (b j,w ,b j,w-1 ,...,b j,1 ,b j,0 ) A j = b j,w C L+1 w+1 + b j,w-1 C L+1 w +…+ b j,1 C L+1 2 + b j,0 C L+1 + b j ′I L+1 ; where b j ′ = mod(b j,w + b j,w-1 +... + b j,1 + b j,0 , 2), C L+1 is a circulant shift matrix 3. The triple-redundant MDS array code compilation method for data recovery according to claim 1, characterized in that, In the step S3, the method of generating the three coded data packets comprises the following steps: Step S301: total setting layer data, i is the data layer number, n i is the total number of data of the i-th layer data, Initialize the 0th layer data t 0,1 ,…,t 0,j ,t 0,j+1 , where t 0,j+1 = m j , t 0,1 is an M*L all-zero matrix; Step S302: from i = 1, respectively, according to the following operation until In turn, t i-1,2a-1 With t i-1,2a Bitwise XOR to get the i layer data t i,a , that is, t i,a = t i-1,2a-1 + t i-1,2a , where a is an integer and gradually from 1 to n i -1; if n i-1 is even, If n i-1 is odd, Step S303: The method for obtaining p is: Step S304: obtaining a matrix wherein, In s i Add a column of all 0 vectors to the right of s i ′, i.e., s i ′ = s i G; Step S305: the method of obtaining q and r is: s i ′i+1 bits are circularly shifted to the right, and the last column of the resulting M*(L+1) matrix is deleted to obtain matrix x i , i.e. i x i ′s L+1 i+1 G T ; obtain obtain q = x + s; s i ′s i ′s i ′s i ′s L+1 2(i+1) G T ; get get r = y + s; C L+1 for the cyclic shift matrix 4. The triple-redundant MDS array code compilation method for data recovery according to claim 3, characterized in that, In the step S305, the method of obtaining q and r is: Initialize x' and y', both of which are M*(L+1) all-zero matrices, initialize Relate x′ to s i Perform a bitwise XOR operation on x', then rotate the resulting M*(L+1) matrix one bit to the right column by column, and reassign the result to x', i.e., x' = (x' + s). i ′)C L+1 Let i = i-1, iterate until i = 0 to get the final x′; delete the last column of x′ to get x, that is, x = x′G T ; Obtain q = x + s; y' is XORed with s bit by bit, and the obtained M*(L+1) matrix is right-circulated by 2 bits by column, and the obtained is re-assigned to y', that is, y'=(y'+s i ')C i L+1 2 , i=i-1, iterate until i=0 to obtain the final y'; delete the last column of y' to obtain y, that is, y=y'G T ; r=y+s is obtained.​

Citation Information

Patent Citations

  • MDS (Maximum Distance Separable) array code coding for recovering multi-node invalidity and decoding method

    CN107086870A

  • High-efficiency and high-reliability big data storage system and method and computer program

    CN110457161A