WO2023197506A1 - 一种数据存储方法、系统、设备及存储介质 - Google Patents

一种数据存储方法、系统、设备及存储介质 Download PDF

Info

Publication number
WO2023197506A1
WO2023197506A1 PCT/CN2022/115724 CN2022115724W WO2023197506A1 WO 2023197506 A1 WO2023197506 A1 WO 2023197506A1 CN 2022115724 W CN2022115724 W CN 2022115724W WO 2023197506 A1 WO2023197506 A1 WO 2023197506A1
Authority
WO
WIPO (PCT)
Prior art keywords
matrix
data
coding
encoded
encoding
Prior art date
Application number
PCT/CN2022/115724
Other languages
English (en)
French (fr)
Inventor
吴睿振
张旭
陈静静
张永兴
王凛
Original Assignee
苏州浪潮智能科技有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Publication of WO2023197506A1 publication Critical patent/WO2023197506A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/03Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words
    • H03M13/05Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits
    • H03M13/13Linear codes
    • H03M13/15Cyclic codes, i.e. cyclic shifts of codewords produce other codewords, e.g. codes defined by a generator polynomial, Bose-Chaudhuri-Hocquenghem [BCH] codes
    • H03M13/151Cyclic codes, i.e. cyclic shifts of codewords produce other codewords, e.g. codes defined by a generator polynomial, Bose-Chaudhuri-Hocquenghem [BCH] codes using error location or error correction polynomials
    • H03M13/1515Reed-Solomon codes

