WO2023184843A1 - Raid encoding/decoding method and apparatus, device and readable storage medium - Google Patents
Raid encoding/decoding method and apparatus, device and readable storage medium Download PDFInfo
- Publication number
- WO2023184843A1 WO2023184843A1 PCT/CN2022/115341 CN2022115341W WO2023184843A1 WO 2023184843 A1 WO2023184843 A1 WO 2023184843A1 CN 2022115341 W CN2022115341 W CN 2022115341W WO 2023184843 A1 WO2023184843 A1 WO 2023184843A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- array
- unknown data
- new
- data block
- data blocks
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 238000012795 verification Methods 0.000 claims description 16
- 230000004044 response Effects 0.000 claims description 11
- 230000008859 change Effects 0.000 claims description 8
- 230000008569 process Effects 0.000 description 13
- 238000005516 engineering process Methods 0.000 description 7
- 238000003491 array Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000013506 data mapping Methods 0.000 description 2
- 238000011084 recovery Methods 0.000 description 2
- 230000000717 retained effect Effects 0.000 description 2
- 230000008094 contradictory effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/08—Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F11/10—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
- G06F11/1076—Parity data used in redundant arrays of independent storages, e.g. in RAID systems
Definitions
- the present application relates to the field of computer technology, and in particular to a RAID encoding and decoding method, device, equipment and readable storage medium.
- RAID Redundant Arrays of Independent Disks
- RAID 5 can tolerate up to 1 data block error on a stripe
- RAID 6 can tolerate up to 2 data block errors on a stripe.
- the specific manifestation is: when the division is incomplete, a specific length of decimal places needs to be retained, which will inevitably cause all The retained data deviates from the actual data and therefore has accuracy errors.
- the coefficients in the equation of different data blocks may be the same, and the solution may not be possible.
- embodiments of the present application provide a RAID encoding and decoding method, including:
- the target set includes n unequal values, where n is the number of disks corresponding to the stripe;
- the parameter values calculated by Galois field division in any equation are formed into an array to obtain the first array and the second array;
- Three unknown data blocks are determined based on the parameter values corresponding to the unselected unknown data blocks, the dividend, the number of disks corresponding to the stripe, and all known data blocks.
- embodiments of the present application provide a RAID encoding and decoding device, including:
- the acquisition module is used to obtain any stripe in RAID that needs to be encoded/decoded, and determine the target set; the target set includes n unequal values, where n is the number of disks corresponding to the stripe;
- a first determination module configured to determine a first preset value and a second preset value that are not equal to each other
- composition module is used for ternary linear encoding/decoding equations, and combines the parameter values calculated by Galois field division in any equation into an array to obtain the first array and the second array;
- the update module is used to select two parameter values corresponding to the same unknown data block in the first array and the second array, and update the first array and the second array using the two parameter values to obtain a new first array and a new second array. array;
- the second determination module is used to determine the parameter value corresponding to the unselected unknown data block in the new first array and the new second array, and determine the dividend based on the parameter value corresponding to the unselected unknown data block;
- the third determination module is used to determine three unknown data blocks based on the parameter values corresponding to the unselected unknown data blocks, the dividend, the number of disks corresponding to the stripe, and all known data blocks.
- embodiments of the present application provide an electronic device, including a memory and one or more processors.
- Computer-readable instructions are stored in the memory.
- processors such that One or more processors perform the steps of the RAID encoding and decoding method in any embodiment.
- embodiments of the present application provide one or more non-volatile computer-readable storage media storing computer-readable instructions. When executed by one or more processors, the computer-readable instructions cause one or more A processor executes the steps of the RAID encoding and decoding method in any embodiment.
- computer readable instructions computer readable instructions computer readable instructions computer readable instructions computer readable instructions
- Figure 1 is a flow chart of a first RAID encoding and decoding method according to one or more embodiments
- Figure 2 is a schematic diagram of a RAID encoding and decoding device according to one or more embodiments
- Figure 3 is a schematic diagram of an electronic device according to one or more embodiments.
- Figure 4 is an internal structure diagram of an electronic device according to one or more embodiments.
- this embodiment of the present application discloses a RAID encoding and decoding method, which includes:
- Step S101 Obtain any stripe in the RAID that needs to be encoded/decoded, and determine the target set.
- a RAID can be composed of several disks of the same or different types, and different disks can be located on the same or different cabinets. Each cabinet corresponds to a controller, which is used to control the data placement work of the local cabinet. The storage spaces on different cabinets are integrated through cloud services. User data is distributed and stored on different disks through the distribution strategy and control method corresponding to RAID. At this time, for disk arrays, the units across different hard disks used to implement verification services are called stripes.
- the target set includes n unequal values, and n is the number of disks corresponding to the stripe.
- the number of disks corresponding to one stripe is the total number of disks that make up the current RAID. If the total number of disks is n, then a stripe includes n data blocks, and these n data blocks are located on n disks.
- n k+3 (number of check blocks).
- k represents the user data block. It can be seen that the n unequal values included in the target set correspond to each disk in the RAID one-to-one, and also correspond to each block in a stripe.
- the n unequal values included in the target set can be flexibly set. For example: take natural numbers from 1 to n, or take random values among the natural numbers: 1, 4, 7, 8, 9... until n natural numbers are taken, or take the value as an arithmetic sequence or a geometric sequence.
- the value can be determined with base 2, then n values that are not equal to each other are: 2 0 , 2 1 ,..., 2 n-1 .
- n unequal values have certain value rules (such as: 2 0 , 2 1 ,..., 2 n-1 )
- the encoding and decoding process can be simplified. Because the coefficients obtained based on the n mutually unequal values can simplify the solution of the equation.
- Step S102 Determine a first preset value and a second preset value that are not equal to each other.
- the first preset value and the second preset value can be flexibly set. For example, take two natural numbers: 1 and 2, or choose any two numbers from the target set.
- the target set, the first preset value and the second preset value can be determined by software or hardware.
- Step S103 In response to the stripe including 3 unknown data blocks, using all known data blocks, 3 unknown data blocks, the target set, the first preset value and the second preset value included in the stripe, in Galois Construct a system of three-dimensional linear encoding/decoding equations in the domain.
- step S103 it may first be determined whether the stripe includes 3 unknown data blocks. If the stripe includes 3 unknown data blocks, all known data blocks included in the stripe, 3 An unknown data block, a target set, a first preset value and a second preset value are used to construct a ternary one-step encoding/decoding equation system in the Galois domain.
- this embodiment constructs a ternary primary code in the Galois domain based on the previously set target set, the first preset value, the second preset value, all known data blocks and three unknown data blocks participating in the solution. /decode system of equations.
- the three-dimensional linear encoding/decoding equations include:
- p 1 , p 2 , p 3 are 3 unknown data blocks; n is the number of disks corresponding to the stripe; d 1 , d 2 ,..., d n-3 are n-3 known data blocks; GF_div Represents Galois field division; a 1 is the first preset value; a 2 is the second preset value; b 1 , b 2 ,..., b n are n unequal values in the target set; ⁇ represents Galois field division. Luo Huayu addition.
- Step S104 For the ternary linear encoding/decoding equations, combine the parameter values calculated by Galois field division in any equation into an array to obtain a first array and a second array.
- the three-dimensional linear encoding/decoding equations shown above include a total of 3 equations. 2 of these 3 equations involve Galois field division. Therefore, the known data blocks and unknown data in these 2 equations are extracted. The coefficients of the block, resulting in 2 arrays: the first array and the second array.
- the parameter values in the first array are:
- the parameter values in the second array are:
- Step S105 Select two parameter values corresponding to the same unknown data block in the first array and the second array, and use the two parameter values to update the first array and the second array to obtain a new first array and a new second array.
- Select two parameter values corresponding to the same unknown data block in the first array and the second array For example: select the two parameter values corresponding to the unknown data block p 1 in the first array and the second array: and Either select the two parameter values corresponding to the unknown data block p 2 in the first array and the second array; or select the two parameter values corresponding to the unknown data block p 3 in the first array and the second array. It can be seen that no matter which one of the three unknown data blocks is selected, the first array and the second array only need to be changed accordingly when subsequently updating, but the solution process can be completed.
- the target set includes 16 unequal values, namely 1, 2, 3, 4,...,16.
- the two parameter values corresponding to the unknown data block p 3 in the first array and the second array are selected: 114 (ie: the last parameter value in the first array), 192 (ie: the last parameter value in the second array) value).
- the new first array can be obtained: [252,134 ,...,170,0].
- a new second array can be obtained: [52,135,...,178, 0]. At this point, the first array and the second array are updated.
- each element in the above-mentioned first array, second array, new first array, and new second array is a decimal number.
- using two parameter values to update the first array and the second array to obtain a new first array and a new second array includes: using the parameter value selected from the first array to Perform Galois field addition on each parameter value in the second array to obtain a new first array; use the parameter value selected from the second array to perform Galois field addition on each parameter value in the second array to obtain a new second array .
- Step S106 Determine the parameter value corresponding to the unselected unknown data block in the new first array and the new second array, and determine the dividend based on the parameter value corresponding to the unselected unknown data block.
- the unselected unknown data blocks remain p 1 and p 2 .
- the corresponding parameter value of p 1 in the new first array is 252, and the corresponding parameter value of p 1 in the new second array is 52; the corresponding parameter value of p 2 in the new first array is 170, p The corresponding parameter value of 2 in the new second array is 178.
- p_deno GF_mul(52,170) ⁇ GF_mul(178,252). At this point, the dividend p_deno can be obtained.
- Step S107 Determine three unknown data blocks based on the parameter values corresponding to the unselected unknown data blocks, the dividend, the number of disks corresponding to the stripe, and all known data blocks.
- determining three unknown data blocks based on the parameter values corresponding to the unselected unknown data blocks, the dividend, the number of disks corresponding to the stripe, and all known data blocks includes: calculating according to the second formula 3 unknown data blocks; the second formula includes:
- p 1 , p 2 , and p 3 are 3 unknown data blocks; n is the number of disks corresponding to the stripe; GF_div represents Galois field division; GF_mul represents Galois field multiplication; ⁇ represents Galois field addition.
- p1_32 is the parameter value corresponding to the unselected unknown data block p 1 in the new second array
- p2_22 is the parameter value corresponding to the unselected unknown data block p 2 in the new first array
- p2_32 is the parameter value corresponding to the unselected unknown data block p 2 in the new second array
- the parameter value corresponding to the unselected unknown data block p 2 ; p1_22 is the parameter value corresponding to the unselected unknown data block p 1 in the new first array
- v2'(i) is the known data block in the new second array
- the parameter value corresponding to i; v1'(i) is the parameter value corresponding to the known data block i in the new first array
- the embodiment shown in Figure 1 first sets a target set including n mutually unequal values, as well as mutually unequal first preset values and second preset values as parameters, and then needs to solve three unknown numbers.
- known quantities all known data blocks included in the strip
- unknown quantities that is, 3 unknown data blocks
- a ternary linear encoding/decoding equation system is constructed in the Galois domain. Due to the setting The n values of are not equal to each other, and the first preset value and the second preset value are not equal to each other, so the coefficients of different data blocks in the equation will be different, so the situation that cannot be solved can be avoided.
- the unknown data blocks that need to be solved can be: check blocks to be calculated during the encoding process, or damaged data blocks to be calculated during the decoding process. That is to say: this solution describes both the encoding process and the decoding process.
- This solution can complete RAID encoding and RAID decoding based on the same logic. Since this solution can solve 3 unknown data blocks, it has a higher fault tolerance rate than RAID 5 and RAID 6, and is suitable for encoding and decoding large stripes (such as stripes corresponding to a number of disks of not less than 32).
- the RAID encoding process corresponds to the process of storing data.
- a stripe consisting of n blocks includes 3 parity blocks: p 1 , p 2 , p 3 ; n-3 users Data block: d 1 , d 2 ,..., d n-3 . If any user data block (any one of d 1 , d 2 ,..., d n-3 ) in the stripe is changed, the difference between the changed data block and the pre-changed data block can be directly determined, and then Based on the difference, the corresponding changes that need to be made to the three check blocks are determined, and then the three check blocks can be directly changed to complete the change of one stripe.
- the correction value in the strip is determined based on the difference between the changed known data block and the original known data block. Check the verification difference of the verification data, and update the verification data based on the verification difference.
- d x ' is the d x after the change
- ⁇ d x is the difference between the d x after the change and the d x before the change
- ⁇ p 1 is the corresponding change that p 1 needs to make (that is, the verification difference of p 1 )
- p 1 ' is the changed p 1
- v1'(x) is the parameter value corresponding to d x in the new first array
- v2'(x) is the parameter value corresponding to d x in the new second array.
- check blocks p 2 and p 3 can be updated accordingly, thereby obtaining three updated check blocks: p 1 ', p 2 ', and p 3 '.
- the maximum fault tolerance rate of the RAID encoding and decoding scheme provided by the embodiments of this application is 3, and can also be downgraded to 2 and 1, that is, downgraded to RAID 5 and RAID 6. That is to say: this application can correct errors and complete data recovery when there are 3 block errors, 2 block errors, or 1 block error in a stripe.
- the stripe includes an unknown data block (that is, when there is a block error in a stripe)
- XOR other blocks in the stripe except the unknown data block to determine the unknown data block. For example: Suppose an error occurs in data block d 2 , then the formula for solving data block d 2 is:
- the dividend in response to the stripe Including 1 unknown data block, XOR other blocks in the strip except the unknown data block to determine the unknown data block.
- the stripe includes 2 unknown data blocks (that is, when there are 2 block errors in one stripe), determine the parameters of the 2 unknown data blocks calculated by Galois field division in the ternary linear encoding/decoding equations. value; determine the 2 unknown data blocks based on the determined parameter values, other blocks except the 2 unknown data blocks, and the parameter values of other blocks calculated by Galois field division in the ternary one-step encoding/decoding equation system.
- the dividend, the number of disks corresponding to the stripe, and all known data blocks in response to if The band includes 2 unknown data blocks, then determine the parameter values of the 2 unknown data blocks calculated by Galois field division in the ternary linear encoding/decoding equations; based on the determined parameter values, divide the 2 unknown data blocks
- the two unknown data blocks are determined by the parameter values calculated by Galois field division in the ternary linear encoding/decoding equation system except for other blocks.
- d 1 , d 2 ,..., d n-3 , p 1 , p 2 , p 3 are n data blocks in the strip, p 1 and d 2 are two unknown data blocks among them;
- GF_div represents GA Luohua domain division;
- a 1 is the first preset value;
- b 1 , b 2 ,..., b n are n unequal values in the target set;
- the corresponding data mapping table is shown in Table 1.
- Data mapping can be performed according to Table 1.
- 10 When the data is a decimal number 10, through the above-mentioned Galois field original polynomial P(X) conversion, 10 can be expressed as binary 01110100. Through such conversion, each data will be converted into an 8-bit binary number, and four arithmetic operations based on the 8-bit binary number will be performed.
- d 1 , d 2 ,..., d n are n user data blocks in a stripe
- a 1 is the first preset value
- a 2 is the second preset value
- b 1 , b 2 ,..., b n is n values that are not equal to each other in the target set.
- the positions of the three added check blocks are determined by mechanisms such as load balancing in the current RAID system.
- the positions of the three check blocks in the ternary one-step encoding/decoding equation set are only exemplary.
- the first array and the second array are determined based on the ternary one-time encoding/decoding equations, and then the first array and the second array are updated, and then the dividend is determined and the three check blocks are solved.
- the first array and the second array are determined based on the ternary one-time encoding/decoding equations, and then the first array and the second array are updated, and then the dividend is determined and the three check blocks are solved.
- the encoding and decoding process is completed based on the corresponding parameter values of each block in the array, and three error correction encoding and decoding can be realized.
- the operation process is simple and efficient, and there will be no decimal and precision problems. It is suitable for large stripe encoding and decoding. And can be downgraded to RAID5 and RAID6.
- this application is also applicable to different Galois fields. Under the polynomials of different Galois fields, the generated arrays are different, but the operation logic is the same, and there is no need for an inverse matrix, which has obvious advantages of high speed and flexibility.
- RAID encoding and decoding device described below and the RAID encoding and decoding method described above may be referred to each other.
- an embodiment of the present application discloses a RAID encoding and decoding device, which includes:
- the acquisition module 201 is used to acquire any stripe in the RAID that needs to be encoded/decoded, and determine the target set; the target set includes: n unequal values, where n is the number of disks corresponding to the stripe;
- the first determination module 202 is used to determine the first preset value and the second preset value that are not equal to each other;
- Building module 203 configured to use all known data blocks, the 3 unknown data blocks, the target set, the first preset value and the second preset value included in the stripe in response to the stripe including 3 unknown data blocks. Construct a system of three-dimensional linear encoding/decoding equations in the Galois domain;
- composition module 204 is used to form an array with the parameter values calculated by Galois field division in any equation for the ternary linear encoding/decoding equations to obtain a first array and a second array;
- the update module 205 is used to select two parameter values corresponding to the same unknown data block in the first array and the second array, and update the first array and the second array using the two parameter values to obtain a new first array and a new third array.
- the second determination module 206 is configured to determine the parameter value corresponding to the unselected unknown data block in the new first array and the new second array, and determine the dividend based on the parameter value corresponding to the unselected unknown data block;
- the third determination module 207 is used to determine three unknown data blocks based on the parameter value corresponding to the unselected unknown data block, the dividend, the number of disks corresponding to the stripe, and all known data blocks.
- the three-dimensional linear encoding/decoding equations are:
- p 1 , p 2 , p 3 are 3 unknown data blocks; n is the number of disks corresponding to the stripe; d 1 , d 2 ,..., d n-3 are n-3 known data blocks; GF_div Represents Galois field division; a 1 is the first preset value; a 2 is the second preset value; b 1 , b 2 ,..., b n are n unequal values in the target set; ⁇ represents Galois field division. Luo Huayu addition.
- the update module is specifically used to:
- Galois field addition is performed on each parameter value in the second array using the parameter value selected from the second array to obtain a new second array.
- the second determination module is specifically used to:
- p_deno is the dividend; GF_mul represents Galois field multiplication; p1_32 is the parameter value corresponding to the unselected unknown data block p 1 in the new second array; p2_22 is the unselected unknown data block p in the new first array 2 corresponds to the parameter value; p2_32 is the parameter value corresponding to the unselected unknown data block p 2 in the new second array; p1_22 is the parameter value corresponding to the unselected unknown data block p 1 in the new first array; Represents Galois field addition.
- the third determination module is specifically used to:
- the second formula includes:
- the change module is used to determine the verification data in the strip based on the difference between the changed known data block and the original known data block if any known data block in the strip is changed. Verification difference, update the verification data based on the verification difference.
- the n unequal values are: 2 0 , 2 1 ,..., 2 n-1 .
- the single error correction module is used to perform XOR on other blocks in the strip except the unknown data block if the stripe includes an unknown data block to determine the unknown data block.
- the double error correction module is used to calculate the 2 unknown data blocks according to the third formula if the stripe includes 2 unknown data blocks; the third formula is:
- d 1 and d 2 are 2 unknown data blocks; d 1 , d 2 ,..., d n are n data blocks in the strip; GF_div represents Galois field division; a 1 is the first preset value ; b 1 , b 2 ,..., b n are n unequal values in the target set; ⁇ represents Galois field addition.
- this embodiment provides a RAID encoding and decoding device, which can improve the accuracy of RAID encoding and decoding, avoid situations where solutions cannot be solved, and has a higher fault tolerance rate than RAID 5 and RAID 6.
- An electronic device provided by an embodiment of the present application is introduced below.
- the electronic device described below and the RAID encoding and decoding method and device described above may be referred to each other.
- an electronic device including:
- Memory 301 used to store computer readable instructions
- the processor 302 is configured to execute computer-readable instructions to implement the RAID encoding and decoding method disclosed in any of the above embodiments.
- computer-readable instructions are stored in the memory 301. When executed by the one or more processors 302, the computer-readable instructions cause the one or more processors 302 to execute any of the foregoing embodiments. Steps in the RAID encoding and decoding method.
- the electronic device is a computer device, and its internal structure diagram can be shown in Figure 4 .
- the electronic device includes a processor, a memory, and a network interface connected through a system bus.
- the processor of the electronic device is used to provide computing and control capabilities.
- the memory of the electronic device includes non-volatile storage media and internal memory.
- the non-volatile storage medium stores an operating system and computer-readable instructions.
- This internal memory provides an environment for the execution of an operating system and computer-readable instructions in a non-volatile storage medium.
- the network interface of the electronic device is used to communicate with an external terminal through a network connection. When executed by the processor, the computer-readable instructions implement the RAID encoding and decoding method in any embodiment.
- a readable storage medium used to store computer-readable instructions, wherein when the computer-readable instructions are executed by a processor, the RAID encoding and decoding method disclosed in the foregoing embodiments is implemented. Regarding the specific steps of this method, reference may be made to the corresponding content disclosed in the foregoing embodiments, which will not be described again here.
- embodiments of the present application disclose one or more non-volatile computer-readable storage media storing computer-readable instructions that, when executed by one or more processors, cause one or more Multiple processors execute the steps of the RAID encoding and decoding method in any of the foregoing embodiments.
- RAM random access memory
- ROM read-only memory
- electrically programmable ROM electrically erasable programmable ROM
- registers hard disks, removable disks, CD-ROMs, or anywhere in the field of technology. any other known form of readable storage medium.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Error Detection And Correction (AREA)
Abstract
Provided in the embodiments of the present application are an RAID encoding/decoding method, the method comprising: first setting a target set comprising n numerical values which are not equal to each other, and setting as parameters a first preset value and a second preset value which are not equal to each other; and then constructing in a Galois field a ternary linear encoding/decoding equation system to solve three unknowns.
Description
相关申请的交叉引用Cross-references to related applications
本申请要求于2022年3月30日提交中国专利局,申请号为CN202210321311.2,申请名称为“一种RAID编解码方法、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires priority to be submitted to the China Patent Office on March 30, 2022, with the application number CN202210321311.2, and the application title is "A RAID encoding and decoding method, device, equipment and readable storage medium", The entire contents of which are incorporated herein by reference.
本申请涉及计算机技术领域,特别涉及一种RAID编解码方法、装置、设备及可读存储介质。The present application relates to the field of computer technology, and in particular to a RAID encoding and decoding method, device, equipment and readable storage medium.
目前,使用多个磁盘可以组成一个容量巨大的磁盘组,称为磁盘阵列(Redundant Arrays of Independent Disks,RAID)。据此,衍生出RAID 0(不提供数据冗余,将至少两块磁盘通过软件或硬件的方式串联在一起,组成一个大的卷组,并将数据依次写入到各个磁盘中的技术)、RAID 1(对于n块磁盘,把其中n/2块磁盘作为镜像磁盘,在往其中一块磁盘写入数据时,也同时往另一块写入数据的技术,n至少为2)、RAID 5(磁盘上同时存储数据和校验数据,数据块和对应的校验信息存保存在不同的磁盘上,在一个磁盘失效时不会发生数据丢失的技术)、RAID 6(具有双重校验的功能,在同时出现两个磁盘失效时依然不会发生数据丢失的技术)等技术,当前常用的是RAID 5和RAID 6。Currently, multiple disks can be used to form a disk group with a huge capacity, called a disk array (Redundant Arrays of Independent Disks, RAID). Based on this, RAID 0 is derived (a technology that does not provide data redundancy and connects at least two disks together through software or hardware to form a large volume group, and writes data to each disk in turn), RAID 1 (for n disks, n/2 of them are used as mirror disks. When writing data to one of the disks, data is also written to the other disk at the same time. n is at least 2), RAID 5 (disk Data and verification data are stored on the computer at the same time. Data blocks and corresponding verification information are stored on different disks. This technology will not cause data loss when one disk fails), RAID 6 (with double verification function, in Technology that will not cause data loss when two disks fail at the same time), currently commonly used are RAID 5 and RAID 6.
RAID 5可允许一个条带上最多有1个数据块错误,RAID 6可允许一个条带上最多有2个数据块错误。在RAID6编解码方案中,由于需要进行除法操作,因此可能出现除不尽的情况,除不尽会影响编码精度,具体表现为:除不尽时需要保留特定长度的小数位,那么必然造成所保留的数据与实际数据存在偏差,因此存在精度误差。另外,在条带较大时,不同数据块的在方程中的系数可能相同,可能出现无法求解的情况。RAID 5 can tolerate up to 1 data block error on a stripe, and RAID 6 can tolerate up to 2 data block errors on a stripe. In the RAID6 encoding and decoding scheme, due to the need for division operations, there may be cases where the division cannot be completed. Incomplete division will affect the encoding accuracy. The specific manifestation is: when the division is incomplete, a specific length of decimal places needs to be retained, which will inevitably cause all The retained data deviates from the actual data and therefore has accuracy errors. In addition, when the stripe is large, the coefficients in the equation of different data blocks may be the same, and the solution may not be possible.
发明内容Contents of the invention
在第一方面,本申请实施例提供了一种RAID编解码方法,包括:In a first aspect, embodiments of the present application provide a RAID encoding and decoding method, including:
获取RAID中任一个需要进行编/解码的条带,并确定目标集合;目标集合包括n个互不相等的数值,n为条带对应的盘个数;Obtain any stripe in RAID that needs to be encoded/decoded, and determine the target set; the target set includes n unequal values, where n is the number of disks corresponding to the stripe;
确定互不相等的第一预设值和第二预设值;Determine the first preset value and the second preset value that are not equal to each other;
响应于条带包括3个未知数据块,利用条带包括的所有已知数据块、3个未知数据块、目标集合、第一预设值和第二预设值,在伽罗华域内构建三元一次编/解码方程组;In response to the strip including 3 unknown data blocks, using all known data blocks included in the strip, the 3 unknown data blocks, the target set, the first preset value and the second preset value, three blocks are constructed in the Galois domain. One-dimensional encoding/decoding of equations;
针对三元一次编/解码方程组,将任一方程式中由伽罗华域除法计算得到的参数值组成一个数组,得到第一数组和第二数组;For the ternary linear encoding/decoding equations, the parameter values calculated by Galois field division in any equation are formed into an array to obtain the first array and the second array;
在第一数组和第二数组中选择同一未知数据块对应的两个参数值,并利用两个参数值更新第一数组和第二数组,得到新第一数组和新第二数组;Select two parameter values corresponding to the same unknown data block in the first array and the second array, and update the first array and the second array with the two parameter values to obtain a new first array and a new second array;
在新第一数组和新第二数组中确定未被选择的未知数据块对应的参数值,并基于未被选择的未知数据块对应的参数值确定被除数;以及Determine the parameter value corresponding to the unselected unknown data block in the new first array and the new second array, and determine the dividend based on the parameter value corresponding to the unselected unknown data block; and
基于未被选择的未知数据块对应的参数值、被除数、条带对应的盘个数及所有已知数据块确定3个未知数据块。Three unknown data blocks are determined based on the parameter values corresponding to the unselected unknown data blocks, the dividend, the number of disks corresponding to the stripe, and all known data blocks.
在第二方面,本申请实施例提供了一种RAID编解码装置,包括:In a second aspect, embodiments of the present application provide a RAID encoding and decoding device, including:
获取模块,用于获取RAID中任一个需要进行编/解码的条带,并确定目标集合;目标集合包括n个互不相等的数值,n为条带对应的盘个数;The acquisition module is used to obtain any stripe in RAID that needs to be encoded/decoded, and determine the target set; the target set includes n unequal values, where n is the number of disks corresponding to the stripe;
第一确定模块,用于确定互不相等的第一预设值和第二预设值;A first determination module, configured to determine a first preset value and a second preset value that are not equal to each other;
构建模块,用于响应于条带包括3个未知数据块,利用条带包括的所有已知数据块、3个未知数据块、目标集合、第一预设值和第二预设值,在伽罗华域内构建三元一次编/解码方程组;Building a module for, in response to the strip including 3 unknown data blocks, utilizing all known data blocks included in the strip, the 3 unknown data blocks, the target set, the first preset value and the second preset value, in the Ga Construct a system of ternary linear encoding/decoding equations in the Luohua domain;
组成模块,用于针对三元一次编/解码方程组,将任一方程式中由伽罗华域除法计算得到的参数值组成一个数组,得到第一数组和第二数组;The composition module is used for ternary linear encoding/decoding equations, and combines the parameter values calculated by Galois field division in any equation into an array to obtain the first array and the second array;
更新模块,用于在第一数组和第二数组中选择同一未知数据块对应的两个参数值,并利用两个参数值更新第一数组和第二数组,得到新第一数组和新第二数组;The update module is used to select two parameter values corresponding to the same unknown data block in the first array and the second array, and update the first array and the second array using the two parameter values to obtain a new first array and a new second array. array;
第二确定模块,用于在新第一数组和新第二数组中确定未被选择的未知数据块对应的参数值,并基于未被选择的未知数据块对应的参数值确定被除数;以及The second determination module is used to determine the parameter value corresponding to the unselected unknown data block in the new first array and the new second array, and determine the dividend based on the parameter value corresponding to the unselected unknown data block; and
第三确定模块,用于基于未被选择的未知数据块对应的参数值、被除数、条带对应的盘个数及所有已知数据块确定3个未知数据块。The third determination module is used to determine three unknown data blocks based on the parameter values corresponding to the unselected unknown data blocks, the dividend, the number of disks corresponding to the stripe, and all known data blocks.
在第三方面,本申请实施例提供了一种电子设备,包括存储器及一个或多个处理 器,存储器中储存有计算机可读指令,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行任一实施例中的RAID编解码方法的步骤。In a third aspect, embodiments of the present application provide an electronic device, including a memory and one or more processors. Computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by one or more processors, such that One or more processors perform the steps of the RAID encoding and decoding method in any embodiment.
在第四方面,本申请实施例提供了一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行任一实施例中的RAID编解码方法的步骤。计算机可读指令计算机可读指令计算机可读指令计算机可读指令In a fourth aspect, embodiments of the present application provide one or more non-volatile computer-readable storage media storing computer-readable instructions. When executed by one or more processors, the computer-readable instructions cause one or more A processor executes the steps of the RAID encoding and decoding method in any embodiment. computer readable instructions computer readable instructions computer readable instructions computer readable instructions
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或现相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly explain the technical solutions in the embodiments of the present application or related technologies, the drawings that need to be used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings in the following description are only For the embodiments of the present application, those of ordinary skill in the art can also obtain other drawings based on the provided drawings without exerting creative efforts.
图1为根据一个或多个实施例的第一种RAID编解码方法流程图;Figure 1 is a flow chart of a first RAID encoding and decoding method according to one or more embodiments;
图2为根据一个或多个实施例的一种RAID编解码装置示意图;Figure 2 is a schematic diagram of a RAID encoding and decoding device according to one or more embodiments;
图3为根据一个或多个实施例的一种电子设备示意图;Figure 3 is a schematic diagram of an electronic device according to one or more embodiments;
图4为根据一个或多个实施例的电子设备的内部结构图。Figure 4 is an internal structure diagram of an electronic device according to one or more embodiments.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.
如图1所示,本申请实施例公开了一种RAID编解码方法,包括:As shown in Figure 1, this embodiment of the present application discloses a RAID encoding and decoding method, which includes:
步骤S101:获取RAID中任一个需要进行编/解码的条带,并确定目标集合。Step S101: Obtain any stripe in the RAID that needs to be encoded/decoded, and determine the target set.
一个RAID可由若干个类型相同或不同的磁盘组成,不同磁盘可位于相同或不同机柜上。每个机柜对应一个控制器,用于控制本地机柜的数据落盘工作,不同机柜上的存储空间通过云服务进行整合。用户数据通过RAID对应的分布策略和控制方式,分别分布存储进不同的磁盘上,此时针对磁盘阵列而言,横跨不同硬盘的用于实现校验服务的单位被称作条带。A RAID can be composed of several disks of the same or different types, and different disks can be located on the same or different cabinets. Each cabinet corresponds to a controller, which is used to control the data placement work of the local cabinet. The storage spaces on different cabinets are integrated through cloud services. User data is distributed and stored on different disks through the distribution strategy and control method corresponding to RAID. At this time, for disk arrays, the units across different hard disks used to implement verification services are called stripes.
其中,目标集合包括n个互不相等的数值,n为条带对应的盘个数。其中,一个条带 对应的盘个数也就是组成当前RAID的盘总数。若盘总数为n,那么一个条带包括n个数据块,这n个数据块分别位于n个盘上。具体的,一个条带包括的n个数据块基于当前RAID方式可记录为n=k+m。例如:RAID方式为RAID5时,n=k+1(校验块个数)。RAID方式为RAID6时,n=k+2(校验块个数)。而本实施例提供的方式n=k+3(校验块个数)。其中,k表示用户数据块。由此可见,目标集合包括的n个互不相等的数值,与RAID中的各个盘一一对应,也对应一个条带中的各个块。Among them, the target set includes n unequal values, and n is the number of disks corresponding to the stripe. Among them, the number of disks corresponding to one stripe is the total number of disks that make up the current RAID. If the total number of disks is n, then a stripe includes n data blocks, and these n data blocks are located on n disks. Specifically, n data blocks included in one stripe can be recorded as n=k+m based on the current RAID mode. For example: when the RAID mode is RAID5, n=k+1 (number of parity blocks). When the RAID mode is RAID6, n=k+2 (number of parity blocks). The method provided by this embodiment is n=k+3 (number of check blocks). Among them, k represents the user data block. It can be seen that the n unequal values included in the target set correspond to each disk in the RAID one-to-one, and also correspond to each block in a stripe.
在一种具体实施方式中,目标集合包括的n个互不相等的数值可以灵活取值。如:取1~n的自然数,或者在自然数中乱序取值为:1、4、7、8、9……,直至取到n个自然数,或者取值为等差数列、等比数列。优选地,可以以2为底数进行取值,那么n个互不相等的数值为:2
0,2
1,…,2
n-1。
In a specific implementation manner, the n unequal values included in the target set can be flexibly set. For example: take natural numbers from 1 to n, or take random values among the natural numbers: 1, 4, 7, 8, 9... until n natural numbers are taken, or take the value as an arithmetic sequence or a geometric sequence. Preferably, the value can be determined with base 2, then n values that are not equal to each other are: 2 0 , 2 1 ,..., 2 n-1 .
需要说明的是,当n个互不相等的数值存在一定取值规则时(如:2
0,2
1,…,2
n-1),可简化编解码流程。因为基于该n个互不相等的数值得到的系数可简化求解方程。
It should be noted that when n unequal values have certain value rules (such as: 2 0 , 2 1 ,..., 2 n-1 ), the encoding and decoding process can be simplified. Because the coefficients obtained based on the n mutually unequal values can simplify the solution of the equation.
步骤S102:确定互不相等的第一预设值和第二预设值。Step S102: Determine a first preset value and a second preset value that are not equal to each other.
其中,第一预设值和第二预设值可以灵活取值。如取两个自然数:1和2,或者从目标集合中任选两个数。The first preset value and the second preset value can be flexibly set. For example, take two natural numbers: 1 and 2, or choose any two numbers from the target set.
其中,目标集合、第一预设值和第二预设值可通过软件或硬件确定取值。The target set, the first preset value and the second preset value can be determined by software or hardware.
步骤S103:响应于条带包括3个未知数据块,利用条带包括的所有已知数据块、3个未知数据块、目标集合、第一预设值和第二预设值,在伽罗华域内构建三元一次编/解码方程组。Step S103: In response to the stripe including 3 unknown data blocks, using all known data blocks, 3 unknown data blocks, the target set, the first preset value and the second preset value included in the stripe, in Galois Construct a system of three-dimensional linear encoding/decoding equations in the domain.
在一些可选的实施方式中,执行步骤S103以前,可以首先判断条带是否包括3个未知数据块,若条带包括3个未知数据块,则利用条带包括的所有已知数据块、3个未知数据块、目标集合、第一预设值和第二预设值,在伽罗华域内构建三元一次编/解码方程组。In some optional implementations, before performing step S103, it may first be determined whether the stripe includes 3 unknown data blocks. If the stripe includes 3 unknown data blocks, all known data blocks included in the stripe, 3 An unknown data block, a target set, a first preset value and a second preset value are used to construct a ternary one-step encoding/decoding equation system in the Galois domain.
若需要求解3个未知数据块,那么使用RAID 5和RAID 6将无法完成求解。为此,本实施例基于前述设定的目标集合、第一预设值、第二预设值以及参与求解的所有已知数据块、3个未知数据块在伽罗华域内构建三元一次编/解码方程组。If 3 unknown data blocks need to be solved, the solution cannot be completed using RAID 5 and RAID 6. To this end, this embodiment constructs a ternary primary code in the Galois domain based on the previously set target set, the first preset value, the second preset value, all known data blocks and three unknown data blocks participating in the solution. /decode system of equations.
在一种具体实施方式中,三元一次编/解码方程组包括:In a specific implementation, the three-dimensional linear encoding/decoding equations include:
其中,p
1、p
2、p
3为3个未知数据块;n为条带对应的盘个数;d
1,d
2,…,d
n-3为n-3个已知数据块;GF_div表示伽罗华域除法;a
1为第一预设值;a
2为第二预设值;b
1,b
2,…,b
n为目标集合中n个互不相等的数值;⊕表示伽罗华域加法。由于一个条带对应的盘个数为n,那么在该条带包括3个未知数据块的情况下,该条带中还剩下n-3个已知数据块,也就是:d
1,d
2,…,d
n-3。
Among them, p 1 , p 2 , p 3 are 3 unknown data blocks; n is the number of disks corresponding to the stripe; d 1 , d 2 ,…, d n-3 are n-3 known data blocks; GF_div Represents Galois field division; a 1 is the first preset value; a 2 is the second preset value; b 1 , b 2 ,..., b n are n unequal values in the target set; ⊕ represents Galois field division. Luo Huayu addition. Since the number of disks corresponding to a stripe is n, then when the stripe includes 3 unknown data blocks, there are still n-3 known data blocks left in the stripe, that is: d 1 , d 2 ,…,d n-3 .
步骤S104:针对三元一次编/解码方程组,将任一方程式中由伽罗华域除法计算得到的参数值组成一个数组,得到第一数组和第二数组。Step S104: For the ternary linear encoding/decoding equations, combine the parameter values calculated by Galois field division in any equation into an array to obtain a first array and a second array.
如上所示的三元一次编/解码方程组,其中共包括3个方程式,这3个方程式中有2个方程式涉及伽罗华域除法,因此提取这2个方程式中已知数据块和未知数据块的系数,得到2个数组:第一数组和第二数组。The three-dimensional linear encoding/decoding equations shown above include a total of 3 equations. 2 of these 3 equations involve Galois field division. Therefore, the known data blocks and unknown data in these 2 equations are extracted. The coefficients of the block, resulting in 2 arrays: the first array and the second array.
具体的,第一数组中的各参数值为:
第二数组中的各参数值为:
Specifically, the parameter values in the first array are: The parameter values in the second array are:
步骤S105:在第一数组和第二数组中选择同一未知数据块对应的两个参数值,并利用两个参数值更新第一数组和第二数组,得到新第一数组和新第二数组。Step S105: Select two parameter values corresponding to the same unknown data block in the first array and the second array, and use the two parameter values to update the first array and the second array to obtain a new first array and a new second array.
在第一数组和第二数组中选择同一未知数据块对应的两个参数值。如:选择未知数据块p
1在第一数组和第二数组中对应的两个参数值:
和
或者选择未知数据块p
2在第一数组和第二数组中对应的两个参数值;或者选择未知数据块p
3在第一数组和第二数组中对应的两个参数值。可见,无论是选择3个未知数据块中的哪一个,后续更新第一数组和第二数组时只需相应变化即可,但都能完成求解过程。
Select two parameter values corresponding to the same unknown data block in the first array and the second array. For example: select the two parameter values corresponding to the unknown data block p 1 in the first array and the second array: and Either select the two parameter values corresponding to the unknown data block p 2 in the first array and the second array; or select the two parameter values corresponding to the unknown data block p 3 in the first array and the second array. It can be seen that no matter which one of the three unknown data blocks is selected, the first array and the second array only need to be changed accordingly when subsequently updating, but the solution process can be completed.
假设n=16,那么目标集合包括16个互不相等的数值,分别为1,2,3,4,…,16。第一预设值a1=1,第二预设值a2=2,那么按照上述,第一数组中的各参数值为:[142,244,…,216,114],第二数组中的各参数值为:[244,71,…,114,192]。假设选择未知数据块p
3在第一数组和第二数组中对应的两个参数值:114(即:第一数组中的最后一个参数值)、192(即:第二数组中的最后一个参数值)。之后用第一数组中的、未知数据块p
3对应的参数值144与第一数组中的每个参数进行伽罗华域加法(也就是异或运算), 可得新第一数组:[252,134,…,170,0]。相应地,用第二数组中的、未知数据块p
3对应的参数值192与第二数组中的每个参数进行伽罗华域加法,可得新第二数组:[52,135,…,178,0]。至此,第一数组和第二数组更新完成。
Assuming n=16, then the target set includes 16 unequal values, namely 1, 2, 3, 4,...,16. The first preset value a1=1, the second preset value a2=2, then according to the above, the parameter values in the first array are: [142,244,...,216,114], and the parameter values in the second array are: [244,71,…,114,192]. Assume that the two parameter values corresponding to the unknown data block p 3 in the first array and the second array are selected: 114 (ie: the last parameter value in the first array), 192 (ie: the last parameter value in the second array) value). Then use the parameter value 144 corresponding to the unknown data block p 3 in the first array to perform Galois field addition (that is, XOR operation) with each parameter in the first array. The new first array can be obtained: [252,134 ,…,170,0]. Correspondingly, by performing Galois field addition with the parameter value 192 corresponding to the unknown data block p 3 in the second array and each parameter in the second array, a new second array can be obtained: [52,135,…,178, 0]. At this point, the first array and the second array are updated.
其中,上述第一数组、第二数组、新第一数组、新第二数组中各元素为十进制数。更新第一数组和第二数组时,先将第一数组、第二数组中的各参数值由十进制数转换为二进制数,再进行异或运算。Wherein, each element in the above-mentioned first array, second array, new first array, and new second array is a decimal number. When updating the first array and the second array, first convert the parameter values in the first array and the second array from decimal numbers to binary numbers, and then perform an XOR operation.
在一种具体实施方式中,利用两个参数值更新第一数组和第二数组,得到新第一数组和新第二数组,包括:利用从第一数组中选择的参数值对第一数组中的每个参数值进行伽罗华域加法,得到新第一数组;利用从第二数组中选择的参数值对第二数组中的每个参数值进行伽罗华域加法,得到新第二数组。In a specific implementation, using two parameter values to update the first array and the second array to obtain a new first array and a new second array includes: using the parameter value selected from the first array to Perform Galois field addition on each parameter value in the second array to obtain a new first array; use the parameter value selected from the second array to perform Galois field addition on each parameter value in the second array to obtain a new second array .
步骤S106:在新第一数组和新第二数组中确定未被选择的未知数据块对应的参数值,并基于未被选择的未知数据块对应的参数值确定被除数。Step S106: Determine the parameter value corresponding to the unselected unknown data block in the new first array and the new second array, and determine the dividend based on the parameter value corresponding to the unselected unknown data block.
在一种具体实施方式中,基于未被选择的未知数据块对应的参数值确定被除数,包括:按照第一公式计算被除数;第一公式为:p_deno=GF_mul(p1_32,p2_22)⊕GF_mul(p2_32,p1_22);其中,p_deno为被除数;GF_mul表示伽罗华域乘法;p1_32为新第二数组中未被选择的未知数据块p
1对应的参数值;p2_22为新第一数组中未被选择的未知数据块p
2对应的参数值;p2_32为新第二数组中未被选择的未知数据块p
2对应的参数值;p1_22为新第一数组中未被选择的未知数据块p
1对应的参数值;⊕表示伽罗华域加法。
In a specific implementation, determining the dividend based on the parameter value corresponding to the unselected unknown data block includes: calculating the dividend according to a first formula; the first formula is: p_deno=GF_mul(p1_32, p2_22)⊕GF_mul(p2_32, p1_22); where p_deno is the dividend; GF_mul represents Galois field multiplication; p1_32 is the parameter value corresponding to the unselected unknown data block p 1 in the new second array; p2_22 is the unselected unknown in the new first array The parameter value corresponding to the data block p 2 ; p2_32 is the parameter value corresponding to the unselected unknown data block p 2 in the new second array; p1_22 is the parameter value corresponding to the unselected unknown data block p 1 in the new first array ;⊕ represents Galois field addition.
若步骤S105中所选未知数据块为p
3,那么未被选择的未知数据块剩下p
1、p
2。按照上述示例,p
1在新第一数组中对应的参数值为252,p
1在新第二数组中对应的参数值为52;p
2在新第一数组中对应的参数值为170,p
2在新第二数组中对应的参数值为178。将这些参数值代入第一公式,可得:p_deno=GF_mul(52,170)⊕GF_mul(178,252)。至此,可求得被除数p_deno。
If the unknown data block selected in step S105 is p 3 , then the unselected unknown data blocks remain p 1 and p 2 . According to the above example, the corresponding parameter value of p 1 in the new first array is 252, and the corresponding parameter value of p 1 in the new second array is 52; the corresponding parameter value of p 2 in the new first array is 170, p The corresponding parameter value of 2 in the new second array is 178. Substituting these parameter values into the first formula, we can get: p_deno=GF_mul(52,170)⊕GF_mul(178,252). At this point, the dividend p_deno can be obtained.
步骤S107:基于未被选择的未知数据块对应的参数值、被除数、条带对应的盘个数及所有已知数据块确定3个未知数据块。Step S107: Determine three unknown data blocks based on the parameter values corresponding to the unselected unknown data blocks, the dividend, the number of disks corresponding to the stripe, and all known data blocks.
在一种具体实施方式中,基于未被选择的未知数据块对应的参数值、被除数、条带对应的盘个数及所有已知数据块确定3个未知数据块,包括:按照第二公式计算3个未知数据块;第二公式包括:In a specific implementation, determining three unknown data blocks based on the parameter values corresponding to the unselected unknown data blocks, the dividend, the number of disks corresponding to the stripe, and all known data blocks includes: calculating according to the second formula 3 unknown data blocks; the second formula includes:
其中,p
1、p
2、p
3为3个未知数据块;n为条带对应的盘个数;GF_div表示伽罗华域除法;GF_mul表示伽罗华域乘法;⊕表示伽罗华域加法;p1_32为新第二数组中未被选择的未知数据块p
1对应的参数值;p2_22为新第一数组中未被选择的未知数据块p
2对应的参数值;p2_32为新第二数组中未被选择的未知数据块p
2对应的参数值;p1_22为新第一数组中未被选择的未知数据块p
1对应的参数值;v2'(i)为新第二数组中已知数据块i对应的参数值;v1'(i)为新第一数组中已知数据块i对应的参数值;p_deno为被除数;d
i为已知数据块i。i=1,2,3,…,n-3。
Among them, p 1 , p 2 , and p 3 are 3 unknown data blocks; n is the number of disks corresponding to the stripe; GF_div represents Galois field division; GF_mul represents Galois field multiplication; ⊕ represents Galois field addition. ; p1_32 is the parameter value corresponding to the unselected unknown data block p 1 in the new second array; p2_22 is the parameter value corresponding to the unselected unknown data block p 2 in the new first array; p2_32 is the parameter value corresponding to the unselected unknown data block p 2 in the new second array The parameter value corresponding to the unselected unknown data block p 2 ; p1_22 is the parameter value corresponding to the unselected unknown data block p 1 in the new first array; v2'(i) is the known data block in the new second array The parameter value corresponding to i; v1'(i) is the parameter value corresponding to the known data block i in the new first array; p_deno is the dividend; di is the known data block i. i=1,2,3,…,n-3.
第二公式中的p
1、p
2、p
3可并行求解,从而提升运算速率。
p 1 , p 2 , and p 3 in the second formula can be solved in parallel, thereby increasing the computing speed.
可见,图1所示的实施例首先设定了包括n个互不相等数值的目标集合,以及互不相等的第一预设值和第二预设值作为参数,而后在需要求解3个未知数时,基于这些参数、已知量(条带包括的所有已知数据块)、未知量(即3个未知数据块),在伽罗华域内构建三元一次编/解码方程组,由于设定的n个数值互不相等,且第一预设值、第二预设值互不相等,因此不同数据块在方程中的系数会不同,因此可避免出现无法求解的情况。同时,伽罗华域内的除法不会出现小数,因此可避免出现除不尽的情况,从而提升编解码精度。在该方案中,需要求解的未知数据块可以是:编码过程要计算的校验块,也可以是解码过程中要计算的已损坏数据块。也即:该方案描述的既是编码过程,也是解码过程,该方案基于同一逻辑即可完成RAID编码和RAID解码。由于该方案可求解3个未知数据块,因此比RAID 5和RAID 6的容错率更高,适用于大条带(如:对应盘个 数不小于32的条带)编解码。It can be seen that the embodiment shown in Figure 1 first sets a target set including n mutually unequal values, as well as mutually unequal first preset values and second preset values as parameters, and then needs to solve three unknown numbers. At this time, based on these parameters, known quantities (all known data blocks included in the strip), and unknown quantities (that is, 3 unknown data blocks), a ternary linear encoding/decoding equation system is constructed in the Galois domain. Due to the setting The n values of are not equal to each other, and the first preset value and the second preset value are not equal to each other, so the coefficients of different data blocks in the equation will be different, so the situation that cannot be solved can be avoided. At the same time, decimals will not appear in division in the Galois field, so the situation of incomplete division can be avoided, thereby improving the encoding and decoding accuracy. In this solution, the unknown data blocks that need to be solved can be: check blocks to be calculated during the encoding process, or damaged data blocks to be calculated during the decoding process. That is to say: this solution describes both the encoding process and the decoding process. This solution can complete RAID encoding and RAID decoding based on the same logic. Since this solution can solve 3 unknown data blocks, it has a higher fault tolerance rate than RAID 5 and RAID 6, and is suitable for encoding and decoding large stripes (such as stripes corresponding to a number of disks of not less than 32).
需要说明的是,RAID编码过程对应存储数据的过程,在存储数据后,一个由n个块组成的条带中包括3个校验块:p
1、p
2、p
3;n-3个用户数据块:d
1,d
2,…,d
n-3。若该条带中任一个用户数据块(d
1,d
2,…,d
n-3中的任一个)发生更改,那么可直接确定更改后的数据块与更改前的数据块的差异,而后基于该差异确定3个校验块需要做的相应更改,之后可直接更改3个校验块,以完成一个条带的更改。
It should be noted that the RAID encoding process corresponds to the process of storing data. After storing the data, a stripe consisting of n blocks includes 3 parity blocks: p 1 , p 2 , p 3 ; n-3 users Data block: d 1 , d 2 ,…, d n-3 . If any user data block (any one of d 1 , d 2 ,..., d n-3 ) in the stripe is changed, the difference between the changed data block and the pre-changed data block can be directly determined, and then Based on the difference, the corresponding changes that need to be made to the three check blocks are determined, and then the three check blocks can be directly changed to complete the change of one stripe.
在一种具体实施方式中,若条带中作为用户数据的任一已知数据块发生更改,则基于更改后的已知数据块与原已知数据块之间的差异确定条带中的校验数据的校验差异,基于校验差异更新校验数据。In a specific implementation, if any known data block as user data in the strip is changed, the correction value in the strip is determined based on the difference between the changed known data block and the original known data block. Check the verification difference of the verification data, and update the verification data based on the verification difference.
假设用户数据块d
x发生更改,那么可使用下述公式更新校验块p
1:
Assuming that the user data block d x changes, the following formula can be used to update the parity block p 1 :
其中,d
x'为更改后的d
x,Δd
x为更改后的d
x与更改前的d
x的差异,Δp
1为p
1需要做的相应更改(即p
1的校验差异),p
1'为更改后的p
1。v1'(x)为新第一数组中d
x对应的参数值,v2'(x)为新第二数组中d
x对应的参数值。
Among them, d x ' is the d x after the change, Δd x is the difference between the d x after the change and the d x before the change, Δp 1 is the corresponding change that p 1 needs to make (that is, the verification difference of p 1 ), p 1 ' is the changed p 1 . v1'(x) is the parameter value corresponding to d x in the new first array, and v2'(x) is the parameter value corresponding to d x in the new second array.
同理,可以据此更新校验块p
2和p
3,从而得到更新后的3个校验块:p
1'、p
2'、p
3'。
In the same way, the check blocks p 2 and p 3 can be updated accordingly, thereby obtaining three updated check blocks: p 1 ', p 2 ', and p 3 '.
在一些可选的实施方式中,本申请实施例提供的RAID编解码方案的容错率最大为3,还可以降级为2和1,也就是降级为RAID 5、RAID 6。也即:本申请在一个条带中有3个块错误时、2个块错误时、1个块错误时,都能进行纠错,完成数据恢复。In some optional implementations, the maximum fault tolerance rate of the RAID encoding and decoding scheme provided by the embodiments of this application is 3, and can also be downgraded to 2 and 1, that is, downgraded to RAID 5 and RAID 6. That is to say: this application can correct errors and complete data recovery when there are 3 block errors, 2 block errors, or 1 block error in a stripe.
在一个条带中有3个块错误时,按照上述实施例即可完成数据恢复。When there are three block errors in one stripe, data recovery can be completed according to the above embodiment.
若条带包括1个未知数据块(也就是一个条带中有1个块错误时),则对条带中除该未知数据块之外的其他块进行异或,以确定该未知数据块。例如:假设数据块d
2发生错误,那么求解数据块d
2的公式为:
If the stripe includes an unknown data block (that is, when there is a block error in a stripe), XOR other blocks in the stripe except the unknown data block to determine the unknown data block. For example: Suppose an error occurs in data block d 2 , then the formula for solving data block d 2 is:
在一些可选的实施方式中,在基于未被选择的未知数据块对应的参数值、被除数、条带对应的盘个数及所有已知数据块确定3个未知数据块之后,响应于条带包括1个未知数据块,对条带中除该未知数据块之外的其他块进行异或,以确定该未知数据块。In some optional implementations, after determining three unknown data blocks based on the parameter values corresponding to the unselected unknown data blocks, the dividend, the number of disks corresponding to the stripe, and all known data blocks, in response to the stripe Including 1 unknown data block, XOR other blocks in the strip except the unknown data block to determine the unknown data block.
若条带包括2个未知数据块(也就是一个条带中有2个块错误时),则确定2个未知数据块在三元一次编/解码方程组中由伽罗华域除法计算得到的参数值;基于所确定的参数值、除2个未知数据块之外的其他块及其他块在三元一次编/解码方程组中由伽罗华域除法计算得到的参数值确定2个未知数据块。If the stripe includes 2 unknown data blocks (that is, when there are 2 block errors in one stripe), determine the parameters of the 2 unknown data blocks calculated by Galois field division in the ternary linear encoding/decoding equations. value; determine the 2 unknown data blocks based on the determined parameter values, other blocks except the 2 unknown data blocks, and the parameter values of other blocks calculated by Galois field division in the ternary one-step encoding/decoding equation system.
在一些可选的实施方式中,在基于未被选择的未知数据块对应的参数值、被除数、条带对应的盘个数及所有已知数据块确定3个未知数据块之后,响应于若条带包括2个未知数据块,则确定2个未知数据块在三元一次编/解码方程组中由伽罗华域除法计算得到的参数值;基于所确定的参数值、除2个未知数据块之外的其他块及其他块在三元一次编/解码方程组中由伽罗华域除法计算得到的参数值确定所述2个未知数据块。In some optional implementations, after determining three unknown data blocks based on the parameter values corresponding to the unselected unknown data blocks, the dividend, the number of disks corresponding to the stripe, and all known data blocks, in response to if The band includes 2 unknown data blocks, then determine the parameter values of the 2 unknown data blocks calculated by Galois field division in the ternary linear encoding/decoding equations; based on the determined parameter values, divide the 2 unknown data blocks The two unknown data blocks are determined by the parameter values calculated by Galois field division in the ternary linear encoding/decoding equation system except for other blocks.
例如:假设p
1、d
2发生错误,那么求解p
1、d
2的公式为:
For example: Suppose errors occur in p 1 and d 2 , then the formula for solving p 1 and d 2 is:
其中,d
1,d
2,…,d
n-3,p
1,p
2,p
3为条带中的n个数据块,p
1、d
2为其中的2个未知数据块;GF_div表示伽罗华域除法;a
1为第一预设值;b
1,b
2,…,b
n为目标集合中n个互不相等的数值;
表示伽罗华域加法。
Among them, d 1 , d 2 ,…, d n-3 , p 1 , p 2 , p 3 are n data blocks in the strip, p 1 and d 2 are two unknown data blocks among them; GF_div represents GA Luohua domain division; a 1 is the first preset value; b 1 , b 2 ,..., b n are n unequal values in the target set; Represents Galois field addition.
可见,两个错误发生时,需要用到三元一次编/解码方程组中包括伽罗华域除法的任一方程式中各块对应的系数。It can be seen that when two errors occur, the coefficients corresponding to each block in any equation including Galois field division in the ternary linear encoding/decoding equations need to be used.
基于上述实施例,需要说明的是,伽罗华域一般使用的是GF8,其多项式是:P(x)=x
8+x
4+x
3+x
1+1。对应的数据映射表如表1。
Based on the above embodiment, it should be noted that the Galois field generally uses GF8, and its polynomial is: P(x)=x 8 +x 4 +x 3 +x 1 +1. The corresponding data mapping table is shown in Table 1.
表1Table 1
按照表1可进行数据映射。当数据为十进制数10时,通过上述伽罗华域本源多项式P(X)转换,10可表示为二进制01110100。通过这样的转换,各个数据都会被转换为8比特的二进制数,并进行基于8比特二进制数的四则运算。Data mapping can be performed according to Table 1. When the data is a decimal number 10, through the above-mentioned Galois field original polynomial P(X) conversion, 10 can be expressed as binary 01110100. Through such conversion, each data will be converted into an 8-bit binary number, and four arithmetic operations based on the 8-bit binary number will be performed.
本申请在伽罗华域运算,那么可设计如下编码公式:This application operates in the Galois field, so the following encoding formula can be designed:
其中,d
1,d
2,…,d
n为一个条带中n个用户数据块,a
1为第一预设值;a
2为第二预设值;b
1,b
2,…,b
n为目标集合中n个互不相等的数值。
Among them, d 1 , d 2 ,…, d n are n user data blocks in a stripe, a 1 is the first preset value; a 2 is the second preset value; b 1 , b 2 ,…, b n is n values that are not equal to each other in the target set.
设一个条带对应的盘总个数仍为n,那么在上述编码公式中加入3个校验块:p
1、 p
2、p
3,那么n=(n-3)+3,可得三元一次编/解码方程组:
Assume that the total number of disks corresponding to a stripe is still n, then add 3 check blocks to the above encoding formula: p 1 , p 2 , p 3 , then n=(n-3)+3, we can get three A system of linear encoding/decoding equations:
当然,所加入的3个校验块的位置以当前RAID系统中的负载均衡等机制确定,三元一次编/解码方程组中的3个校验块的位置仅为示例性展示。Of course, the positions of the three added check blocks are determined by mechanisms such as load balancing in the current RAID system. The positions of the three check blocks in the ternary one-step encoding/decoding equation set are only exemplary.
之后基于三元一次编/解码方程组确定第一数组、第二数组,而后更新第一数组、第二数组,进而确定被除数并求解3个校验块,具体可参照上述实施例的相关介绍。Then, the first array and the second array are determined based on the ternary one-time encoding/decoding equations, and then the first array and the second array are updated, and then the dividend is determined and the three check blocks are solved. For details, please refer to the relevant introduction of the above embodiment.
可见,按照本申请,编解码过程依据各块在数组中的对应参数值完成,可实现三纠错编解码,运算过程简易高效,不会出现小数和精度问题,适用于大条带编解码。且可以降级至RAID5、RAID6。当然,本申请还适用于不同的伽罗华域,在不同伽罗华域的多项式下,生成的数组不同,但运算逻辑相同,也都无需求逆矩阵,具有明显的高速和灵活性优势。It can be seen that according to this application, the encoding and decoding process is completed based on the corresponding parameter values of each block in the array, and three error correction encoding and decoding can be realized. The operation process is simple and efficient, and there will be no decimal and precision problems. It is suitable for large stripe encoding and decoding. And can be downgraded to RAID5 and RAID6. Of course, this application is also applicable to different Galois fields. Under the polynomials of different Galois fields, the generated arrays are different, but the operation logic is the same, and there is no need for an inverse matrix, which has obvious advantages of high speed and flexibility.
下面对本申请实施例提供的一种RAID编解码装置进行介绍,下文描述的一种RAID编解码装置与上文描述的一种RAID编解码方法可以相互参照。The following is an introduction to a RAID encoding and decoding device provided by embodiments of the present application. The RAID encoding and decoding device described below and the RAID encoding and decoding method described above may be referred to each other.
参见图2所示,本申请实施例公开了一种RAID编解码装置,包括:Referring to Figure 2, an embodiment of the present application discloses a RAID encoding and decoding device, which includes:
获取模块201,用于获取RAID中任一个需要进行编/解码的条带,并确定目标集合;目标集合包括:n个互不相等的数值,n为条带对应的盘个数;The acquisition module 201 is used to acquire any stripe in the RAID that needs to be encoded/decoded, and determine the target set; the target set includes: n unequal values, where n is the number of disks corresponding to the stripe;
第一确定模块202,用于确定互不相等的第一预设值和第二预设值;The first determination module 202 is used to determine the first preset value and the second preset value that are not equal to each other;
构建模块203,用于响应于条带包括3个未知数据块,利用条带包括的所有已知数据块、3个未知数据块、目标集合、第一预设值和第二预设值,在伽罗华域内构建三元一次编/解码方程组; Building module 203, configured to use all known data blocks, the 3 unknown data blocks, the target set, the first preset value and the second preset value included in the stripe in response to the stripe including 3 unknown data blocks. Construct a system of three-dimensional linear encoding/decoding equations in the Galois domain;
组成模块204,用于针对三元一次编/解码方程组,将任一方程式中由伽罗华域除法计算得到的参数值组成一个数组,得到第一数组和第二数组;The composition module 204 is used to form an array with the parameter values calculated by Galois field division in any equation for the ternary linear encoding/decoding equations to obtain a first array and a second array;
更新模块205,用于在第一数组和第二数组中选择同一未知数据块对应的两个参数值,并利用两个参数值更新第一数组和第二数组,得到新第一数组和新第二数组;The update module 205 is used to select two parameter values corresponding to the same unknown data block in the first array and the second array, and update the first array and the second array using the two parameter values to obtain a new first array and a new third array. two array;
第二确定模块206,用于在新第一数组和新第二数组中确定未被选择的未知数据块对应的参数值,并基于未被选择的未知数据块对应的参数值确定被除数;The second determination module 206 is configured to determine the parameter value corresponding to the unselected unknown data block in the new first array and the new second array, and determine the dividend based on the parameter value corresponding to the unselected unknown data block;
第三确定模块207,用于基于未被选择的未知数据块对应的参数值、被除数、条带对 应的盘个数及所有已知数据块确定3个未知数据块。The third determination module 207 is used to determine three unknown data blocks based on the parameter value corresponding to the unselected unknown data block, the dividend, the number of disks corresponding to the stripe, and all known data blocks.
在一种具体实施方式中,三元一次编/解码方程组为:In a specific implementation, the three-dimensional linear encoding/decoding equations are:
其中,p
1、p
2、p
3为3个未知数据块;n为条带对应的盘个数;d
1,d
2,…,d
n-3为n-3个已知数据块;GF_div表示伽罗华域除法;a
1为第一预设值;a
2为第二预设值;b
1,b
2,…,b
n为目标集合中n个互不相等的数值;⊕表示伽罗华域加法。
Among them, p 1 , p 2 , p 3 are 3 unknown data blocks; n is the number of disks corresponding to the stripe; d 1 , d 2 ,…, d n-3 are n-3 known data blocks; GF_div Represents Galois field division; a 1 is the first preset value; a 2 is the second preset value; b 1 , b 2 ,..., b n are n unequal values in the target set; ⊕ represents Galois field division. Luo Huayu addition.
在一种具体实施方式中,更新模块具体用于:In a specific implementation, the update module is specifically used to:
利用从第一数组中选择的参数值对第一数组中的每个参数值进行伽罗华域加法,得到新第一数组;Perform Galois field addition on each parameter value in the first array using the parameter value selected from the first array to obtain a new first array;
利用从第二数组中选择的参数值对第二数组中的每个参数值进行伽罗华域加法,得到新第二数组。Galois field addition is performed on each parameter value in the second array using the parameter value selected from the second array to obtain a new second array.
在一种具体实施方式中,第二确定模块具体用于:In a specific implementation, the second determination module is specifically used to:
按照第一公式计算被除数;第一公式为:p_deno=GF_mul(p1_32,p2_22)⊕GF_mul(p2_32,p1_22);Calculate the dividend according to the first formula; the first formula is: p_deno=GF_mul(p1_32,p2_22)⊕GF_mul(p2_32,p1_22);
其中,p_deno为被除数;GF_mul表示伽罗华域乘法;p1_32为新第二数组中未被选择的未知数据块p
1对应的参数值;p2_22为新第一数组中未被选择的未知数据块p
2对应的参数值;p2_32为新第二数组中未被选择的未知数据块p
2对应的参数值;p1_22为新第一数组中未被选择的未知数据块p
1对应的参数值;
表示伽罗华域加法。
Among them, p_deno is the dividend; GF_mul represents Galois field multiplication; p1_32 is the parameter value corresponding to the unselected unknown data block p 1 in the new second array; p2_22 is the unselected unknown data block p in the new first array 2 corresponds to the parameter value; p2_32 is the parameter value corresponding to the unselected unknown data block p 2 in the new second array; p1_22 is the parameter value corresponding to the unselected unknown data block p 1 in the new first array; Represents Galois field addition.
在一种具体实施方式中,第三确定模块具体用于:In a specific implementation, the third determination module is specifically used to:
按照第二公式计算3个未知数据块;第二公式包括:Calculate 3 unknown data blocks according to the second formula; the second formula includes:
其中,p
1、p
2、p
3为3个未知数据块;n为条带对应的盘个数;GF_div表示伽罗华域除法;GF_mul表示伽罗华域乘法;
表示伽罗华域加法;p1_32为新第二数组中未被选择的未知数据块p
1对应的参数值;p2_22为新第一数组中未被选择的未知数据块p
2对应的参数值;p2_32为新第二数组中未被选择的未知数据块p
2对应的参数值;p1_22为新第一数组中未被选择的未知数据块p
1对应的参数值;v2'(i)为新第二数组中已知数据块i对应的参数值;v1'(i)为新第一数组中已知数据块i对应的参数值;p_deno为被除数;d
i为已知数据块i。
Among them, p 1 , p 2 , and p 3 are three unknown data blocks; n is the number of disks corresponding to the strip; GF_div represents Galois field division; GF_mul represents Galois field multiplication; Represents Galois field addition; p1_32 is the parameter value corresponding to the unselected unknown data block p 1 in the new second array; p2_22 is the parameter value corresponding to the unselected unknown data block p 2 in the new first array; p2_32 is the parameter value corresponding to the unselected unknown data block p 2 in the new second array; p1_22 is the parameter value corresponding to the unselected unknown data block p 1 in the new first array; v2'(i) is the new second The parameter value corresponding to the known data block i in the array; v1'(i) is the parameter value corresponding to the known data block i in the new first array; p_deno is the dividend; di is the known data block i.
在一种具体实施方式中,还包括:In a specific implementation, it also includes:
更改模块,用于若条带中作为用户数据的任一已知数据块发生更改,则基于更改后的已知数据块与原已知数据块之间的差异确定条带中的校验数据的校验差异,基于校验差异更新校验数据。The change module is used to determine the verification data in the strip based on the difference between the changed known data block and the original known data block if any known data block in the strip is changed. Verification difference, update the verification data based on the verification difference.
在一种具体实施方式中,n个互不相等的数值为:2
0,2
1,…,2
n-1。
In a specific implementation, the n unequal values are: 2 0 , 2 1 ,..., 2 n-1 .
在一种具体实施方式中,还包括:In a specific implementation, it also includes:
单纠错模块,用于若条带包括1个未知数据块,则对条带中除该未知数据块之外的其他块进行异或,以确定该未知数据块。The single error correction module is used to perform XOR on other blocks in the strip except the unknown data block if the stripe includes an unknown data block to determine the unknown data block.
在一种具体实施方式中,还包括:In a specific implementation, it also includes:
双纠错模块,用于若条带包括2个未知数据块,则按照第三公式计算2个未知数据块;第三公式为:The double error correction module is used to calculate the 2 unknown data blocks according to the third formula if the stripe includes 2 unknown data blocks; the third formula is:
其中,d
1、d
2为2个未知数据块;d
1,d
2,…,d
n为条带中的n个数据块;GF_div表示伽罗华域除法;a
1为第一预设值;b
1,b
2,…,b
n为目标集合中n个互不相等的数值;⊕表示伽罗华域加法。
Among them, d 1 and d 2 are 2 unknown data blocks; d 1 , d 2 ,..., d n are n data blocks in the strip; GF_div represents Galois field division; a 1 is the first preset value ; b 1 , b 2 ,…, b n are n unequal values in the target set; ⊕ represents Galois field addition.
其中,关于本实施例中各个模块、单元更加具体的工作过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For more specific working processes of each module and unit in this embodiment, reference may be made to the corresponding content disclosed in the foregoing embodiments, which will not be described again here.
可见,本实施例提供了一种RAID编解码装置,能够提高RAID编解码精度,避免出现无法求解的情况,还比RAID 5和RAID 6的容错率更高。It can be seen that this embodiment provides a RAID encoding and decoding device, which can improve the accuracy of RAID encoding and decoding, avoid situations where solutions cannot be solved, and has a higher fault tolerance rate than RAID 5 and RAID 6.
下面对本申请实施例提供的一种电子设备进行介绍,下文描述的一种电子设备与上文描述的一种RAID编解码方法及装置可以相互参照。An electronic device provided by an embodiment of the present application is introduced below. The electronic device described below and the RAID encoding and decoding method and device described above may be referred to each other.
参见图3所示,本申请实施例公开了一种电子设备,包括:Referring to Figure 3, an embodiment of the present application discloses an electronic device, including:
存储器301,用于保存计算机可读指令; Memory 301, used to store computer readable instructions;
处理器302,用于执行计算机可读指令,以实现上述任一实施例公开RAID编解码的方法。The processor 302 is configured to execute computer-readable instructions to implement the RAID encoding and decoding method disclosed in any of the above embodiments.
在一些可选的实施方式中,存储器301中储存有计算机可读指令,计算机可读指令被所述一个或多个处理器302执行时,使得一个或多个处理器302执行前述任一实施例中的RAID编解码方法的步骤。In some optional implementations, computer-readable instructions are stored in the memory 301. When executed by the one or more processors 302, the computer-readable instructions cause the one or more processors 302 to execute any of the foregoing embodiments. Steps in the RAID encoding and decoding method.
在一些实施例中,电子设备为计算机设备,其内部结构图可以如图4所示。该电子设备包括通过系统总线连接的处理器、存储器、网络接口。其中,电子设备的处理器用于提供计算和控制能力。该电子设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该电子设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现任一实施例中的RAID编解码方法。In some embodiments, the electronic device is a computer device, and its internal structure diagram can be shown in Figure 4 . The electronic device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes non-volatile storage media and internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions. This internal memory provides an environment for the execution of an operating system and computer-readable instructions in a non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When executed by the processor, the computer-readable instructions implement the RAID encoding and decoding method in any embodiment.
下面对本申请实施例提供的一种可读存储介质进行介绍,下文描述的一种可读存储介质与上文描述的一种RAID编解码方法、装置及设备可以相互参照。The following is an introduction to a readable storage medium provided by embodiments of the present application. The readable storage medium described below and the RAID encoding and decoding method, apparatus and equipment described above may be referred to each other.
一种可读存储介质,用于保存计算机可读指令,其中,计算机可读指令被处理器执行时实现前述实施例公开的RAID编解码方法。关于该方法的具体步骤可以参考前述实施例中公开的相应内容,在此不再进行赘述。A readable storage medium used to store computer-readable instructions, wherein when the computer-readable instructions are executed by a processor, the RAID encoding and decoding method disclosed in the foregoing embodiments is implemented. Regarding the specific steps of this method, reference may be made to the corresponding content disclosed in the foregoing embodiments, which will not be described again here.
在一些实施例中,本申请实施例公开了一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行前述任一实施例中的RAID编解码方法的步骤。In some embodiments, embodiments of the present application disclose one or more non-volatile computer-readable storage media storing computer-readable instructions that, when executed by one or more processors, cause one or more Multiple processors execute the steps of the RAID encoding and decoding method in any of the foregoing embodiments.
本申请实施例涉及的“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法或设备固有的其它步骤或单元。“First”, “second”, “third”, “fourth”, etc. (if present) mentioned in the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, e.g., a process, method or apparatus that encompasses a series of steps or units need not be limited to those steps or units expressly listed. , but may include other steps or elements not expressly listed or inherent to such processes, methods or apparatuses.
需要说明的是,在本申请实施例中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。It should be noted that the descriptions involving “first”, “second”, etc. in the embodiments of this application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the indicated technical features. quantity. Therefore, features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In addition, the technical solutions in various embodiments can be combined with each other, but it must be based on the realization by those of ordinary skill in the art. When the combination of technical solutions is contradictory or cannot be realized, it should be considered that such a combination of technical solutions does not exist. , nor is it within the scope of protection required by this application.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on its differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的可读存储介质中。The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly in hardware, in software modules executed by a processor, or in a combination of both. Software modules may be located in random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or anywhere in the field of technology. any other known form of readable storage medium.
本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and the core idea of the present application; at the same time, for those of ordinary skill in the art, based on this application There will be changes in the specific implementation and scope of application of the ideas. In summary, the contents of this description should not be understood as limiting the present application.
Claims (20)
- 一种RAID编解码方法,其特征在于,包括:A RAID encoding and decoding method, characterized by including:获取RAID中任一个需要进行编/解码的条带,并确定目标集合;所述目标集合包括n个互不相等的数值,n为所述条带对应的盘个数;Obtain any stripe in the RAID that needs to be encoded/decoded, and determine a target set; the target set includes n unequal values, where n is the number of disks corresponding to the stripe;确定互不相等的第一预设值和第二预设值;Determine the first preset value and the second preset value that are not equal to each other;响应于所述条带包括3个未知数据块,利用所述条带包括的所有已知数据块、所述3个未知数据块、所述目标集合、所述第一预设值和所述第二预设值,在伽罗华域内构建三元一次编/解码方程组;In response to the strip including 3 unknown data blocks, using all known data blocks included in the strip, the 3 unknown data blocks, the target set, the first preset value and the third 2 preset values, construct a system of three-dimensional linear encoding/decoding equations in the Galois domain;针对所述三元一次编/解码方程组,将任一方程式中由伽罗华域除法计算得到的参数值组成一个数组,得到第一数组和第二数组;For the three-dimensional linear encoding/decoding equations, the parameter values calculated by Galois field division in any equation are formed into an array to obtain a first array and a second array;在所述第一数组和所述第二数组中选择同一未知数据块对应的两个参数值,并利用所述两个参数值更新所述第一数组和所述第二数组,得到新第一数组和新第二数组;Select two parameter values corresponding to the same unknown data block in the first array and the second array, and use the two parameter values to update the first array and the second array to obtain a new first array. array and new second array;在所述新第一数组和所述新第二数组中确定未被选择的未知数据块对应的参数值,并基于所述未被选择的未知数据块对应的参数值确定被除数;以及Determine the parameter value corresponding to the unselected unknown data block in the new first array and the new second array, and determine the dividend based on the parameter value corresponding to the unselected unknown data block; and基于所述未被选择的未知数据块对应的参数值、所述被除数、所述条带对应的盘个数及所有已知数据块确定3个未知数据块。Three unknown data blocks are determined based on the parameter value corresponding to the unselected unknown data block, the dividend, the number of disks corresponding to the stripe, and all known data blocks.
- 根据权利要求1所述的方法,其特征在于,所述三元一次编/解码方程组包括:The method according to claim 1, characterized in that the three-dimensional one-time encoding/decoding equation set includes:其中,p 1、p 2、p 3为3个未知数据块;n为所述条带对应的盘个数;d 1,d 2,…,d n-3为n-3个已知数据块;GF_div表示伽罗华域除法;a 1为第一预设值;a 2为第二预设值;b 1,b 2,…,b n为所述目标集合中n个互不相等的数值; 表示伽罗华域加法。 Among them, p 1 , p 2 , p 3 are 3 unknown data blocks; n is the number of disks corresponding to the stripe; d 1 , d 2 ,..., d n-3 are n-3 known data blocks ; GF_div represents Galois field division; a 1 is the first preset value; a 2 is the second preset value; b 1 , b 2 ,..., b n are n unequal values in the target set ; Represents Galois field addition.
- 根据权利要求1至2所述的方法,其特征在于,所述利用所述两个参数值更新所述第一数组和所述第二数组,得到新第一数组和新第二数组,包括:The method according to claims 1 to 2, characterized in that, using the two parameter values to update the first array and the second array to obtain a new first array and a new second array includes:利用从所述第一数组中选择的参数值对所述第一数组中的每个参数值进行伽罗华域加法,得到所述新第一数组;以及performing Galois field addition on each parameter value in the first array using the parameter value selected from the first array to obtain the new first array; and利用从所述第二数组中选择的参数值对所述第二数组中的每个参数值进行伽罗华域 加法,得到所述新第二数组。Perform Galois field addition on each parameter value in the second array using the parameter value selected from the second array to obtain the new second array.
- 根据权利要求1至3任一项所述的方法,其特征在于,The method according to any one of claims 1 to 3, characterized in that,所述基于所述未被选择的未知数据块对应的参数值确定被除数,包括:按照第一公式计算所述被除数;Determining the dividend based on the parameter value corresponding to the unselected unknown data block includes: calculating the dividend according to the first formula;其中,p_deno为所述被除数;GF_mul表示伽罗华域乘法;p1_32为所述新第二数组中未被选择的未知数据块p 1对应的参数值;p2_22为所述新第一数组中未被选择的未知数据块p 2对应的参数值;p2_32为所述新第二数组中未被选择的未知数据块p 2对应的参数值;p1_22为所述新第一数组中未被选择的未知数据块p 1对应的参数值; 表示伽罗华域加法。 Among them, p_deno is the dividend; GF_mul represents Galois field multiplication; p1_32 is the parameter value corresponding to the unknown data block p 1 that is not selected in the new second array; p2_22 is the parameter value that is not selected in the new first array. The parameter value corresponding to the selected unknown data block p 2 ; p2_32 is the parameter value corresponding to the unselected unknown data block p 2 in the new second array; p1_22 is the unselected unknown data in the new first array Parameter value corresponding to block p 1 ; Represents Galois field addition.
- 根据权利要求1至4任一项所述的方法,其特征在于,The method according to any one of claims 1 to 4, characterized in that,所述基于所述未被选择的未知数据块对应的参数值、所述被除数、所述条带对应的盘个数及所有已知数据块确定3个未知数据块,包括:按照第二公式计算3个未知数据块;Determining three unknown data blocks based on the parameter values corresponding to the unselected unknown data blocks, the dividend, the number of disks corresponding to the stripe, and all known data blocks includes: calculating according to the second formula 3 unknown data blocks;所述第二公式包括:The second formula includes:其中,p 1、p 2、p 3为3个未知数据块;n为所述条带对应的盘个数;GF_div表示伽罗华域除法;GF_mul表示伽罗华域乘法; 表示伽罗华域加法;p1_32为所述新第二数组中未被选择的未知数据块p 1对应的参数值;p2_22为所述新第一数组中未被选择的未知数 据块p 2对应的参数值;p2_32为所述新第二数组中未被选择的未知数据块p 2对应的参数值;p1_22为所述新第一数组中未被选择的未知数据块p 1对应的参数值;v2'(i)为所述新第二数组中已知数据块i对应的参数值;v1'(i)为所述新第一数组中已知数据块i对应的参数值;p_deno为所述被除数;d i为已知数据块i。 Among them, p 1 , p 2 , and p 3 are three unknown data blocks; n is the number of disks corresponding to the stripe; GF_div represents Galois field division; GF_mul represents Galois field multiplication; represents Galois field addition; p1_32 is the parameter value corresponding to the unselected unknown data block p 1 in the new second array; p2_22 is the parameter value corresponding to the unselected unknown data block p 2 in the new first array Parameter value; p2_32 is the parameter value corresponding to the unselected unknown data block p 2 in the new second array; p1_22 is the parameter value corresponding to the unselected unknown data block p 1 in the new first array; v2 '(i) is the parameter value corresponding to the known data block i in the new second array; v1'(i) is the parameter value corresponding to the known data block i in the new first array; p_deno is the dividend ;d i is the known data block i.
- 根据权利要5所述的方法,其特征在于,所述按照第二公式计算3个未知数据块,包括:The method according to claim 5, characterized in that the calculation of three unknown data blocks according to the second formula includes:并行求解第二公式中的p 1、p 2、p 3。 Solve p 1 , p 2 , p 3 in the second formula in parallel.
- 根据权利要求1至6任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1 to 6, further comprising:响应于所述条带中作为用户数据的任一已知数据块发生更改,基于更改后的已知数据块与原已知数据块之间的差异确定所述条带中的校验数据的校验差异,基于所述校验差异更新所述校验数据。In response to any known data block serving as user data in the strip being changed, a checksum of the check data in the strip is determined based on the difference between the changed known data block and the original known data block. Check the difference, and update the check data based on the check difference.
- 根据权利要求7所述的方法,其特征在于,还包所述基于所述校验差异更新所述校验数据,包括:使用以下公式更新其中一份校验数据:The method according to claim 7, further comprising: updating the verification data based on the verification difference, including: updating one of the verification data using the following formula:其中,d x为更改前的已知数据块,d x'为更改后的已知数据块,Δd x为更改后的d x与更改前的d x的差异,p 1表示1个未知数据块,Δp 1表示p 1的校验差异,p 1'为对p 1进行更新后得到的数据,v1'(x)为新第一数组中d x对应的参数值,v2'(x)为新第二数组中d x对应的参数值。 Among them, d x is the known data block before the change, d x ' is the known data block after the change, Δd , Δp 1 represents the check difference of p 1 , p 1 ' is the data obtained after updating p 1 , v1'(x) is the parameter value corresponding to d x in the new first array, v2'(x) is the new The parameter value corresponding to d x in the second array.
- 根据权利要求1至8任一项所述的方法,其特征在于,n个互不相等的数值为:2 0,2 1,…,2 n-1。 The method according to any one of claims 1 to 8, characterized in that n mutually unequal values are: 2 0 , 2 1 ,..., 2 n-1 .
- 根据权利要求1至8任一项所述的方法,其特征在于,所述n个互不相等的数值为n个互不相等的、乱序的自然数。The method according to any one of claims 1 to 8, characterized in that the n mutually unequal numerical values are n mutually unequal, disordered natural numbers.
- 根据权利要求1至8任一项所述的方法,其特征在于,所述n个互不相等的数值形成等差数列或等比数列。The method according to any one of claims 1 to 8, characterized in that the n mutually unequal numerical values form an arithmetic sequence or a geometric sequence.
- 根据权利要求1至11任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1 to 11, further comprising:在所述基于所述未被选择的未知数据块对应的参数值、所述被除数、所述条带对应的盘个数及所有已知数据块确定3个未知数据块之后,响应于所述条带包括1个未知数据块,对所述条带中除该未知数据块之外的其他块进行异或,以确定该未知数据块。After determining three unknown data blocks based on the parameter values corresponding to the unselected unknown data blocks, the dividend, the number of disks corresponding to the stripe, and all known data blocks, in response to the stripe The strip includes 1 unknown data block, and other blocks in the strip except the unknown data block are XORed to determine the unknown data block.
- 根据权利要求12所述的方法,其特征在于,所述对所述条带中除该未知数据块 之外的其他块进行异或,以确定该未知数据块,包括:The method according to claim 12, characterized in that, performing XOR on other blocks in the strip except the unknown data block to determine the unknown data block includes:采用以下公式确定未知数据块:Use the following formula to determine unknown data blocks:其中,d 2,表示所述未知数据块,d 1,d 3,d 4,…,p 1,p 2,p 3表示该未知数据块之外的其他块。 Among them, d 2 represents the unknown data block, and d 1 , d 3 , d 4 , ..., p 1 , p 2 , p 3 represent other blocks other than the unknown data block.
- 根据权利要求1至11任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1 to 11, further comprising:在所述基于所述未被选择的未知数据块对应的参数值、所述被除数、所述条带对应的盘个数及所有已知数据块确定3个未知数据块之后,响应于所述条带包括2个未知数据块,确定所述2个未知数据块在所述三元一次编/解码方程组中由伽罗华域除法计算得到的参数值;After determining three unknown data blocks based on the parameter values corresponding to the unselected unknown data blocks, the dividend, the number of disks corresponding to the stripe, and all known data blocks, in response to the stripe The band includes two unknown data blocks, and the parameter values of the two unknown data blocks calculated by Galois field division in the three-dimensional linear encoding/decoding equations are determined;基于所确定的参数值、除所述2个未知数据块之外的其他块及其他块在所述三元一次编/解码方程组中由伽罗华域除法计算得到的参数值确定所述2个未知数据块。The two unknown data blocks are determined based on the determined parameter values, other blocks other than the two unknown data blocks and the parameter values calculated by Galois field division in the ternary one-step encoding/decoding equation system. Unknown data block.
- 根据权利要求14所述的方法,其特征在于,按照第三公式确定所述2个未知数据块,所述第三公式为:The method according to claim 14, characterized in that the two unknown data blocks are determined according to a third formula, and the third formula is:其中,d 1、d 2为2个未知数据块;d 1,d 2,…,d n为条带中的n个数据块;GF_div表示伽罗华域除法;a 1为第一预设值;b 1,b 2,…,b n为目标集合中n个互不相等的数值; 表示伽罗华域加法。 Among them, d 1 and d 2 are 2 unknown data blocks; d 1 , d 2 ,..., d n are n data blocks in the strip; GF_div represents Galois field division; a 1 is the first preset value ; b 1 , b 2 ,…, b n are n unequal values in the target set; Represents Galois field addition.
- 根据权利要求1至15任一项所述的方法,其特征在于,所述第一数组、所述第二数组、所述新第一数组、所述新第二数组中各元素为十进制数;The method according to any one of claims 1 to 15, characterized in that each element in the first array, the second array, the new first array, and the new second array is a decimal number;在所述第一数组和所述第二数组中选择同一未知数据块对应的两个参数值,并利用所述两个参数值更新所述第一数组和所述第二数组,得到新第一数组和新第二数组,包括:Select two parameter values corresponding to the same unknown data block in the first array and the second array, and use the two parameter values to update the first array and the second array to obtain a new first array. array and new second array, including:在所述第一数组和所述第二数组中选择同一未知数据块对应的两个参数值之前,将所述第一数组、所述第二数组中的各参数值由十进制数转换为二进制数。Before selecting two parameter values corresponding to the same unknown data block in the first array and the second array, convert each parameter value in the first array and the second array from a decimal number into a binary number. .
- 一种RAID编解码装置,其特征在于,包括:A RAID encoding and decoding device, characterized by including:获取模块,用于获取RAID中任一个需要进行编/解码的条带,并确定目标集合;所述目标集合包括n个互不相等的数值,n为所述条带对应的盘个数;An acquisition module is used to acquire any stripe in the RAID that needs to be encoded/decoded, and determine a target set; the target set includes n unequal values, where n is the number of disks corresponding to the stripe;第一确定模块,用于确定互不相等的第一预设值和第二预设值;A first determination module, configured to determine a first preset value and a second preset value that are not equal to each other;构建模块,用于响应于所述条带包括3个未知数据块,利用所述条带包括的所有已知数据块、所述3个未知数据块、所述目标集合、所述第一预设值和所述第二预设值,在伽罗华域内构建三元一次编/解码方程组;Building a module for, in response to the strip including 3 unknown data blocks, utilizing all known data blocks included in the strip, the 3 unknown data blocks, the target set, the first preset value and the second preset value to construct a ternary linear encoding/decoding equation system in the Galois domain;组成模块,用于针对所述三元一次编/解码方程组,将任一方程式中由伽罗华域除法计算得到的参数值组成一个数组,得到第一数组和第二数组;A composition module configured to form an array with the parameter values calculated by Galois field division in any equation for the ternary linear encoding/decoding equations to obtain a first array and a second array;更新模块,用于在所述第一数组和所述第二数组中选择同一未知数据块对应的两个参数值,并利用所述两个参数值更新所述第一数组和所述第二数组,得到新第一数组和新第二数组;An update module, configured to select two parameter values corresponding to the same unknown data block in the first array and the second array, and update the first array and the second array using the two parameter values. , get the new first array and the new second array;第二确定模块,用于在所述新第一数组和所述新第二数组中确定未被选择的未知数据块对应的参数值,并基于所述未被选择的未知数据块对应的参数值确定被除数;以及A second determination module, configured to determine the parameter value corresponding to the unselected unknown data block in the new first array and the new second array, and based on the parameter value corresponding to the unselected unknown data block Determine the dividend; and第三确定模块,用于基于所述未被选择的未知数据块对应的参数值、所述被除数、所述条带对应的盘个数及所有已知数据块确定3个未知数据块。The third determination module is configured to determine three unknown data blocks based on the parameter value corresponding to the unselected unknown data block, the dividend, the number of disks corresponding to the stripe, and all known data blocks.
- 根据权利要求17所述的装置,其特征在于,所述更新模块具体用于:The device according to claim 17, characterized in that the update module is specifically used to:利用从第一数组中选择的参数值对第一数组中的每个参数值进行伽罗华域加法,得到新第一数组;Perform Galois field addition on each parameter value in the first array using the parameter value selected from the first array to obtain a new first array;利用从第二数组中选择的参数值对第二数组中的每个参数值进行伽罗华域加法,得到新第二数组。Galois field addition is performed on each parameter value in the second array using the parameter value selected from the second array to obtain a new second array.
- 一种电子设备,其特征在于,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1至6任一项所述方法的步骤。An electronic device, characterized in that it includes a memory and one or more processors. Computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the one or more processors, the computer-readable instructions cause the The one or more processors perform the steps of the method according to any one of claims 1 to 6.
- 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1至16任一项所述方法的步骤。One or more non-volatile computer-readable storage media storing computer-readable instructions, characterized in that, when executed by one or more processors, the computer-readable instructions cause the one or more processors to Carry out the steps of the method according to any one of claims 1 to 16.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210321311.2A CN114416424B (en) | 2022-03-30 | 2022-03-30 | RAID encoding and decoding method, device, equipment and readable storage medium |
CN202210321311.2 | 2022-03-30 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023184843A1 true WO2023184843A1 (en) | 2023-10-05 |
Family
ID=81263944
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/115341 WO2023184843A1 (en) | 2022-03-30 | 2022-08-28 | Raid encoding/decoding method and apparatus, device and readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114416424B (en) |
WO (1) | WO2023184843A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114416424B (en) * | 2022-03-30 | 2022-06-17 | 苏州浪潮智能科技有限公司 | RAID encoding and decoding method, device, equipment and readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104850504A (en) * | 2015-05-26 | 2015-08-19 | 华中科技大学 | Equation parallel computing method for accelerating XOR based RAID-6 coding/decoding process |
US20170185481A1 (en) * | 2015-12-29 | 2017-06-29 | Cnex Labs, Inc. | Computing system with data recovery mechanism and method of operation thereof |
US20190347162A1 (en) * | 2017-01-24 | 2019-11-14 | Arizona Board Of Regents On Behalf Of The University Of Arizona | Method and system utilizing quintuple parity to provide fault tolerance |
CN113296999A (en) * | 2021-05-20 | 2021-08-24 | 山东云海国创云计算装备产业创新中心有限公司 | RAID6 encoding method and encoding circuit |
CN114416424A (en) * | 2022-03-30 | 2022-04-29 | 苏州浪潮智能科技有限公司 | RAID encoding and decoding method, device, equipment and readable storage medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6823425B2 (en) * | 2001-10-23 | 2004-11-23 | Ivivity, Inc. | System and method for implementing advanced RAID using a set of unique matrices as coefficients |
CN104467875A (en) * | 2014-12-09 | 2015-03-25 | 山东大学 | Blind recognition method for RS code and punctured convolutional code cascaded code parameters |
CN112165337B (en) * | 2020-09-30 | 2024-01-26 | 电子科技大学 | Convolutional code random interleaving sequence interleaving relation estimation method based on linear constraint |
CN113297001B (en) * | 2021-05-20 | 2023-02-24 | 山东云海国创云计算装备产业创新中心有限公司 | RAID (redundant array of independent disks) coding and decoding method and coding and decoding circuit |
CN113297000B (en) * | 2021-05-20 | 2022-12-23 | 山东云海国创云计算装备产业创新中心有限公司 | RAID (redundant array of independent disks) coding circuit and coding method |
CN113986147A (en) * | 2021-12-24 | 2022-01-28 | 苏州浪潮智能科技有限公司 | RAID6 hardware acceleration circuit structure and RAID6 hardware acceleration implementation method |
CN114063973B (en) * | 2022-01-14 | 2022-04-22 | 苏州浪潮智能科技有限公司 | Galois field multiplier and erasure coding and decoding system |
-
2022
- 2022-03-30 CN CN202210321311.2A patent/CN114416424B/en active Active
- 2022-08-28 WO PCT/CN2022/115341 patent/WO2023184843A1/en unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104850504A (en) * | 2015-05-26 | 2015-08-19 | 华中科技大学 | Equation parallel computing method for accelerating XOR based RAID-6 coding/decoding process |
US20170185481A1 (en) * | 2015-12-29 | 2017-06-29 | Cnex Labs, Inc. | Computing system with data recovery mechanism and method of operation thereof |
US20190347162A1 (en) * | 2017-01-24 | 2019-11-14 | Arizona Board Of Regents On Behalf Of The University Of Arizona | Method and system utilizing quintuple parity to provide fault tolerance |
CN113296999A (en) * | 2021-05-20 | 2021-08-24 | 山东云海国创云计算装备产业创新中心有限公司 | RAID6 encoding method and encoding circuit |
CN114416424A (en) * | 2022-03-30 | 2022-04-29 | 苏州浪潮智能科技有限公司 | RAID encoding and decoding method, device, equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114416424A (en) | 2022-04-29 |
CN114416424B (en) | 2022-06-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6748488B2 (en) | Storage array having multiple erasure correction and sub-stripe writing | |
US9081752B2 (en) | Redundant disk encoding via erasure decoding | |
US9405623B2 (en) | Method of, and apparatus for, layout rectification of erasure encoded storage systems | |
US9009569B2 (en) | Detection and correction of silent data corruption | |
CN101719086B (en) | Fault-tolerant processing method and device of disk array and fault-tolerant system | |
Park | Efficient placement of parity and data to tolerate two disk failures in disk array systems | |
WO2023184911A1 (en) | Data storage method and apparatus, and device and non-volatile readable storage medium | |
US10394651B2 (en) | Computing system with circular-shift recovery mechanism and method of operation thereof | |
EP2810280A1 (en) | Erasure correcting codes for storage arrays | |
TW201351427A (en) | Memory controller | |
US20100037022A1 (en) | RAID Data Protection Architecture Using Data Protection Information | |
EP2218003A1 (en) | Correction of errors in a memory array | |
US20150100819A1 (en) | Method of Recovering Data in a Storage Device | |
CN114816837B (en) | Erasure code fusion method and system, electronic device and storage medium | |
WO2023184843A1 (en) | Raid encoding/decoding method and apparatus, device and readable storage medium | |
WO2023151288A1 (en) | Check data generation method and apparatus, device, and storage medium | |
CN114816278B (en) | Data migration method, system, equipment and storage medium of storage server | |
JP2016038767A (en) | Storage control device, storage control program, and storage control method | |
US8489976B2 (en) | Storage controlling device and storage controlling method | |
WO2024051114A1 (en) | Data transfer method, system and device, and nonvolatile readable storage medium | |
WO2024108930A1 (en) | Data recovery method and related device | |
Chen et al. | A new Zigzag MDS code with optimal encoding and efficient decoding | |
US20080140740A1 (en) | Systems and methods for processing data sets in parallel | |
TWI338291B (en) | Methods and apparatuses for generating parity symbols for data block | |
Song et al. | A Low complexity design of reed solomon code algorithm for advanced RAID system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22934663 Country of ref document: EP Kind code of ref document: A1 |