CN113297000B - RAID (redundant array of independent disks) coding circuit and coding method - Google Patents

RAID (redundant array of independent disks) coding circuit and coding method Download PDF

Info

Publication number
CN113297000B
CN113297000B CN202110551258.0A CN202110551258A CN113297000B CN 113297000 B CN113297000 B CN 113297000B CN 202110551258 A CN202110551258 A CN 202110551258A CN 113297000 B CN113297000 B CN 113297000B
Authority
CN
China
Prior art keywords
data
parameter
check code
check
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110551258.0A
Other languages
Chinese (zh)
Other versions
CN113297000A (en
Inventor
吴睿振
黄萍
陈静静
王凛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
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 Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202110551258.0A priority Critical patent/CN113297000B/en
Publication of CN113297000A publication Critical patent/CN113297000A/en
Application granted granted Critical
Publication of CN113297000B publication Critical patent/CN113297000B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1076Parity data used in redundant arrays of independent storages, e.g. in RAID systems
    • 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

Abstract

The application discloses RAID encoding circuit and encoding method, the circuit includes: the first parameter module is used for acquiring a first check parameter corresponding to a current target data strip of data to be coded in the current RAID mode, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on the Van der Mongolian RS coding relation, and the first verification parameter in the RAID5 mode is 1; and the first coding module is used for carrying out coding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until the final first check code corresponding to the data to be coded is determined based on the last target data stripe of the data to be coded. RAID6 can be realized quickly and in a lower area on the premise of realizing RAID 5.

Description

RAID (redundant array of independent disks) coding circuit and coding method
Technical Field
The present application relates to the field of storage technologies, and in particular, to a RAID encoding circuit and an encoding method.
Background
With the rapid development of communication technology and network technology, the digital information is exponentially and explosively increased, and the data storage technology is also greatly challenged. The reliability of data in memory systems and the power consumption of memory systems are of increasing concern. Now facing such a huge data scale, the reliability of data in a storage system is inversely proportional to the number of components contained in the storage system, i.e. the greater the number of components of the storage system, the lower the reliability of data in the storage system. In a large-scale storage system, data reliability degradation caused by disk failure is a serious problem, and researches on related fault-tolerant technologies are carried out. RAID (Redundant Arrays of Independent Redundant Arrays, redundant array of Independent Disks) technology is developed, and by using RAID storage technology, storage capacity can be greatly improved, the request processing capability of system input and output is improved, and the reliability of data is improved by a distributed storage technology of data, a parallel access means, and an information redundancy technology. Currently, RAID can be divided into different levels: RAID 0,1,5,6,10, and generally implementing RAID6 in practical circuits needs to be carried out on the premise of implementing RAID5, so how to implement RAID6 quickly and in a lower area on the premise of implementing RAID5 is a problem to be solved.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a RAID encoding circuit and an encoding method, which can implement RAID6 quickly and with a relatively low area on the premise of implementing RAID 5. The specific scheme is as follows:
in a first aspect, the present application discloses a RAID encoding circuit, comprising:
the system comprises a first parameter module, a second parameter module and a third parameter module, wherein the first parameter module is used for acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Menu RS coding relation, and the first verification parameter in the RAID5 mode is 1;
the first encoding module is used for performing encoding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until a final first check code corresponding to the data to be encoded is determined based on the last target data strip of the data to be encoded.
Optionally, the method further includes:
the data stripe dividing module is used for dividing the data to be coded into a preset number of data stripes;
the Galois field conversion module is used for converting each data stripe into Galois field data to obtain the target data stripe corresponding to each data stripe;
correspondingly, the first encoding module is configured to perform an exclusive or operation on the current first check code read from the first check code storage location and the data after the current first parameter operation to obtain a new first check code, and store the new first check code to the first check code storage location.
Optionally, the method further includes:
the second parameter module is used for acquiring a second check parameter corresponding to a current target data stripe of data to be coded in the RAID6 mode, and determining data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolian RS coding relation;
and the second coding module is used for carrying out coding operation on the current second check code read from the second check code storage position and the data after the current second parameter operation to obtain a new second check code and storing the new second check code to the second check code storage position.
Optionally, the first parameter module is further configured to obtain a second check parameter corresponding to a current target data stripe of data to be encoded under RAID6, and determine data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolia RS coding relation;
correspondingly, the first encoding module is further configured to perform encoding operation on the current second parity read from the second parity storage location and the data after the current second parameter operation to obtain a new second parity, and store the new second parity to the second parity storage location.
Optionally, the method further includes:
the data cache module is used for storing the target data strip of the data to be coded into a cache;
and the data reading module is used for reading the target data stripe from the cache and simultaneously respectively transmitting the target data stripe to a data storage position corresponding to the target data stripe and the first parameter module.
Optionally, the first parameter module is specifically configured to:
based on the formula
Figure BDA0003075465440000031
Determining a first check parameter corresponding to a current target data stripe of data to be coded in an RAID6 mode;
wherein alpha is p A code coefficient value, alpha, corresponding to the first check code determined based on the Van der Monte RS coding relation q A code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS code relation x An encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure BDA0003075465440000032
representing an exclusive or operation.
Optionally, the second parameter module is specifically configured to:
based on the formula
Figure BDA0003075465440000033
Determining a second check parameter corresponding to a current target data stripe of data to be coded in the RAID6 mode;
wherein alpha is p A code coefficient value, alpha, corresponding to the first check code determined based on the Van der Monte RS coding relation q A code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS coding relation x For the encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure BDA0003075465440000034
representing an exclusive or operation.
In a second aspect, the present application discloses a RAID encoding method, including:
acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Mongolian RS coding relation, and the first verification parameter in the RAID5 mode is 1;
and performing encoding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until a final first check code corresponding to the data to be encoded is determined based on the last target data strip of the data to be encoded.
Optionally, the method further includes:
dividing the data to be coded into a preset number of data stripes;
and converting each data stripe into Galois field data to obtain a target data stripe corresponding to each data stripe.
Optionally, the performing encoding operation on the current first check code read from the first check code storage location and the data after the current first parameter operation to obtain a new first check code includes:
and performing XOR operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code.
It can be seen that the present application discloses a RAID encoding circuit, including: the first parameter module is used for acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Menu RS coding relation, and the first verification parameter in the RAID5 mode is 1; and the first coding module is used for carrying out coding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until the final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded. Therefore, the code conversion from RAID5 to RAID6 can be realized only by the first parameter module, and RAID6 can be realized quickly and in a lower area on the premise of realizing RAID 5.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic diagram of a RAID encoding circuit according to the present disclosure;
FIG. 2 is a schematic diagram of a specific RAID encoding circuit encoding disclosed herein;
FIG. 3 is a schematic diagram of a RAID5 encoding circuit encoding according to the present disclosure;
FIG. 4 is a schematic diagram of a RAID6 encoding circuit encoding disclosed herein;
fig. 5 is a flowchart of a RAID encoding method disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, an embodiment of the present application discloses a RAID encoding circuit, including:
the first parameter module 11 is configured to obtain a first check parameter corresponding to a current target data stripe of data to be encoded in a current RAID mode, and determine data after first parameter operation by using the first check parameter and the current target data stripe; the first check parameter in the RAID6 mode is an encoding parameter corresponding to the first check code determined based on the vandermonde RS encoding relationship, and the first check parameter in the RAID5 mode is 1.
In a specific implementation manner, the first check parameter and the current target data strip are used for performing multiplication operation to obtain data after the first parameter operation.
The first encoding module 12 is configured to perform encoding operation on the current first check code read from the first check code storage location and the data after the current first parameter operation to obtain a new first check code, and store the new first check code to the first check code storage location until a final first check code corresponding to the data to be encoded is determined based on the last target data strip of the data to be encoded.
In a specific embodiment, the circuit further comprises:
and the data stripe segmentation module is used for segmenting the data to be encoded into a preset number of data stripes.
The preset number is the number of data strips of the RAID.
And the Galois field conversion module is used for converting each data stripe into Galois field data to obtain the target data stripe corresponding to each data stripe.
Correspondingly, the first encoding module is configured to perform an exclusive or operation on the current first check code read from the first check code storage location and the data after the current first parameter operation to obtain a new first check code, and store the new first check code to the first check code storage location.
That is, the embodiment of the present application may perform coding operation based on the data stripes of the galois field, so that the coding efficiency may be improved.
It should be noted that, RAID5 only has one parity stripe (i.e., a first parity code), and when encoding is performed, if data to be encoded is divided into n data stripes, a relationship between the data stripes and the first parity code is represented as:
Figure BDA0003075465440000051
wherein d is 0 ,d 1 ...d n Representing a data strip, p a first check code,
Figure BDA0003075465440000052
representing an exclusive or operation.
When RAID6 is realized, two check stripes, namely a first check code and a second check code, need to be supported simultaneously. In the present application, an RS (Reed-Solomon Code, reed Solomon Code) Code is used to encode a first check Code and a second check Code, the RS Code has multiple implementation manners such as vandermonde and cauchy, and in consideration of characteristics of RAID6 and simplicity requirements of operation, the implementation manner of vandermonde is used in the embodiment of the present application, and if data to be encoded is divided into n data stripes, a relationship among the data stripes, the first check Code, and the second check Code is expressed as follows:
Figure BDA0003075465440000061
wherein d is 0 ,d 1 ...d n Representing a data stripe, p representing a first check code, q representing a second check code,
Figure BDA0003075465440000062
indicating an exclusive or operation and alpha indicating a vandermonde parameter.
For convenience of operation and storage, the present embodiment encodes and stores the finite field by galois field processing. In addition, since the transmission of data in a circuit is generally based on byte, the galois field used in the embodiment of the present application is a finite field 0X11D of 8 bits, that is:
P(X)=x 8 +x 4 +x 3 +x 2 +1;
under the Galois field of finite field 0X11D, the definition for the data can be expressed as shown in Table one:
watch 1
Generating an element Polynomial representation Binary representation Numerical representation Derivation procedure
0 0 0000 0000 0
x^0 x^0 0000 0001 1
x^1 x^1 0000 0010 2
x^2 x^2 0000 0100 4
x^3 x^3 0000 1000 8
x^4 x^4 0001 0000 16
x^5 x^5 0010 0000 32
x^6 x^6 0100 0000 64
x^7 x^7 1000 0000 128
x^8 x^4+x^3+x^2+1 0001 1101 29 x^7*x=x^8mod P(x)
x^9 x^5+x^4+x^3+x 0011 1010 58 x^8*x=x^5+x^4+x^3+x
x^10 x^6+x^5+x^4+x^2 0111 0100 116 x^9*x=x^6+x^5+x^4+x^2
x^255 1 0000 0001 1
For example, when the exponent of the generated element is 10, it is represented as binary 01110100 by the above galois field primitive polynomial P (X) conversion. By this conversion, all data is converted into 8-bit binary numbers, and four arithmetic operations based on the 8-bit binary numbers are performed. Based on the situation of the galois field, it is known that both traditional RAID5 and RAID6 can implement ordinary data four-element operation through the galois field, but the coding of RAID6 based on the RS code based on the vandermonde proposed in the application needs to consider a corresponding exponential relationship, and when the four-element operation, especially multiplication, is involved, it needs to consider whether the data still conforms to the vandermonde relationship after overflowing. To verify the applicability, the following calculation derivation is performed:
suppose there are two data stripes d 0 And d 1 Multiplication operation is needed, expansion is carried out according to 8-bit Galois field, and conversion is carried out by using RS code based on Van der Monte, and then:
Figure BDA0003075465440000071
since it is the multiplication that is most prone to overflow problems, do d 0 And d 1 The multiplication of (a) may result in:
d 0 *d 1 =A 7 B 7 α 14
+(A 7 B 6 +A 6 B 713
+...+
+A 0 B 0 α 0
a of the above formula 7 B 7 ,(A 7 B 6 +A 6 B 7 ) Up to A 0 B 0 By parameter P 14 ,P 13 ,...,P 0 Then the above formula can be expressed as:
d 0 *d 1 =P 14 α 14 +P 13 α 13 +...+P 2 α 2 +P 1 α 1 +P 0 α 0
based on table-query overflow term alpha 14 ,α 13 ,...,α 8 Of 8-bit binary representation, e.g. alpha 8 =29 expression as alpha 8 =α 4320 Then, the above formula is substituted again, and then:
d 0 *d 1 =C 7 α 7 +C 6 α 6 +...+C 2 α 2 +C 1 α 1 +C 0 α 0
wherein, C 0 ,C 1 ...C 6 ,C 7 After the splitting operation is carried out through the first lookup table, P (X) = X is utilized 8 +x 4 +x 3 +x 2 +1 for α 7 ,α 6 ,...,α 0 New parameters of (2). It can be known that the perfect adaptation of the vandermonde-based RS code requirement can complete four operations of RAID6, that is, the vandermonde-based RS code proposed in the present application can be used for encoding and decoding of RAID6, thereby implementing the operations of RAID 6.
In a specific embodiment, the RAID encoding circuit further comprises:
the second parameter module is used for acquiring a second check parameter corresponding to a current target data stripe of data to be coded in the RAID6 mode, and determining data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolian RS coding relation;
and the second coding module is used for carrying out coding operation on the current second check code read from the second check code storage position and the data after the current second parameter operation to obtain a new second check code and storing the new second check code to the second check code storage position.
In another specific implementation, the first parameter module is further configured to obtain a second check parameter corresponding to a current target data stripe of data to be encoded under RAID6, and determine data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolian RS coding relation;
correspondingly, the first encoding module is further configured to perform encoding operation on the current second parity read from the second parity storage location and the data after the current second parameter operation to obtain a new second parity, and store the new second parity to the second parity storage location.
That is, in a specific embodiment, the first check code and the second check code may be determined serially by using the same parameter module and the encoding module, so as to reduce the circuit area. In order to increase the encoding speed, the first check code and the second check code can be respectively determined by different parameter modules and encoding modules in parallel.
In another specific embodiment, the RAID encoding circuit further includes:
and the data caching module is used for storing the target data strip of the data to be coded into a cache.
In a specific embodiment, the buffering mode may be buffer or FIFO (First Input First Output, first in First out).
And the data reading module is used for reading the target data stripe from the cache and simultaneously respectively transmitting the target data stripe to a data storage position corresponding to the target data stripe and the first parameter module.
For example, referring to fig. 2, fig. 2 is a schematic diagram illustrating an encoding of a specific RAID encoding circuit disclosed in the present application.
1. The method comprises the steps that data to be coded enters an RAID coding circuit, the RAID coding circuit firstly divides the data to be coded into a preset number of data strips, then each data strip is converted into Galois field data, a target data strip corresponding to each data strip is obtained and is temporarily stored in a buffer or FIFO mode, when a data reading module is idle, the data reading module respectively and simultaneously sends the target data strip to a data storage position corresponding to a current data strip and a first parameter module and a second parameter module, the first parameter module obtains a first check parameter corresponding to the current target data strip of the data to be coded in a current RAID mode, multiplication is carried out by utilizing the first check parameter and the current target data strip, data after first parameter operation is obtained, the data after first parameter operation is transmitted to the first coding module, and the second parameter module obtains the current target data of the data to be coded in the current RAID modeAnd performing multiplication operation on the second check parameter corresponding to the standard data strip by using the second check parameter and the current target data strip to obtain data after second parameter operation, and transmitting the data after second parameter operation to the second coding module. For example, the current target data stripe is d 0 Transmitting data to d 0 A corresponding storage position, a first parameter module and a second parameter module. At the same time, the stored data is read from the storage positions of the first check code p and the second check code q, namely the current first check code and the current second check code are transmitted to the first coding module and the second coding module.
2. And after the data after the first parameter operation and the data after the second parameter operation are respectively subjected to exclusive OR operation with the data stored in the current first check code read from the first check code storage position and the current second check code read from the second check code storage position in the first coding module and the second coding module, generating a new first check code and a new second check code, and then updating the data in the first check code storage position and the second check code storage position.
And the initial values of the first check code storage position and the second check code storage position are both 0, so that the check code determined by using the last target data strip of the data to be coded is the final check code corresponding to the data to be coded, and the coding of the data to be coded is completed.
It should be noted that the first check parameter in the RAID5 mode is 1, and the encoding can be completed by the first parameter module and the first encoding module, so as to obtain the corresponding first check code.
In a specific embodiment, the first parameter module is specifically configured to:
based on the formula
Figure BDA0003075465440000091
Determining a first check parameter corresponding to a current target data stripe of data to be coded in an RAID6 mode;
wherein alpha is p A code coefficient value, alpha, corresponding to the first check code determined based on the Van der Monte RS coding relation q A code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS coding relation x For the encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure BDA0003075465440000094
representing an exclusive or operation.
The second parameter module is specifically configured to:
based on the formula
Figure BDA0003075465440000092
Determining a second check parameter corresponding to a current target data stripe of data to be coded in the RAID6 mode;
wherein alpha is p An encoding coefficient value, alpha, corresponding to the first check code determined based on the Van der Monte RS encoding relation q A code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS code relation x An encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure BDA0003075465440000095
representing an exclusive or operation.
The following describes an implementation process of the RAID encoding circuit provided in the present application:
note that RAID5 is implemented as:
Figure BDA0003075465440000093
when RAID5 encoding needs to be implemented, the operation mode is as shown in fig. 3, and fig. 3 is a schematic diagram of encoding of a RAID5 encoding circuit disclosed in the embodiment of the present application. 1. The data to be coded enters an RAID5 coding circuit, the RAID coding circuit firstly divides the data to be coded into a preset number of data strips, and temporarily stores the data strips to the data storage positions and the coding modules corresponding to the current data strips when waiting for the data reading modules to be idle in a buffer or FIFO mode and the like. At the same time, the number stored now is read from the position where the check code p is storedAccording to the data, the coding module is entered. 2. And after the data strip and the current check code read from the position for storing the check code p are subjected to XOR operation by the encoding module, the generated new check code is written into the position for storing the check code p, and the data at the position is updated.
The multiplexing of hardware circuits is realized, the minimum area is reached, and the maximum multiplexing optimization is realized, so that the same method needs to be set for encoding when the RAID6 is adopted.
The RAID6 relationship may be expressed as:
Figure BDA0003075465440000101
the formula (1) may be simply expanded to form the second parity stripe q through the expression of RAID 5. Therefore, when the coding of formula (1) of RAID6 is realized, the RAID5 module is applied. Two encoding modules can be used for parallel operation, or just one encoding module can be used as in RAID5, and the values of p and q are calculated in two beats and then updated respectively. Since the formula (1) of RS RAID6 encoding is very similar to RAID5, q can be considered to be updated in the same manner as p, so that calculation and update of p and q can be achieved in parallel or in series by using the same circuit. For example, referring to fig. 4, fig. 4 is a schematic encoding diagram of a RAID6 encoding circuit disclosed in an embodiment of the present application, for implementing encoding of equation (1) for implementing RAID 6. 1. The data to be coded enters an RAID6 coding circuit, the RAID6 coding circuit firstly divides the data to be coded into a preset number of data strips, and temporarily stores the data strips to be sent to a data storage position corresponding to the current data strip and two different coding modules respectively and simultaneously by the data reading module when waiting for the data reading module to be idle in a buffer or FIFO mode and the like. At the same time, the data stored at present are read from the positions for storing the check codes p and q and are respectively sent into the two coding modules. 2. And after the data strip and the current check code p read from the position for storing the check code p are subjected to XOR operation in the corresponding coding module, the generated new check code is written into the position for storing the check code p, and the data at the position is updated. And after the data strip and the current check code q read from the position for storing the check code q are subjected to XOR operation in the corresponding coding module, the generated new check code is written into the position for storing the check code q, and the data at the position is updated.
Formula (2) of RS RAID6 is greatly different from RAID5, and different parameters and corresponding multiplications are added due to the xor operation compared with RAID 5. In order to set the same way to perform coding and implement circuit multiplexing, a parameter module is added in the embodiment, and the parameter module multiplies the data stripe by a parameter before performing exclusive-or operation, and the parameter can simultaneously satisfy the formulas (1) and (2) of RAID 6. So that formula (2) can complete the calculation update of p and q through additional multiplication operation and exclusive or operation based on the updated data stripe.
Let any stored data be d x The corresponding check codes are p and q. The updated storage data is d x ', their corresponding check codes are p ' and q '. And x is the number corresponding to the data stripe.
As can be seen from the encoding relationship of formula (1) in RAID6, the following relationship is satisfied:
Figure BDA0003075465440000111
let d x -d x ' = Δ, then the updatable formula is:
Figure BDA0003075465440000112
let the parameters of RS RAID6 corresponding to p and q be alpha respectively pq Then multiply the above formula by alpha respectively pq The following relationships can be obtained:
Figure BDA0003075465440000113
Figure BDA0003075465440000114
and, based on alpha pq The corresponding RS RAID6 encoding relationship may be found:
Figure BDA0003075465440000115
(5) In the formula alpha x Refers to the coding coefficient corresponding to the stored data Δ.
Taking q' as an example, the following equations (3) and (5) are added, where the addition refers to the addition in the galois field, and the xor operation is performed:
Figure BDA0003075465440000116
the same principle (3) and (4) are added to obtain the relation formula of p'.
As defined above, in the above equation, p and q are check codes originally stored, and Δ is an increment of corresponding data to be stored, which may represent a change in data or a new data. Alpha (alpha) ("alpha") pq And alpha x Expressed as described above are the corresponding encoding coefficients, α in equation (2) of RAID6 pq Are each alpha n+1n+2 ,α x Coefficient values, e.g. alpha, for corresponding stripe data 0 All the parameters are definite parameters irrelevant to specific values of data and can be directly operated.
In a specific embodiment, the data stripes of the data to be encoded can be regarded as Δ, α x And the coding coefficient value corresponding to the current target data strip determined based on the Van der Monte RS coding relation.
Due to the fact that
Figure BDA0003075465440000121
And
Figure BDA0003075465440000122
to determine the parameters, through the above operation conversion, it can be known that the data update of p and q of RS RAID6 can be realized by adding the parameter calculation and then using the circuit in fig. 4. Adding parameter module to obtainSuch as the circuit of fig. 2.
It can be seen that the RAID encoding circuit disclosed in the embodiments of the present application includes: the first parameter module is used for acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Mongolian RS coding relation, and the first verification parameter in the RAID5 mode is 1; and the first coding module is used for carrying out coding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until the final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded. Therefore, the code conversion from RAID5 to RAID6 can be realized only by the first parameter module, and RAID6 can be realized quickly and in a lower area on the premise of realizing RAID 5.
Referring to fig. 5, an embodiment of the present application discloses a RAID encoding method, including:
step S11: acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Menu RS coding relation, and the first verification parameter in the RAID5 mode is 1;
step S12: and carrying out coding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until the final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded.
In a specific embodiment, the data to be encoded may be divided into a preset number of data stripes; and converting each data stripe into Galois field data to obtain a target data stripe corresponding to each data stripe.
Correspondingly, the encoding operation is performed on the current first check code read from the first check code storage location and the data after the current first parameter operation to obtain a new first check code, including:
and performing XOR operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code.
In a particular embodiment, it is possible to:
acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode through a first parameter module, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Mongolian RS coding relation, and the first verification parameter in the RAID5 mode is 1;
and performing coding operation on the current first check code read from the first check code storage position and the current data after the first parameter operation through a first coding module to obtain a new first check code, and storing the new first check code to the first check code storage position until a final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded.
Acquiring a second check parameter corresponding to a current target data stripe of data to be encoded in the RAID6 mode through a second parameter module, and determining data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolian RS coding relation;
and the second coding module is used for coding the current second check code read from the second check code storage position and the data after the current second parameter operation to obtain a new second check code, and storing the new second check code to the second check code storage position.
In another specific embodiment, the method may be
Acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode through a first parameter module, and determining data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Mongolian RS coding relation, and the first verification parameter in the RAID5 mode is 1;
and performing coding operation on the current first check code read from the first check code storage position and the current data after the first parameter operation through a first coding module to obtain a new first check code, and storing the new first check code to the first check code storage position until a final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded.
Acquiring a second check parameter corresponding to a current target data stripe of data to be encoded under RAID6 through a first parameter module, and determining data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolian RS coding relation;
correspondingly, the first coding module is used for coding the current second check code read from the second check code storage position and the data after the current second parameter operation to obtain a new second check code, and the new second check code is stored to the second check code storage position.
In a specific embodiment, the target data stripe of the data to be encoded may be stored in a cache; and reading the target data stripe from the cache, and simultaneously respectively transmitting the target data stripe to a data storage position corresponding to the target data stripe and the first parameter module.
And, in particularMay be based on a formula
Figure BDA0003075465440000141
Determining a first check parameter corresponding to a current target data stripe of data to be coded in an RAID6 mode;
wherein alpha is p A code coefficient value, alpha, corresponding to the first check code determined based on the Van der Monte RS coding relation q A code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS code relation x For the encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure BDA0003075465440000143
representing an exclusive or operation.
Based on the formula
Figure BDA0003075465440000142
Determining a second check parameter corresponding to a current target data stripe of data to be coded in the RAID6 mode;
wherein alpha is p A code coefficient value, alpha, corresponding to the first check code determined based on the Van der Monte RS coding relation q A code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS coding relation x An encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure BDA0003075465440000144
representing an exclusive or operation.
Therefore, the method and the device for determining the data to be encoded in the RAID mode obtain a first check parameter corresponding to a current target data strip of the data to be encoded in the current RAID mode, and determine data after first parameter operation by using the first check parameter and the current target data strip; the first verification parameter in the RAID6 mode is a coding parameter corresponding to a first verification code determined based on a Van der Menu RS coding relation, and the first verification parameter in the RAID5 mode is 1; and carrying out coding operation on the current first check code read from the first check code storage position and the data after the current first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until the final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded. Therefore, the encoding conversion from RAID5 to RAID6 can be realized only by replacing the first check code parameter, and RAID6 can be realized quickly and in a lower area on the premise of realizing RAID 5.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. For the method disclosed by the embodiment, the method corresponds to the circuit disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the circuit part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The RAID encoding circuit and the encoding method provided by the present application are introduced in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, the specific implementation manner and the application scope may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (8)

1. A RAID encoding circuit comprising:
a first parameter module for obtaining the current data to be coded in the current RAID modeA first check parameter corresponding to the target data strip is used for performing multiplication operation with the current target data strip by using the first check parameter, and data after the first parameter operation is determined; wherein the first check parameter in RAID6 mode is based on formula
Figure FDA0003829813840000011
Determined of alpha p An encoding coefficient value, alpha, corresponding to a first check code determined based on the Van der Monte RS encoding relation q A code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS code relation x An encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure FDA0003829813840000012
representing exclusive-or operation, wherein a first check parameter in the RAID5 mode is 1;
and the first coding module is used for performing exclusive-or operation on the current first check code read from the first check code storage position and the current data after the first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until the final first check code corresponding to the data to be coded is determined based on the last target data strip of the data to be coded.
2. The RAID encoding circuit of claim 1, further comprising:
the data stripe dividing module is used for dividing the data to be coded into a preset number of data stripes;
and the Galois field conversion module is used for converting each data stripe into Galois field data to obtain the target data stripe corresponding to each data stripe.
3. The RAID encoding circuit of claim 1, further comprising:
the second parameter module is used for acquiring a second check parameter corresponding to a current target data stripe of data to be coded in the RAID6 mode, and determining data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolian RS coding relation;
and the second coding module is used for carrying out coding operation on the current second check code read from the second check code storage position and the data after the current second parameter operation to obtain a new second check code and storing the new second check code to the second check code storage position.
4. The RAID encoding circuit of claim 1,
the first parameter module is further configured to obtain a second check parameter corresponding to a current target data stripe of data to be encoded under RAID6, and determine data after second parameter operation by using the second check parameter and the current target data stripe; the second check parameter corresponding to RAID6 is a coding parameter corresponding to a second check code determined based on the Van der Mongolian RS coding relation;
correspondingly, the first encoding module is further configured to perform encoding operation on the current second parity read from the storage location of the second parity and the data after the current second parameter operation, so as to obtain a new second parity, and store the new second parity to the storage location of the second parity.
5. The RAID encoding circuit of claim 1, further comprising:
the data cache module is used for storing the target data strip of the data to be coded into a cache;
and the data reading module is used for reading the target data stripe from the cache and simultaneously respectively transmitting the target data stripe to a data storage position corresponding to the target data stripe and the first parameter module.
6. The RAID encoding circuit of claim 3, wherein the second parameter module is specifically configured to:
based on the formula
Figure FDA0003829813840000021
Determining a second check parameter corresponding to a current target data stripe of data to be coded in the RAID6 mode;
wherein alpha is p A code coefficient value, alpha, corresponding to the first check code determined based on the Van der Monte RS coding relation q A code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS coding relation x For the encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure FDA0003829813840000022
representing an exclusive or operation.
7. A RAID encoding method comprising:
acquiring a first check parameter corresponding to a current target data strip of data to be coded in a current RAID mode, and performing multiplication operation by using the first check parameter and the current target data strip to determine data after first parameter operation; wherein the first check parameter in RAID6 mode is based on formula
Figure FDA0003829813840000023
Determined of alpha p A code coefficient value, alpha, corresponding to the first check code determined based on the Van der Monte RS coding relation q A code coefficient value, alpha, corresponding to the second check code determined based on the Van der Monte RS code relation x For the encoding coefficient value corresponding to the current target data strip determined based on the vandermonde RS encoding relationship,
Figure FDA0003829813840000024
representing exclusive-or operation, wherein a first check parameter in the RAID5 mode is 1;
and performing exclusive-or operation on the current first check code read from the first check code storage position and the current data after the first parameter operation to obtain a new first check code, and storing the new first check code to the first check code storage position until a final first check code corresponding to the data to be encoded is determined based on the last target data strip of the data to be encoded.
8. The RAID encoding method of claim 7, further comprising:
dividing the data to be coded into a preset number of data stripes;
and converting each data stripe into Galois field data to obtain a target data stripe corresponding to each data stripe.
CN202110551258.0A 2021-05-20 2021-05-20 RAID (redundant array of independent disks) coding circuit and coding method Active CN113297000B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110551258.0A CN113297000B (en) 2021-05-20 2021-05-20 RAID (redundant array of independent disks) coding circuit and coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110551258.0A CN113297000B (en) 2021-05-20 2021-05-20 RAID (redundant array of independent disks) coding circuit and coding method

Publications (2)

Publication Number Publication Date
CN113297000A CN113297000A (en) 2021-08-24
CN113297000B true CN113297000B (en) 2022-12-23

Family

ID=77323110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110551258.0A Active CN113297000B (en) 2021-05-20 2021-05-20 RAID (redundant array of independent disks) coding circuit and coding method

Country Status (1)

Country Link
CN (1) CN113297000B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113986147A (en) * 2021-12-24 2022-01-28 苏州浪潮智能科技有限公司 RAID6 hardware acceleration circuit structure and RAID6 hardware acceleration implementation method
CN114442950B (en) * 2022-01-21 2024-01-23 山东云海国创云计算装备产业创新中心有限公司 Data recovery method, system, device and computer readable storage medium
CN114416424B (en) * 2022-03-30 2022-06-17 苏州浪潮智能科技有限公司 RAID encoding and decoding method, device, equipment and readable storage medium
CN114415982B (en) * 2022-03-30 2022-06-07 苏州浪潮智能科技有限公司 Data storage method, device and equipment and readable storage medium
CN115167787B (en) * 2022-09-06 2023-01-24 苏州浪潮智能科技有限公司 Data unloading method, system, equipment and computer readable storage medium
CN116028260B (en) * 2023-01-09 2024-02-27 海光信息技术股份有限公司 Data processing method, processing device and storage system
CN116312726B (en) * 2023-05-16 2023-08-15 苏州浪潮智能科技有限公司 Data storage method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577274A (en) * 2012-07-31 2014-02-12 国际商业机器公司 Management method and device of memory array
CN106227463A (en) * 2016-07-11 2016-12-14 苏州科达科技股份有限公司 RAID model, reading and writing data and method for reconstructing thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848055A (en) * 2009-03-23 2010-09-29 华为技术有限公司 Method and device for correcting data
CN102023820B (en) * 2010-12-01 2012-08-22 北京同有飞骥科技股份有限公司 Method for constructing double-disk fault-tolerant vertical packet parallel access disk array
CN105335150B (en) * 2014-08-13 2019-03-19 苏宁易购集团股份有限公司 The quick decoding method and system of correcting and eleting codes data
CN107391046B (en) * 2017-08-02 2021-04-20 郑州云海信息技术有限公司 Data writing method and device of RAID system
US11132258B2 (en) * 2019-01-31 2021-09-28 EMC IP Holding Company, LLC In-place RAID conversion system and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577274A (en) * 2012-07-31 2014-02-12 国际商业机器公司 Management method and device of memory array
CN106227463A (en) * 2016-07-11 2016-12-14 苏州科达科技股份有限公司 RAID model, reading and writing data and method for reconstructing thereof

Also Published As

Publication number Publication date
CN113297000A (en) 2021-08-24

Similar Documents

Publication Publication Date Title
CN113297000B (en) RAID (redundant array of independent disks) coding circuit and coding method
CN113296999B (en) RAID6 coding method and coding circuit
CN113297001B (en) RAID (redundant array of independent disks) coding and decoding method and coding and decoding circuit
CN107086870B (en) Repair the MDS array code coding and coding/decoding method of more piece point failure
US20050204268A1 (en) Decoding and error correction for algebraic geometric codes
CN111858142A (en) Data processing method and device, electronic equipment and storage medium
CN111682874B (en) Data recovery method, system, equipment and readable storage medium
US20080177815A1 (en) Raid system and galois field product computation method
CN107239362B (en) Parallel CRC (Cyclic redundancy check) code calculation method and system
CN111240597A (en) Method, device, equipment and computer readable storage medium for storing data
CN113687975A (en) Data processing method, device, equipment and storage medium
CN114465627A (en) Data storage method, system, equipment and storage medium
CN110679090B (en) Reduced delay error correction decoding
CN108347250B (en) Fast coding method and apparatus suitable for small amount of redundant Reed-Solomon codes
CN112889221A (en) Offset value determination in check node processing units for message passing decoding of non-binary codes
US10164660B1 (en) Syndrome-based Reed-Solomon erasure decoding circuitry
CN107688506B (en) BCH decoding system with flow structure
CN114138543A (en) Data strip coding method, system, device and medium
CN115113816A (en) Erasure code data processing system, method, computer device and medium
CN112000509B (en) Erasure code encoding method, system and device based on vector instruction
CN114691414A (en) Check block generation method and data recovery method
EP4072023A1 (en) Decoding method, decoder, and decoding device
CN110175185B (en) Self-adaptive lossless compression method based on time sequence data distribution characteristics
KR101923116B1 (en) Apparatus for Encoding and Decoding in Distributed Storage System using Locally Repairable Codes and Method thereof
CN108352845A (en) Method for being encoded to storage data and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant