CN110990188B - Construction method of partial repetition code based on Hadamard matrix - Google Patents
Construction method of partial repetition code based on Hadamard matrix Download PDFInfo
- Publication number
- CN110990188B CN110990188B CN201911134160.4A CN201911134160A CN110990188B CN 110990188 B CN110990188 B CN 110990188B CN 201911134160 A CN201911134160 A CN 201911134160A CN 110990188 B CN110990188 B CN 110990188B
- Authority
- CN
- China
- Prior art keywords
- matrix
- data blocks
- code
- row
- hadamard
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/08—Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F11/10—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
- G06F11/1008—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Error Detection And Correction (AREA)
Abstract
The invention discloses a method for constructing a part of repeated codes based on a Hadamard matrix, which divides an original file M into k original data blocks, adopts (n, k) MDS coding on the k original data blocks and generates n coding blocks. The method comprises the steps of selecting an n +1 order antisymmetric Hadamard matrix according to the number of coding blocks, transforming the Hadamard matrix according to a formula to obtain a new matrix, constructing isomorphic FR codes according to the matrix, deleting the matrix to obtain another new matrix, and constructing the heterogeneous FR codes with different storage capacities by utilizing the matrix. The FR codes constructed by utilizing the Hadamard matrix are simpler and more visual, and the isomorphic FR codes can be easily changed into heterogeneous FR codes with different storage capacities through conversion.
Description
Technical Field
The invention belongs to the field of computers, and relates to a construction method of a partial repetition code based on Hadamard.
Background
In distributed storage systems, "replication" and "erasure coding" techniques are typically employed to ensure the reliability of data. However, the storage overhead required for copying is relatively large, erasure codes require encoding and decoding operations, the whole file needs to be downloaded for repair in the repair process, the repair bandwidth overhead is relatively large, and the repair is relatively complex. For this purpose Rouayheb and ramchandar proposed in 2010 a repair-accurate partial Repetition (FR) code. The FR code can tolerate the accurate no-code repair of a plurality of fault nodes, the repair bandwidth overhead and the disk I/O overhead are smaller, and the system repair performance is obviously improved. There are many existing methods for constructing the FR code, such as utilizing latin square, bipartite graph, etc.
Disclosure of Invention
The invention aims to provide a construction method of a High Frequency Response (HFR) code based on a Hadamard matrix.
In order to realize the task, the invention adopts the following technical scheme:
a method for constructing a partial repetition code based on a Hadamard matrix is characterized by comprising the following steps:
step one, dividing an original file M into k original data blocks, wherein k is more than or equal to 2, and coding the k original data blocks by adopting (n, k) MDS (n is more than or equal to k) to obtain n coded data blocks c 1 ,…,c k-1 ,c k ,c k+1 ,…c n The n coded data blocks comprise k original data blocks and n-k check data blocks;
step two, taking an n +1 order antisymmetric Hadamard matrix H n+1 。
Step three, according to the following formula (1):
obtaining zero matrix K' n+1 (n.gtoreq.k), wherein J n+1 Representing an n +1 order matrix with elements all 1, H n+1 For an antisymmetric Hadamard matrix, n +1 is a multiple of 4;
step four, a matrix K 'is obtained by aligning zero' n+1 The first row and the first column are deleted by transformation to obtain a new matrix K n ;
Step five, passing the matrix K n And (3) constructing an FR code:
1) Matrix K n Wherein each row represents a node, using a matrix K n Row (ii) in (ii) represents the i-th storage node N in the distributed storage system i There are n storage nodes (i =1,2 … n);
2) An isomorphic FR code is constructed from the following equation (2):
N i ={j:a ij =1} (2)
where j =1,2 … n, i denotes the i-th storage node, a ij A value representing the ith row and jth column of the matrix; wherein N is i Storage node, N, representing isomorphic FR code i The data block contained in it is the matrix K n The number of columns corresponding to all 1 in the ith row;
extracting the number of the columns to obtain a data block stored by one node to form an isomorphic FR code;
3) Heterogeneous FR codes are constructed according to the following method:
will matrix K n In the jth column ofChanging 1 to 0 results in a new matrix K n1 Then, the following formula (3) is utilized:
N i ={j:a ij =1} (3)
where j =1,2 … n, i denotes the i-th storage node, a ij A value representing the ith row and the jth column of the matrix;
N i storage node, N, representing heterogeneous FR codes i The data block contained in it is a matrix K n And (3) extracting the column numbers corresponding to all the 1 s in the ith row to obtain a data block stored by one storage node and obtain heterogeneous FR codes with different node storage capacities.
According to the invention, the Hadamard matrix is specifically defined as:
let H be a (1, -1) matrix, i.e., an n × n matrix with 1 and-1 as elements, if:
HH T and if = nI, H is called an n-order Hadamard matrix.
Further, in step three, if an H matrix of order n exists, n =1,2 or n =0 (mod 4).
The zero-one matrix K 'obtained in step three' n+1 (n is more than or equal to K) all the first rows are 0, all the first columns are 1, then in step four, zero is taken as a matrix K' n+1 The first row and the first column are deleted.
And fifthly, the data block comprises an original data block and a check data block.
Compared with the prior art, the construction method of the partial repeated code based on the Hadamard matrix brings the following technical effects:
1. a novel algorithm is constructed by utilizing the Hadamard matrix, and the FR code is constructed by utilizing the algorithm to be simpler, more intuitive and more efficient.
2. Homogeneous FR codes can be easily converted into heterogeneous FR codes using Hadamard matrices.
Drawings
FIG. 1 is an antisymmetric Hadamard matrix of order 12;
FIG. 2 shows a matrix K of order 11 transformed from a Hadamard matrix of order 12 antisymmetric 11 ;
FIG. 3 is a block storage of isomorphic FR code data constructed by Hadamard matrix transformation;
FIG. 4 is a pair K 11 Deleting a new matrix formed by 1 from each column;
FIG. 5 is a block storage of heterogeneous FR code data constructed by Hadamard matrix transformation;
the present invention will be described in further detail below with reference to the accompanying drawings and examples.
Detailed Description
The technical idea of the invention is that an FR code is constructed by a Hadamard matrix, and isomorphism can be changed into isomorphism through simple steps.
It should be noted that, in the following embodiments, only the objects, technical solutions and advantages of the present invention will be made clear to those skilled in the art, and the present invention is not limited to these embodiments.
According to the technical scheme of the invention, the embodiment provides a construction method of a partial repetition code based on a Hadamard matrix, which specifically comprises the following steps:
step 2, taking an n +1 order antisymmetric Hadamard matrix H n+1 。
Step 3, according to the following formula (1):
obtaining zero matrix K' n+1 (n.gtoreq.k), wherein J n+1 Presentation elementN +1 order matrix with elements all 1, H n+1 For an antisymmetric Hadamard matrix, n +1 is a multiple of 4;
step 4, a matrix K 'of zero line' n+1 The first row and the first column are deleted by transformation to obtain a new matrix K n ;
Step 5, passing the matrix K n And (3) constructing an FR code:
1) Matrix K n Wherein each row represents a node, using a matrix K n Row (ii) in (ii) represents the i-th storage node N in the distributed storage system i There are n storage nodes (i =1,2 … n);
2) An isomorphic FR code is constructed from the following equation (2):
N i ={j:a ij =1} (2)
j =1,2 … n, i denotes the i-th storage node, a ij Values, N, representing the ith row and jth column of the matrix i Storage node, N, representing isomorphic FR i The data block contained in it is the matrix K n And extracting the column numbers corresponding to all 1 in the ith row to obtain a data block stored by one node, thereby forming the isomorphic FR code.
3) Heterogeneous FR codes are constructed according to the following method:
will matrix K n In the jth columnChanging 1's to 0's results in a new matrix K n1 Then using the formula:
N i ={j:a ij =1} (3)
where j =1,2 … n, i denotes the i-th storage node, a ij Representing the value of the ith row and the jth column of the matrix.
N i Storage node, N, representing heterogeneous FR codes i The data block contained in it is a matrix K n And (3) extracting the column numbers corresponding to all 1 s in the ith row to obtain a data block stored by one node, namely obtaining the heterogeneous FR codes with different node storage capacities.
In this embodiment, the Hadamard matrix is specifically defined as:
let H be a (1, -1) matrix, i.e., an n × n matrix with 1 and-1 as elements, if:
HH T and if = nI, H is called an n-order Hadamard matrix (H matrix for short).
Wherein, the zero matrix K 'obtained in the step 3' n+1 (n is more than or equal to K) all the first rows are 0, all the first columns are 1, then in step four, zero is taken as a matrix K' n+1 The first row and the first column are deleted.
And 5, the data block comprises an original data block and a check data block.
The following are specific examples given by the inventors.
Example (b):
the embodiment provides a method for constructing a partially repeated (HFR) code based on a Hadamard matrix, which specifically includes the following steps:
this example is to construct (11,7) system MDS code, using m = (m) 1 ,m 2 ,m 3 ,m 4 ,m 5 ,m 6 ,m 7 ) Representing the original file stored in the distributed storage system, c = (m) 1 ,m 2 ,m 3 ,m 4 ,m 5 ,m 6 ,m 7 ,p 8 ,p 9 ,p 10 ,p 11 ) Representing an MDS code, m of 1 ,m 2 ,m 3 ,m 4 ,m 5 ,m 6 ,m 7 Representing an original data block; p is a radical of 8 ,p 9 ,p 10 ,p 11 Representing a check data block;
step 2, taking an n +1 order antisymmetric Hadamard matrix H n+1 。
In step 1, 11 data blocks and check blocks are obtained, and the Hadamard matrix is specifically defined as:
let H be a (1, -1) matrix, i.e. an n x n matrix with 1 and-1 as elements, if HH is satisfied T And = nI, the H is called an n-order Hadamard matrix, and the H is called an H matrix for short.
This embodiment selects the 12 th order antisymmetric Hadamard matrix to obtain the 12 th order antisymmetric Hadamard matrix H shown in FIG. 1 12
Step 3, according to the formula (1):
obtaining zero matrix K' n+1 (n.gtoreq.k) wherein J n+1 Representing an n +1 order matrix with elements all 1, H n+1 For an antisymmetric Hadamard matrix, n +1 is a multiple of 4;
in the present example, the 12 th order antisymmetric Hadamard matrix H obtained in step 2 12 A matrix K 'of 12 th order is obtained from equation (1)' 12 For further use.
Step 4, a matrix K 'of zero line' n+1 Transforming to obtain new matrix K by deleting the first row and the first column n ;
In the present example, for the matrix K 'obtained in step 3' 12 The matrix is subjected to the operation of deleting the first row and the first column to obtain a new matrix K 11 As shown in fig. 2.
Step 5, passing the matrix K n And (3) constructing an FR code:
1) Matrix K n Wherein each row represents a node, using a matrix K n Row (ii) in (ii) represents the i-th storage node N in the distributed storage system i There are n storage nodes (i =1,2 … n);
as shown in FIG. 2, the 11 th order matrix K in this embodiment 11 Each row of the matrix represents a node, so there are 11 storage nodes to store a block of data.
2) An isomorphic FR code is constructed from the following equation (2):
N i ={j:a ij =1} (2)
where j =1,2 … n, i denotes the i-th bankNode, a ij Values, N, representing the ith row and jth column of the matrix i Storage node, N, representing isomorphic FR i The data block contained in it is a matrix K n And extracting the column numbers corresponding to all 1 in the ith row to obtain a data block stored by one node, thereby forming the isomorphic FR code.
As shown in fig. 2, in this embodiment, there are 7 data blocks and their repetition degrees, and 4 check blocks and their repetition degrees, which are overlapped to obtain 11 storage nodes and their corresponding repetition degrees ρ, where the data blocks include an original data block and a check data block.
The 11 storage nodes correspond to 11-order matrixes K respectively 11 If the third column element in the second row is 1, it means that the second storage node stores the original data block 3, and if the eleventh column element in the second row is 1, it means that the second storage node stores the parity block 11.
As shown in fig. 3, the data blocks stored in 11 storage nodes can be obtained by corresponding the matrix according to this method, as follows:
N 1 ={2,4,5,6,10}N 2 ={3,5,6,7,11}
N 3 ={1,4,6,7,8}N 4 ={2,5,7,8,9}
N 5 ={3,6,8,9,10}N 6 ={4,7,9,10,11}
N 7 ={1,5,8,10,11}N 8 ={1,2,6,9,11}
N 9 ={1,2,3,7,10}N 10 ={2,3,4,8,11}
N 11 ={1,3,4,5,9}
it can be seen that there are 11 storage nodes in total, each storage node has a storage capacity of 5, and there is one homogeneous FR code with a repetition ρ of 5.
Step 5.3, constructing the heterogeneous FR code according to the following method:
will matrix K n In the jth columnChanging 1's to 0's results in a new matrix K n1 Then, then liWith equation (3):
N i ={j:a ij =1} (3)
wherein j =1,2 … n, i represents the i-th FR node, a ij Representing the value of the ith row and jth column of the matrix. Wherein N is i Storage node, N, representing a heterogeneous FR code i The data block contained in it is the matrix K n And (3) extracting the column numbers corresponding to all 1 s in the ith row to obtain a data block stored by one node, namely obtaining the heterogeneous FR codes with different node storage capacities.
In this embodiment, K is set 11 In each column ofChanging 1 to 0 results in a new matrix K n1 Due to K n1 Is a matrix of order 11, so a new matrix K is obtained n1 Is represented by K 111 As shown in fig. 4, the following formula (3) is obtained:
N 1 ={2,4,5}N 2 ={3,5,7,11}
N 3 ={1,4,6,7,8}N 4 ={2,5,8,9}
N 5 ={3,6,8,9,10}N 6 ={4,7,9,10}
N 7 ={5,10,11}N 8 ={1,6,9,11}
N 9 ={1,2,3,7,10}N 10 ={2,4,8,11}
N 11 ={1,3,5}
it can be seen that the first storage node storage capacity is 3, the second storage node capacity is 4, the third storage node capacity is 5, the fourth storage node capacity is 4, the fifth storage node capacity is 5, the sixth storage node capacity is 4, the seventh storage node storage capacity is 3, the eighth storage node capacity is 4, the ninth storage node capacity is 5, the tenth storage node capacity is 4, and the eleventh storage node capacity is 3.
Finally, the heterogeneous FR generated by the matrix has 11 storage nodes, namely 7 original data blocks and 4 check blocks for storage, and the repetition degree rho is 4, but the storage nodes have different storage capacities of 3,4,5.
The data blocks generated by the Hadamard matrix correspond to homogeneous FR data blocks as shown in fig. 3, and the heterogeneous FRs are constructed as shown in fig. 5.
It can be seen that the homogeneous FR codes have the same storage capacity for each data node, but the heterogeneous FR codes of the embodiments have different storage capacities, and it is relatively simple to construct the FR codes by using the Hadamard matrix, and it is relatively simple to construct the heterogeneous FR codes having different storage capacities from the homogeneous FR codes. Obviously, the FR code is more suitable for a practical distributed storage system than a general FR code, and the storage cost is lower.
Claims (5)
1. A method for constructing a partial repetition code based on a Hadamard matrix is characterized by comprising the following steps:
step one, dividing an original file M into k original data blocks, wherein k is more than or equal to 2, and coding the k original data blocks by adopting (n, k) MDS (n is more than or equal to k) to obtain n coded data blocks c 1 ,…,c k-1 ,c k ,c k+1 ,…c n The n coded data blocks comprise k original data blocks and n-k check data blocks;
step two, taking an n +1 order antisymmetric Hadamard matrix H n+1 ;
Step three, according to the following formula (1):
obtaining zero matrix K' n+1 (n.gtoreq.k), wherein J n+1 Denotes an n +1 order matrix with elements all 1, H n+1 For an antisymmetric Hadamard matrix, n +1 is a multiple of 4;
step four, a matrix K 'is obtained by aligning zero' n+1 The first row and the first column are deleted by transformation to obtain a new matrix K n ;
Step five, passing the matrix K n Constructing an FR code:
1) Matrix K n Wherein each row represents a node, using momentsMatrix K n Row (ii) in (ii) represents the i-th storage node N in the distributed storage system i There are n storage nodes (i =1,2 … n);
2) An isomorphic FR code is constructed from the following equation (2):
N i ={j:a ij =1} (2)
where j =1,2 … n, i denotes the i-th storage node, a ij A value representing the ith row and jth column of the matrix; wherein N is i Storage node, N, representing isomorphic FR code i The data block contained in it is the matrix K n The number of columns corresponding to all 1 in the ith row;
extracting the column number to obtain a data block stored by one node to form an isomorphic FR code;
3) Heterogeneous FR codes are constructed according to the following method:
will matrix K n In the jth columnChanging 1 to 0 results in a new matrix K n1 Then, the following formula (3) is utilized:
N i ={j:a ij =1} (3)
where j =1,2 … n, i denotes the i-th storage node, a ij A value representing the ith row and the jth column of the matrix;
N i storage node, N, representing a heterogeneous FR code i The data block contained in it is a matrix K n And (3) extracting the column numbers corresponding to all the 1 s in the ith row to obtain a data block stored by one storage node and obtain heterogeneous FR codes with different node storage capacities.
2. The method of claim 1, wherein the Hadamard matrix is specifically defined as:
let H be a (1, -1) matrix, i.e., an n × n matrix with 1 and-1 as elements, if:
HH T and if = nI, H is called an n-order Hadamard matrix.
3. The method of claim 1, wherein in step three, if an nth order H matrix exists, then n =1,2 or n =0 (mod 4).
4. The method of claim 1, wherein the zero-one matrix K 'is obtained if step three' n+1 (n is more than or equal to K) all the first rows are 0, all the first columns are 1, then the fourth step is to take zero as a matrix K' n+1 The first row and the first column are deleted.
5. The method of claim 1 wherein the data blocks of step five comprise original data blocks and parity data blocks.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911134160.4A CN110990188B (en) | 2019-11-19 | 2019-11-19 | Construction method of partial repetition code based on Hadamard matrix |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911134160.4A CN110990188B (en) | 2019-11-19 | 2019-11-19 | Construction method of partial repetition code based on Hadamard matrix |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110990188A CN110990188A (en) | 2020-04-10 |
CN110990188B true CN110990188B (en) | 2023-03-24 |
Family
ID=70084915
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911134160.4A Active CN110990188B (en) | 2019-11-19 | 2019-11-19 | Construction method of partial repetition code based on Hadamard matrix |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110990188B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113708780B (en) * | 2021-08-13 | 2024-02-02 | 上海映盛网络技术股份有限公司 | Partial repetition code construction method based on shadow |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105721611A (en) * | 2016-04-15 | 2016-06-29 | 西南交通大学 | General method for generating minimal storage regenerating code with maximum distance separable storage code |
WO2018072294A1 (en) * | 2016-10-17 | 2018-04-26 | 成都信息工程大学 | Method for constructing check matrix and method for constructing horizontal array erasure code |
CN110032470A (en) * | 2019-03-18 | 2019-07-19 | 长安大学 | A kind of building method of the isomery part duplication code based on Huffman tree |
CN110389848A (en) * | 2019-06-25 | 2019-10-29 | 长安大学 | Part based on segmented construction repeats code constructing method and malfunctioning node restorative procedure |
-
2019
- 2019-11-19 CN CN201911134160.4A patent/CN110990188B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105721611A (en) * | 2016-04-15 | 2016-06-29 | 西南交通大学 | General method for generating minimal storage regenerating code with maximum distance separable storage code |
WO2018072294A1 (en) * | 2016-10-17 | 2018-04-26 | 成都信息工程大学 | Method for constructing check matrix and method for constructing horizontal array erasure code |
CN110032470A (en) * | 2019-03-18 | 2019-07-19 | 长安大学 | A kind of building method of the isomery part duplication code based on Huffman tree |
CN110389848A (en) * | 2019-06-25 | 2019-10-29 | 长安大学 | Part based on segmented construction repeats code constructing method and malfunctioning node restorative procedure |
Non-Patent Citations (2)
Title |
---|
一类新的(k+2,k)Hadamard MSR码;张司娜等;《西南交通大学学报》;20160215(第01期);全文 * |
基于可分组设计的部分重复码研究;朱兵等;《通信学报》;20150225(第02期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN110990188A (en) | 2020-04-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Sasidharan et al. | A high-rate MSR code with polynomial sub-packetization level | |
US7451374B2 (en) | Apparatus and method for channel coding in mobile communication system | |
WO2018072294A1 (en) | Method for constructing check matrix and method for constructing horizontal array erasure code | |
CN104850468A (en) | Check matrix based erasure code decoding method | |
US20210273654A1 (en) | Erasure code calculation method | |
US10425106B2 (en) | Balanced Reed-Solomon codes | |
Kadhe et al. | Codes with unequal locality | |
Shahabinejad et al. | A class of binary locally repairable codes | |
Hu et al. | New constructions of SD and MR codes over small finite fields | |
EP3182601B1 (en) | Data processing method and system based on quasi-cyclic ldpc | |
CN103746774A (en) | Error resilient coding method for high-efficiency data reading | |
CN106998208A (en) | A kind of code construction method of variable length Polar codes | |
US8145971B2 (en) | Data processing systems and methods for processing digital data with low density parity check matrix | |
Sasidharan et al. | High-rate regenerating codes through layering | |
Su | Optimal pliable fractional repetition codes that are locally recoverable: A bipartite graph approach | |
CN110990188B (en) | Construction method of partial repetition code based on Hadamard matrix | |
CN103401650B (en) | A kind of (n, 1, m) there is the blind-identification method of error code convolutional code | |
US11316534B2 (en) | Encoding method and device, decoding method and device, and storage medium | |
CN111125014B (en) | Construction method of flexible partial repeat code based on U-shaped design | |
CN102386932B (en) | LDPC code constitution method | |
CN102723956B (en) | Method for generating low density parity check (LDPC) code | |
CN106788454B (en) | Construction method of local unequal codes | |
Silberstein et al. | Optimal fractional repetition codes | |
Farnoud et al. | Multipermutation codes in the Ulam metric | |
CN113708780B (en) | Partial repetition code construction method based on shadow |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |