Methods and apparatus for generating, encoding, repairing, and decoding extremely repairable codes.
By updating the initial verification matrix and solving the global verification information, a huge repairable code with code length n=finite domain parameter q+1 is generated, which solves the problems of code length and finite domain in the existing technology, and improves the computing speed.
Patent Information
- Application Number
- CN202411153797.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-08-21
AI Technical Summary
In the prior art, the code length of extremely repairable codes is shorter and the finite domain is larger, resulting in slower computing speed.
By obtaining the encoding parameters and initial verification matrix of the extremely repairable code, determining the local repair group parameters and global verification row parameters, updating the initial verification matrix to generate an intermediate verification matrix, solving the global verification information to generate the target verification matrix, and obtaining the extremely repairable code with code length n=finite domain parameter q+1.
The problem of shorter code length and larger finite domains in the prior art has been overcome, and the computing speed of extremely repairable codes has been improved, and the maximum repairable code with smaller finite domains under the same code length is realized.
Smart Images

Figure CN119127561B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data coding technology, and in particular to a method and device for generating, encoding, repairing, and decoding a very large repairable code. Background Art
[0002] With the digital development of society, distributed storage systems have become the digital infrastructure of today's society. Generally speaking, redundancy strategies are needed to deal with software and hardware failures of storage systems. That is, when storing data, the original k data blocks are encoded to obtain n (n>k) data blocks, and the encoded n data blocks are stored in n storage nodes respectively to ensure that even if there are a small number of node failures, data will not be lost. In this case, the encoding method needs to meet the requirements of both ensuring the redundancy rate of the encoding and having the maximum fault tolerance as much as possible.
[0003] The prior art provides an ideal fault-tolerant coding scheme for distributed storage systems, namely a special maximally recoverable code (MRC). The MRC has the strongest fault tolerance capability under a given local repair group configuration, and has the advantages of low repair bandwidth overhead and high fault tolerance capability.
[0004] However, the construction process of the currently known maximally repairable codes all uses methods such as partial polynomials, function fields, and subspace direct sum systems. For the maximally repairable codes with a global check bit h=2, the code length of the constructed maximally repairable codes is less than or equal to the finite field parameter q-1. This makes the existing maximally repairable codes have the disadvantages of a large finite field and a relatively short code length, which leads to the problem of slow computing speed. Summary of the invention
[0005] The purpose of the present application is to provide a method and device for generating, encoding, repairing and decoding extremely large repairable codes in view of the deficiencies in the above-mentioned prior art, so as to solve the problem that the extremely large repairable codes in the prior art have large finite fields and short code lengths, thereby resulting in slow computing speed.
[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0007] In a first aspect, an embodiment of the present application provides a method for generating a very large repairable code, the method comprising:
[0008] Obtaining a coding parameter and an initial check matrix of a maximally repairable code, wherein the coding parameter is a finite field parameter and a locality parameter that satisfy a first preset condition, and the initial check matrix is a check matrix of a maximally repairable code having two global check rows, and the first preset condition is that the finite field parameter is a prime power, and the locality parameter is greater than one, and the ratio of the finite field parameter plus one to the locality parameter plus one is an integer;
[0009] Determining local repair group parameters of the extremely large repairable code according to the encoding parameters;
[0010] The initial check matrix is updated according to the local repair group parameter and the locality parameter to obtain an intermediate check matrix, wherein the intermediate check matrix is used to characterize that the extremely large repairable code has the local repair characteristics indicated by the local repair group parameter and the locality parameter;
[0011] Determine a target finite field according to the finite field parameter, the number of elements in the target finite field being the number indicated by the finite field parameter;
[0012] According to the target finite field and the local repair group parameters, global check information of the extremely large repairable code is obtained by solving, and the global check information is used to generate a global check row of the extremely large repairable code;
[0013] A target check matrix of a maximally repairable code is generated according to the intermediate check matrix and the global check information.
[0014] In a possible implementation, updating the initial check matrix according to the local repair group parameter and the locality parameter to obtain an intermediate check matrix includes:
[0015] Determining the number of local repair rows in the initial check matrix according to the local repair group parameters;
[0016] Determining the weight of each local repair row in the initial check matrix according to the locality parameter;
[0017] The initial check matrix is updated according to the number of the local repair rows, the weight of each of the local repair rows and the global check row parameter to obtain an intermediate check matrix.
[0018] In a possible implementation, solving the global check information of the extremely large repairable code according to the target finite field and the local repair group parameters includes:
[0019] Determine a first matrix of the target finite field, where the first matrix is a companion matrix of a primitive polynomial of degree 2 in the target finite field;
[0020] Generate a second matrix according to the first matrix and the local repair group parameters;
[0021] According to the basic properties of the target finite field and the second matrix, a target vector on the target finite field is constructed, and a first component of the target vector is determined. According to the first component of the target vector, global check information of the extremely large repairable code is obtained.
[0022] In a possible implementation manner, constructing a target vector on the target finite field according to the basic properties of the target finite field and the second matrix includes:
[0023] Determine a first vector on the target finite field, where the first vector is any non-zero column vector with a length of 2 on the target finite field;
[0024] According to the basic properties of the target finite field and the first vector, the target vector is constructed, and the target vector is Wherein, a is the first vector, A is the second matrix, 1<i≤r, r is the locality parameter, c i is the first component of the target vector and c 1 =1,d i is the second component of the target vector.
[0025] In a possible implementation, obtaining the global check information of the extremely large repairable code according to the first component of the target vector includes:
[0026] The first component of the target vector, the first vector, the first matrix and the second matrix are input into the formula The global check information of the extremely large repairable code is obtained by solving the problem, where a is the first vector, c i is the first component of the target vector and c 1 =1, C is the first matrix, A is the second matrix, is the global check information of the jth column of the i-th group in the lower part of the check matrix of the maximally repairable code, 1≤i≤r, 1≤j≤l, r is the locality parameter, and l is the local repair group parameter.
[0027] In a second aspect, another embodiment of the present application provides a coding method for encoding a target check matrix and data to be stored, wherein the target check matrix is the target check matrix described in the first aspect, and the method includes:
[0028] Determining a generator matrix of a maximally repairable code according to the target check matrix;
[0029] Generate verification data according to the generation matrix and the data to be stored.
[0030] In a third aspect, another embodiment of the present application provides a repair method for repairing stored data stored based on a target extremely large repairable code, wherein the target extremely large repairable code is generated according to the extremely large repairable code generation method described in the first aspect above, the stored data includes multiple data groups, each of the data groups includes at least one original data and at least one verification data, and each of the data groups is stored in multiple storage nodes of a distributed storage system, the method includes:
[0031] Determine at least one to-be-repaired node among the plurality of storage nodes and a target data group where each of the to-be-repaired nodes is located;
[0032] If there is only one node to be repaired in the target data group, the local parameter storage nodes are taken out from the target data group, and the node to be repaired is repaired according to the local parameter storage nodes.
[0033] In a fourth aspect, another embodiment of the present application provides a decoding method for decoding stored data stored based on a target extremely large repairable code, wherein the target extremely large repairable code is generated according to the extremely large repairable code generation method described in the first aspect above, the stored data includes multiple data groups, each of the data groups includes at least one original data and at least one verification data, and each of the data groups is stored in multiple storage nodes of a distributed storage system, the method includes:
[0034] Determining a node to be rebuilt among the multiple storage nodes;
[0035] A plurality of storage nodes satisfying a preset number condition are taken out from each stored data group, and each of the nodes to be repaired is rebuilt based on each of the storage nodes. The preset number condition is that the total number of the stored data groups is a target number k and does not include r+1 of any stored data group, wherein the target number k is determined by the finite field parameter and the locality parameter, and r is the locality parameter.
[0036] In a fifth aspect, another embodiment of the present application provides a device for generating a very large repairable code, wherein the device for generating a very large repairable code is used to:
[0037] Obtaining a coding parameter and an initial check matrix of a maximally repairable code, wherein the coding parameter is a finite field parameter and a locality parameter that satisfy a first preset condition, and the initial check matrix is a check matrix of a maximally repairable code having two global check rows, and the first preset condition is that the finite field parameter is a prime power, and the locality parameter is greater than one, and the ratio of the finite field parameter plus one to the locality parameter plus one is an integer;
[0038] Determining local repair group parameters of the extremely large repairable code according to the encoding parameters;
[0039] The initial check matrix is updated according to the local repair group parameter and the locality parameter to obtain an intermediate check matrix, wherein the intermediate check matrix is used to characterize that the extremely large repairable code has the local repair characteristics indicated by the local repair group parameter and the locality parameter;
[0040] Determine a target finite field according to the finite field parameter, the number of elements in the target finite field being the number indicated by the finite field parameter;
[0041] According to the target finite field and the local repair group parameters, global check information of the extremely large repairable code is obtained by solving, and the global check information is used to generate a global check row of the extremely large repairable code;
[0042] A target check matrix of a maximally repairable code is generated according to the intermediate check matrix and the global check information.
[0043] In a sixth aspect, another embodiment of the present application provides a coding device for encoding a target check matrix and data to be stored, wherein the target check matrix is the target check matrix described in the first aspect, and the coding device is used to:
[0044] Determining a generator matrix of a maximally repairable code according to the target check matrix;
[0045] Generate verification data according to the generation matrix and the data to be stored.
[0046] In a seventh aspect, another embodiment of the present application provides a repair device for repairing stored data stored based on a target extremely large repairable code, wherein the target extremely large repairable code is generated according to the extremely large repairable code generation method described in the first aspect above, the stored data includes multiple data groups, each of the data groups includes at least one original data and at least one verification data, each of the data groups is stored in multiple storage nodes of a distributed storage system, and the repair device is used to:
[0047] Determine at least one to-be-repaired node among the plurality of storage nodes and a target data group where each of the to-be-repaired nodes is located;
[0048] If there is only one node to be repaired in the target data group, the local parameter storage nodes are taken out from the target data group, and the node to be repaired is repaired according to the local parameter storage nodes.
[0049] In an eighth aspect, another embodiment of the present application provides a decoding device for decoding stored data stored based on a target extremely large repairable code, wherein the target extremely large repairable code is generated according to the extremely large repairable code generation method described in the first aspect above, the stored data includes multiple data groups, each of the data groups includes at least one original data and at least one check data, each of the data groups is stored in multiple storage nodes of a distributed storage system, and the decoding device is used to:
[0050] Determining a node to be rebuilt among the multiple storage nodes;
[0051] A plurality of storage nodes satisfying a preset number condition are taken out from each stored data group, and each of the nodes to be repaired is rebuilt based on each of the storage nodes. The preset number condition is that the total number of the stored data groups is a target number k and does not include r+1 of any stored data group, wherein the target number k is determined by the finite field parameter and the locality parameter, and r is the locality parameter.
[0052] In the ninth aspect, another embodiment of the present application provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in any one of the first aspect, the second aspect, the third aspect, or the fourth aspect are executed.
[0053] In the tenth aspect, another embodiment of the present application provides a computer program product, characterized in that the computer program product includes computer program code, and when the computer program code is executed by a computing device, the computing device executes the steps of the method described in any one of the first aspect, the second aspect, the third aspect, or the fourth aspect above.
[0054] The beneficial effects of the present application are as follows: by obtaining the coding parameters and the initial check matrix of the extremely repairable code, and determining the local repair group parameters of the extremely repairable code according to the coding parameters, the initial check matrix is updated according to the local repair group parameters and the locality parameters to obtain an intermediate check matrix, the local repair characteristics of the extremely repairable code are characterized, and the target finite field is determined according to the finite field parameters, and the global check information of the extremely repairable code is obtained according to the target finite field and the local repair group parameters, so that the target check matrix of the extremely repairable code is generated according to the intermediate check matrix and the global check information, and the extremely repairable code with a code length of n=finite field parameter q+1 can be obtained, so that the obtained extremely repairable code has the extremely repairable characteristics when storing data, and when the code length of the extremely repairable code is the same, the smaller the finite field of the obtained extremely repairable code is, thereby improving the operation speed of encoding, decoding and repairing data using the extremely repairable code constructed by the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 A schematic diagram of an initial check matrix provided in an embodiment of the present application;
[0057] Figure 2 A schematic diagram of a flow chart of a method for generating a very large repairable code provided in an embodiment of the present application;
[0058] Figure 3 A schematic diagram of an intermediate check matrix provided in an embodiment of the present application;
[0059] Figure 4 A schematic diagram of a flow chart of obtaining an intermediate check matrix in a method for generating a very large repairable code provided in an embodiment of the present application;
[0060] Figure 5 A schematic diagram of a flow chart of obtaining global verification information of a very large repairable code in a method for generating a very large repairable code provided in an embodiment of the present application;
[0061] Figure 6 A schematic diagram of a flow chart of constructing a target vector on a target finite field in a method for generating a very large repairable code provided in an embodiment of the present application;
[0062] Figure 7A schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;
[0063] Figure 8 A storage schematic diagram of a distributed storage system provided in an embodiment of the present application;
[0064] Fig. 9 A schematic diagram of a process flow of a repair method provided in an embodiment of the present application;
[0065] Fig.10 A flowchart of a decoding method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] 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 clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0067] In addition, the described embodiments are only a 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 here can be arranged and designed in various configurations. 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 application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0068] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0069] The prior art provides an ideal fault-tolerant coding scheme for distributed storage systems, namely a special maximally recoverable code (MRC). The MRC has the strongest fault tolerance capability under a given local repair group configuration, and has the advantages of low repair bandwidth overhead and high fault tolerance capability.
[0070] However, the construction process of the currently known maximally repairable codes all uses methods such as partial polynomials, function fields, and subspace direct sum systems. For the maximally repairable codes with a global check bit h=2, the code length of the constructed maximally repairable codes is less than or equal to the finite field parameter q-1. This makes the existing maximally repairable codes have the disadvantages of a large finite field and a relatively short code length, which leads to the problem of slow computing speed.
[0071] Based on the above problems, the embodiment of the present application proposes a construction method of a maximally repairable code, by obtaining the coding parameters and the initial check matrix of the maximally repairable code, and determining the local repair group parameters and the global check row parameters of the maximally repairable code according to the coding parameters, thereby updating the initial check matrix according to the local repair group parameters, the locality parameters and the global check row parameters to obtain an intermediate check matrix, characterizing the local repair characteristics of the maximally repairable code, and determining the target finite field according to the finite field parameters, and solving the global check information of the maximally repairable code according to the target finite field and the local repair group parameters, thereby generating the target check matrix of the maximally repairable code according to the intermediate check matrix and the global check information, and being able to generate a maximally repairable code with a code length n=finite field parameter q+1, overcoming the problem in the prior art that when constructing the maximally repairable code, the code length of the constructed maximally repairable code is shorter and the finite field is longer, and when the code length of the maximally repairable code is the same, the finite field of the maximally repairable code is smaller, thereby improving the operation speed when encoding, decoding and repairing data using the maximally repairable code constructed by the present application.
[0072] First, the relevant definitions that may be involved in the method for generating a very large repairable code provided in an embodiment of the present application are explained.
[0073] Definition 1: [n] is the set of integers from 0 to n-1, that is, [n] = {0, 1, 2, ..., n-1}. [a, b] is the set of integers from a to b-1, that is, [a, b] = {a, a+1, ..., b-1}.
[0074] Definition 2: Let F q is a finite field with q elements, a linear code of length n Yes F q Upper linear space A non-empty subspace of . The dimension k of the code is called The dimension of , n is called the code length. The vector c in (c 0 , c 1 , ..., c n-1 ) is called code Codewords, where c i ∈Fq (i=0, 1, ..., n-1).
[0075] Definition 3: Coding is a finite field F q A linear code on the linear space Linear code The dual code of Right now
[0076]
[0077] Definition 4: Let x and y be fields F q The relative distance between the two vectors of length n is d(x, y), which is defined as the number of all different components in x and y. That is, if x=(x 0 , x 1 , …, x n-1 ), y=(y 0 ,y 1 , …, y n-1 ),but
[0078] d(x,y)=d(x 0 ,y 0 )+…+d(x n-1 ,y n-1 ),
[0079] in
[0080]
[0081] Definition 5: Assume is a finite field F q A linear code on which at least two code words are contained. The minimum distance Defined as:
[0082]
[0083] Definition 6: For a [n, k, d] linear code If a codeword can be restored after being deleted by accessing at most r other codewords, then the codeword is said to have locality r.
[0084] Definition 7: For a [n, k, d] linear code If every codeword has locality r, then the codeword is called is a Locally Repairable Code (LRC) with a locality parameter of r. For any symbol position i∈[n], the set consisting of the position of the symbol and the positions of other symbols to be accessed to repair the symbol is called the local repair group of position i, denoted as And |L i |≤r+1.
[0085] Definition 8: Let F q is a finite field with q elements. Assume that m ≥ 2 and the point set Ω contains The non-zero point
[0086] (a 0 , a 1 , ..., a m ), a i ∈F q .
[0087] And stipulates (a 0 , a 1 , ..., a m ) and (λa 0 , λa 1 , ..., λa m ) is a point in the same Ω, where λ is F q The non-zero elements in Ω are called the secondary coordinates of the point. There are q m+1 -1 non-zero points, each of which is the same point as q-1 points in Ω, so there are points. Passing through two points (a 0 , a 1 , ..., a m ) and (b 0 , b 1 , ..., b m ) contains the following points:
[0088] (λa 0 +μb 0 , λa 1 +μb 1 , ..., λa m +μb m ),
[0089] where λ,μ∈F q , and they are not zero at the same time. A line contains q+1 points, because λ and μ have q 2 -1 choices, each point is the same point as q-1 points in Ω.
[0090] Definition 9: A maximally repairable code is a local repair code whose local repair groups are mutually disjoint and whose sizes are equal. Figure 1A schematic diagram of an initial check matrix provided in an embodiment of the present application, referring to Figure 1 As shown, the initial check matrix H1 may be a matrix having a plurality of rows and a plurality of columns, wherein the initial check matrix H 1 The local repair codes identified are There are local repair groups, global checksum rows, for any i∈[1:l+1], j∈[1:r+1], 0 means The initial check matrix H is the all-zero column vector in 1 The first l rows are local check rows, the weight of each row is r+1, and the supports of each row do not intersect each other, which ensures the local repair property of the maximum repairable code. The initial check matrix H 1 The last h rows are called global check rows, which together with the local check rows ensure the maximally repairable property of the maximally repairable code.
[0091] Secondly, the scenario in which the method for generating a very large repairable code provided in the embodiment of the present application is applied is described.
[0092] It should be understood that the method for generating extremely large repairable codes provided in the embodiments of the present application can be applied to scenarios where data is redundantly encoded, such as distributed storage systems, network communications, and fault-tolerant computing. Exemplarily, in the scenario of a distributed storage system, by executing the method for generating extremely large repairable codes provided in the embodiments of the present application, a check matrix of extremely large repairable codes can be obtained, and after obtaining the check matrix of extremely large repairable codes, the data can be redundantly encoded using the check matrix of extremely large repairable codes, and the results obtained after the redundant encoding can be dispersedly stored in multiple nodes in the distributed storage system, so that in the event that some nodes in the distributed storage system fail, the data can be repaired and reconstructed using extremely large repairable codes, thereby improving the fault tolerance and data recovery efficiency of the distributed storage system.
[0093] It is worth noting that the method for generating the extremely large repairable code provided in the embodiment of the present application can generate an extremely large repairable code with a smaller finite field when the code length of the extremely large repairable code is the same. That is, the method for generating the extremely large repairable code provided in the embodiment of the present application can generate an extremely large repairable code with a longer code length when the finite field parameters of the extremely large repairable code are the same, thereby improving the computing speed when encoding, decoding and repairing data using the extremely large repairable code constructed by the present application.
[0094] Specifically, by executing the method for generating a maximally repairable code provided in an embodiment of the present application, a maximally repairable code with a code length n=finite field parameter q+1 can be generated, thereby overcoming the problem in the prior art that when a maximally repairable code is constructed, the code length of the constructed maximally repairable code is short and the finite field is long.
[0095] The following is a detailed description of the method for generating a very large repairable code provided in an embodiment of the present application.
[0096] Figure 2 A flow chart of a method for generating a very large repairable code provided in an embodiment of the present application, referring to Figure 2 As shown, the execution subject of the method can be any electronic device with processing capability, and the method includes:
[0097] S201, obtaining coding parameters and an initial check matrix of a very large repairable code.
[0098] It can be understood that in the maximally repairable code, the check matrix of the maximally repairable code can characterize the maximally repairable property of the maximally repairable code. Therefore, when generating the maximally repairable code, it is only necessary to determine the check matrix of the maximally repairable code to characterize the maximally repairable code, thereby enabling redundant storage of data through the maximally repairable code.
[0099] Optionally, when generating a target check matrix of a very large repairable code, it is necessary to first obtain coding parameters of the very large repairable code and an initial check matrix.
[0100] The coding parameters are a finite field parameter q and a locality parameter r that meet the first preset condition, wherein the finite field parameter q is used to indicate the characteristics of the extremely large repairable code generated by the present application in the finite field, and the locality parameter r is used to indicate the local repair characteristics of the extremely large repairable code generated by the present application. The first preset condition is that the finite field parameter q is a prime power, and the locality parameter r is greater than one, and the ratio of the finite field parameter q plus one to the locality parameter r plus one is an integer, that is, the first preset condition is: q is a prime power, and r>1, and (r+1)|(q+1). Wherein, q is a finite field parameter, and r is a locality parameter.
[0101] The initial check matrix H1 is a check matrix of a maximally repairable code with two global check rows, that is, the global check row parameter h of the initial check matrix H1 is 2. The specific form of the initial check matrix H1 can refer to the above Figure 1 As shown, the maximally repairable code determined by the initial check matrix H1 has the repair property indicated by the initial check matrix H1.
[0102] S202: Determine local repair group parameters of the extremely large repairable code according to the encoding parameters.
[0103] Optionally, after obtaining the finite field parameter q and the locality parameter r, the local repair group parameter l of the maximally repairable code may be obtained by calculating the finite field parameter q and the locality parameter r.
[0104] Among them, the local repair group parameter l refers to the parameter of the local repair group involved in performing local repair on the stored data when the extremely large repairable code provided in the embodiment of the present application is used to store the data. Specifically, it may refer to the number of local repair groups obtained when the data is encoded and stored.
[0105] S203: Update the initial check matrix according to the local repair group parameters and the locality parameters to obtain an intermediate check matrix.
[0106] It can be understood that since the check matrix of the extremely large repairable code can characterize the local repair characteristics and global check characteristics of the extremely large repairable code, after obtaining the local repair group parameters and the locality parameters, the initial check matrix can be updated to an intermediate check matrix with local repair characteristics.
[0107] Optionally, the initial check matrix H may be modified according to the local repair group parameter l and the local repair characteristic of the maximally repairable code indicated by the locality parameter. 1 Update and get the intermediate check matrix H 2 Among them, the intermediate check matrix H 2 It is used to characterize that the extremely large repairable code has the local repair characteristics indicated by the local repair group parameter l and the locality parameter r.
[0108] For example, Figure 3 A schematic diagram of an intermediate check matrix provided in an embodiment of the present application, referring to Figure 3 As shown, the intermediate check matrix H 2 The local repair group parameter l and the locality parameter r can be characterized.
[0109] S204: Determine a target finite field according to the finite field parameters.
[0110] It can be understood that after obtaining the intermediate check matrix, the local repair characteristics of the maximally repairable code can be characterized by the intermediate check matrix. On this basis, the global check characteristics of the maximally repairable code can also be characterized by the basic properties of the finite field, so as to generate the target check matrix of the maximally repairable code based on the intermediate check matrix.
[0111] Optionally, a target finite field may be selected according to the finite field parameter q obtained in step S201 , wherein the number of elements in the target finite field is the number indicated by the finite field parameter q.
[0112] Exemplarily, the specific construction process of the target finite field can be implemented by referring to the above definition 8. After obtaining the target finite field, a finite field with q elements can be selected as the target finite field F q .
[0113] S205. According to the target finite field and the local repair group parameters, the global verification information of the maximally repairable code is obtained.
[0114] Optionally, after obtaining the target finite field, the target finite field F q and the local repair group parameter l, solving the global check information of the extremely large repairable code to obtain the global check information of the extremely large repairable code, wherein the global check information is used to generate the global check row of the target check matrix of the extremely large repairable code.
[0115] That is to say, after obtaining the target finite field, the elements in the target check matrix of the maximally repairable code can be regarded as the elements in the target finite field. Therefore, based on the relevant characteristics of the target finite field, the relationship between the elements in the target check matrix can be constructed, and then the global check information of the maximally repairable code can be obtained by solving it.
[0116] S206: Generate a target check matrix of the extremely large repairable code according to the intermediate check matrix and the global check information.
[0117] Optionally, after obtaining the global check information, the global check information can be substituted into the intermediate check matrix H2 to obtain the target check matrix H of the maximally repairable code, that is, the target check matrix H of the maximally repairable code is generated according to the intermediate check matrix H2 and the global check information.
[0118] Exemplarily, by executing the method for generating extremely large repairable codes provided in the embodiment of the present application, the target finite field F can be obtained. 11 The target check matrix H of the maximal local repair code with [code length n=12, finite field parameter q=11, local repair group parameter l=3, locality parameter r=3] is shown in formula (1). When the target check matrix H is used for data encoding and storage, the number of data nodes k=7:
[0119]
[0120] In this embodiment, by obtaining the coding parameters and the initial check matrix of the maximally repairable code, and determining the local repair group parameters of the maximally repairable code according to the coding parameters, the initial check matrix is updated according to the local repair group parameters and the locality parameters to obtain an intermediate check matrix, the local repair characteristics of the maximally repairable code are characterized, and the target finite field is determined according to the finite field parameters, and the global check information of the maximally repairable code is obtained according to the target finite field and the local repair group parameters, so as to generate the target check matrix of the maximally repairable code according to the intermediate check matrix and the global check information, and the maximally repairable code with a code length n=finite field parameter q+1 can be obtained, so that the obtained maximally repairable code has the maximally repairable characteristics when storing data, and when the code length of the maximally repairable code is the same, the smaller the finite field of the obtained maximally repairable code is, thereby improving the operation speed when encoding, decoding and repairing data using the maximally repairable code constructed by the present application.
[0121] In a possible implementation, when determining the local repair group parameters of the extremely large repairable code according to the encoding parameters in the above step S202, the following steps may be performed, specifically including:
[0122] A first sum after the finite field parameter is increased by one is determined, and a second sum after the locality parameter is increased by one is determined, and a ratio of the first sum to the second sum is used as a local repair group parameter l of the maximally repairable code.
[0123] Optionally, after obtaining the finite field parameter q and the locality parameter r, the local repair group parameter l of the maximum repairable code can be obtained by calculation using the following formula (2):
[0124] l=(q+1) / (r+1) (2)
[0125] The local repair group parameters are obtained by calculating the ratio of the finite field parameters and the locality parameters, which can ensure the accuracy of the local repair group parameters. When the extremely large repairable code provided in the embodiment of the present application is used for data storage, the number of data nodes and check nodes of each local repair group can be accurately determined, thereby minimizing additional storage overhead while ensuring the reliability of the stored data.
[0126] Figure 4 A schematic diagram of a flow chart of obtaining an intermediate check matrix in a method for generating a very large repairable code provided in an embodiment of the present application.
[0127] In one possible implementation, referring to Figure 4 As shown, in the above step S203, the initial check matrix is updated according to the local repair group parameters and the locality parameters to obtain the intermediate check matrix, which can be performed according to the following steps, specifically including:
[0128] S401. Determine the number of local repair rows in an initial check matrix according to a local repair group parameter.
[0129] Optionally, after obtaining the local repair group parameter l, the local repair group parameter l can be used as the initial check matrix H 1 The number of rows in the local repair row.
[0130] S402: Determine the weight of each local repair row in the initial check matrix according to the locality parameter.
[0131] Optionally, after obtaining the locality parameter r, the initial check matrix H can be determined according to the locality parameter r. 1 The weight of each local repair row in is r+1.
[0132] S403: Update the initial check matrix according to the number of local repair rows, the weight of each local repair row and the global check row parameter to obtain an intermediate check matrix.
[0133] Optionally, after obtaining the number of local repair rows and the weight of each local repair row, the initial check matrix can be updated according to the number of local repair rows, the weight of each local repair row and the global check row parameter to obtain the intermediate check matrix H 2 .
[0134] The number of local repair rows in the initial check matrix is determined through the local repair group parameters, and the weight of each local repair row in the initial check matrix is determined through the locality parameters. Therefore, according to the number of local repair rows, the weight of each local repair row and the global check row parameters, the initial check matrix is updated to obtain an intermediate check matrix, which can ensure the local repair property of the extremely large repairable code.
[0135] Figure 5 A schematic diagram of a flow chart of obtaining global verification information of a very large repairable code in a method for generating a very large repairable code provided in an embodiment of the present application.
[0136] In one possible implementation, referring to Figure 5 As shown, in the above step S205, the global verification information of the maximum repairable code is obtained according to the target finite field and the local repair group parameters, including:
[0137] S501: Determine a first matrix of a target finite field.
[0138] Optionally, after obtaining the target finite field F q After that, the target finite field F can be determined q The first matrix C on the target finite field F qThe companion matrix of the second-degree primitive polynomial in .
[0139] S502: Generate a second matrix according to the first matrix and local repair group parameters.
[0140] Optionally, after obtaining the first matrix C, the second matrix A can be calculated based on the first matrix C and the local repair group parameter l.
[0141] For example, the second matrix A can be calculated according to the following formula (3):
[0142] A=C l (3)
[0143] Among them, C is the first matrix and l is the local repair group parameter.
[0144] S503. According to the basic properties of the target finite field and the second matrix, a target vector on the target finite field is constructed, and a first component of the target vector is determined. According to the first component of the target vector, global check information of the maximally repairable code is obtained.
[0145] It can be understood that, in the target finite field, since the elements in the target check matrix of the maximally repairable code are equivalent to the elements in the target finite field, the maximally repairable code can be characterized by characterizing the elements in the target finite field.
[0146] Optionally, the target finite field F q The basic properties of the vector and the second matrix A are used to construct the target finite field F q The target vector on the target finite field F q The conditions satisfied by the vector in the target vector are expressed, so that the global check information of the extremely large repairable code can be determined by determining the components of the target vector on the target finite field.
[0147] By determining the companion matrix of the target finite field, the algebraic properties of the target finite field can be expressed more clearly, and a second matrix can be generated based on the companion matrix and the local repair group parameters, which can ensure the uniqueness and certainty of the obtained maximally repairable code, so that according to the basic properties of the target finite field and the second matrix, a target vector on the target finite field can be constructed, and the first component of the target vector can be determined. Based on the first component of the target vector, the global check information of the maximally repairable code can be obtained, and the redundant information in the maximally repairable code can be removed, so that the expression of the global check row of the check matrix of the maximally repairable code obtained in the present application is more concise and clear, which helps to reduce the overhead of data encoding, decoding and repair, and improve the overall efficiency of the distributed storage system.
[0148] Figure 6A schematic diagram of a flow chart of constructing a target vector on a target finite field in a method for generating a very large repairable code provided in an embodiment of the present application.
[0149] In one possible implementation, referring to Figure 6 As shown, in the above step S503, constructing the target vector on the target finite field according to the basic properties of the target finite field and the second matrix can be performed according to the following steps, specifically including:
[0150] S601: Determine a first vector on a target finite field.
[0151] Optionally, the target finite field F can be determined first q The first vector a on the target finite field F q Any nonzero column vector of length 2 above.
[0152] S602: construct a target vector according to the basic properties of the target finite field and the first vector.
[0153] Optionally, the target finite field F q The basic properties of and the first vector a are used to construct the target vector, where the target vector can be expressed using the following formula (4):
[0154]
[0155] Where a is the first vector, A is the second matrix, 1<i≤r, r is the locality parameter, c i is the first component of the target vector and c 1 =1,d i is the second component of the target vector.
[0156] By determining an arbitrary non-zero column vector of length 2 on the target finite field as the first vector on the target finite field, the complexity of the extremely large repairable code generation process can be simplified, and the target vector is constructed according to the basic properties of the target finite field and the first vector, which can make the obtained target vector more intuitive and easy to express, and can also optimize the calculation process and reduce the amount of calculation, thereby improving the speed of generating extremely large repairable codes.
[0157] In a possible implementation, obtaining global verification information of the extremely large repairable code according to the first component of the target vector in the above step S503 includes:
[0158] Enter the first component of the target vector, the first vector, the first matrix, and the second matrix into the formula The solution is obtained in the global verification information of the extremely large repairable code.
[0159] Optionally, after obtaining the first component c of the target vector i After that, the first component c of the target vector can be i , the target vector a, the first matrix C and the second matrix A are substituted into the following formula (5), and the obtained result is used as the global verification information of the extremely large repairable code:
[0160]
[0161] Among them, a is the first vector, c i is the first component of the target vector and c 1 =1, C is the first matrix, A is the second matrix, is the global check information of the jth column of the i-th group in the lower part of the check matrix of the maximal repairable code, 1≤i≤r, 1≤, ≤l, r is the locality parameter, and l is the local repair group parameter.
[0162] The above is a detailed description of the method for generating a very large repairable code provided in the embodiment of the present application. It can be understood that by executing the method for generating a very large repairable code provided in the embodiment of the present application, a target check matrix of a very large repairable code with a code length n=finite field parameter q+1 can be obtained.
[0163] Based on the same inventive concept, an embodiment of the present application also provides a coding method, which can use the target check matrix of the extremely large repairable code as a redundancy scheme in a distributed storage system after obtaining the target check matrix of the extremely large repairable code, which is exemplarily described below.
[0164] Figure 7 A schematic diagram of a flow chart of the encoding method provided in the embodiment of the present application, referring to Figure 7 As shown, the encoding method provided in the embodiment of the present application is used to encode a target check matrix and data to be stored, wherein the target check matrix is a target check matrix generated by the above-mentioned method for generating extremely large repairable codes, and the method comprises:
[0165] S701. Determine a generator matrix of a maximally repairable code according to a target check matrix.
[0166] Optionally, a matrix operation may be performed on the target check matrix H to obtain a generator matrix M of the maximally repairable code.
[0167] For example, the dual matrix H of the target check matrix H can be calculated * , and the dual matrix H *Elementary row transformation and column permutation are performed to obtain the first generator matrix G, where the first generator matrix G is in the form of a unit matrix on the left side I, which can be described as G = [I|M]. The second generator matrix M is determined by the first generator matrix G, and the second generator matrix M is used as the generator matrix of the maximally repairable code.
[0168] Through vector-matrix multiplication, M can generate the check bits of a very large repairable code, and each column of M can correspond to a check bit. The weight of the column is less than r, and there are 3 columns with weight greater than or equal to r. Take out the columns with weight less than r and any 1 column with weight greater than r in M, and put these The column is called the local check column, and the other two columns of M are called the global check columns.
[0169] S702: Generate verification data according to the generation matrix and the data to be stored.
[0170] It can be understood that after obtaining the generating matrix, the storage nodes in the distributed storage system for storing the encoded data can be determined, and after obtaining the storage nodes, the data nodes in the storage nodes for storing the original data, the local check nodes for storing the local check data, and the global check nodes for storing the global check data can be determined.
[0171] Optionally, the data to be stored is divided into strips, and the data in each strip is encoded by generating a matrix to obtain encoded data, wherein the encoded data includes local verification data and global verification data, and the data to be stored is stored in the data nodes in the storage node, the local verification data is stored in the local verification node, and the global verification data is stored in the global verification node.
[0172] For example, the data to be stored is stored in bit order per klog 2 (q) bits are divided into a stripe, which is a sub-data segment to be processed, and each stripe, that is, each sub-data segment to be processed, is divided into k groups, each group of log 2 (q) bits.
[0173] For example, each log in each stripe 2 (q) bits are considered as a finite field F q An element on F q A row vector x on M. Calculate the check data y=xM, where the check data y is a row vector of length nk, and the check data y is used as the check bit after encoding. Specifically, when the check data y is calculated from the local check column of M, the bit is called the local check bit, and the other bits are called the global check bits.
[0174] For example, Figure 8A storage schematic diagram of a distributed storage system provided in an embodiment of the present application, referring to Figure 8 As shown, the distributed storage system includes a network core and 16 data nodes, wherein D1-D10 are data nodes, D1-D10 are used to store original data, L1-L4 are local check nodes, L1-L4 are used to store local check data generated by extremely large repairable codes, P1-P2 are global check nodes, P1-P2 are used to store global check data generated by extremely large repairable codes, and the 16 data nodes constitute four local repair groups.
[0175] The following describes a process of data repair after data is stored using the target check matrix of the extremely large repairable code generated by the embodiment of the present application.
[0176] Based on the same inventive concept, a repair method is also provided in the embodiment of the present application. Fig. 9 A schematic diagram of a repair method provided in an embodiment of the present application, referring to Fig. 9 As shown, the method is used to repair the stored data stored based on the target extremely large repairable code, the target extremely large repairable code is generated according to the extremely large repairable code generation method provided in the embodiment of the present application, the stored data is the aforementioned original data, local check data and global check data, the stored data includes multiple data groups, namely the aforementioned local repair groups, each data group includes at least one original data and at least one check data, each data group is stored in multiple storage nodes of the distributed storage system respectively, the method includes:
[0177] S901. Determine at least one node to be repaired among multiple storage nodes and a target data group where each node to be repaired is located.
[0178] The storage node may include a data node, a local check node, and a global check node. The node to be repaired is a node that is currently damaged, and may be a data node, a local check node, or a global check node. The target data group where the node to be repaired is located is the local repair group where the node that is currently damaged is located.
[0179] For example, continue to refer to Figure 8 As shown, assuming that data node D1 is damaged, it can be determined that the node to be repaired is node D1, and the target data group where the node to be repaired is located is determined to be the local repair group where data node D1 is located.
[0180] S902: If there is only one node to be repaired in the target data group, take out locality parameter storage nodes from the target data group, and repair the node to be repaired according to the locality parameter storage nodes.
[0181] Optionally, if there is only one node to be repaired in the target data group, r storage nodes are taken from the target data group, and the node to be repaired is repaired based on the r storage nodes, where r is a locality parameter of the maximally repairable code.
[0182] In this embodiment, by determining at least one node to be repaired among multiple storage nodes and the target data group where each node to be repaired is located, and when there is only one node to be repaired in the target data group, a locality parameter storage node is taken out from the target data group, and the node to be repaired is repaired based on the locality parameter storage node, thereby improving the availability and data recovery capability of the distributed storage system and optimizing the performance of the distributed storage system.
[0183] The above describes the situation where there is a node to be repaired in the target data group.
[0184] Based on the same inventive concept, the embodiment of the present application also provides a decoding method. Fig.10 A flowchart of a decoding method provided in an embodiment of the present application, referring to Fig.10 As shown, the method is used to decode the stored data stored based on the target extremely large repairable code, wherein the target extremely large repairable code is generated by the extremely large repairable code generation method described above, the stored data includes multiple data groups, each data group includes at least one original data and at least one verification data, each data group is stored in multiple storage nodes of the distributed storage system, and the method includes:
[0185] S1001. Determine a node to be rebuilt among multiple storage nodes.
[0186] The storage nodes may include data nodes, local check nodes and global check nodes. The nodes to be rebuilt are multiple nodes that are currently damaged, and may be data nodes, local check nodes or global check nodes.
[0187] S1002: extract multiple storage nodes that meet a preset quantity condition from each stored data group, and reconstruct each node to be reconstructed based on each extracted storage node.
[0188] Optionally, multiple storage nodes that meet a preset quantity condition may be taken out from each stored data group, and each node to be rebuilt may be rebuilt based on each taken out storage node to achieve repair of each node to be repaired.
[0189] Among them, the preset quantity condition is that the preset quantity condition is from each stored data group and the total number is the target number k and does not include r+1 of any stored data group, wherein the target number k is determined by a finite field parameter and a locality parameter, and r is a locality parameter.
[0190] Exemplarily, the target number k=finite field parameter q-local repair group parameter l-1.
[0191] In this embodiment, by determining the nodes to be rebuilt among multiple storage nodes, and taking out multiple storage nodes that meet the preset quantity conditions from each stored data group, and reconstructing each node to be rebuilt based on the taken out storage nodes, the availability and data recovery capability of the distributed storage system are improved, and the performance of the distributed storage system is optimized.
[0192] Based on the same inventive concept, the embodiment of the present application further provides a device for generating a very large repairable code, and the device for generating a very large repairable code is used to:
[0193] Obtaining a coding parameter and an initial check matrix of a maximally repairable code, wherein the coding parameter is a finite field parameter and a locality parameter satisfying a first preset condition, and the initial check matrix is a check matrix of a maximally repairable code having two global check rows, and the first preset condition is that the finite field parameter is a prime power, and the locality parameter is greater than one, and the ratio of the finite field parameter plus one to the locality parameter plus one is an integer;
[0194] Determining local repair group parameters of the extremely large repairable code according to the encoding parameters;
[0195] According to the local repair group parameter and the locality parameter, the initial check matrix is updated to obtain an intermediate check matrix, where the intermediate check matrix is used to characterize that the extremely large repairable code has the local repair characteristics indicated by the local repair group parameter and the locality parameter;
[0196] According to the finite field parameter, a target finite field is determined, and the number of elements in the target finite field is the number indicated by the finite field parameter;
[0197] According to the target finite field and the local repair group parameters, the global check information of the maximal repairable code is obtained, and the global check information is used to generate the global check row of the maximal repairable code;
[0198] According to the intermediate check matrix and the global check information, a target check matrix of the extremely large repairable code is generated.
[0199] In a possible implementation, the device for generating a very large repairable code is specifically used to:
[0200] Determining the number of local repair rows in the initial check matrix according to the local repair group parameters;
[0201] Determining the weight of each local repair row in the initial check matrix according to the locality parameter;
[0202] The initial check matrix is updated according to the number of the local repair rows, the weight of each of the local repair rows and the global check row parameter to obtain an intermediate check matrix.
[0203] In a possible implementation, the device for generating a very large repairable code is specifically used to:
[0204] Determine a first matrix of the target finite field, where the first matrix is a companion matrix of a primitive polynomial of degree 2 in the target finite field;
[0205] Generate a second matrix according to the first matrix and the local repair group parameters;
[0206] According to the basic properties of the target finite field and the second matrix, a target vector on the target finite field is constructed, and a first component of the target vector is determined. According to the first component of the target vector, global check information of the extremely large repairable code is obtained.
[0207] In a possible implementation, the device for generating a very large repairable code is specifically used to:
[0208] Determine a first vector on the target finite field, where the first vector is any non-zero column vector with a length of 2 on the target finite field;
[0209] According to the basic properties of the target finite field and the first vector, the target vector is constructed, and the target vector is Wherein, a is the first vector, A is the second matrix, 1<i≤r, r is the locality parameter, c i is the first component of the target vector and c 1 =1,d i is the second component of the target vector.
[0210] In a possible implementation, the device for generating a very large repairable code is specifically used to:
[0211] The first component of the target vector, the first vector, the first matrix and the second matrix are input into the formula The global check information of the extremely large repairable code is obtained by solving the problem, where a is the first vector, c i is the first component of the target vector and c 1 =1, C is the first matrix, A is the second matrix, is the global check information of the jth column of the i-th group in the lower part of the check matrix of the maximally repairable code, 1≤i≤r, 1≤j≤l, r is the locality parameter, and l is the local repair group parameter.
[0212] For the description of the processing flow in the device for generating a very large repairable code, reference may be made to the relevant description in the embodiment of the method for generating a very large repairable code, which will not be described in detail here.
[0213] Based on the same inventive concept, an embodiment of the present application further provides a coding device for encoding a target check matrix and data to be stored, wherein the target check matrix is the target check matrix in the above-mentioned method for generating a very large repairable code, and the coding device is used to:
[0214] According to the target check matrix, a generator matrix of the extremely large repairable code is determined;
[0215] Generate verification data based on the generation matrix and the data to be stored.
[0216] For the description of the processing flow in the encoding device, reference may be made to the relevant description in the above encoding method embodiment, which will not be described in detail here.
[0217] Based on the same inventive concept, an embodiment of the present application provides a repair device for repairing stored data stored based on a target extremely large repairable code, wherein the target extremely large repairable code is generated according to the extremely large repairable code generation method described above, the stored data includes multiple data groups, each data group includes at least one original data and at least one verification data, each data group is stored in multiple storage nodes of a distributed storage system, and the repair device is used to:
[0218] Determine at least one to-be-repaired node among the plurality of storage nodes and a target data group where each to-be-repaired node is located;
[0219] If there is only one node to be repaired in the target data group, a local parameter storage node is taken out from the target data group, and the node to be repaired is repaired according to the local parameter storage node.
[0220] For the description of the processing flow in the repair device, reference can be made to the relevant description in the above-mentioned repair method embodiment, which will not be described in detail here.
[0221] Based on the same inventive concept, an embodiment of the present application provides a decoding device for decoding stored data stored based on a target extremely large repairable code, wherein the target extremely large repairable code is generated according to the extremely large repairable code generation method described above, the stored data includes multiple data groups, each data group includes at least one original data and at least one verification data, each data group is stored in multiple storage nodes of a distributed storage system, and the decoding device is used to:
[0222] Determine a node to be rebuilt among multiple storage nodes;
[0223] A plurality of storage nodes satisfying a preset number condition are taken out from each stored data group, and each node to be repaired is rebuilt based on each storage node. The preset number condition is that the total number of the stored data groups is a target number k and does not include r+1 of any stored data group, wherein the target number k is determined by a finite field parameter and a locality parameter, and r is a locality parameter.
[0224] For the description of the processing flow of each module in the decoding device, reference may be made to the relevant description in the above decoding method embodiment, which will not be described in detail here.
[0225] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the above-mentioned extremely large repairable code generation method, encoding method, repair method or decoding method are executed.
[0226] An embodiment of the present application also provides a computer program product, which includes computer program code. When the computer program code is executed by a computing device, the computing device executes the steps of the above-mentioned extremely large repairable code generation method, encoding method, repair method or decoding method.
[0227] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0228] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or part of the technical solution that contributes to the prior art or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.
[0229] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A method for generating a very large repairable code, characterized in that: The method comprises: Obtaining a coding parameter and an initial check matrix of a maximally repairable code, wherein the coding parameter is a finite field parameter and a locality parameter that satisfy a first preset condition, and the initial check matrix is a check matrix of a maximally repairable code having two global check rows, and the first preset condition is that the finite field parameter is a prime power, and the locality parameter is greater than one, and the ratio of the finite field parameter plus one to the locality parameter plus one is an integer; Determining local repair group parameters of the extremely large repairable code according to the encoding parameters; The initial check matrix is updated according to the local repair group parameter and the locality parameter to obtain an intermediate check matrix, wherein the intermediate check matrix is used to characterize that the extremely large repairable code has the local repair characteristics indicated by the local repair group parameter and the locality parameter; Determine a target finite field according to the finite field parameter, the number of elements in the target finite field being the number indicated by the finite field parameter; According to the target finite field and the local repair group parameters, global check information of the extremely large repairable code is obtained by solving, and the global check information is used to generate a global check row of the extremely large repairable code; A target check matrix of a maximally repairable code is generated according to the intermediate check matrix and the global check information.
2. The method for generating a very large repairable code according to claim 1, characterized in that: The updating of the initial check matrix according to the local repair group parameter and the locality parameter to obtain an intermediate check matrix includes: Determining the number of local repair rows in the initial check matrix according to the local repair group parameters; Determining the weight of each local repair row in the initial check matrix according to the locality parameter; The initial check matrix is updated according to the number of the local repair rows, the weight of each of the local repair rows and the global check row parameter to obtain an intermediate check matrix.
3. The method for generating a very large repairable code according to claim 1, characterized in that: The step of solving the global check information of the extremely large repairable code according to the target finite field and the local repair group parameters includes: Determine a first matrix of the target finite field, where the first matrix is a companion matrix of a primitive polynomial of degree 2 in the target finite field; Generate a second matrix according to the first matrix and the local repair group parameters; According to the basic properties of the target finite field and the second matrix, a target vector on the target finite field is constructed, and a first component of the target vector is determined. According to the first component of the target vector, global check information of the extremely large repairable code is obtained.
4. The method for generating a very large repairable code according to claim 3, characterized in that: The step of constructing a target vector on the target finite field according to the basic properties of the target finite field and the second matrix includes: Determine a first vector on the target finite field, where the first vector is any non-zero column vector with a length of 2 on the target finite field; Construct the target vector according to the basic properties of the target finite field and the first vector, where the target vector is where a is the first vector, A is the second matrix, 1 < i ≤ r, r is the locality parameter, c i is the first component of the target vector and c1 = 1, d i is the second component of the target vector.
5. The method for generating extremely large repairable codes according to claim 4, characterized in that: The step of obtaining global verification information of the extremely large repairable code according to the first component of the target vector includes: The first component of the target vector, the first vector, the first matrix and the second matrix are input into the formula The global check information of the extremely large repairable code is obtained by solving the problem, where a is the first vector, c i is the first component of the target vector and c1=1, C is the first matrix, A is the second matrix, is the global check information of the jth column of the i-th group in the lower part of the check matrix of the maximally repairable code, 1≤i≤r, 1≤j≤l, r is the locality parameter, and l is the local repair group parameter.
6. A coding method, characterized in that: Used to encode a target check matrix and data to be stored, wherein the target check matrix is the target check matrix according to any one of claims 1 to 5, and the method comprises: Determining a generator matrix of a maximally repairable code according to the target check matrix; Generate verification data according to the generation matrix and the data to be stored.
7. A repair method, characterized in that: Used to repair stored data stored based on a target extremely large repairable code, wherein the target extremely large repairable code is generated according to the extremely large repairable code generation method according to any one of claims 1 to 5 above, the stored data includes a plurality of data groups, each of the data groups includes at least one original data and at least one check data, each of the data groups is stored in a plurality of storage nodes of a distributed storage system, the method comprising: Determine at least one to-be-repaired node among the plurality of storage nodes and a target data group where each of the to-be-repaired nodes is located; If there is only one node to be repaired in the target data group, the local parameter storage nodes are taken out from the target data group, and the node to be repaired is repaired according to the local parameter storage nodes.
8. A decoding method, characterized in that: Used to decode stored data stored based on a target extremely large repairable code, wherein the target extremely large repairable code is generated according to the extremely large repairable code generation method according to any one of claims 1 to 5 above, the stored data includes a plurality of data groups, each of the data groups includes at least one original data and at least one check data, each of the data groups is stored in a plurality of storage nodes of a distributed storage system, the method comprising: Determining a node to be rebuilt among the multiple storage nodes; A plurality of storage nodes satisfying a preset quantity condition are taken out from each stored data group, and each of the nodes to be repaired is reconstructed based on each of the storage nodes, wherein the preset quantity condition is that the total number of the stored data groups is a target number k and does not include r+1 of any stored data group, wherein the target number k is determined by the finite field parameter and the locality parameter, and r is the locality parameter.
9. A device for generating a very large repairable code, characterized in that: The device for generating the extremely large repairable code is used for: Obtaining a coding parameter and an initial check matrix of a maximally repairable code, wherein the coding parameter is a finite field parameter and a locality parameter that satisfy a first preset condition, and the initial check matrix is a check matrix of a maximally repairable code having two global check rows, and the first preset condition is that the finite field parameter is a prime power, and the locality parameter is greater than one, and the ratio of the finite field parameter plus one to the locality parameter plus one is an integer; Determining local repair group parameters of the extremely large repairable code according to the encoding parameters; The initial check matrix is updated according to the local repair group parameter and the locality parameter to obtain an intermediate check matrix, wherein the intermediate check matrix is used to characterize that the extremely large repairable code has the local repair characteristics indicated by the local repair group parameter and the locality parameter; Determine a target finite field according to the finite field parameter, the number of elements in the target finite field being the number indicated by the finite field parameter; According to the target finite field and the local repair group parameters, global check information of the extremely large repairable code is obtained by solving, and the global check information is used to generate a global check row of the extremely large repairable code; A target check matrix of a maximally repairable code is generated according to the intermediate check matrix and the global check information.
10. A coding device, characterized in that: Used to encode a target check matrix and data to be stored, wherein the target check matrix is the target check matrix according to any one of claims 1 to 5, and the encoding device is used to: Determining a generator matrix of a maximally repairable code according to the target check matrix; Generate verification data according to the generation matrix and the data to be stored.
11. A repair device, characterized in that: Used to repair stored data stored based on a target extremely large repairable code, wherein the target extremely large repairable code is generated according to the extremely large repairable code generation method according to any one of claims 1 to 5 above, the stored data includes a plurality of data groups, each of the data groups includes at least one original data and at least one check data, each of the data groups is stored in a plurality of storage nodes of a distributed storage system, and the repair device is used to: Determine at least one to-be-repaired node among the plurality of storage nodes and a target data group where each of the to-be-repaired nodes is located; If there is only one node to be repaired in the target data group, the local parameter storage nodes are taken out from the target data group, and the node to be repaired is repaired according to the local parameter storage nodes.
12. A decoding device, characterized in that: Used to decode stored data stored based on a target extremely large repairable code, wherein the target extremely large repairable code is generated according to the extremely large repairable code generation method according to any one of claims 1 to 5, the stored data includes a plurality of data groups, each of the data groups includes at least one original data and at least one check data, each of the data groups is stored in a plurality of storage nodes of a distributed storage system, and the decoding device is used to: Determining a node to be rebuilt among the multiple storage nodes; A plurality of storage nodes satisfying a preset quantity condition are taken out from each stored data group, and each of the nodes to be repaired is reconstructed based on each of the storage nodes, wherein the preset quantity condition is that the total number of the stored data groups is a target number k and does not include r+1 of any stored data group, wherein the target number k is determined by the finite field parameter and the locality parameter, and r is the locality parameter.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are executed.
14. A computer program product, characterized in that The computer program product comprises computer program codes. When the computer program codes are executed by a computing device, the computing device executes the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Packet-based optimal local repair code construction method
CN113381772A
Data processing method, device and equipment based on local repairable array code
CN116991625A