Definitions

  • the present application relates to the field of coding technology, and in particular to a data storage method, system, equipment and storage medium.
  • formula (1) represents the use of Vandermond matrix for RS encoding
  • formula (2) represents the use of Cauchy matrix for RS encoding
  • the upper part of the Vandermond matrix represents the k*k identity matrix. This identity matrix is multiplied by the original data D1 to Dk, and the result is still the original data D1 to Dk.
  • the lower part is the encoding matrix of r*k, which is multiplied by the original data D1 to Dk.
  • the obtained P1 to Pr are the r pieces of coded data obtained through encoding, or called check data.
  • the original data D1 to Dk can be obtained by using the inverse matrix of the corresponding matrix of the remaining data and multiplying the remaining data.
  • the decoding process can be expressed as formula (3).
  • the core of erasure coding is to construct a reversible encoding matrix. After encoding, the inverse matrix of the encoding is used to restore the original encoded data. Common RS erasure codes use Cauchy matrix or Vandermond matrix. The resulting matrix is completely reversible, and the size of the matrix can be easily expanded.
  • the number size limit must also be considered in the computer. For example, k 32-bit integers are used as original data.
  • the check data is generated through the above-mentioned Cauchy matrix or Vandermond matrix, the value of the check data is almost certain. will overflow. Therefore, when performing RS encoding in a computer, the Galois field will be set to ensure that the calculation result is in the Galois field.
  • This application provides a data storage method, including:
  • the above-mentioned replacement rules satisfy: the four arithmetic operations performed by element a and element b in the above-mentioned Galois field , equivalent to the four arithmetic operations performed by the matrix H(a) and the matrix H(b) in the above-mentioned Galois field, a and b are arbitrary elements in the above-mentioned encoding matrix, H(a) and H(b) are the matrices used to replace a and b, respectively.
  • the above-mentioned encoded sparse matrix only includes the number 1 and the number 0;
  • the above-mentioned data to be encoded is encoded through the above-mentioned encoding sparse matrix to obtain encoded data, so that the process of encoding the above-mentioned data to be encoded through the above-mentioned encoding sparse matrix is completed in the circuit through the XOR circuit and the selection circuit;
  • the above-mentioned encoded data and the above-mentioned data to be encoded are combined into encoded data.
  • each element in the above coding matrix is replaced with a corresponding matrix according to preset replacement rules to obtain a coding sparse matrix, including:
  • H[2] that satisfies the above replacement rules is determined
  • H[3] to H[2 m -1] that satisfy the above replacement rules are determined in sequence;
  • the above replacement rules specifically include:
  • H[0] is an m ⁇ m all-0 matrix
  • H[1] is the unit matrix of m ⁇ m
  • a ⁇ b represents the division operation of element a and element b in the above-mentioned Galois field
  • q is the calculation result of the above-mentioned division operation.
  • the Galois field used in the above RS encoding is GF (2 8 ).
  • the coding matrix used for RS encoding is a coding matrix of a Vandermond matrix or a coding matrix of a Cauchy matrix.
  • it also includes:
  • Decoding the data to be decoded based on the decoding sparse matrix is performed to obtain decoded data, so that the process of decoding the data to be decoded based on the decoding sparse matrix to obtain the decoded data is completed in the circuit through the XOR circuit and the selection circuit.
  • This application provides a data storage system, including:
  • the data to be encoded receiving module is used to receive the data to be encoded
  • the coding matrix determination module is used to determine the coding matrix used for RS coding, and the Galois field GF (2 m ) used in the above-mentioned RS coding, where m is a positive integer;
  • the equivalent replacement module is used to replace each element in the above-mentioned coding matrix with the corresponding matrix according to the preset replacement rules to obtain the coding sparse matrix; wherein, the above-mentioned replacement rules satisfy: element a and element b are in the above-mentioned Galois
  • the four arithmetic operations performed in the field are equivalent to the four arithmetic operations performed by the matrix H(a) and the matrix H(b) in the above-mentioned Galois field.
  • Both a and b are arbitrary elements in the above-mentioned encoding matrix
  • H( a) and H(b) are the matrices used to replace a and b respectively.
  • the above-mentioned encoded sparse matrix only includes the number 1 and the number 0;
  • the execution module is used to encode the data to be encoded through the encoding sparse matrix and obtain the encoded data, so that the process of encoding the data to be encoded through the encoding sparse matrix is completed in the circuit through the XOR circuit and the selection circuit;
  • the encoding completion module is used to combine the above-mentioned encoded data and the above-mentioned data to be encoded into encoded data.
  • the above replacement rules specifically include:
  • H[0] is an m ⁇ m all-0 matrix
  • H[1] is the unit matrix of m ⁇ m
  • a ⁇ b represents the division operation of element a and element b in the above-mentioned Galois field
  • q is the calculation result of the above-mentioned division operation.
  • This application provides a data storage device, including:
  • Memory for storing computer-readable instructions
  • One or more processors configured to execute the above computer readable instructions to implement the steps of any of the above data storage methods.
  • the present application provides a non-volatile computer-readable storage medium.
  • Computer-readable instructions are stored on the non-volatile computer-readable storage medium.
  • the above-mentioned computer-readable instructions are executed by one or more processors, the following is implemented: The steps of any of the above data storage methods.
  • Figure 1 is an implementation flow chart of a data storage method in one or more embodiments of the present application
  • Figure 2 is a functional schematic diagram of one row of calculations of the operation circuit in one or more embodiments of the present application;
  • Figure 3 is a schematic structural diagram of a data storage system in one or more embodiments of the present application.
  • Figure 4 is an internal structure diagram of a data storage device in one or more embodiments of the present application.
  • the core of this application is to provide a data storage method that can encode data, thereby effectively realizing redundant storage of data, ensuring high computing efficiency, and having the advantage of high speed in hardware implementation.
  • the data storage method may include the following steps:
  • Step S101 Receive data to be encoded.
  • each Byte is usually used as a data unit for data transmission, that is, data is transmitted in hardware through each Byte.
  • each Byte is 8bit.
  • Step S102 Determine the coding matrix used for RS coding and the Galois field GF(2 m ) used for RS coding, where m is a positive integer.
  • the specific type of coding matrix used for RS encoding can be set and adjusted as needed.
  • the coding matrix of the Vandermond matrix or the Cauchy matrix can usually be selected, which is more mature and commonly used.
  • RS encoding uses Galois field GF (2 m ), and as described above, considering that data transmission in hardware is transmitted through each Byte, the power of Galois field GF can be set to 8, that is, the Galois field used in the RS encoding of this application can be GF (2 8 ).
  • m can be selected as other values as needed.
  • the Galois field used is GF(2 8 )
  • the corresponding data table can be expressed as:
  • Gflog (positive table) [0 1 25 2 50 26 198 3 223 51 238 27 104 199 75 4 100 224 14 52 141 239 129 28 193 105 248 200 8 76 113 5 138 101 4 7 225 36 15 33 53 147 142 218 240 18 130 69 29 181 194 125 106 39 249 185 201 154 9 120 77 228 114 166 6 191 139 98 102 221 48 253 226 152 37 179 16 14 5 34 136 54 208 148 206 143 150 219 189 241 210 19 92 131 56 70 64 30 66 182 163 195 72 126 110 107 58 40 84 250 133 186 61 202 94 155 159 10 21 121 43 78 212 229 172 115 243 167 87 7 112 192 247 140 128 99 13 103 74 222 237 49 197 254 24 227 165 153 119 38 184 180 124
  • Gfilog (reverse table) [1 2 4 8 16 32 64 128 29 58 116 232 205 135 19 38 76 152 45 90 180 117 234 201 143 3 6 12 24 48 96 192 157 39 78 1 56 37 74 148 53 106 212 181 119 238 193 159 35 70 140 5 10 20 40 80 160 93 186 105 210 185 111 222 161 95 190 97 194 153 47 94 188 101 202 137 15 30 60 120 240 253 231 211 187 107 214 177 127 254 225 223 163 91 182 113 226 217 175 67 134 17 34 68 136 13 26 52 104 208 189 103 206 129 31 62 124 248 237 199 147 59 118 236 197 151 51 102 204 133 23 46 92 184 109 218 169 79 158 33 66 132 21 42 84 168 77
  • Step S103 Replace each element in the coding matrix with a corresponding matrix according to the preset replacement rules to obtain a coding sparse matrix.
  • the substitution rule satisfies: the four arithmetic operations performed by element a and element b in the Galois field are equivalent to the four arithmetic operations performed by matrix H(a) and matrix H(b) in the Galois field, a and b are arbitrary elements in the encoding matrix, H(a) and H(b) are the matrices used to replace a and b respectively, and the encoding sparse matrix only includes the number 1 and the number 0.
  • each element in the coding matrix is replaced with a corresponding matrix.
  • the coding sparse matrix needs to be used to encode the data to be coded. Therefore, the coding sparse matrix needs to be able to encode the Galois domain.
  • the operation relationship is mapped, so that the operation of the Galois field can be directly implemented by encoding the sparse matrix.
  • the replacement rules need to satisfy: the four arithmetic operations performed by element a and element b in the Galois field, and the four arithmetic operations performed by matrix H(a) and matrix H(b) in the Galois field, etc. price.
  • An 8*8 matrix can be constructed to represent all the operations that need to be performed. The prerequisite for this matrix to be valid and conform to the encoding and decoding operations is that in the set composed of the 8*8 matrix, any matrix H has the following six conditions: relation:
  • the first item indicates that H[0] is an 8*8 matrix of all zeros.
  • the second item indicates that H[1] is an 8*8 identity matrix.
  • the sixth item indicates that any 8*8 matrix is invertible. Items 3 to 6 represent the operation rules that need to be met for matrix addition and multiplication.
  • the replacement rule can be specifically expressed as:
  • H[0] is an m ⁇ m all-0 matrix
  • H[1] is the unit matrix of m ⁇ m
  • a*b represents the multiplication operation of element a and element b in the Galois field
  • z is the calculation result of the multiplication operation
  • a ⁇ b represents the division operation performed between element a and element b in the Galois field
  • q is the calculation result of the division operation.
  • step S103 may specifically include:
  • H[2] that satisfies the replacement rules is determined
  • the determined coding matrix used for RS encoding can be a coding matrix based on a Vandermond matrix or a coding matrix based on a Cauchy matrix, which can be expressed as:
  • H[4] to H[7] can be obtained in sequence, where,
  • the encoding matrix based on the Vandermond matrix in formula (4) requires the use of GF(9), so it can be passed That is to say, it is determined
  • Step S104 Encode the data to be encoded through the encoding sparse matrix to obtain the encoded data, so that the process of encoding the data to be encoded through the encoding sparse matrix is completed in the circuit through the XOR circuit and the selection circuit.
  • the XOR circuit and the selection circuit can be used to complete the encoding of the data to be encoded through the encoding sparse matrix. The coding process.
  • the operation circuit can be specifically represented as Figure 2. It can be seen that d1, d4 and d7 can be selected through the selection circuit, and then performed through the XOR circuit. XOR, XOR in Figure 2 represents the XOR circuit required for the calculation of this row.
  • Step S105 Combine the encoded data and the data to be encoded into encoded data.
  • the encoded data and the data to be encoded can be combined into encoded data.
  • the encoding matrix is combined with the identity matrix to directly obtain the encoded data including the encoded data and the data to be encoded.
  • the identity matrix to directly obtain the encoded data including the encoded data and the data to be encoded.
  • the substitution rules replace each element in the inverse matrix of the encoding matrix with the corresponding matrix to obtain the decoded sparse matrix; the decoded sparse matrix only includes the number 1 and the number 0;
  • Decoding the data to be decoded based on the decoding sparse matrix is performed to obtain the decoded data, so that the process of decoding the data to be decoded based on the decoding sparse matrix and obtaining the decoded data is completed in the circuit through the XOR circuit and the selection circuit.
  • decoding takes the encoding process as an example.
  • This implementation mode describes the decoding process. The principle is consistent with the encoding process.
  • decoding can also be completed through the XOR circuit and the selection circuit in the circuit.
  • the inverse matrix of the encoding matrix needs to be used. Similarly, each element in the inverse matrix of the encoding matrix needs to be replaced with the corresponding matrix to obtain the decoding sparse matrix.
  • the decoding sparse matrix is combined with the identity matrix, and then multiplied by the data to be decoded, the result obtained is the original data to be encoded, or what is obtained after decoding. raw data.
  • the substitution relationship between each element and the corresponding matrix has been determined during encoding, therefore, when decoding, the encoding is directly carried out according to the substitution rules determined during encoding.
  • the decoded sparse matrix can be obtained by replacing each element in the inverse matrix of the matrix with the corresponding matrix, and the description will not be repeated here.
  • the coding matrix used for RS encoding and the Galois field GF (2 m ) used for RS encoding are determined according to the preset Assume the replacement rule, replace each element in the coding matrix with the corresponding matrix, and obtain the coding sparse matrix. That is, the operational relationship of the Galois field is mapped through the coding sparse matrix, so that the operations of the Galois field can be Encoding sparse matrices is implemented directly.
  • the replacement rule needs to satisfy: the four arithmetic operations performed by element a and element b in Galois are equivalent to the four arithmetic operations performed by matrix H(a) and matrix H(b) in Galois.
  • the coded sparse matrix only includes the number 1 and the number 0. Therefore, in the process of encoding the data to be encoded through the coded sparse matrix, the encoding can be completed in the circuit only through the XOR circuit and the selection circuit. process, the traditional Galois field calculation module can be omitted, and it has the advantage of high speed in hardware implementation. To sum up, the solution of this application can encode data, thereby effectively realizing redundant storage of data, ensuring high computing efficiency, and having the advantage of high speed in hardware implementation.
  • the embodiment of the present application also provides a data storage system, which can be mutually referenced with the above.
  • FIG. 3 is a schematic structural diagram of a data storage system in this application, including:
  • the data to be encoded receiving module 301 is used to receive the data to be encoded
  • the coding matrix determination module 302 is used to determine the coding matrix used for RS coding, and the Galois field GF (2 m ) used for RS coding, where m is a positive integer;
  • the equivalent replacement module 303 is used to replace each element in the coding matrix with the corresponding matrix according to the preset replacement rules to obtain the coding sparse matrix; where the replacement rules satisfy: element a and element b are in the Galois field
  • the four arithmetic operations performed are equivalent to the four arithmetic operations performed by the matrix H(a) and the matrix H(b) in the Galois field. Both a and b are arbitrary elements in the encoding matrix.
  • H(a) and H (b) are the matrices used to replace a and b respectively, and the encoding sparse matrix only includes the number 1 and the number 0;
  • the execution module 304 is used to encode the data to be encoded through the encoding sparse matrix to obtain the encoded data, so that the process of encoding the data to be encoded through the encoding sparse matrix is completed in the circuit through the XOR circuit and the selection circuit, and the encoded data is Combined with the data to be encoded to form encoded data.
  • the equivalent replacement module 303 is specifically used for:
  • H[2] that satisfies the replacement rules is determined
  • the replacement rules specifically include:
  • H[0] is an m ⁇ m all-0 matrix
  • H[1] is the unit matrix of m ⁇ m
  • a*b represents the multiplication operation of element a and element b in the Galois field
  • z is the calculation result of the multiplication operation
  • a ⁇ b represents the division operation performed between element a and element b in the Galois field
  • q is the calculation result of the division operation.
  • the Galois field used in RS encoding is GF (2 8 ).
  • the coding matrix used for RS encoding is a coding matrix of a Vandermond matrix or a coding matrix of a Cauchy matrix.
  • the decoding module is used for:
  • the substitution rules replace each element in the inverse matrix of the encoding matrix with the corresponding matrix to obtain the decoded sparse matrix; the decoded sparse matrix only includes the number 1 and the number 0;
  • Decoding the data to be decoded based on the decoding sparse matrix is performed to obtain the decoded data, so that the process of decoding the data to be decoded based on the decoding sparse matrix and obtaining the decoded data is completed in the circuit through the XOR circuit and the selection circuit.
  • embodiments of the present application also provide a data storage device and a non-volatile computer-readable storage medium, which may be mutually referenced with the above.
  • the non-volatile computer-readable storage medium stores computer-readable instructions.
  • the non-volatile computer-readable storage media mentioned here include random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROM, or any other form of storage media known in the technical field.
  • This data storage device can include:
  • One or more processors configured to execute computer-readable instructions to implement the steps of the data storage method in any of the above embodiments.
  • the internal structure diagram of the data storage device can be shown in Figure 4.
  • the data storage device includes a processor, memory, network interface and database connected through a system bus.
  • the processor of the data storage device is used to provide computing and control capabilities.
  • the memory of the data storage device includes non-volatile storage media and internal memory.
  • the non-volatile storage medium stores operating systems, computer programs and databases.
  • This internal memory provides an environment for the execution of operating systems and computer programs in non-volatile storage media.
  • the database of the data storage device is used to store data such as data to be encoded and encoded data. For specific data stored, please refer to the limitations in the above method embodiments.
  • the network interface of the data storage device is used to communicate with external terminals through a network connection.
  • the computer program when executed by the processor, implements a method of data storage.
  • FIG. 4 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the data storage device to which the solution of the present application is applied.
  • the specific data storage Devices may include more or fewer components than shown in the figures, or some combinations of components, or have different arrangements of components.

Landscapes

  • Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Algebra (AREA)
  • General Physics & Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Error Detection And Correction (AREA)

Abstract

一种数据存储方法,应用于编码技术领域,包括:接收待编码数据;确定出用于RS编码的编码矩阵及所使用的伽罗华域GF(2 m);将编码矩阵中的各个元素替换为相应的矩阵,得到仅包括1和0的编码稀疏矩阵;替换时满足:元素a和b在伽罗华域中进行的四则运算与矩阵H(a)和H(b)在伽罗华域中进行的四则运算等价;通过编码稀疏矩阵进行待编码数据的编码,得到编码数据,以使得在电路中通过异或电路以及选择电路完成编码;将编码数据和待编码数据组合成编码后的数据。

Description

一种数据存储方法、系统、设备及存储介质
相关申请的交叉引用
本申请要求于2022年04月11日提交中国专利局,申请号为202210371393.1,申请名称为“一种数据存储方法、系统、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及编码技术领域,特别是涉及一种数据存储方法、系统、设备及存储介质。
背景技术
目前,面对海量数据的存储需求,分布式存储得到了广泛的应用。分布式存储系统中的节点数量较多,单个节点的可靠性通常不会很高,且由于软硬件故障,人为失误等原因,导致系统常常发生节点失效的情况。因此,为了提高分布式存储系统的数据可靠性,实现原始文件的重构,会在存储原始数据的基础上,额外存储一定数量的数据冗余,使得在出现部分节点失效的情况下,仍然可以对原始文件实现解码恢复,保障系统的正常运行。
EC(Erasure Code,纠删码)是编码理论中的一种向前纠错技术,可以在保证相同可靠性的前提下有效地降低存储开销,被广泛地应用于各大存储系统以及数据中心。纠删码的种类众多,RS码(Reed-Solomon Code,里德所罗门码)是实际存储系统中较常见的一种。RS码将k个数据块编码为r个额外的校验块。而这r个校验块基于范德蒙矩阵或柯西矩阵进行编码的获得方式就称为利用范德蒙矩阵或柯西矩阵编码的RS纠删码,可以表示为:
Figure PCTCN2022115724-appb-000001
Figure PCTCN2022115724-appb-000002
其中,公式(1)表示的是采用范德蒙矩阵进行RS编码,公式(2)表示的是采用柯西矩阵进行RS编码。以公式(1)为例,范德蒙矩阵上部分表示的是k*k的单位矩阵,该单位矩阵与原始数据D1至Dk相乘,得到的结果仍然是原始数据D1至Dk。下部分的是r*k的编码矩阵,与原始数据D1至Dk相乘,得到的P1至Pr就是通过编码所得到的r个编码数据,或者称为校验数据,当D1至Pr中的至多r个数据出错或者丢失时,利用剩余数据对应矩阵的逆矩阵,与这些剩余数据相乘,便可以得到原始数据D1至Dk。例如当D1至Dr丢失时,解码过程可以表示为公式(3)。
Figure PCTCN2022115724-appb-000003
可以看出,纠删码的核心是构建一个可逆的编码矩阵,编码后利用编码的逆矩阵来恢复原始编码的数据。常见的RS纠删码使用的是柯西矩阵或范德蒙矩阵,所得到的矩阵完全可逆,并且矩阵的大小扩充简单。
但是,在实际的设计中,计算机中还要考虑数字大小限制,例如k个32位整数作为原始数据,在通过上述的柯西矩阵或范德蒙矩阵生成校验数据时,校验数据的数值几乎确定会溢出,因此,在计算机中进行RS编码时,会设定伽罗华域来保证计算结果在伽罗华域中。
发明人意识到,在实际设计中,矩阵运算的参数乘加对于有着大数据量处理需求的存储环境而言,运算起来非常复杂,一般这种场景下的硬件需要设计一个伽罗华域运算的专门模块,通过伽罗华域乘法和除法减少运算的数据量增加。而这样的专门运算模块,相比于原本的范德蒙和柯西运算思路,会造成额外的面积及速度损耗。
综上所述,如何有效地实现数据的冗余存储,且保障计算的高效性,是目前本领域技术人员急需解决的技术问题。
发明内容
本申请为解决上述技术问题,本申请提供如下技术方案:
本申请提供了一种数据存储方法,包括:
接收待编码数据;
确定出用于进行RS编码的编码矩阵,以及上述RS编码所使用的伽罗华域GF(2 m),m为正整数;
按照预设的替换规则,将上述编码矩阵中的各个元素替换为相应的矩阵,得到编码稀疏矩阵;其中,上述替换规则满足:元素a和元素b在上述伽罗华域中进行的四则运算 运算,与矩阵H(a)和矩阵H(b)在上述伽罗华域中进行的四则运算运算等价,a和b均为上述编码矩阵中的任意元素,H(a)和H(b)分别为用于替换a和用于替换b的矩阵,上述编码稀疏矩阵仅包括数字1和数字0;
通过上述编码稀疏矩阵进行上述待编码数据的编码,得到编码数据,以使得在电路中通过异或电路以及选择电路完成通过上述编码稀疏矩阵进行上述待编码数据的编码的过程;及
将上述编码数据和上述待编码数据组合成编码后的数据。
在其中一些实施例中,按照预设的替换规则,将上述编码矩阵中的各个元素替换为相应的矩阵,得到编码稀疏矩阵,包括:
按照预设的替换规则,通过计算机推演,确定出满足上述替换规则的H[2];
基于确定出的H[2],依次确定出满足上述替换规则的H[3]至H[2 m-1];及
将上述编码矩阵中的各个元素替换为相应的矩阵,得到编码稀疏矩阵。
在其中一些实施例中,上述替换规则具体包括:
H[0]为m×m的全0矩阵;
H[1]为m×m的单位矩阵;
Figure PCTCN2022115724-appb-000004
H[a*b]=H[a]*H[b]=H[z];
H[a÷b]=H[a]÷H[b]=H[q];
H[a]*H[b]=H[b]*H[a]
H[a]*H[a]-1=H[1];
其中,
Figure PCTCN2022115724-appb-000005
表示的是元素a和元素b在上述伽罗华域中进行的加法运算,a*b表示的是元素a和元素b在上述伽罗华域中进行的乘法运算,z为上述乘法运算的计算结果,a÷b表示的是元素a和元素b在上述伽罗华域中进行的除法运算,q为上述除法运算的计算结果。
在其中一些实施例中,上述RS编码所使用的伽罗华域为GF(2 8)。
在其中一些实施例中,用于进行RS编码的上述编码矩阵为范德蒙矩阵的编码矩阵或者为柯西矩阵的编码矩阵。
在其中一些实施例中,还包括:
接收待解码数据;
确定出上述编码矩阵的逆矩阵;
按照上述替换规则,将上述编码矩阵的逆矩阵中的各个元素替换为相应的矩阵,得到解码稀疏矩阵;上述解码稀疏矩阵仅包括数字1和数字0;及
基于上述解码稀疏矩阵进行上述待解码数据的解码,得到解码数据,以使得在电路中通过异或电路以及选择电路完成上述基于上述解码稀疏矩阵进行上述待解码数据的解码,得到解码数据的过程。
本申请提供了一种数据存储系统,包括:
待编码数据接收模块,用于接收待编码数据;
编码矩阵确定模块,用于确定出用于进行RS编码的编码矩阵,以及上述RS编码所使用的伽罗华域GF(2 m),m为正整数;
等效替换模块,用于按照预设的替换规则,将上述编码矩阵中的各个元素替换为相应的矩阵,得到编码稀疏矩阵;其中,上述替换规则满足:元素a和元素b在上述伽罗华域中进行的四则运算运算,与矩阵H(a)和矩阵H(b)在上述伽罗华域中进行的四则运算运算等价,a和b均为上述编码矩阵中的任意元素,H(a)和H(b)分别为用于替换a和用于替换b的矩阵,上述编码稀疏矩阵仅包括数字1和数字0;
执行模块,用于通过上述编码稀疏矩阵进行上述待编码数据的编码,得到编码数据,以使得在电路中通过异或电路以及选择电路完成通过上述编码稀疏矩阵进行上述待编码数据的编码的过程;及
编码完成模块,用于将上述编码数据和上述待编码数据组合成编码后的数据。
在其中一些实施例中,上述替换规则具体包括:
H[0]为m×m的全0矩阵;
H[1]为m×m的单位矩阵;
Figure PCTCN2022115724-appb-000006
H[a*b]=H[a]*H[b]=H[z];
H[a÷b]=H[a]÷H[b]=H[q];
H[a]*H[b]=H[b]*H[a]
H[a]*H[a]-1=H[1];
其中,
Figure PCTCN2022115724-appb-000007
表示的是元素a和元素b在上述伽罗华域中进行的加法运算,a*b表示的是元素a和元素b在上述伽罗华域中进行的乘法运算,z为上述乘法运算的计算结果, a÷b表示的是元素a和元素b在上述伽罗华域中进行的除法运算,q为上述除法运算的计算结果。
本申请提供了一种数据存储设备,包括:
存储器,用于存储计算机可读指令;及
一个或多个处理器,用于执行上述计算机可读指令以实现如上述任一项上述的数据存储方法的步骤。
本申请提供了一种非易失性计算机可读存储介质,上述非易失性计算机可读存储介质上存储有计算机可读指令,上述计算机可读指令被一个或多个处理器执行时实现如上述任一项上述的数据存储方法的步骤。
本申请本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请一个或多个实施例中的一种数据存储方法的实施流程图;
图2为本申请一个或多个实施例中的运算电路的一行的计算的功能示意图;
图3为本申请一个或多个实施例中的一种数据存储系统的结构示意图;
图4为本申请一个或多个实施例中的数据存储设备的内部结构图。
具体实施方式
本申请的核心是提供一种数据存储方法,可以进行数据的编码,也就有效地实现了数据的冗余存储,且保障了计算的高效性,在硬件实现上具有高速的优势。
为了使本技术领域的人员更好地理解本申请方案,下面结合附图和具体实施方式对本申请作进一步的详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
请参考图1,图1为本申请中一种数据存储方法的实施流程图,该数据存储方法可以包括以下步骤:
步骤S101:接收待编码数据。
待编码数据的具体数据类型,数据大小等参数均可以根据实际需要进行确定,此外在实际应用中,通常是以1Byte作为一个数据单元进行数据传输,即数据在硬件中的传输是通过每个Byte进行传输的,每个Byte为8bit。
步骤S102:确定出用于进行RS编码的编码矩阵,以及RS编码所使用的伽罗华域GF(2 m),m为正整数。
用于进行RS编码的编码矩阵的具体类型可以根据需要进行设定和调整,在实际应用中,通常可以选取为范德蒙矩阵的编码矩阵或者为柯西矩阵的编码矩阵,较为成熟常用。
进行RS编码使用的是伽罗华域GF(2 m),并且如上文的描述,考虑到数据在硬件中的传输是通过每个Byte进行传输的,因此伽罗华域GF的幂可以设置为8,即本申请的RS编码所使用的伽罗华域可以为GF(2 8)。当然,其他实施方式中,m可以根据需要选取为其他数值。
当采用的伽罗华域为GF(2 8)时,所使用的本原多项式也可以有多种,例如本原多项式可以采用:P(x)=x 8+x 4+x 3+x 2+1。此时,对应的数据表可以表示为:
表一:对应于本原多项式P(x)=x 8+x 4+x 3+x 2+1的数据表
Figure PCTCN2022115724-appb-000008
使用伽罗华域GF(2 m)时,伽罗华域的加法运算和减法运算都可以通过异或来实现。而乘法运算和除法运算由于需要mod P(x),因此计算较为复杂,在传统的硬件实现中,通常是通过查表来实现,查表分为正表和反表。
以上述例子中的本原多项式P(x)=x 8+x 4+x 3+x 2+1为例,得到的正表和反表分别为:
正表:
Gflog(正表)=[0 1 25 2 50 26 198 3 223 51 238 27 104 199 75 4 100 224 14 52 141 239 129 28 193 105 248 200 8 76 113 5 138 101 47 225 36 15 33 53 147 142 218 240 18 130 69 29 181 194 125 106 39 249 185 201 154 9 120 77 228 114 166 6 191 139 98 102 221 48 253 226 152 37 179 16 145 34 136 54 208 148 206 143 150 219 189 241 210 19 92 131 56 70 64 30 66 182 163 195 72 126 110 107 58 40 84 250 133 186 61 202 94 155 159 10 21 121 43 78 212 229 172 115 243 167 87 7 112 192 247 140 128 99 13 103 74 222 237 49 197 254 24 227 165 153 119 38 184 180 124 17 68 146 217 35 32 137 46 55 63 209 91 149 188 207 205 144 135 151 178 220 252 190 97 242 86 211 171 20 42 93 158 132 60 57 83 71 109 65 162 31 45 67 216 183 123 164 118 196 23 73 236 127 12 111 246 108 161 59 82 41 157 85 170 251 96 134 177 187 204 62 90 203 89 95 176 156 169 160 81 11 245 22 235 122 117 44 215 79 174 213 233 230 231 173 232 116 214 244 234 168 80 88 175];
反表:
Gfilog(反表)=[1 2 4 8 16 32 64 128 29 58 116 232 205 135 19 38 76 152 45 90 180 117 234 201 143 3 6 12 24 48 96 192 157 39 78 156 37 74 148 53 106 212 181 119 238 193 159 35 70 140 5 10 20 40 80 160 93 186 105 210 185 111 222 161 95 190 97 194 153 47 94 188 101 202 137 15 30 60 120 240 253 231 211 187 107 214 177 127 254 225 223 163 91 182 113 226 217 175 67 134 17 34 68 136 13 26 52 104 208 189 103 206 129 31 62 124 248 237 199 147 59 118 236 197 151 51 102 204 133 23 46 92 184 109 218 169 79 158 33 66 132 21 42 84 168 77 154 41 82 164 85 170 73 146 57 114 228 213 183 115 230 209 191 99 198 145 63 126 252 229 215 179 123 246 241 255 227 219 171 75 150 49 98 196 149 55 110 220 165 87 174 65 130 25 50 100 200 141 7 14 28 56 112 224 221 167 83 166 81 162 89 178  121 242 249 239 195 155 43 86 172 69 138 9 18 36 72 144 61 122 244 245 247 243 251 235 203 139 11 22 44 88 176 125 250 233 207 131 27 54 108 216 173 71 142]。
在上述正表和反表的例子中,以在伽罗华域GF(2 8)中进行的乘法运算3*6为例:
GF(3*6)=Gfilog(Gflog(3)+Gflog(6))
=Gfilog(2+198)
=Gfilog(200)
=28
相应的,在伽罗华域GF(28)中进行的除法运算3÷6为:
GF(3÷6)=Gfilog(Gflog(3)-Gflog(6))
=Gfilog(2-198)
=Gfilog(-196)
=210
步骤S103:按照预设的替换规则,将编码矩阵中的各个元素替换为相应的矩阵,得到编码稀疏矩阵。
其中,替换规则满足:元素a和元素b在伽罗华域中进行的四则运算运算,与矩阵H(a)和矩阵H(b)在伽罗华域中进行的四则运算运算等价,a和b均为编码矩阵中的任意元素,H(a)和H(b)分别为用于替换a和用于替换b的矩阵,编码稀疏矩阵仅包括数字1和数字0。
本申请的方案中,将编码矩阵中的各个元素替换为相应的矩阵,得到编码稀疏矩阵之后,需要利用编码稀疏矩阵进行待编码数据的编码,因此,编码稀疏矩阵需要能够对伽罗华域的运算关系进行映射,使得伽罗华域的运算可以通过编码稀疏矩阵来直接实现。也就是说,替换规则需要满足:元素a和元素b在伽罗华域中进行的四则运算运算,与矩阵H(a)和矩阵H(b)在伽罗华域中进行的四则运算运算等价。
具体的,仍以幂为8为例,即以上述实施方式中的伽罗华域GF(2 8),且本原多项式为P(x)=x 8+x 4+x 3+x 2+1为例。可以构造一个8*8的矩阵来表征所有需要进行的运算,而该矩阵有效且符合编解码运算的前提条件是,对于该8*8的矩阵所组成的集合中,任意矩阵H都存在以下六条关系:
1、H[0]=zero(8,8)
2、H[1]=eye(8)
3、H[a+b]=H[a]+H[b]
4、H[a*b]=H[a]*H[b]
5、H[a]*H[b]=H[b]*H[a]
6、H[a]*H[a]-1=H[1]
第1项表示H[0]是一个8*8的全0矩阵,第2项表示H[1]是一个8*8的单位矩阵,第6项表示任意8*8的矩阵是可逆的,第3至6项表示的是矩阵的加法和乘法需要满足的运算规律。
进一步的,要利用构建的矩阵实现与伽罗华域等价的四则运算,需要考虑伽罗华域GF(2 8)中的四则运算关系,即需要在上述的六条关系的基础上,进一步地增加以下的4条限制,使得矩阵的运算符合伽罗华域的运算需求:
1、H[1]=1,H[0]=0,即H[1]表示的是伽罗华运算元素中的1,因为在伽罗华域中,任意数乘以1都为其本身,H(0)为0,因为任意数乘以0都为0。
2、
Figure PCTCN2022115724-appb-000009
表示1和2进行异或结果为3。
3、H[GF_MUL(3,6)]=H[3]*H[6]=H[28];表示的是矩阵的乘法运算需要符合伽罗华域的乘法关系,并且此处是以前文实施例中的3*6为例,要满足H[3]*H[6]相当于是伽罗华域中的3*6,而由于伽罗华域中3*6=28,因此,H[3]*H[6]=H[GF_MUL(3,6)]=H[28]需要成立。
4、H[GF_DIV(3,6)]=H[3]÷H[6]=H[210]。与乘法同理,此处以伽罗华域中的3÷6为例,要使得H[3]÷H[6]=H[GF_DIV(3,6)]=H[210]成立。
因此,在本申请的一种具体实施方式中,将上文中对于矩阵的六条关系限定,与考虑伽罗华域GF(2 8)中的四则运算关系的4条限制进行结合之后,在本申请的该种具体实施方式中,替换规则可以具体表示为:
H[0]为m×m的全0矩阵;
H[1]为m×m的单位矩阵;
Figure PCTCN2022115724-appb-000010
H[a*b]=H[a]*H[b]=H[z];
H[a÷b]=H[a]÷H[b]=H[q];
H[a]*H[b]=H[b]*H[a]
H[a]*H[a]-1=H[1];
其中,
Figure PCTCN2022115724-appb-000011
表示的是元素a和元素b在伽罗华域中进行的加法运算,a*b表示的是 元素a和元素b在伽罗华域中进行的乘法运算,z为乘法运算的计算结果,a÷b表示的是元素a和元素b在伽罗华域中进行的除法运算,q为除法运算的计算结果。
在按照预设的替换规则,确定出编码矩阵中的各个元素各自对应的矩阵时,具体确定方式可以有多种,通常可以通过计算机推演实现。即在本申请的一种具体实施方式中,步骤S103可以具体包括:
按照预设的替换规则,通过计算机推演,确定出满足替换规则的H[2];
基于确定出的H[2],依次确定出满足替换规则的H[3]至H[2 m-1];
将编码矩阵中的各个元素替换为相应的矩阵,得到编码稀疏矩阵。
该种实施方式中,考虑到得到的符合要求的编码稀疏矩阵可能有多种,但H[2]至H[2 m-1]中的任一矩阵确定之后,其余矩阵便可以唯一确定,因此,该种实施方式中,可以通过计算机推演,先确定出满足替换规则的H[2],然后再基于确定出的H[2],依次确定出满足替换规则的H[3]至H[2 m-1],实施时较为方便。
为了便于说明,以幂为3的伽罗华域GF(2 3)为例进行说明,且本源多项式设定为GF(2 3)=x 3+x+1
Figure PCTCN2022115724-appb-000012
并且例如一种具体场合中,通过计算机推演,确定出的满足替换规则的
Figure PCTCN2022115724-appb-000013
Figure PCTCN2022115724-appb-000014
以此类推可以得到H[3]至H[7]。
如上文的描述,确定出的用于进行RS编码的编码矩阵可以为基于范德蒙矩阵的编码矩阵或者基于柯西矩阵的编码矩阵,可以表示为:
Figure PCTCN2022115724-appb-000015
Figure PCTCN2022115724-appb-000016
以公式(4)中的基于范德蒙矩阵的编码矩阵为例,由于确定出了H[1]和H[2],因此,可以确定出所需要的
Figure PCTCN2022115724-appb-000017
基于伽罗华域中的加法以及乘法运算,可以依次得到H[4]至H[7],其中,得到的
Figure PCTCN2022115724-appb-000018
而公式(4)中的基于范德蒙矩阵的编码矩阵需要使用GF(9),因此,可以通过
Figure PCTCN2022115724-appb-000019
即确定出
Figure PCTCN2022115724-appb-000020
Figure PCTCN2022115724-appb-000021
因此,该例子中,按照预设的替换规则,将编码矩阵中的9个元素替换为相应的矩阵,得到的编码稀疏矩阵表示为:
Figure PCTCN2022115724-appb-000022
利用该编码稀疏矩阵进行待编码数据的编码则可以表示为:
Figure PCTCN2022115724-appb-000023
步骤S104:通过编码稀疏矩阵进行待编码数据的编码,得到编码数据,以使得在电路中通过异或电路以及选择电路完成通过编码稀疏矩阵进行待编码数据的编码的过程。
由于编码稀疏矩阵中仅包括数字1和数字0,因此,在通过编码稀疏矩阵进行待编码数据的编码时,在电路中,通过异或电路以及选择电路便可以完成通过编码稀疏矩阵进行待编码数据的编码的过程。
以上述实施方式中的公式(5)的第一行的计算为例,运算电路可以具体表示为图2,可以看出,可以通过选择电路选择出d1,d4以及d7,进而通过异或电路进行异或,图2 中的XOR表示的是该行计算所需要的异或电路。
步骤S105:将编码数据和待编码数据组合成编码后的数据。
结合上文的描述可知,通过编码得到编码数据之后,便可以将编码数据和待编码数据组合成编码后的数据。当然,参阅公式(1),是将编码矩阵与单位矩阵结合,从而直接得到包括编码数据和待编码数据的编码后的数据。本申请的方案中同理,即按照预设的替换规则,得到编码稀疏矩阵之后,例如得到如公式(5)中的编码稀疏矩阵H之后,可以与单位矩阵结合,这样在与待编码数据相乘之后,得到的结果便是包括编码数据和待编码数据的编码后的数据。
在本申请的一种具体实施方式中,还可以包括:
接收待解码数据;
确定出编码矩阵的逆矩阵;
按照替换规则,将编码矩阵的逆矩阵中的各个元素替换为相应的矩阵,得到解码稀疏矩阵;解码稀疏矩阵仅包括数字1和数字0;
基于解码稀疏矩阵进行待解码数据的解码,得到解码数据,以使得在电路中通过异或电路以及选择电路完成基于解码稀疏矩阵进行待解码数据的解码,得到解码数据的过程。
前文是以编码过程为例进行说明,该种实施方式中则描述的是解码的过程,原理与编码过程一致,在进行解码时,同样在电路中通过异或电路以及选择电路便可以完成解码。
在解码时,需要使用的是编码矩阵的逆矩阵,同样的,需要将编码矩阵的逆矩阵中的各个元素替换为相应的矩阵,得到解码稀疏矩阵。与上文实施例中的公式(3)同理,将解码稀疏矩阵与单位矩阵结合,再与待解码数据相乘之后,得到的结果便是原始的待编码数据,或者称为解码之后得到的原数据。
当然,由于在上文的实施方式中,在编码时已经确定出了各个元素与相应的矩阵之间的替换关系,因此,在进行解码时,直接按照编码时所确定出的替换规则,将编码矩阵的逆矩阵中的各个元素替换为相应的矩阵即可得到解码稀疏矩阵,此处便不再重复说明。
应用本申请实施例所提供的技术方案,针对伽罗华域的运算特点,确定出用于进行RS编码的编码矩阵,以及RS编码所使用的伽罗华域GF(2 m)之后,按照预设的替换规则,将编码矩阵中的各个元素替换为相应的矩阵,得到编码稀疏矩阵,即,将伽罗华域的运算关系通过编码稀疏矩阵进行了映射,使得伽罗华域的运算可以通过编码稀疏矩阵 直接实现。因此,替换规则需要满足:元素a和元素b在伽罗华中进行的四则运算运算,与矩阵H(a)和矩阵H(b)在伽罗华中进行的四则运算运算等价。得到了编码稀疏矩阵之后,编码稀疏矩阵仅包括数字1和数字0,因此,通过编码稀疏矩阵进行待编码数据的编码的过程中,在电路中只需要通过异或电路以及选择电路便可以完成编码的过程,便可以省略传统的伽罗华域运算模块,在硬件实现上具有高速的优势。综上所述,本申请的方案可以进行数据的编码,也就有效地实现了数据的冗余存储,且保障了计算的高效性,在硬件实现上具有高速的优势。
相应于上面的方法实施例,本申请实施例还提供了一种数据存储系统,可与上文相互对应参照。
参见图3所示,为本申请中一种数据存储系统的结构示意图,包括:
待编码数据接收模块301,用于接收待编码数据;
编码矩阵确定模块302,用于确定出用于进行RS编码的编码矩阵,以及RS编码所使用的伽罗华域GF(2 m),m为正整数;
等效替换模块303,用于按照预设的替换规则,将编码矩阵中的各个元素替换为相应的矩阵,得到编码稀疏矩阵;其中,替换规则满足:元素a和元素b在伽罗华域中进行的四则运算运算,与矩阵H(a)和矩阵H(b)在伽罗华域中进行的四则运算运算等价,a和b均为编码矩阵中的任意元素,H(a)和H(b)分别为用于替换a和用于替换b的矩阵,编码稀疏矩阵仅包括数字1和数字0;
执行模块304,用于通过编码稀疏矩阵进行待编码数据的编码,得到编码数据,以使得在电路中通过异或电路以及选择电路完成通过编码稀疏矩阵进行待编码数据的编码的过程,将编码数据和待编码数据组合成编码后的数据。
在本申请的一种具体实施方式中,等效替换模块303,具体用于:
按照预设的替换规则,通过计算机推演,确定出满足替换规则的H[2];
基于确定出的H[2],依次确定出满足替换规则的H[3]至H[2 m-1];
将编码矩阵中的各个元素替换为相应的矩阵,得到编码稀疏矩阵。
在本申请的一种具体实施方式中,替换规则具体包括:
H[0]为m×m的全0矩阵;
H[1]为m×m的单位矩阵;
Figure PCTCN2022115724-appb-000024
H[a*b]=H[a]*H[b]=H[z];
H[a÷b]=H[a]÷H[b]=H[q];
H[a]*H[b]=H[b]*H[a]
H[a]*H[a]-1=H[1];
其中,
Figure PCTCN2022115724-appb-000025
表示的是元素a和元素b在伽罗华域中进行的加法运算,a*b表示的是元素a和元素b在伽罗华域中进行的乘法运算,z为乘法运算的计算结果,a÷b表示的是元素a和元素b在伽罗华域中进行的除法运算,q为除法运算的计算结果。
在本申请的一种具体实施方式中,RS编码所使用的伽罗华域为GF(2 8)。
在本申请的一种具体实施方式中,用于进行RS编码的编码矩阵为范德蒙矩阵的编码矩阵或者为柯西矩阵的编码矩阵。
在本申请的一种具体实施方式中,解码模块,用于:
接收待解码数据;
确定出编码矩阵的逆矩阵;
按照替换规则,将编码矩阵的逆矩阵中的各个元素替换为相应的矩阵,得到解码稀疏矩阵;解码稀疏矩阵仅包括数字1和数字0;
基于解码稀疏矩阵进行待解码数据的解码,得到解码数据,以使得在电路中通过异或电路以及选择电路完成基于解码稀疏矩阵进行待解码数据的解码,得到解码数据的过程。
相应于上面的方法和系统实施例,本申请实施例还提供了一种数据存储设备以及一种非易失性计算机可读存储介质,可与上文相互对应参照。该非易失性计算机可读存储介质上存储有计算机可读指令,计算机可读指令被处理器执行时实现如上述任一实施例中的数据存储方法的步骤。这里所说的非易失性计算机可读存储介质包括随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质。
该数据存储设备可以包括:
存储器,用于存储计算机可读指令;
一个或多个处理器,用于执行计算机可读指令以实现如上述任一实施例中的数据存储方法的步骤。
在一个实施例中,该数据存储设备的内部结构图可以如图4所示。该数据存储设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该数据存储设备的处理器用于提供计算和控制能力。该数据存储设备的存储器包括非易失性存储介质、 内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该数据存储设备的数据库用于存储待编码数据、编码后的数据等数据,具体存储的数据还可以参见上述方法实施例中的限定。该数据存储设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种数据存储方法。
本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的数据存储设备的限定,具体的数据存储设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的技术方案及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。

Claims (16)

  1. 一种数据存储方法,其特征在于,包括:
    接收待编码数据;
    确定出用于进行RS编码的编码矩阵,以及所述RS编码所使用的伽罗华域GF(2 m),m为正整数;
    按照预设的替换规则,将所述编码矩阵中的各个元素替换为相应的矩阵,得到编码稀疏矩阵;其中,所述替换规则满足:元素a和元素b在所述伽罗华域中进行的四则运算运算,与矩阵H(a)和矩阵H(b)在所述伽罗华域中进行的四则运算运算等价,a和b均为所述编码矩阵中的任意元素,H(a)和H(b)分别为用于替换a和用于替换b的矩阵,所述编码稀疏矩阵仅包括数字1和数字0;
    通过所述编码稀疏矩阵进行所述待编码数据的编码,得到编码数据,以使得在电路中通过异或电路以及选择电路完成通过所述编码稀疏矩阵进行所述待编码数据的编码的过程;及
    将所述编码数据和所述待编码数据组合成编码后的数据。
  2. 根据权利要求1所述的数据存储方法,其特征在于,按照预设的替换规则,将所述编码矩阵中的各个元素替换为相应的矩阵,得到编码稀疏矩阵,包括:
    按照预设的替换规则,通过计算机推演,确定出满足所述替换规则的H[2];
    基于确定出的H[2],依次确定出满足所述替换规则的H[3]至H[2 m-1];及
    将所述编码矩阵中的各个元素替换为相应的矩阵,得到编码稀疏矩阵。
  3. 根据权利要求1所述的数据存储方法,其特征在于,所述替换规则具体包括:
    H[0]为m×m的全0矩阵;
    H[1]为m×m的单位矩阵;
    Figure PCTCN2022115724-appb-100001
    H[a*b]=H[a]*H[b]=H[z];
    H[a÷b]=H[a]÷H[b]=H[q];
    H[a]*H[b]=H[b]*H[a]
    H[a]*H[a]-1=H[1];
    其中,
    Figure PCTCN2022115724-appb-100002
    表示的是元素a和元素b在所述伽罗华域中进行的加法运算,a*b表示 的是元素a和元素b在所述伽罗华域中进行的乘法运算,z为所述乘法运算的计算结果,a÷b表示的是元素a和元素b在所述伽罗华域中进行的除法运算,q为所述除法运算的计算结果。
  4. 根据权利要求1所述的数据存储方法,其特征在于,所述RS编码所使用的伽罗华域为GF(2 8)。
  5. 根据权利要求1所述的数据存储方法,其特征在于,用于进行RS编码的所述编码矩阵为范德蒙矩阵的编码矩阵或者为柯西矩阵的编码矩阵。
  6. 根据权利要求1至5任一项所述的数据存储方法,其特征在于,还包括:
    接收待解码数据;
    确定出所述编码矩阵的逆矩阵;
    按照所述替换规则,将所述编码矩阵的逆矩阵中的各个元素替换为相应的矩阵,得到解码稀疏矩阵;所述解码稀疏矩阵仅包括数字1和数字0;及
    基于所述解码稀疏矩阵进行所述待解码数据的解码,得到解码数据,以使得在电路中通过异或电路以及选择电路完成所述基于所述解码稀疏矩阵进行所述待解码数据的解码,得到解码数据的过程。
  7. 根据权利要求4所述的数据存储方法,其特征在于,使用的本原多项式为:P(x)=x 8+x 4+x 3+x 2+1。
  8. 根据权利要求1所述的数据存储方法,其特征在于,通过异或来实现在所述伽罗华域中进行的加法运算和减法运算。
  9. 根据权利要求1或8所述的数据存储方法,其特征在于,通过查表来实现在所述伽罗华域中进行的乘法运算和除法运算。
  10. 根据权利要求9所述的数据存储方法,其特征在于,所述查表分为正表和反表。
  11. 根据权利要求1所述的数据存储方法,其特征在于,将所述编码数据和所述待编码数据组合成编码后的数据,包括:
    将所述编码稀疏矩阵与单位矩阵结合,并与待编码数据相乘,以将所述编码数据和所述待编码数据组合成编码后的数据。
  12. 根据权利要求6所述的数据存储方法,其特征在于,基于所述解码稀疏矩阵进行所述待解码数据的解码,得到解码数据,包括:
    将所述解码稀疏矩阵与单位矩阵结合,再与所述待解码数据相乘,得到解码数据。
  13. 一种数据存储系统,其特征在于,包括:
    待编码数据接收模块,用于接收待编码数据;
    编码矩阵确定模块,用于确定出用于进行RS编码的编码矩阵,以及所述RS编码所使用的伽罗华域GF(2 m),m为正整数;
    等效替换模块,用于按照预设的替换规则,将所述编码矩阵中的各个元素替换为相应的矩阵,得到编码稀疏矩阵;其中,所述替换规则满足:元素a和元素b在所述伽罗华域中进行的四则运算运算,与矩阵H(a)和矩阵H(b)在所述伽罗华域中进行的四则运算运算等价,a和b均为所述编码矩阵中的任意元素,H(a)和H(b)分别为用于替换a和用于替换b的矩阵,所述编码稀疏矩阵仅包括数字1和数字0;
    执行模块,用于通过所述编码稀疏矩阵进行所述待编码数据的编码,得到编码数据,以使得在电路中通过异或电路以及选择电路完成通过所述编码稀疏矩阵进行所述待编码数据的编码的过程;及
    编码完成模块,用于将所述编码数据和所述待编码数据组合成编码后的数据。
  14. 根据权利要求13所述的数据存储系统,其特征在于,所述替换规则具体包括:
    H[0]为m×m的全0矩阵;
    H[1]为m×m的单位矩阵;
    Figure PCTCN2022115724-appb-100003
    H[a*b]=H[a]*H[b]=H[z];
    H[a÷b]=H[a]÷H[b]=H[q];
    H[a]*H[b]=H[b]*H[a]
    H[a]*H[a]-1=H[1];
    其中,
    Figure PCTCN2022115724-appb-100004
    表示的是元素a和元素b在所述伽罗华域中进行的加法运算,a*b表示的是元素a和元素b在所述伽罗华域中进行的乘法运算,z为所述乘法运算的计算结果,a÷b表示的是元素a和元素b在所述伽罗华域中进行的除法运算,q为所述除法运算的计算结果。
  15. 一种数据存储设备,其特征在于,包括:
    存储器,用于存储计算机可读指令;及
    一个或多个处理器,用于执行所述计算机可读指令以实现如权利要求1至13任一项所述的数据存储方法的步骤。
  16. 一种非易失性计算机可读存储介质,其特征在于,所述非易失性计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时实现 如权利要求1至13任一项所述的数据存储方法的步骤。
PCT/CN2022/115724 2022-04-11 2022-08-30 一种数据存储方法、系统、设备及存储介质 WO2023197506A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210371393.1A CN114465627B (zh) 2022-04-11 2022-04-11 一种数据存储方法、系统、设备及存储介质
CN202210371393.1 2022-04-11

Publications (1)

Publication Number Publication Date
WO2023197506A1 true WO2023197506A1 (zh) 2023-10-19

Family

ID=81417627

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/115724 WO2023197506A1 (zh) 2022-04-11 2022-08-30 一种数据存储方法、系统、设备及存储介质

Country Status (2)

Country Link
CN (1) CN114465627B (zh)
WO (1) WO2023197506A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117254823A (zh) * 2023-11-20 2023-12-19 苏州联讯仪器股份有限公司 一种并行rs编码方法、装置、系统及计算机存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114465627B (zh) * 2022-04-11 2022-07-08 苏州浪潮智能科技有限公司 一种数据存储方法、系统、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6550035B1 (en) * 1998-10-20 2003-04-15 Texas Instruments Incorporated Method and apparatus of Reed-Solomon encoding-decoding
CN101587433A (zh) * 2008-05-22 2009-11-25 中兴通讯股份有限公司 一种基于多级查表的压缩伽罗华域的执行方法及系统
CN111697976A (zh) * 2020-05-28 2020-09-22 苏州浪潮智能科技有限公司 一种基于分布式存储的rs纠删快速解码方法及系统
CN113300718A (zh) * 2021-05-20 2021-08-24 南京大学 编码方法、译码方法、编码装置和译码装置
CN114465627A (zh) * 2022-04-11 2022-05-10 苏州浪潮智能科技有限公司 一种数据存储方法、系统、设备及存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092816A (zh) * 2013-02-05 2013-05-08 苏州威士达信息科技有限公司 一种并行rs编码中常系数矩阵的生成装置和方法
CN113810062B (zh) * 2021-11-17 2022-04-12 南京风兴科技有限公司 一种面向下一代以太网的gel编码方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6550035B1 (en) * 1998-10-20 2003-04-15 Texas Instruments Incorporated Method and apparatus of Reed-Solomon encoding-decoding
CN101587433A (zh) * 2008-05-22 2009-11-25 中兴通讯股份有限公司 一种基于多级查表的压缩伽罗华域的执行方法及系统
CN111697976A (zh) * 2020-05-28 2020-09-22 苏州浪潮智能科技有限公司 一种基于分布式存储的rs纠删快速解码方法及系统
CN113300718A (zh) * 2021-05-20 2021-08-24 南京大学 编码方法、译码方法、编码装置和译码装置
CN114465627A (zh) * 2022-04-11 2022-05-10 苏州浪潮智能科技有限公司 一种数据存储方法、系统、设备及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WU RUIZHEN; WU YAN; WANG LIN; CHEN JINGJING; ZHANG YONGXING; WANG MINGMING: "A Bit Level Erasure Codes Solution Based on Galois Field", 2022 IEEE 2ND INTERNATIONAL CONFERENCE ON POWER, ELECTRONICS AND COMPUTER APPLICATIONS (ICPECA), IEEE, 21 January 2022 (2022-01-21), pages 1230 - 1234, XP034094345, DOI: 10.1109/ICPECA53709.2022.9719123 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117254823A (zh) * 2023-11-20 2023-12-19 苏州联讯仪器股份有限公司 一种并行rs编码方法、装置、系统及计算机存储介质
CN117254823B (zh) * 2023-11-20 2024-03-15 苏州联讯仪器股份有限公司 一种并行rs编码方法、装置、系统及计算机存储介质

Also Published As

Publication number Publication date
CN114465627A (zh) 2022-05-10
CN114465627B (zh) 2022-07-08

Similar Documents

Publication Publication Date Title
WO2023197506A1 (zh) 一种数据存储方法、系统、设备及存储介质
CA2493610C (en) Multi-dimensional data protection and mirroring method for micro level data
Blaum et al. Partial-MDS codes and their application to RAID type of architectures
US4030067A (en) Table lookup direct decoder for double-error correcting (DEC) BCH codes using a pair of syndromes
US9450615B2 (en) Multi-bit error correction method and apparatus based on a BCH code and memory system
US20200081778A1 (en) Distributed storage system, method and apparatus
US10523244B2 (en) Device and associated methodoloy for encoding and decoding of data for an erasure code
CN111682874B (zh) 一种数据恢复的方法、系统、设备及可读存储介质
CN113297001B (zh) 一种raid编解码方法及编解码电路
Lin et al. Novel repair-by-transfer codes and systematic exact-MBR codes with lower complexities and smaller field sizes
Hou et al. A new construction and an efficient decoding method for Rabin-like codes
CN113296999B (zh) 一种raid6编码方法及编码电路
Hou et al. Triple-fault-tolerant binary MDS array codes with asymptotically optimal repair
Hou et al. New MDS array code correcting multiple disk failures
Tang et al. Fast en/decoding of Reed-Solomon codes for failure recovery
JP7116374B2 (ja) 短縮レイテンシ誤り訂正復号
WO2017041232A1 (zh) 一种二进制循环码的编解码框架
Chen et al. A new Zigzag MDS code with optimal encoding and efficient decoding
WO2019214266A1 (zh) 计算crc编码的方法和装置
EP4369201A1 (en) Data processing method and apparatus
CN115113816A (zh) 一种纠删码数据处理系统、方法、计算机设备及介质
Nguyen Error-detection codes: algorithms and fast implementation
Wu et al. A Bit Level Erasure Codes Solution Based on Galois Field
CN116974810A (zh) 扩展evenodd码的编码方法、解码方法及电子装置、存储介质
US20240184665A1 (en) Data processing method and apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22937144

Country of ref document: EP

Kind code of ref document: A1