Disk array data encoding and decoding method, device, equipment, program product and medium
By pre-stored the set of coefficient values corresponding to position parameters and using the parity principle, the disk array data encoding and decoding process is simplified, the RAID performance problem caused by the large amount of calculation in the prior art is solved, and more efficient encoding and decoding performance is achieved.
Patent Information
- Application Number
- CN202510705334.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-05-29
AI Technical Summary
The existing disk array data encoding and decoding methods are computationally expensive, resulting in poor RAID performance.
By preserving the set of coefficient values corresponding to various combinations of position parameters, during the encoding and decoding process of the target strip, the expression of the data to be generated is determined based on the parity principle and known data, thereby directly obtaining the coefficient values of the target coefficients, simplifying the data generation process.
The determination process of data to be generated is simplified, and the encoding and decoding efficiency and RAID performance are improved.
Smart Images

Figure CN120223098A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of redundant arrays of independent disks, and in particular, to a method, device, equipment, program product and medium for encoding and decoding disk array data. Background Art
[0002] RAID (Redundant Arrays of Independent Disks) combines multiple independent disks into a whole to construct a disk group with huge capacity, and can implement data recovery for faulty disks through relevant disk array data encoding and decoding methods, thereby improving data reliability. However, there is a lack of a mature disk array data encoding and decoding method in the related art, and the current disk array data encoding and decoding methods have a large amount of calculation, resulting in poor RAID performance.
[0003] Therefore, how to provide a solution to the above technical problems is what those skilled in the art need to solve currently. Summary of the Invention
[0004] The purpose of the present invention is to provide a method, device, equipment, program product and medium for encoding and decoding disk array data, which can pre-store a set of coefficient values corresponding to the position parameters of various combinations. During the encoding and decoding process of the target stripe, after determining the expressions of each data to be generated according to each relational expression of the parity check principle of the target stripe and each known data in the target stripe, the set of coefficient values corresponding to the position parameters of each data to be generated pre-stored can be determined, and then directly determine the coefficient values of each target coefficient in the expression of the data to be generated from the set of coefficient values, thereby determining each data to be generated, which can simplify the process of determining the data to be generated, improve the encoding and decoding efficiency and RAID performance.
[0005] To solve the above technical problems, the present invention provides a method for encoding and decoding disk array data, including: Determine each data to be generated in the target stripe of the redundant array of independent disks storage system, where, when encoding the target stripe, the data to be generated includes the data of each parity block in the target stripe, and when decoding the target stripe, the data to be generated includes the data of each faulty block in the target stripe; According to each relational expression of the parity check principle of the target stripe and each known data in the target stripe, determine the expressions of each data to be generated, where any term in the relational expression is the product of the data body and its corresponding position parameter, and the expression of the data to be generated includes target coefficients composed of the position parameters of each data to be generated; Determine the set of coefficient values corresponding to the position parameters of each data to be generated, where each coefficient value in the set of coefficient values is determined by the corresponding position parameter; Determine the coefficient values of each target coefficient in the expression of the data to be generated from the set of coefficient values, and then determine each data to be generated.
[0006] On the other hand, the determination of the expressions of each data to be generated according to each relationship of the parity check principle of the target stripe and each known data in the target stripe includes: For any relationship in the parity check principle of the target stripe, convert the relationship into a first expression of the addition operation of the unknown terms with respect to the addition operation of the known terms, where any term in the relationship is the product of the data body and its corresponding position parameter, the unknown term is the term including the data to be generated in the relationship, and the known term is the term not including the data to be generated in the relationship; By jointly solving each first expression, obtain the expressions of each data to be generated, where the expression of the data to be generated includes the target coefficients composed of the position parameters of each data to be generated.
[0007] On the other hand, the obtaining of the expressions of each data to be generated by jointly solving each first expression includes: For any first expression, take the operation result of the addition operation of each known term in the first expression as an intermediate variable; By jointly solving each first expression, obtain the expressions of each data to be generated, where the expression of the data to be generated includes the target coefficients composed of the position parameters of each data to be generated, and also includes the intermediate variables corresponding to each first expression.
[0008] On the other hand, the redundant array of independent disks storage system includes a redundant array of independent disks storage system applying double parity check technology; The parity check principle of the target stripe includes: ; where, {d1,…,d k} are the data in the 1st to kth data blocks in the target stripe respectively, p is the data in the (k + 1)th block in the target stripe, q is the data in the (k + 2)th block in the target stripe, the 1st to kth blocks in the target stripe are all data blocks, the (k + 1)th and (k + 2)th blocks in the target stripe are both parity check blocks, {l1,…,l k ,l k+1 ,l k+2} are the position parameters corresponding to the 1st to (k + 2)th data respectively.
[0009] On the other hand, when encoding the target stripe, determining each piece of data to be generated in the target stripe of the redundant array of independent disks (RAID) storage system includes: Determining the data of two parity blocks in the target stripe of the RAID storage system as the data to be generated; The first expression of the addition operation of unknown terms with respect to the addition operation of known terms includes: ; For any one of the first expressions, taking the operation result of the addition operation of each known term in the first expression as an intermediate variable includes: Converting the first expression into the following form: ; ; The expression of the data to be generated includes: ; Wherein, both v1 and v2 are intermediate variables, and in the expression of the data to be generated, the coefficients of the intermediate variables are all target coefficients.
[0010] On the other hand, when decoding the target stripe, determining each piece of data to be generated in the target stripe of the RAID storage system includes: Determining the data of two failed blocks in the target stripe of the RAID storage system as the data to be generated; For any one of the first expressions, taking the operation result of the addition operation of each known term in the first expression as an intermediate variable includes: Converting the first expression into the following form: ; ; The expression of the data to be generated includes: ; Wherein, d x and d y are respectively the data of a failed block in the target stripe, x and y are the sequence numbers of the failed blocks, l x and l y are respectively the position parameters corresponding to the failed blocks, v1 and v2 are both intermediate variables, d k+1 is p, and d k+2 is q.
[0011] On the other hand, the pre-stored coefficient value set database includes a coefficient value set corresponding to any pair of position parameters in the target stripe; The coefficient value set corresponding to any pair of position parameters includes: ; wherein, l m and l n are respectively a pair of position parameters with sequence numbers m and n in the target stripe, , and are respectively three coefficient values in the coefficient value set corresponding to the position parameters l m and l n .
[0012] On the other hand, the pre-stored coefficient value set database is constructed in the form of a lookup table.
[0013] On the other hand, determining the data of two faulty blocks in the target stripe of the redundant array of independent disks (RAID) storage system as the data to be generated includes: Judging whether the number of faulty disks in the RAID storage system is one; If it is one, determining a non-faulty block in the target stripe as a faulty block and determining the data of two faulty blocks in the target stripe of the RAID storage system as the data to be generated; If it is not one, determining the data of two faulty blocks in the target stripe of the RAID storage system as the data to be generated.
[0014] On the other hand, the RAID data encoding and decoding method further includes: When there is an updated data block in the target stripe, determining the pre-update data and post-update data of the updated data block, and determining the current check data of the check block in the target stripe, wherein the current check data is: the current check data; Based on the pre-update data, post-update data of the updated data block, and the current check data of the check block in the target stripe, through the parity check principle of the target stripe, determining the expression of the updated target check data of the target stripe, wherein the expression of the target check data includes the target coefficients composed of the position parameters of the current check data; Determining the pre-stored coefficient value set corresponding to the position parameters of each current check data; Determining the coefficient values of each target coefficient in the expression of the target check data from the determined coefficient value set, and further determining each updated target check data of the target stripe.
[0015] On the other hand, the RAID storage system includes a RAID storage system applying double check technology; The parity check principle of the target stripe includes: ; wherein, {d1,…,d k} are the data in the 1st to kth data blocks in the target stripe, p is the data in the (k + 1)th block in the target stripe, q is the data in the (k + 2)th block in the target stripe. The 1st to kth blocks in the target stripe are all data blocks, and the (k + 1)th and (k + 2)th blocks in the target stripe are both parity blocks, {l1,…,l k ,l k+1 ,l k+2} are the position parameters corresponding to the 1st to (k + 2)th data respectively; Based on the data before update, the data after update of the data block to be updated, and the current parity data of the parity blocks of the target stripe, through the parity check principle of the target stripe, the expression of the target parity data after update of the target stripe includes: Based on the data before update, the data after update of the data block to be updated, and the current parity data of the parity blocks of the target stripe, two update intermediate variables are determined; The two update intermediate variables include: ; ; Among them, v g1 and v g2 are the two update intermediate variables, d t is the data before update, is the data after update, p and q are the current parity data of the two parity blocks of the target stripe, l t is the position parameter with serial number t in the target stripe, l k+1 is the position parameter with serial number k + 1 in the target stripe, l k+2 is the position parameter with serial number k + 2 in the target stripe; Through the parity check principle of the updated target stripe and the update intermediate variables, the expression of the target parity data after update of the target stripe is determined; The parity check principle of the updated target stripe includes: ; Among them, is the target parity data after update at position k + 1 in the target stripe, is the target parity data after update at position k + 2 in the target stripe; The expression of the target parity data includes: ; , and are three coefficient values in the coefficient value set corresponding to the position parameters l k+1 and l k+2 in the target stripe respectively.
[0016] To solve the above technical problems, the present invention further provides a disk array data encoding and decoding device, including: A first determination module, configured to determine each data to be generated in a target stripe of a redundant array of independent disks (RAID) storage system, where, when encoding the target stripe, the data to be generated includes the data of each parity block in the target stripe, and when decoding the target stripe, the data to be generated includes the data of each failed block in the target stripe; A second determination module, configured to determine an expression of each data to be generated according to each relational expression of the parity check principle of the target stripe and each known data in the target stripe, where any item in the relational expression is a product of a data body and its corresponding position parameter, and the expression of the data to be generated includes a target coefficient composed of the position parameters of each data to be generated; A third determination module, configured to determine a set of coefficient values pre-stored corresponding to the position parameters of each data to be generated, where each coefficient value in the set of coefficient values is determined by the corresponding position parameter; A fourth determination module, configured to determine the coefficient values of each target coefficient in the expression of the data to be generated from the set of coefficient values, and further determine each data to be generated.
[0017] To solve the above technical problems, the present invention further provides a disk array data encoding and decoding device, including: A memory, configured to store a computer program; A processor, configured to implement the steps of the above disk array data encoding and decoding method when executing the computer program.
[0018] To solve the above technical problems, the present invention further provides a computer program product, including a computer program / instructions, where when the computer program / instructions are executed by a processor, the steps of the above disk array data encoding and decoding method are implemented.
[0019] To solve the above technical problems, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above disk array data encoding and decoding method are implemented.
[0020] Beneficial effects: The present invention provides a method for encoding and decoding disk array data. Considering that in both the encoding and decoding processes of the target stripe, the calculation process for the data to be generated includes "target coefficients composed of respective position parameters corresponding to the data to be generated", thus in the present invention, a set of coefficient values corresponding to various combinations of position parameters can be pre-stored. During the encoding and decoding processes of the target stripe, after determining the expressions of each data to be generated based on each relational expression according to the parity check principle of the target stripe and each known data in the target stripe, the set of coefficient values corresponding to the position parameters of each data to be generated pre-stored can be determined. Then, the coefficient values of each target coefficient in the expression of the data to be generated can be directly determined from the set of coefficient values, and further each data to be generated can be determined, which can simplify the process of determining the data to be generated and improve the encoding and decoding efficiency and RAID performance.
[0021] The present invention also provides a disk array data encoding and decoding device, equipment, computer program product, and computer-readable storage medium, which have the same beneficial effects as the above disk array data encoding and decoding method. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required to be used in the related art and embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0023] Figure 1 It is a schematic flowchart of a method for encoding and decoding disk array data provided by the present invention; Figure 2 It is a schematic flowchart of another method for encoding and decoding disk array data provided by the present invention; Figure 3 It is a schematic structural diagram of a disk array data encoding and decoding device provided by the present invention; Figure 4 It is a schematic structural diagram of a disk array data encoding and decoding equipment provided by the present invention; Figure 5 It is a schematic structural diagram of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0024] The core of the present invention is to provide a method, device, equipment, program product and medium for encoding and decoding disk array data. A set of coefficient values corresponding to position parameters of various combinations can be pre-stored. During the encoding and decoding process of a target stripe, after determining the expressions of each data to be generated based on each relational expression according to the parity check principle of the target stripe and each known data in the target stripe, a set of coefficient values corresponding to the position parameters of each data to be generated that are pre-stored can be determined. Then, the coefficient values of each target coefficient in the expression of the data to be generated can be directly determined from the set of coefficient values, and further each data to be generated can be determined, which can simplify the process of determining the data to be generated and improve the encoding and decoding efficiency as well as the RAID performance.
[0025] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0026] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a method for encoding and decoding disk array data provided by the present invention. The method for encoding and decoding disk array data includes: S101: Determine each data to be generated in the target stripe of the redundant array of independent disks (RAID) storage system. Among them, when encoding the target stripe, the data to be generated includes the data of each parity block in the target stripe, and when decoding the target stripe, the data to be generated includes the data of each failed block in the target stripe.
[0027] Specifically, considering the technical problems in the above background technology, and also considering that for both the encoding and decoding processes of the target stripe, the calculation process of the data to be generated includes "target coefficients composed of each position parameter corresponding to the data to be generated". If the target coefficient is directly calculated in each encoding and decoding process, it will consume a lot of computing resources and time. Since the target coefficient exists in each encoding and decoding process, in the embodiments of the present invention, the numerical values of the target coefficients corresponding to "each different combination of the data to be generated" can be considered to be preset in advance, and then the preset coefficient values can be directly used in the encoding and decoding process, which can save a lot of computing amount. And the premise of the encoding and decoding process is the existence of the data to be generated "in the encoding and decoding process". Therefore, this step can determine each data to be generated in the target stripe of the RAID storage system and use it as the data basis for the subsequent steps.
[0028] S102: According to various relational expressions of the parity check principle of the target stripe and various known data in the target stripe, expressions of various data to be generated are determined, wherein any item in the relational expressions is the product of the data body and its corresponding position parameter, and the expression of the data to be generated includes a target coefficient composed of the position parameters of various data to be generated.
[0029] Specifically, the parity check principle of RAID involves several relational expressions, and the number of relational expressions depends on how many verification technologies are applied by RAID. For example, the parity check principle using triple verification technology involves three relational expressions, and the parity check principle of RAID 6 using double verification technology involves two relational expressions. Solving the data to be generated can be understood as a process of jointly solving the various relational expressions of the parity check principle, and since any term in the relational expression is the product of the data body and its corresponding positional parameter, that is, the term containing the data to be generated also has the corresponding "known positional parameter", then the expression of the data to be generated determined will include the target coefficient composed of the positional parameters of each data to be generated. Although the positional parameters of each data to be generated are known, the calculation of the target coefficient needs to consume more computing resources and time. In this step, the expression of each data to be generated can be determined according to the various relational expressions of the parity check principle of the target stripe and each known data in the target stripe, and the expression of the data to be generated includes the target coefficient composed of the positional parameters of each data to be generated.
[0030] S103: Determine a pre-stored coefficient value set corresponding to each position parameter of the data to be generated, wherein each coefficient value in the coefficient value set is determined by each corresponding position parameter.
[0031] Specifically, in the embodiment of the present invention, a set of coefficient values of target coefficients corresponding to "each theoretically possible combination of data to be generated" is pre-stored, that is, for any theoretically possible combination of data to be generated, the coefficient values of each target coefficient corresponding to the combination are calculated in advance, and the coefficient value set of these coefficient values is stored for easy retrieval during the encoding and decoding process. Therefore, in this step, the pre-stored set of coefficient values corresponding to the position parameters of each data to be generated can be determined, and used as the data basis for subsequent steps.
[0032] S104: Determine the coefficient value of each target coefficient in the expression of the data to be generated from the coefficient value set, and then determine each data to be generated.
[0033] Specifically, in the process of solving the expressions of the data to be generated, since the coefficient value set corresponding to the position parameters of each data to be generated has the coefficient value of the target coefficient, the coefficient values of each target coefficient in the expression of the data to be generated can be directly determined from the coefficient value set, and then each data to be generated can be determined, eliminating the calculation process for the target coefficient, which is beneficial to reducing the calculation amount and thus improving the RAID performance.
[0034] The present invention provides a method for encoding and decoding disk array data. Considering that for both the encoding and decoding processes of the target stripe, the calculation process for the data to be generated includes "the target coefficient composed of each position parameter corresponding to the data to be generated", the coefficient value set corresponding to various combinations of position parameters can be pre-stored in the present invention. During the encoding and decoding process of the target stripe, after determining the expressions of each data to be generated according to each relational expression of the parity check principle of the target stripe and each known data in the target stripe, the coefficient value set corresponding to the position parameters of each data to be generated that is pre-stored can be determined, and then the coefficient values of each target coefficient in the expression of the data to be generated can be directly determined from the coefficient value set, and then each data to be generated can be determined, which can simplify the process of determining the data to be generated and improve the encoding and decoding efficiency and RAID performance.
[0035] Based on the above embodiments: As an optional embodiment, determining the expressions of each data to be generated according to each relational expression of the parity check principle of the target stripe and each known data in the target stripe includes: S201: For any relational expression in the parity check principle of the target stripe, convert the relational expression into a first expression of the addition operation of the unknown terms with respect to the addition operation of the known terms, where any term in the relational expression is the product of the data body and its corresponding position parameter, the unknown terms are the terms containing the data to be generated in the relational expression, and the known terms are the terms not containing the data to be generated in the relational expression; By jointly solving each first expression, the expressions of each data to be generated are obtained, where the expression of the data to be generated includes the target coefficient composed of the position parameters of each data to be generated.
[0036] Specifically, based on the above content, since the process of solving the data to be generated can be regarded as jointly solving each relational expression in the parity check principle of the target stripe, in order to perform the joint solution more efficiently and accurately, in the embodiment of the present invention, for any relational expression in the parity check principle of the target stripe, the relational expression can be converted into a first expression of the addition operation of the unknown terms with respect to the addition operation of the known terms, and then by jointly solving each first expression, the expressions of each data to be generated are obtained.
[0037] Specifically, for better illustration of the embodiments of the present invention, please refer to Figure 2 , Figure 2 which is a schematic flowchart of another method for encoding and decoding disk array data provided by the present invention.
[0038] As an optional embodiment, by simultaneously solving each first expression, the expressions for each data to be generated include: S202: For any one of the first expressions, take the operation result of the addition operation of each known term in the first expression as an intermediate variable; S203: By simultaneously solving each first expression, obtain the expressions for each data to be generated, where the expressions for the data to be generated include target coefficients composed of the position parameters of each data to be generated, and also include intermediate variables corresponding to each first expression.
[0039] Specifically, considering that the "addition operation of each known term" involves multiple items, and each item may further consist of multiple calculation factors. If the "addition operation of each known term" is directly expanded for calculation, the calculation amount will be greatly increased. Considering that the "operation result of the addition operation of each known term" can be used as an intermediate variable, thereby reducing the calculation amount in the process of simultaneous solution. Therefore, in the embodiments of the present invention, for any one of the first expressions, the operation result of the addition operation of each known term in the first expression can be taken as an intermediate variable, and then by simultaneously solving each first expression, the expressions for each data to be generated can be obtained.
[0040] As an optional embodiment, a redundant array of independent disks (RAID) storage system includes a redundant array of independent disks storage system applying double parity check technology; The parity check principle of the target stripe includes: ; where {d1,…,d k} are the data in the 1st to kth data blocks in the target stripe respectively, p is the data in the (k + 1)th block in the target stripe, q is the data in the (k + 2)th block in the target stripe, the 1st to kth blocks in the target stripe are all data blocks, the (k + 1)th and (k + 2)th blocks in the target stripe are both parity blocks, and {l1,…,l k ,l k+1 ,l k+2} are the position parameters corresponding to the 1st to (k + 2)th data respectively.
[0041] Specifically, considering that the combinations of the data to be generated in the RAID storage system applying the double-parity-check technology have more definite target coefficients and the forms of the target coefficients are not too many, the redundant array of independent disks (RAID) storage system in the embodiments of the present invention is a RAID storage system applying the double-parity-check technology (i.e., RAID 6). The parity-check principle of RAID6 includes the above two relational expressions, and the solution of the data to be generated is also based on the simultaneous solution of the above two relational expressions.
[0042] As an optional embodiment, when encoding a target stripe, determining the data to be generated in the target stripe of the redundant array of independent disks storage system includes: Determining the data of two parity blocks in the target stripe of the redundant array of independent disks storage system as the data to be generated; The first expression of the addition operation of the unknown terms with respect to the addition operation of the known terms includes: ; For any one of the first expressions, taking the operation result of the addition operation of each known term in the first expression as an intermediate variable includes: Converting the first expression into the following form: ; ; The expression of the data to be generated includes: ; Wherein, both v1 and v2 are intermediate variables. In the expression of the data to be generated, the coefficients of the intermediate variables are all target coefficients.
[0043] Specifically, in the embodiments of the present invention, the specific process of solving two data to be generated when encoding a target stripe is given. First, the data of two parity blocks in the target stripe of the redundant array of independent disks storage system can be determined as the data to be generated, then the above two first expressions are determined, and then the first expressions are converted into the form including intermediate variables. Finally, the expressions of two data to be generated (p and q) can be determined. It can be more intuitively seen from the above expressions of the two data to be generated that the expressions of the data to be generated are related to the target coefficients and the intermediate variables. If the coefficient values of the target coefficients can be directly determined from the coefficient value set, a large amount of computation will undoubtedly be reduced.
[0044] As an optional embodiment, when decoding a target stripe, determining the data to be generated in the target stripe of the redundant array of independent disks storage system includes: Determining the data of two failed blocks in the target stripe of the redundant array of independent disks storage system as the data to be generated; For any first expression, taking the operation result of the addition operation of each known term in the first expression as an intermediate variable includes: Converting the first expression into the following form: ; ; The expression of the data to be generated includes: ; where d x and d y are respectively the data of a faulty block in the target stripe, x and y are the sequence numbers of the faulty blocks, l x and l y are respectively the position parameters corresponding to the faulty blocks, v1 and v2 are both intermediate variables, d k+1 is p, and d k+2 is q.
[0045] Specifically, in the embodiment of the present invention, when decoding the target stripe, first determine that the data of two faulty blocks in the target stripe of the redundant array of independent disks storage system are the data to be generated, and give the specific form of the first expression including intermediate variables in this case. At this time, the data to be generated is represented by d x and d y . Based on the simultaneous solution of the two first expressions, the expression of the data to be generated can be determined, that is, the expressions of d x and d y as above.
[0046] As an optional embodiment, the pre-stored coefficient value set database includes a coefficient value set corresponding to any pair of position parameters in the target stripe; The coefficient value set corresponding to any pair of position parameters includes: ; where l m and l n are respectively a pair of position parameters with sequence numbers m and n in the target stripe, , and are respectively three coefficient values in the coefficient value set corresponding to the position parameters l m and l n .
[0047] Specifically, as introduced above, in the embodiments of the present invention, a set of coefficient values corresponding to any pair of position parameters can be pre-stored, facilitating the quick determination of the numerical values of target coefficients for any pair of data to be generated during the encoding and decoding processes. Therefore, the pre-stored coefficient value set database in the embodiments of the present invention includes a set of coefficient values corresponding to any pair of position parameters in the target stripe. It can be intuitively seen from the target coefficients in the expression of the data to be generated as described above that a set of coefficient values for any pair of data to be generated may include , and coefficient values, which can support the quick acquisition of the coefficient values of target coefficients during the encoding and decoding processes of RAID 6. Therefore, the RAID storage system can have t sets of coefficient values, , where k + 2 is the total number of blocks in a single stripe.
[0048] As an alternative embodiment, the pre-stored coefficient value set database is constructed in the form of a lookup table.
[0049] Specifically, considering that the form of the lookup table can efficiently maintain each set of coefficient values and is convenient for searching, the pre-stored coefficient value set database in the embodiments of the present invention is constructed in the form of a lookup table. In a RAID 6 storage system with k + 2 blocks in a stripe, the specific form of the coefficient value set database can be seen in Table 1 below. Table 1 is a schematic structural table of a coefficient value set database.
[0050] Table 1
[0051] .
[0052] Among them, the position parameters include l1 to l k+2 . Table 1 shows the set of coefficient values for any pair of position parameters. Since the form in the table may result in duplicate position parameter combinations, for the duplicate position parameter combinations in the table, only one set of coefficient values needs to be retained. For example, retain the set of coefficient values in the upper right triangle part to avoid waste of storage resources caused by duplicate data storage.
[0053] As an alternative embodiment, determining the data of two failed blocks in the target stripe of the redundant array of independent disks storage system as the data to be generated includes: Judging whether the number of failed disks in the redundant array of independent disks storage system is one; If it is one, determine a non-failed block in the target stripe as a failed block and determine the data of two failed blocks in the target stripe of the redundant array of independent disks storage system as the data to be generated; If it is not one, determine the data of two failed blocks in the target stripe of the redundant array of independent disks storage system as the data to be generated.
[0054] Specifically, when the number of faulty disks is one, in order to reduce the number of disk reads and improve the performance of the RAID 6 disk array, the embodiment of the present invention still adopts the above decoding method for two data to be generated, and will determine a non-faulty block in the target stripe as the faulty block and determine the data of the two faulty blocks in the target stripe of the independent disk redundant array storage system as the data to be generated.
[0055] Among them, the method for determining a non-faulty block can be of various types, such as random determination, etc., and the embodiment of the present invention does not limit this here.
[0056] As an optional embodiment, the disk array data encoding and decoding method further includes: When there is an updated data block in the target stripe, determine the data before and after the update of the updated data block, and determine the current parity check data of the parity check block in the target stripe, where the current parity check data is: the current parity check data; Based on the data before and after the update of the updated data block and the current parity check data of the parity check block in the target stripe, through the parity check principle of the target stripe, determine the expression of the updated target parity check data of the target stripe, where the expression of the target parity check data includes the target coefficients composed of the position parameters of the current parity check data; Determine the set of coefficient values corresponding to the position parameters of each current parity check data stored in advance; Determine the coefficient values of each target coefficient in the expression of the target parity check data from the determined set of coefficient values, and then determine each updated target parity check data of the target stripe.
[0057] Specifically, for the assembled RAID 6 disk array, when the RAID storage system performs a write operation, the values of some data blocks are updated, and at the same time, the values of parity check blocks p and q need to be updated. The RAID storage system has two data update methods, namely RMW (Read-Modify-Write) and RCW (Read-Construct-Write). Among them, the RMW update method first reads the updated data block and the original parity check block, then calculates the new parity check block using a specific algorithm, and finally writes the new data block and the updated parity check block back to the disk array.
[0058] Specifically, taking the RMW method as an example, in the embodiments of the present invention, when there are updated data blocks in the target stripe, the data before and after the update of the updated data blocks can be determined, and the current check data of the check block of the target stripe can be determined. Then, based on the data before the update, the data after the update of the updated data blocks, and the current check data of the check block of the target stripe, through the parity check principle of the target stripe, the expression of the target check data after the update of the target stripe can be determined. Then, the coefficient value set corresponding to the position parameters of each current check data stored in advance can be determined. Finally, the coefficient values of each target coefficient in the expression of the target check data can be determined from the determined coefficient value set, and then each target check data after the update of the target stripe can be determined. By adopting this update scheme, the numerical values of the target coefficients can be quickly determined by using the above-mentioned pre-stored coefficient value set, thereby reducing the calculation amount and improving the encoding and decoding efficiency.
[0059] Of course, in addition to the above form, the method for generating new check data when data changes occur in the target stripe can also be in other forms, which are not limited in the embodiments of the present invention.
[0060] As an alternative embodiment, the redundant array of independent disks storage system includes a redundant array of independent disks storage system applying double check technology; The parity check principle of the target stripe includes: ; Among them, {d1,…,d k} are the data in the 1st to kth data blocks in the target stripe respectively, p is the data in the (k + 1)th block in the target stripe, q is the data in the (k + 2)th block in the target stripe. The 1st to kth blocks in the target stripe are all data blocks, and the (k + 1)th and (k + 2)th blocks in the target stripe are both check blocks. {l1,…,l k ,l k+1 ,l k+2} are the position parameters corresponding to the data of the 1st to (k + 2)th respectively; Based on the data before the update, the data after the update of the updated data blocks, and the current check data of the check block of the target stripe, the expression of the target check data after the update of the target stripe determined through the parity check principle of the target stripe includes: Based on the data before the update, the data after the update of the updated data blocks, and the current check data of the check block of the target stripe, two update intermediate variables are determined; The two update intermediate variables include: ; ; Among them, v g1 and v g2are two updated intermediate variables, d t is the data before update, is the data after update, p and q are the current parity check data of two parity check blocks of the target stripe, l t is the position parameter at position t in the target stripe, l k+1 is the position parameter at position k + 1 in the target stripe, l k+2 is the position parameter at position k + 2 in the target stripe; Determine the expression of the updated target parity check data of the target stripe through the parity check principle of the updated target stripe and the updated intermediate variables; The parity check principle of the updated target stripe includes: ; Among them, is the updated target parity check data at position k + 1 in the target stripe, is the updated target parity check data at position k + 2 in the target stripe; The expression of the target parity check data includes: ; , and are respectively three coefficient values in the coefficient value set corresponding to the position parameters l k+1 and l k+2 in the target stripe.
[0061] Specifically, in the embodiment of the present invention, the specific process of updating the parity check data in the RAID storage system applying the dual parity check technology is given. Through the above process, the pre-stored coefficient value set can be utilized to obtain the updated target parity check data efficiently and accurately.
[0062] Please refer to Figure 3 , Figure 3 which is the structural schematic diagram of a disk array data encoding and decoding device provided by the present invention. The disk array data encoding and decoding device includes: The first determination module 31 is used to determine each data to be generated in the target stripe of the redundant array of independent disks storage system. Among them, when encoding the target stripe, the data to be generated includes the data of each parity check block in the target stripe, and when decoding the target stripe, the data to be generated includes the data of each failed block in the target stripe; The second determination module 32 is configured to determine expressions of respective data to be generated according to respective relational expressions of the parity check principle of the target stripe and respective known data in the target stripe, where any item in the relational expressions is a product of a data body and its corresponding position parameter, and the expression of the data to be generated includes a target coefficient formed by position parameters of respective data to be generated; The third determination module 33 is configured to determine a set of coefficient values corresponding to position parameters of respective data to be generated stored in advance, where each coefficient value in the set of coefficient values is determined by respective corresponding position parameters; The fourth determination module 34 is configured to determine coefficient values of respective target coefficients in the expression of the data to be generated from the set of coefficient values, and further determine respective data to be generated.
[0063] Based on the above embodiments: As an optional embodiment, the second determination module 32 includes: The first conversion module is configured to, for any relational expression in the parity check principle of the target stripe, convert the relational expression into a first expression of an addition operation of unknown terms with respect to an addition operation of known terms, where any item in the relational expression is a product of a data body and its corresponding position parameter, the unknown terms are items in the relational expression that include data to be generated, and the known terms are items in the relational expression that do not include data to be generated; The first action module is configured to obtain expressions of respective data to be generated by simultaneously solving respective first expressions, where the expression of the data to be generated includes a target coefficient formed by position parameters of respective data to be generated.
[0064] As an optional embodiment, the first action module includes: The fifth determination module is configured to, for any one of the first expressions, use the operation result of the addition operation of respective known terms in the first expression as an intermediate variable; The first action sub-module is configured to obtain expressions of respective data to be generated by simultaneously solving respective first expressions, where the expression of the data to be generated includes a target coefficient formed by position parameters of respective data to be generated and also includes intermediate variables corresponding to respective first expressions.
[0065] As an optional embodiment, when encoding the target stripe, the first determination module 31 is specifically configured to: Determine that data of two parity blocks in the target stripe of the redundant array of independent disks storage system is data to be generated; The first expression of the addition operation of unknown terms with respect to the addition operation of known terms includes: ; The fifth determination module is specifically configured to: Convert the first expression into the following form: ; ; The expression of the data to be generated includes: ; where both v1 and v2 are intermediate variables, and in the expression of the data to be generated, the coefficients of the intermediate variables are all target coefficients.
[0066] As an optional embodiment, when decoding the target stripe, the first determination module 31 is specifically configured to: Determine the data of two faulty blocks in the target stripe of the redundant array of independent disks (RAID) storage system as the data to be generated; The fifth determination module is specifically configured to: Convert the first expression into the following form: ; ; The expression of the data to be generated includes: ; where d x and d y are respectively the data of a faulty block in the target stripe, x and y are the serial numbers of the faulty blocks, l x and l y are respectively the position parameters corresponding to the faulty blocks, v1 and v2 are both intermediate variables, d k+1 is p, and d k+2 is q.
[0067] As an optional embodiment, when decoding the target stripe, the first determination module 31 includes: A first judgment module, configured to judge whether the number of faulty disks in the redundant array of independent disks (RAID) storage system is one. If it is one, trigger the sixth determination module; if it is not one, trigger the seventh determination module; The sixth determination module, configured to determine a non-faulty block in the target stripe as a faulty block and determine the data of two faulty blocks in the target stripe of the redundant array of independent disks (RAID) storage system as the data to be generated; The seventh determination module, configured to determine the data of two faulty blocks in the target stripe of the redundant array of independent disks (RAID) storage system as the data to be generated.
[0068] As an optional embodiment, the disk array data encoding and decoding device further includes: An eighth determination module, configured to determine the data before update and the data after update of the data block to be updated when there is a data block to be updated in the target stripe, and determine the current check data of the check block of the target stripe, where the current check data is: the current check data; A ninth determination module, configured to determine an expression of the target check data after update of the target stripe based on the data before update and the data after update of the data block to be updated and the current check data of the check block of the target stripe through the parity check principle of the target stripe, where the expression of the target check data includes target coefficients composed of the position parameters of the current check data; An eleventh determination module, configured to determine a set of coefficient values corresponding to the position parameters of each current check data stored in advance; A twelfth determination module, configured to determine the coefficient values of each target coefficient in the expression of the target check data from the determined set of coefficient values, and further determine each target check data after update of the target stripe.
[0069] As an optional embodiment, the redundant array of independent disks storage system includes a redundant array of independent disks storage system applying double check technology; The parity check principle of the target stripe includes: ; where, {d1,…,d k} are the data in the 1st to kth data blocks in the target stripe respectively, p is the data in the (k + 1)th block in the target stripe, q is the data in the (k + 2)th block in the target stripe, the 1st to kth blocks in the target stripe are all data blocks, the (k + 1)th and (k + 2)th blocks in the target stripe are both check blocks, {l1,…,l k ,l k+1 ,l k+2} are the position parameters corresponding to the data in the 1st to (k + 2)th respectively; The ninth determination module includes: A first determination sub-module, configured to determine two update intermediate variables based on the data before update and the data after update of the data block to be updated and the current check data of the check block of the target stripe; The two update intermediate variables include: ; ; where, v g1 and v g2 are the two update intermediate variables, d x is the data before update, is the data after update, p and q are the current check data of the two check blocks of the target stripe, l xis the position parameter at the x-th position in the target stripe, l k+1 is the position parameter at the (k + 1)-th position in the target stripe, l k+2 is the position parameter at the (k + 2)-th position in the target stripe; The second determination sub-module is configured to determine an expression of the updated target check data of the target stripe by using the parity check principle of the updated target stripe and updating intermediate variables; The parity check principle of the updated target stripe includes: ; Among them, is the updated target check data at the position k + 1 in the target stripe, is the updated target check data at the position k + 2 in the target stripe; The expression of the target check data includes: ; , and are respectively three coefficient values in the coefficient value set corresponding to the position parameters l k+1 and l k+2 in the target stripe.
[0070] For the introduction of the disk array data encoding and decoding device provided by the embodiments of the present invention, please refer to the embodiments of the disk array data encoding and decoding method described above, and the embodiments of the present invention will not be elaborated here.
[0071] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of a disk array data encoding and decoding device provided by the present invention. The disk array data encoding and decoding device includes: A memory 41 for storing a computer program; A processor 42 for implementing the steps of the disk array data encoding and decoding method in the foregoing embodiments when executing the computer program.
[0072] For the introduction of the disk array data encoding and decoding device provided by the embodiments of the present invention, please refer to the embodiments of the disk array data encoding and decoding method described above, and the embodiments of the present invention will not be elaborated here.
[0073] The present invention also provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, the steps of the disk array data encoding and decoding method in the foregoing embodiments are implemented.
[0074] For the introduction of the computer program product provided by the embodiments of the present invention, please refer to the embodiments of the disk array data encoding and decoding method described above, and the embodiments of the present invention will not be elaborated here.
[0075] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of a computer-readable storage medium provided by the present invention. A computer program 52 is stored on the computer-readable storage medium 51. When the computer program 52 is executed by a processor, the steps of the disk array data encoding and decoding method in the foregoing embodiments are implemented.
[0076] For the introduction of the computer-readable storage medium provided by the embodiments of the present invention, please refer to the embodiments of the disk array data encoding and decoding method described above. The embodiments of the present invention will not be elaborated herein.
[0077] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For the relevant parts, please refer to the description in the method part. It should also be noted that in this specification, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0078] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for encoding and decoding disk array data, characterized in that, Including: Determine each piece of data to be generated in the target stripe of the redundant array of independent disks (RAID) storage system. When encoding the target stripe, the data to be generated includes the data of each parity block in the target stripe. When decoding the target stripe, the data to be generated includes the data of each failed block in the target stripe; According to each relation of the parity check principle of the target stripe and each known data in the target stripe, determine the expressions of each piece of data to be generated. In the relation, any term is the product of the data body and its corresponding position parameter, and the expression of the data to be generated includes the target coefficients composed of the position parameters of each piece of data to be generated; Determine the set of coefficient values pre-stored corresponding to the position parameters of each piece of data to be generated, where each coefficient value in the set of coefficient values is determined by the corresponding position parameter; Determine the coefficient values of each target coefficient in the expression of the data to be generated from the set of coefficient values, and then determine each piece of data to be generated.
2. The disk array data encoding and decoding method according to claim 1, characterized in that, The determining the expressions of each piece of data to be generated according to each relation of the parity check principle of the target stripe and each known data in the target stripe includes: For any relation in the parity check principle of the target stripe, convert the relation into a first expression of the addition operation of the unknown terms with respect to the addition operation of the known terms. In the relation, any term is the product of the data body and its corresponding position parameter, the unknown term is the term containing the data to be generated in the relation, and the known term is the term not containing the data to be generated in the relation; By jointly solving each first expression, obtain the expressions of each piece of data to be generated, where the expressions of the data to be generated include the target coefficients composed of the position parameters of each piece of data to be generated.
3. The disk array data encoding and decoding method according to claim 2, wherein The obtaining the expressions of each piece of data to be generated by jointly solving each first expression includes: For any one first expression, regard the operation result of the addition operation of each known term in the first expression as an intermediate variable; By jointly solving each first expression, obtain the expressions of each piece of data to be generated, where the expressions of the data to be generated include the target coefficients composed of the position parameters of each piece of data to be generated, and also include the intermediate variables corresponding to each first expression.
4. The disk array data encoding and decoding method according to claim 3, wherein The redundant array of independent disks (RAID) storage system includes a redundant array of independent disks (RAID) storage system applying double parity check technology; The parity check principle of the target stripe includes: ; Among them, {d1, …, d k} are the data in the 1st to kth data blocks in the target stripe, p is the data in the (k + 1)th block in the target stripe, q is the data in the (k + 2)th block in the target stripe. The 1st to kth blocks in the target stripe are all data blocks, and the (k + 1)th and (k + 2)th blocks in the target stripe are both parity blocks. {l1, …, l k , l k+1 , l k+2} are the position parameters corresponding to the 1st to (k + 2)th data respectively.
5. The disk array data encoding and decoding method according to claim 4, characterized in that When encoding the target stripe, determining each piece of data to be generated in the target stripe of the redundant array of independent disks (RAID) storage system includes: Determine the data of two parity blocks in the target stripe of the redundant array of independent disks (RAID) storage system as the data to be generated; The first expression of the addition operation of the unknown terms with respect to the addition operation of the known terms includes: ; For any one first expression, regarding the operation result of the addition operation of each known term in the first expression as an intermediate variable includes: Convert the first expression into the following form: ; ; The expression of the data to be generated includes: ; Wherein, both v1 and v2 are intermediate variables. In the expression of the data to be generated, the coefficients of the intermediate variables are all target coefficients.
6. The disk array data encoding and decoding method according to claim 4, characterized in that, When decoding a target stripe, determining each piece of data to be generated in the target stripe of a redundant array of independent disks (RAID) storage system includes: Determining the data of two failed blocks in the target stripe of the RAID storage system as the data to be generated; For any first expression, taking the operation result of the addition operation of each known term in the first expression as an intermediate variable includes: Converting the first expression into the following form: ; ; The expression of the data to be generated includes: ; where d x and d y are respectively the data of a faulty block in the target strip, x and y are the sequence numbers of the faulty blocks, l x and l y are respectively the position parameters corresponding to the faulty blocks, v1 and v2 are both intermediate variables, d k+1 is p, and d k+2 is q.
7. The disk array data encoding and decoding method according to claim 4, wherein, The pre-stored coefficient value set database includes a coefficient value set corresponding to any pair of position parameters in the target stripe; The coefficient value set corresponding to any pair of position parameters includes: ; where, l m and l n are a pair of position parameters with sequence numbers m and n in the target strip respectively, , and are three coefficient values in the coefficient value set corresponding to the position parameters l m and l n respectively.
8. The disk array data encoding and decoding method according to claim 7, characterized in that, The pre-stored coefficient value set database is constructed in the form of a lookup table.
9. The disk array data encoding and decoding method according to claim 6, wherein Determining the data of two failed blocks in the target stripe of the RAID storage system as the data to be generated includes: Judging whether the number of failed disks in the RAID storage system is one; If it is one, determining a non-failed block in the target stripe as a failed block and determining the data of two failed blocks in the target stripe of the RAID storage system as the data to be generated; If it is not one, determining the data of two failed blocks in the target stripe of the RAID storage system as the data to be generated.
10. The disk array data encoding and decoding method according to any one of claims 1 to 9, characterized in that The disk array data encoding and decoding method further includes: When there is an updated data block in the target stripe, determining the pre-update data and post-update data of the updated data block, and determining the current check data of the check block of the target stripe, where the current check data is the current check data; Based on the pre-update data, post-update data of the updated data block, and the current check data of the check block of the target stripe, through the parity check principle of the target stripe, determining the expression of the updated target check data of the target stripe, where the expression of the target check data includes target coefficients composed of the position parameters of the current check data; Determining the pre-stored coefficient value sets corresponding to the position parameters of each current check data; Determining the coefficient values of each target coefficient in the expression of the target check data from the determined coefficient value sets, and further determining each updated target check data of the target stripe.
11. The disk array data encoding and decoding method according to claim 10, wherein The RAID storage system includes a RAID storage system applying a dual parity check technology; The parity check principle of the target stripe includes: ; Among them, {d1, …, d k} are the data in the 1st to kth data blocks in the target stripe, p is the data in the (k + 1)th block in the target stripe, q is the data in the (k + 2)th block in the target stripe. The 1st to kth blocks in the target stripe are all data blocks, and the (k + 1)th and (k + 2)th blocks in the target stripe are both parity blocks. {l1, …, l k , l k+1 , l k+2} are the position parameters corresponding to the 1st to (k + 2)th data respectively; Based on the pre-update data, post-update data of the updated data block, and the current check data of the check block of the target stripe, through the parity check principle of the target stripe, determining the expression of the updated target check data of the target stripe includes: Determining two update intermediate variables based on the pre-update data, post-update data of the updated data block, and the current check data of the check block of the target stripe; The two update intermediate variables include: ; ; Among them, v g1 and v g2 are two intermediate variables for update, d t is the data before update, is the data after update, p and q are the current verification data of two verification blocks of the target stripe, l t is the position parameter at the t-th position in the target stripe, l k+1 is the position parameter at the (k + 1)-th position in the target stripe, l k+2 is the position parameter at the (k + 2)-th position in the target stripe; Through the parity check principle of the updated target stripe and the update intermediate variables, determining the expression of the updated target check data of the target stripe; The parity check principle of the updated target stripe includes: ; wherein, is the updated target check data at the (k + 1)-th position in the target stripe, is the updated target check data at the (k + 2)-th position in the target stripe; The expression of the target check data includes: ; , and are three coefficient values in the coefficient value sets corresponding to the position parameters l k+1 and l k+2 in the target strip, respectively.
12. A disk array data encoding and decoding device, characterized in that Includes: A first determination module, configured to determine each piece of data to be generated in a target stripe of a redundant array of independent disks (RAID) storage system, where, when encoding the target stripe, the data to be generated includes the data of each parity block in the target stripe, and when decoding the target stripe, the data to be generated includes the data of each failed block in the target stripe; A second determination module, configured to determine an expression for each piece of data to be generated according to each relation of the parity check principle of the target stripe and each piece of known data in the target stripe, where any term in the relation is a product of a data body and its corresponding position parameter, and the expression for the data to be generated includes a target coefficient formed by the position parameters of each piece of data to be generated; A third determination module, configured to determine a set of coefficient values pre-stored and corresponding to the position parameters of each piece of data to be generated, where each coefficient value in the set of coefficient values is determined by the corresponding position parameter; A fourth determination module, configured to determine the coefficient values of each target coefficient in the expression for the data to be generated from the set of coefficient values, and further determine each piece of data to be generated.
13. A disk array data encoding and decoding device, characterized in that Comprising: A memory, configured to store a computer program; A processor, configured to implement the steps of the disk array data encoding and decoding method according to any one of claims 1 to 11 when executing the computer program.
14. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, the steps of the disk array data encoding and decoding method according to any one of claims 1 to 11 are implemented.
15. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the steps of the disk array data encoding and decoding method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
RAID encoding and decoding method and encoding and decoding circuit
CN113297001A
Method for degrading RAID6 (redundant array of independent disks 6) into RAID5 (redundant array of independent disks 5)
CN116450048A
Data storage method, computer program product, equipment and computer medium
CN118656039A
System parameter determination method and device, electronic equipment and storage medium
CN119088308A
Data processing method and device based on two-dimensional parity check code, product and medium
CN119883717A