WO2014106316A1 - 一种通用射影自修复码的编码、数据重构和修复方法 - Google Patents

一种通用射影自修复码的编码、数据重构和修复方法 Download PDF

Info

Publication number
WO2014106316A1
WO2014106316A1 PCT/CN2013/070001 CN2013070001W WO2014106316A1 WO 2014106316 A1 WO2014106316 A1 WO 2014106316A1 CN 2013070001 W CN2013070001 W CN 2013070001W WO 2014106316 A1 WO2014106316 A1 WO 2014106316A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
node
storage
storage node
data block
Prior art date
Application number
PCT/CN2013/070001
Other languages
English (en)
French (fr)
Inventor
李挥
朱兵
侯韩旭
陈畅民
周敬邦
范曦东
Original Assignee
北京大学深圳研究生院
深圳广信网络传媒有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京大学深圳研究生院, 深圳广信网络传媒有限公司 filed Critical 北京大学深圳研究生院
Priority to PCT/CN2013/070001 priority Critical patent/WO2014106316A1/zh
Priority to CN201380063753.0A priority patent/CN104838626B/zh
Publication of WO2014106316A1 publication Critical patent/WO2014106316A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0057Block codes
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/37Decoding methods or techniques, not specific to the particular type of coding provided for in groups H03M13/03 - H03M13/35
    • H03M13/3761Decoding methods or techniques, not specific to the particular type of coding provided for in groups H03M13/03 - H03M13/35 using code combining, i.e. using combining of codeword portions which may have been transmitted separately, e.g. Digital Fountain codes, Raptor codes or Luby Transform [LT] codes

Definitions

  • the present invention relates to the field of distributed network storage, and more particularly to a method for encoding, reconstructing and repairing a general projective self-healing code.
  • MDS (Maximum Distance Separable) code MDS code can achieve the best storage space efficiency.
  • One (n, k) MDS error correction code needs to divide an original file into k equal-sized modules and linearly encode them. Generate n mutually unrelated coding modules, store different modules by n nodes, and satisfy the MDS attribute (any original k of n coding modules can reconstruct the original file).
  • This coding technology plays an important role in providing effective network storage redundancy, and is particularly suitable for storing large files and archive data backup applications.
  • data of size ⁇ is stored in n storage nodes, and each storage node stores a data size of ".
  • the data receiver only needs to connect and download the data of any k storage nodes in the n storage nodes to recover the original data B.
  • This process is called data reconstruction process.
  • the RS code is a code word that satisfies the characteristics of the MDS code.
  • the RS code first needs to download/the data of one storage node and recover the original data, and then encode the stored data of the failed node for the new node. Decoding out the entire raw data in order to recover the data of one storage node is obviously a waste of transmission bandwidth.
  • FIG. 26 The communication overhead required for redundant recovery is also relatively large.
  • Figure 1 shows that as long as the number of effective nodes in the system d ⁇ , the original file can be obtained from the existing node;
  • Figure 2 shows the process of restoring the content stored in the failed node. It can be seen from Figure 1 and Figure 2 that the whole recovery process is: 1) First download the data from the k storage nodes in the system and reconstruct the original file; 2) Re-encode the new module from the original file, store On the new node.
  • the recovery process indicates that the network load required to repair any failed node is at least the content stored by k nodes.
  • RGC code is proposed in the patent PCT/CN2012/071177, which requires only a small amount of data to be repaired in a lost coding module without the need to reconstruct the entire file.
  • the RGC code applies the linear network coding idea, and uses the NC (Network Coding) attribute (ie, the maximum stream minimum cut) to improve the overhead required to repair an encoding module. From the network information theory, it can be proved that the same amount of data is used and lost. The network overhead can be lost.
  • the main idea of the RGC code is to use the MDS attribute.
  • MDS attribute When some storage nodes in the network fail, it is equivalent to storing data loss. It is necessary to download information from the existing active nodes to make the lost data repair the lost data module and store it in the data module. On the new node. Over time, many of the original nodes may fail, and some of the regenerated new nodes can re-execute the regeneration process themselves, which in turn generates more new nodes. Therefore, the regeneration process needs to ensure two points: 1) The failed nodes are independent of each other, and the regeneration process can be cyclically recursive; 2) Any 1 ⁇ node is enough to restore the original file.
  • Figure 3 depicts the regeneration process when a node fails.
  • ⁇ storage nodes in the distributed system each store
  • Each storage node i is represented by a pair of nodes ' ⁇ ', '.'' The pair of nodes are connected by an edge whose capacity is the storage amount (ie, ") of the node.
  • the regeneration process is described by an information flow diagram, "collecting data from any of the d available nodes in the system, through x "" Oh . "The data stored in '', can be accessed by any receiver.
  • the maximum information flow from the source to the sink is determined by the minimum cut set in the graph. When the sink wants to reconstruct the original file, the size of the stream cannot be lower than the original. The size of the file.
  • MSR bandwidth regenerating code
  • MSR minimum storage regenerative code
  • Precise repair The failed module needs to be constructed correctly, the recovered information is the same as the lost one (the core technology is the interference queue and NC);
  • Functional repair The newly generated module can contain Different from the data of the lost node, as long as the repaired system supports the MDS code attribute (the core technology is NC); the system part is precisely repaired: it is a hybrid repair model between the exact repair and the function repair.
  • the system node storing unencoded data
  • no exact repair is required, only functional repair is required to restore the information.
  • Can be full of MDS code attributes the core technology is interference queue and NC).
  • the RGC code In order to apply the RGC code to the actual distributed system, even if it is not optimal, at least the data needs to be downloaded from k nodes to repair the lost module. Therefore, even if the data transmission volume required for the repair process is relatively low, the RGC code needs to be high.
  • the protocol load and system design (NC technology) complexity is achieved.
  • the RGC code does not consider the engineering solution, such as the lazy repair process, so the repair load caused by the temporary failure cannot be avoided.
  • the computational cost of the codec implementation based on NC RGC code is relatively large, which is one order higher than the traditional EC code.
  • Patent PCT/CN2012/083174 proposes a practical projective self-healing code encoding, data reconstruction and repair method.
  • PPSRC Practice Projective Self-repairing Codes
  • Lost encoding modules can download less than the entire file from other encoding modules for repair; Lost encoding module Fixed from a given number of modules, the given number is only related to how many modules are lost, regardless of which modules are lost. These attributes make the load of repairing a lost module relatively low.
  • the nodes in the system have the same status and balance, the different lost modules can be repaired independently and concurrently in different locations of the network.
  • the codeword has the following characteristics: When a node fails, there may be (n - 1 ) /2 pairs of repair nodes available for selection; when (n - l ) /2 nodes fail simultaneously, We can still repair the failed node using 2 of the remaining ( n+1 ) /2 nodes.
  • PPSRC codes only involves XOR operations. Unlike general self-repairing codes, the encoding requires computational polynomials to be relatively complex. The computational complexity of PPSRC codes is less than the PSRC code (Projective).
  • the repair bandwidth and repair node of the PPSRC code is better than the MSR code.
  • the redundancy of the PPSRC code is controllable and suitable for general storage systems.
  • the reconstruction bandwidth of the PPSRC code is optimized.
  • the PPSRC code effectively reduces the data storage node, reduces the redundancy of the system data storage, and greatly improves the use value of the utility self-repair code.
  • PPSRC codes also have certain deficiencies.
  • the coding and decoding process of PPSRC code is more complicated, the division operation of finite field and its sub-domain is relatively large, and the data reconstruction process is cumbersome.
  • the coding module is inseparable, so it is repaired.
  • the coding module must also be inseparable.
  • the entire codec process of the PPSRC code is computationally complex, and although the amount of redundancy is controllable, it is still quite large.
  • the number of PPSRC code storage nodes is very large, which is completely unnecessary for relatively 'j, some files.
  • the technical problem to be solved by the present invention is to provide a generalized projective self-repairing code encoding and data reconstruction with simple operation and small repair data cost in view of the above-mentioned defects of complicated operation and large repair cost in the prior art. And repair methods.
  • the technical solution adopted by the present invention to solve the technical problem thereof is: constructing a coding of a general projective self-repairing code
  • the method is characterized in that it comprises the following steps:
  • A) Obtain a file with a data volume of B that needs to be stored, and divide it into k data blocks, each of which includes m data;
  • the method further includes the following steps: respectively: encoding the plurality of data blocks by multiplying the encoded data of each storage node into the storage nodes.
  • step D the coding vector is multiplied by the data block to perform an exclusive OR operation on its corresponding binary number.
  • the present invention also relates to a data reconstruction method in a storage system of the above-described general projective self-healing code encoding method, comprising the following steps:
  • the decoding vector in step K) is an inverse matrix of the coding vector of each storage node, which is obtained by obtaining the coding vector of each storage node and then obtaining the inverse.
  • step K the operation of the encoded data and the decoding matrix is XORed for its corresponding binary number.
  • the data blocks obtained in the step ⁇ ) are combined in the step L) to obtain a storage file; and the combining includes arranging the data blocks in a set order.
  • the present invention also relates to a method for data repair in a storage system of the above-described general projective self-healing code encoding method, comprising the following steps:
  • step ⁇ ) storing a plurality of encoded data blocks representing the failed node encoded data in a new storage node. Further, the step ⁇ ) further includes:
  • step N3 Select the new non-failed storage node to repeat step N2) until the code vector ⁇ ⁇ of the failed storage node is obtained.
  • the operation in the step ⁇ ) performs an exclusive-OR operation on the corresponding binary number; the storage node of the encoded data block in which the operation is performed in the step ⁇ ) is the same or different.
  • the method for encoding, data reconstructing and repairing the universal projective self-repairing code of the present invention has the following beneficial effects: Since the storage file is divided into data blocks, the data blocks are respectively encoded and the obtained mutually independent encoded data are stored in Multiple storage nodes, so when repairing data, the data block subset stored by each storage node can be separately downloaded to repair the failed storage node, and the repair data is relatively simple, and the downloaded data volume is small.
  • FIG. 1 is a schematic diagram of data reconstruction of an EC code in the prior art
  • FIG. 2 is a schematic diagram of repairing a failed storage node of an EC code in the prior art
  • FIG. 4 is a coding flow diagram of an embodiment of a method for encoding, reconstructing, and repairing a general projective self-repairing code of the present invention
  • FIG. 5 is a schematic diagram of storage distribution of encoded data in one case in the embodiment.
  • Figure 6 is a flow chart of data reconstruction in the embodiment
  • Figure 7 is a flow chart of data repair in the embodiment
  • FIG. 8 is a schematic diagram of repairing encoded data in a case in the embodiment.
  • Figure 9 is a schematic diagram showing a comparison of the compromise curves of the repair nodes and the repair bandwidth of the GPRSC code and the MSR code in one case in the embodiment;
  • Figure 10 is a diagram showing a comparison of the compromise curves of the repair nodes and the repair bandwidth of the GPRSC code and the MSR code in another case in the embodiment.
  • the encoding method comprises the following steps:
  • Step S41 Obtaining a data block:
  • a data block to be stored is obtained, and the data block may be one of data blocks obtained by dividing a file having a data amount of B into k shares.
  • the encoded data stored in each storage node is also obtained by the encoding method disclosed in the embodiment, and the data is stored in the corresponding storage node. . Therefore, the encoded data stored on one node of each data block is independent of each other; meanwhile, one data block is stored between the data items of the encoded data (the data includes a plurality of data items) on one storage node, It is also independent and irrelevant.
  • Step S 4 2 sets a basic finite field, and represents the data block on the basic finite field, thereby obtaining the first finite field and the second finite field:
  • defining GF( ) represents a finite field of size q
  • the projective geometry PG (/wl, ) consists of all subspaces. Among them, the point of PG(wl, q) is the dimension subspace, and the line is the 2-dimensional subspace.
  • (+l)-dimensional subspace is ⁇ -space.
  • PG ( -l , - is extended to the collection S of ⁇ _ space, which divides the PG (wl, the point.
  • PG (ml, the ⁇ -extension of the necessary and sufficient condition is juice 1 divisible w.
  • the extended finite field can be constructed ⁇ -extension, we use the w-dimensional finite field GF(g w ) to represent the vector space.
  • GF(3 ⁇ 4r) cz GF( ⁇ ' + 1 ) c GF(g w ) use GF( ⁇ ") * indicates a non-zero element of GF(g m ).
  • GF «)* is a cyclic multiplicative group.
  • B, k, q, t, and m are all positive and t+1 can be divisible by 111.
  • Step S43 obtains the coding vector of each storage node:
  • w is a fixed generator of GF ⁇ "'
  • V is GF (a generator of ' + Y
  • w and V are respectively called GF ( ⁇ ")' and GF( ⁇ +Y's primitive.
  • w is a fixed generator of GF ⁇ "'
  • V is GF (a generator of ' + Y
  • w and V are respectively called GF ( ⁇ "' and GF( ⁇ +Y's primitive.
  • zGF( ⁇ + 1 )* eGF(g' +1 )* ⁇ to denote GF( « )* Cosets.
  • the coset w'GF forms a ⁇ -extension of PG( , q).
  • the operation domain of the codeword is GF(2).
  • the file of size ⁇ is divided into several data blocks of equal size, and the codec method of each data block is the same. Therefore, we only give A code block encoding and decoding method, without loss of generality, consider a data file containing only one data block, the size is ⁇ , can be represented by the element on the GF(2) of length ⁇ .
  • be the positive of the division of ⁇ Integer
  • N is a positive integer (2 ⁇ -1 ) / (2 ⁇ +1 - 1), which is the number of cosets of GF ( ) * in GF ⁇ +Y.
  • the above steps S42 and S43 may be set first, and the data blocks are divided according to the restrictions of steps S42 and S43. That is, in some cases, the above steps may be performed first. S42, 43, then step S41 is performed. These steps can be adjusted as the case may be.
  • Step S44 obtains the encoded data stored in each storage node according to the obtained encoding vector:
  • the encoded data corresponding to the data block stored in the storage node is obtained by using the corresponding coding vector and the data block operation respectively (corresponding to storing the file when the storage file has only one data block) .
  • the product is an exclusive OR operation of the binary number of the data file corresponding to the code vector.
  • the product is the exclusive OR of the binary number of the data file corresponding to the encoding vector.
  • the 8-bit data bits are represented by O ⁇ 2 , ⁇ 3 , ⁇ 4 , ⁇ 5 , ⁇ 6 , ⁇ 7 , ⁇ 8 , respectively.
  • the specific instructions are as follows:
  • the vector space stored by the other seven storage nodes is
  • FIG. 5 shows the coded data distribution map stored by GPSRC (10, 2) in this embodiment.
  • the file S is stored in n nodes, and the amount of data stored in each node is and each node stores data.
  • the coding vectors are independent of each other.
  • ⁇ 2 neither the PSRC code nor the GPSRC code satisfies the MDS characteristics. It can be seen that the reconstruction process of the GPSRC code is different from the previous RS code, EC code and RGC code.
  • the consecutive B elements of any column of the GPSRC coding matrix are independent of each other. It may be assumed that the data collector separately downloads the first encoded data of the nodes /, ..., i+B, and the encoding vectors are respectively w'', w ⁇ , ..., w i+B ⁇ if there are B incomplete
  • the method of reconstructing data of the GPSRC code is as follows: The number of column/column codes of the consecutive ⁇ storage nodes is downloaded.
  • FIG. 6 the data reconstruction process of the GPSRC code in this embodiment is shown in FIG. 6, and includes the following steps:
  • Step S61 selects a storage node equal to the storage file data amount or the data block data amount:
  • the data block data amount equal to the storage file data amount or the storage file equalization is selected among the t-1 storage nodes.
  • the storage node for example, if the data in the header or data block is 8 bits, then 8 storage nodes are selected. It is worth mentioning that if the storage file has only one data block and is B, the number of storage nodes selected is B; if the storage file is equally divided, the number of the storage nodes is the data block. The amount of data in the middle. In either case, in the present embodiment, these selected storage nodes must be contiguous. In this embodiment, as an example, in a case where the storage file has only one data block and the data amount thereof is B, the number of selected storage nodes is B, where the value of B is the same as the data amount B included in the storage file. of.
  • Step S62 respectively downloads the first column encoded data in the selected storage node:
  • the column/column encoded data of the consecutive eight storage nodes in the above step is downloaded, where 1 ⁇ / ⁇ (/ + 1).
  • Step S63 respectively, the coded data downloaded by each storage node is operated with its corresponding decoding vector to obtain a data block: Since the data downloaded from each storage node is encoded data, it needs to be decoded and combined to obtain the original coded storage. The raw data at the storage node. In this step, the downloaded code number ⁇ is decoded according to the location of the storage node that obtained the data. Generally, the coding of each storage node is different. When the coding vectors used by each storage node for coding are associated according to the location of the stored data, an encoding matrix of the storage node is formed. The same is true for decoding, and there are also vectors or matrices for decoding.
  • the original data is decoded by the downloaded data and the decoding matrix.
  • the decoding vector corresponding to the downloaded data in the decoding matrix is used.
  • the decoding matrix is an inverse matrix of the coding matrix of each storage node, and the decoding vector is obtained from the decoding matrix according to the location of the encoded data. Therefore, in this step, the decoding vector is obtained by obtaining the coding vector of each storage node and then obtaining the inverse.
  • the operation of the encoded data and the decoding matrix is XORed for its corresponding binary number.
  • Step S64 combines the obtained data blocks to obtain a storage file: Integrate the decoded data to recover the original data.
  • FIG. 7 shows a process of data repair in this embodiment, including the following steps:
  • Step S71 determines the failed storage node, and sets its encoded data: In this step, it is determined whether a storage node is invalid. If a storage node fails, the encoding matrix or encoding of the storage node can be obtained by its location (or node number). vector. In this step, after determining that a storage node is invalid, it may first set its encoded data to Vi , v 2 , . . . , Va ; in the following steps, each data block in the above encoded data is obtained one by one, After the combination is stored in a new node, data repair can be completed.
  • Step S72 downloading at least one coded data to repair the coded data of the failed storage node by at least two storage nodes respectively: In this step, respectively downloading at least one coded data from at least two non-failed storage nodes respectively, respectively obtaining the above steps Set the coded data or coded data block of the failed node.
  • the coded data block M1 is downloaded by an unfailed node, and the coded data block is downloaded by another unfailed node, wherein the data downloaded by the two non-failed storage nodes has the following relationship.
  • v, Ml + " 2 ; operation on the downloaded coded data block to obtain the coded vector v of the failed storage node, and the coded vector 3 ⁇ 43 is downloaded from the other unexpired node, which is already in the above step
  • the new non-failed storage node is selected to repeat the above steps until the coding vector v a of the failed storage node is obtained. In this step, the operation between the above encoded data is performed for its corresponding binary number.
  • a storage node may be downloaded by the two coded data and operation.
  • a storage node may choose to download the plurality of data blocks and computation according to the situation.
  • Step S73 obtains the encoded data of the failed storage node and stores it in the new node: In this step, the plurality of encoded data blocks obtained in the above steps are combined, and stored in a new storage node to complete the data repair. .
  • each storage node stores "the amount of encoded data.
  • the stored data can be recovered by selecting any one storage and its corresponding another storage node and downloading the two storage nodes.
  • the original data blocks stored by each node can be different or different. Specifically, in order to repair the data block stored by the node 9, it is necessary to select some data blocks from the data blocks stored in the first 8 nodes for XOR operation. However, the raw data stored by these nodes is not directly repaired by the missing data blocks of node 9. At this time, we need to perform a simple XOR of the previous node storage data block to fix it. For example, to repair the data block of node 9 ( +(3 ⁇ 4), you can select the data block of node 8 ( ⁇ +02+03+04+08), ( ⁇ 3 + ⁇ 5 + ⁇ 7 + ⁇ 8 ) Or, get the data block ( ⁇ +02+04+05+07). Also select the data block of node 4 ( ⁇ 4 ),
  • GPSRC The compromise between the GPSRC and MSR codes. It can be found that when the number of repair nodes is given, the repair bandwidth of the GPSRC is smaller than the repair bandwidth of the MSR code, and when the repair bandwidth is given, the number of repair nodes of the GPSRC is also smaller than the repair node of the MSR code. Therefore, it can be said that in general, GPSRC is superior to MSR code in repairing bandwidth and repairing node performance, although at the cost of losing MDS characteristics.
  • the general projective self-repairing code (GPSRC) in this embodiment is different from the RGC code in that the main idea of the RGC code is to use the MDS attribute.
  • the regeneration process needs to ensure two points: 1) The failed nodes are independent of each other, and the regeneration process can be cyclically recursive; 2) Any 1 ⁇ node is enough to restore the original file.
  • any module needs to be reconstructed, at least it needs to communicate with other k nodes. When only one module is lost, the minimum traffic required is to communicate with all active n-1 nodes, and the GPSRC code is more flexible. Repairing nodes and repairing bandwidth can be compromised, requiring at least 2 nodes to communicate.
  • HSRC codes require computational polynomials to be relatively complex, and the system computational complexity is high.
  • a node is randomly selected as a secondary node, only one node is available for selection.
  • the GPSRC code is different.
  • the GPSRC code can be compromised in terms of repairing the node and repairing the bandwidth.
  • the repair node has less benefits and the repair bandwidth is small, and is particularly suitable for the practical distributed storage system.
  • the GPSRC code provides an effective redundancy repair solution, including: 1) Lost editing
  • the code block can directly download several subsets of other coding modules for repair, and the amount of data downloaded is less than the data amount of the entire file; 2) the lost coding block can be performed by a fixed number of coding modules, and the fixed number is only How many modules are lost in the system, regardless of which modules are lost. These attributes make the repair of a lost module lower, and can repair different lost modules independently and concurrently.
  • the GPSRC code not only satisfies the basic characteristics of the PSRC, but is also more flexible in selecting the number of storage nodes. Compared to the previous coding scheme, the GPSRC is more efficient.
  • a GPSRC(n,k) code can repair a failed module by much less than k nodes, and in many cases one node has more than one repair capability, so the number of nodes needed to repair a lost module is greatly reduced, thereby reducing
  • the communication overhead of the system; the construction process, repair process and reconstruction process of GPSRC code only involve XOR operation, so the computational complexity is very low and the computational overhead is small, which is suitable for the actual storage system; GPSRC code can repair different modules concurrently. , the system repair delay is greatly reduced, which makes the GPSRC easy to implement and the repair cost is low.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Error Detection And Correction (AREA)

Abstract

本发明涉及一种通用射影自修复码的编码方法,包括如下步骤:取得需要存储的数据块;设置大小为q的基本有限域GF(q),所述每个数据块在所述基本有限域上用长度为m的向量表示;得到第一有限域GF(qi+1)和第二有限域GF(qm),GF(q)⊂GF(qi+1)⊂GF(qm);构建存储节点/的编码向量Vi={wi-1,wi-1v,wi-1v2,...wi-1vt},存储节点/的编码向量分别为所述t-扩展的一组基;其中,i为表示存储节点数的正整数,i=1,2,...t;得到该数据块存储在该存储节点的编码数据。本发明还涉及一种对使用上述编码方法的系统进行数据重构和数据修复的方法。实施本发明的通用射影自修复码的编码、数据重构和修复方法,具有以下有益效果:其修复数据较为简单、下载的数据量较小。

Description

一种通用射影自修复码的编码、 数据重构和修复方法
技术领域
本发明涉及分布式网络存储领域, 更具体地说, 涉及一种通用射影自修复码的编 码、 数据重构和修复方法。
背景技术
随着信息产生量的迅速增长, 有效地存储海量数据的存储系统已经越来越重要。 分布式存储系统以其高效的可扩展性和高可用性成为存储海量数据的有效系统。 然而 在分布式存储系统中, 存储数据的存储节点是不可靠的。 为了能够由不可靠的存储节 点提供可靠的存储服务, 需要在存储系统中引入冗余。 引入冗余最简单的方法就是对 原始数据直接备份, 直接备份虽然简单但是其存储效率和系统可靠性不高, 而通过编 码引入冗余的方法可以提高其存储效率。 在¾前的存储系统中, 编码方法一般采用
MDS ( Maximum Distance Separable 最大距离可分离)码, MDS码可以达到存储空 间效率的最佳, 一个 (n,k) MDS纠错码需要将一个原始文件分成 k个大小相等的模块, 并通过线性编码生成 n个互不相关的编码模块, 由 n个节点存储不同的模块, 并满足 MDS属性(n个编码模块中任意 k个就可重构原始文件)。 这种编码技术在提供有效 的网络存储冗余中占有重要的地位, 特别适合存储大的文件以及档案数据备份应用。
在分布式存储系统中, 把大小为 β的数据存储在 n个存储节点中, 每个存储节点 存储的数据大小为《。 数据接收者只需要连接并下载 η个存储节点中的任意 k个存储 节点的数据即可恢复出原始数据 B, 这一过程称为数据重建过程。 RS码是满足 MDS 码特性的一种码字。 当存储系统中的存储节点失效时, 为了保持存储系统的冗余量, 需要恢复该失效节点存储的数据并将该数据存储在新节点中, 该过程称为修复过程。 然而, 在修复过程中, RS码首先需要下载/ 1个存储节点的数据并恢复出原始数据, 之 后为新节点编码出失效节点的存储数据。 为了恢复一个存储节点的数据而解码出整个 原始数据显然对传输带宽是一种浪费。
然而, 系统节点失效或者文件损耗, 系统的冗余度会随着时间而逐渐减小, 因此 需要一种机制来保证系统的冗余。 文献 [R. Rodrigues and B. Liskov, "High Availability in DHTs: Erasure Coding vs. Replication" , Workshop on Peer-to-Peer Systems (IPTPS)2005.] 中提出的 EC ( Erasure Codes 纠错码)码, 该码在存储开销上是比较有效的, 然而支
替换页 (细则第 26条) 持冗余恢复所需要的通信开销也比较大。 图 1表示只要系统中有效节点数 d≥ ,就可 以从现有节点中获得原始文件; 图 2表示恢复失效节点所存储内容的过程。 从图 1、 图 2中可以看出整个恢复过程是: 1 )首先从系统中的 k个存储节点中下栽数据并重 构原始文件; 2 ) 由原始文件再重新编码出新的模块, 存储在新节点上。 该恢复过程 表明修复任何一个失效节点所需要的网络负载至少为 k个节点所存储的内容。
同时, 为了降低修复过程中所使用的带宽, 文 [A. G. Dimakis, P. G. Godfrey, . J. Wainwright, K. Ramchandran , "Network coding for distributed storage systems" , IEEE Proc. INFOCOM, Anchorage, Alaska, May 2007.】利用网络编码理论的思想提出了再生码 (RGC, Regenerating Codes) , RGC码也满足 MDS码特性。 再生码的修复过程中, 新节点需要 在剩下的存储节点中连接 d个存储节点并分别从这 d个存储节点中下栽 大小的数据, 所以 RGC码的修复带宽为 ^。 同时给出了 RGC码功能修复的模型并提出了 RGC码的 两类最佳码: 最小存储再生码 (MSR, Minimum-storage Regenerating)和最小修复带宽再 生码 (MBR, Minimum-bandwidth Regenerating)„ RGC码的修复带宽优于 RS码, 但 RGC 的修复过程需要连接 d(d>/f)个存储节点 称为修复节点)。 另外, 修复节点需要对其存 储的数据执行随机线性网络编码操作。 为了满足所有编码包是相互独立的, RGC码的 运算需要在一个较大的有限域内。
专利 PCT/CN2012/071177 中提出了一种 RGC码, 该方案中修复一个丢失的编码模 块只需要一小部分的数据量,而不需要重构整个文件。 RGC码应用线性网络编码思想, 利用 NC ( Network Coding, 网络编码)属性(即最大流最小割)来改善修复一个编码 模块所需要的开销, 从网络信息论上可以证明用和丢失模块相同数据量的网络开销就 可 复丢失模块。
RGC码主要思想还是利用 MDS属性, 当网络中一些存储节点失效, 也就相当于存 储数据丟失, 需要从现有有效节点中下载信息来使得丟失的数据修复丟失的数据模块, 并将其存储在新的节点上。 随着时间的推移, 很多原始节点可能都会失效, 一些再生 的新节点可以在自身再重新执行再生过程, 继而生成更多的新节点。 因此再生过程需 要确保两点: 1 )失效的节点间是相互独立的, 再生过程可以循环递推; 2 )任意1^个 节点就足够恢复原始文件。
图 3描述了当一个节点失效后的再生过程。分布式系统中 η个存储节点各自存储 "个
替换页 (细则第 26条) 数据, 当有一个节点失效, 新节点通过从其他 个存活节点中下载数据来再生, 每 个节点的下载量为 ^ 每个存储节点 i通过一对节点 '·", '。"'来表示, 这对节点通过一 个容量为该节点的存储量(即")的边连接。 再生过程通过一个信息流图描述, "从 系统中任意 d个可用节点中各自收集 个数据, 通过 x""<在 Χ。"'中存储 个数据 , 任何一个接收者都可以访问 。从信源到信宿的最大信息流是由图中最小割集决定, 当信宿要重构原始文件时, 这个流的大小不能低于原始文件的大小。
每个节点存储量 "和再生一个节点所需要的带宽 ^之间存在一个折中, 因此又引入 最小带宽再生码(MBR)和最小存储再生码(MSR)。 对于最小存储点可以知道每个 节点至少存储 M/k比特, 因此可推出 MSR码中( ,
' )= ( k, k,,(d -^κ + J \) , 当 d取最大 值即一个新来者同时和所有存活的 η-1个节点通信时, 修复带宽 s«最小即
YMS'「T~^。 而 MBR码拥有最小修复带宽, 可以推出当 d=n-l时, 获得最小修复负载 mn)= ( . 2"- 2 2n-2
纖 , k 2n~k-\ k 2n-k-\
对于节点失效修复问题, 考虑了三种修复模型: 精确修复: 失效的模块需要正确 构造, 恢复的信息和丢失的一样(核心技术为千扰队列和 NC); 功能修复: 新产生的 模块可以包含不同于丟失节点的数据, 只要修复的系统支持 MDS码属性(核心技术为 NC); 系统部分精确修复: 是介于精确修复和功能修复之间的一个混合修复模型, 在 这个混合模型中, 对于系统节点 (存储未编码数据)要求必须精确恢复, 即恢复的信 息和失效节点所存储的信息一样, 对于非系统节点 (存储编码模块) , 则不需要精确 修复, 只需要功能修复使得恢复的信息能够满则 MDS码属性(核心技术为干扰队列和 NC)。
为了使 RGC码运用到实际的分布式系统中, 即使不是最优情况也至少需要从 k个节 点下载数据才能修复丢失模块, 因此即使修复过程所需要的数据传输量比较低, RGC 码也需要高的协议负载和系统设计(NC技术)复杂度来实现。 另外 RGC码中未考虑工 程解决方法, 如懒修复过程, 因此不能避免临时失效所带来的修复负载。 最后基于 NC 的 RGC码的编解码实现所需要的计算开销比较大, 比传统的 EC码要高一个阶数。
替换页 (细则第 26条) 专利 PCT/CN2012/083174 中提出了一种实用射影自修复码的编码、 数据重构及修 复方法。 实用摄影自修复码(PPSRC, Practical Projective Self-repairing Codes )同样 具有自修复码的两个典型属性: 丢失的编码模块可从其他编码模块中下载少于整个文 件的数据进行修复; 丢失的编码模块从一个给定数的模块中修复, 该给定数只与丟失 了多少模块数有关, 而与具体哪些模块丟失无关。 这些属性使得修复一个丟失模块的 负载比较低, 另外由于系统中各节点地位相同、 负栽均衡使得在网络的不同位置, 可 以独立并发地修复不同丢失模块。
该码字除了满足以上条件外还有以下特性: 当一个节点失效时, 可以有(n - 1 ) /2 对修复节点可供选择; 当有(n - l ) /2 个节点同时失效时, 我们仍然可以使用剩下的 ( n+1 ) /2个节点中的 2 两个节点来修复失效节点。
PPSRC码的编码以及自修复过程仅涉及异或运算, 并不像一般自修复码, 其编码 需要计算多项式相对较复杂, PPSRC码的计算复杂度小于 PSRC码( Projective
Self-repairing Codes , 射影自修复码) 。 同时, PPSRC码的修复带宽和修复节点优于 MSR码。 PPSRC码的冗余是可控的, 适用于一般的存储系统, PPSRC码的重建带宽达 到最佳。 总而言之, PPSRC码有效地减少了数据存储节点, 降低了系统数据存储的冗 余度, 很大程度上提高了实用自修复码的使用价值。
然而, PPSRC码也存在一定的不足之处。首先, PPSRC码的编解码过程较为复杂, 有限域及其子域的划分运算量相对较大,并且数据重构过程比较繁瑣;其次,在 PPSRC 码中,编码模块是不可再分的,因此修复编码模块也必须是不可再分的。同时, PPSRC 码的整个编解码过程运算复杂度较高, 冗余量虽然可控但其实还是相当大的。 通常 PPSRC码存储节点数选取非常大, 对于相对' j、一些的文件来说就显得完全没有必要了。 这些均增加了 PPSRC码在实际分布式存储系统中实施难度, 该射影自修复码通用性不 强。
发明内容
本发明要解决的技术问题在于, 针对现有技术的上述运算复杂、 修复花销较大的 缺陷, 提供一种运算简单、 修复数据花销较小的通用射影自修复码的编码、 数据重构 和修复方法。
本发明解决其技术问题所采用的技术方案是: 构造一种通用射影自修复码的编码
替换页 (细则第 26条) 方法, 其特征在于, 包括如下步骤:
A )取得需要存储的、数据量为 B的文件, 将其等分为 k个数据块,每个数 据块包括 m个数据;
B)设置大小为 q的基本有限域 GF( ), 所述每个数据块在所述基本有限域 上用长度为 m的向量表示; 所述基本有限域的 m-维向量空间为 W, 所述 W的所有子 空间组成射影几何 PG (m-l,q); 所述 W的( t+1 ) -维子空间为 t-空间, 所述 t-空间的 集合 S为 t-扩展;得到第一有限域 和表示所述向量空间 W的第二有限域 GEfem), GF(q)^GF(q'+l)^GF(qm); 其中, B、 k、 q、 t和 m均为正整数, t+1整除 ΠΊ;
C)取得表示所述第二有限域 G ( m)非零元素的循环乘法群 GF^")', w为其 本原元;取得表示所述第一有限域 G +')非零元素的循环乘法群 GEfe'+1)', V为其本原 元; 构建存储节点 /的编码向量 ; = {W- V,...,w'-V}, 存储节点,的编码向量分别 为所述 t-扩展的一组基; 其中, ί为表示存储节点数的正整数, , = 1,2,...,t;
D)将对应于各存储节点 ,·的编码向量分别与一个数据块相乘, 得到该数据 块存储在该存储节点的编码数据。
更进一步地, 还包括如下步骤: 将多个数据块分别与各存储节点的编码数据相乘 后得到的编码数据分别依次存储在各存储节点。
更进一步地, 所述步骤 D)中编码向量与数据块相乘为其对应的二进制数进行异 或运算。
本发明还涉及一种在上述的通用射影自修复码编码方法的存储系统中数据重构 方法, 包括如下步骤:
I)选择 M 个存储节点中的连续的、 等于存储文件数据量或存储文件等分后 得到的数据块数据量个存储节点;
J)下载所述选择的存储节点中的第 /列的编码数据, /为正整数, 1</<(/ + 1);
K)分别取得所述选择的存储节点的解码向量, 与其下载的编码数据运算, 得 到解码后的数据块;
L)处理所述分别得到的数据块, 得到存储文件。
更进一步地, 步骤 K)所述的解码向量为各存储节点的编码向量的逆矩阵, 其通 过取得各存储节点的编码向量后求其逆而得。
替换页 (细则第 26条) 更进一步地, 步骤 K)中所述编码数据与解码矩阵的运算为其对应的二进制数进 行异或运算。
更进一步地, 在所述步骤 L) 中组合所述步骤 Κ) 中得到的数据块, 得到存储文 件; 所述組合包括按照设定顺序排列所述数据块。
本发明还涉及一种在上述的通用射影自修复码编码方法的存储系统中数据修复 的方法, 包括如下步骤:
Μ )确认一存储节点已经失效并得到该存储节点的编码数据块,设该失效的存 储节点的编码数据块为 v ν2,...,ν„;
Ν)依次由未失效的至少两个存储节点分别下载至少一个编码数据块, 并运算 得到所述失效存储节点的编码数据块;
Ο)将得到的多个表示失效节点编码数据的编码数据块存储在新的存储节点。 更进一步地, 所述步骤 Ν)进一步包括:
N1 ) 由一未失效节点下载其编码数据块 Ml, 由另一未失效节点下载其编码数 据块 w2, 其中, Vl=M,+M2; 对所迷下栽的编码数据块进行运算, 得到失效存储节点的 编码向量 V, ;
N2) 由再一未失效节点下载其编码向量 M3, 其中, v2="2+"3; 对所述下载的 编码数据块进行运算, 得到失效存储节点的编码向量 ;
N3)选择新的未失效存储节点重复步骤 N2), 直到得到失效存储节点的编码 向量 να
更进一步地, 所述步骤 Ν) 中的运算为其对应的二进制数进行异或运算; 所述步 骤 Ν ) 中下载进行运算的编码数据块的存储节点相同或不相同。
实施本发明的通用射影自修复码的编码、 数据重构和修复方法, 具有以下有益效 果: 由于将存储文件分为数据块, 且分别对数据块编码并将得到的相互独立的编码数 据存储在多个存储节点, 所以, 在修复数据时可以单独下载各存储节点存储的数据块 子集对失效的存储节点进行修复, 其修复数据较为简单、 下载的数据量较小。
附图说明
图 1是现有技术中 EC码的数据重构示意图;
图 2是现有技术中 EC码的失效存储节点修复示意图;
替换页 (细则第 26条) 图 3是现有技术中 RGC码的数据重构示意图;
图 4是本发明通用射影自修复码的编码、数据重构和修复方法实施例中编码流程 图;
图 5是所述实施例中一种情况下编码数据的存储分布示意图;
图 6是所述实施例中数据重构流程图;
图 7是所述实施例中数据修复流程图;
图 8是所述实施例中一种情况下编码数据的修复示意图;
图 9是所述实施例中一种情况下 GPRSC码和 MSR码的修复节点和修复带宽的折 中曲线比较示意图;
图 10是所述实施例中另一种情况下 GPRSC码和 MSR码的修复节点和修复带宽 的折中曲线比较示意图。
具体实施方式
下面将结合附图对本发明实施例作进一步说明。
如图 4所示,在本发明通用射影自修复码的编码、数据重构和修复方法实施例中, 该编码方法包括如下步骤:
步骤 S41取得数据块: 在本步骤中, 取得需要存储的数据块, 该数据块可能是将 需要存储的、数据量为 B的文件等分为 k份而得到的数据块中的一个,在这种情况下, 每个数据块包括 m个数据, B=mk; 也可以是数据量为 B的文件只有一个数据块, 在 这种情况下, 数据块的数据量为 B; 在多个数据块的情况下, 对于本实施例中的方法 而言, 也是逐个按照本实施例中所揭示的编码方法取得一个数据块存储在各存储节点 的编码数据, 并将这些数据存储在对应的存储节点中。 因此, 每个数据块存储在一个 节点上的编码数据相互之间是独立的; 同时, 一个数据块存储在一个存储节点上的编 码数据(该数据包括多个数据项)的数据项之间, 也是独立的、 不相关的。
步骤 S42设置基本有限域, 并将数据块在基本有限域上表示, 进而得到第一有限 域和第二有限域: 在本步骤中, 定义 GF( )表示大小为 q的有限域, 为 GF(g)的 m- 维向量空间。 射影几何 PG(/w-l, )是由 的所有子空间组成。 其中, PG(w-l , q)的 点为 维子空间, 线为 2-维子空间。 可以验证 PG(m-l , 中共有 ( 1)个点、 有
替换页 (细则第 26条) ( -ιχ ^-ιν^-ιχ^ι)个线。 任意的两个不同的点都包含在同一个线中, 任意的两个 不同的线都相交于一个点。
通常称 的 ( +l)-维子空间为 ί-空间。 PG( -l , 的 -扩展为 ί_空间的集合 S, 其 划分了 PG(w-l , 的点。 存在 PG(m-l, 的 ί-扩展的充要条件是汁 1整除 w。 扩展有 限域可以构造 ί-扩展,我们用 w-维有限域 GF(gw)表示向量空间 。在扩展有限域 GF(¾r) cz GF(^'+ 1) c GF(gw)中, 用 GF(^")*表示 GF(gm)的非零元素。 显然 GF«)*是循环乘法 群。 其中, B、 k、 q、 t和 m均为正整 t+1可以整除111。
步骤 S43得到各存储节点的编码向量: 在本步骤中, 用 w为 GF^")'的一个固定 生成元,而 V为 GF( '+Y的一个生成元, w和 V分别称为 GF(^")'和 GF(< +Y的本原元。 对于 GF ( ; Γ的任意元素 2, 我们用 zGF(^+ 1)* = eGF(g'+1)*}表示 GF(« )*的陪 集。 当 =0, 1 , 2, ..., ( 一1)/ ( +1— 1) — 1时, 陪集 w'GF ( 形成了 PG( , q)的一 个 ί-扩展。 考虑到实际应用, 码字的运算域为 GF(2)。 大小为 β的文件被分割为大 小相等的若干数据块, 每个数据块的编解码方法都是一样的。 因此, 我们只给出一个 数据块的编解码方法,不失一般性,考虑一个数据文件只含有一个数据块,大小为 Β, 可以用长度为 β的 GF(2)上的元素表示。 令 ί为满足 整除 β的正整数, N为正整 数 (2β-1 )/(2ί+1 - 1), 也就是 GF ( ) *在 GF^+Y中陪集的个数。令 ^={ 1, v, v2,…, v'}为向 量空间 GF(2'+ I)的一组基。对于 /=1 , 2,...,《,节点 i的编码向量分别为 t-扩展的一组基, 即 νν'-' V, W~] v2,…, 1 vt}是对应于节点 i, i=\, 2,..., n的编码向量。 本实施 例中, 在一些情况下, 也可以先设置上述步骤 S42 、 S43 , 在按照步骤 S42、 S43的 限制, 去划分数据块。 也就是说, 在一些情况下, 可以先执行上述步骤 S42、 43, 再 执行步骤 S41。 这些步骤之间可以视具体情况加以调节。
步骤 S44依据得到的编码向量,得到存储在各存储节点的编码数据:在本步骤中, 节点 存储的编码数据为数据文件与编码向量 1 ! '的乘积, ' = 0,1, 2,..., 对于所有 存储节点而言, 分别使用对应的上述编码向量与数据块运算得到存储在该存储节点的、 对应于该数据块的编码数据 (在存储文件只有一个数据块时对应该存储文件)。此时, 乘积是指数据文件与编码向量对应的二进制数的异或运算。
总之, 取数据量大小为 S的文件(为简单起见这里不进行文件分块, 各文件快的 编解码是一样的) , 将该文件用 GF(2) (为不失一般性, 此处 q=2 )上长度为 B的向
替换页 (细则第 26条) 量表示; 取正整数 满足 整除 β。 V是 GF(2'+ )的本原元, 构造编码向量 ={w''一1, wh] v, w' 1 v2, ..., w'-1 v'};节点 /存储的编码数据为数据文件与编码向量 —1 的乘积,/ = 0, 1,2,..., 。 乘积是指数据文件与编码向量对应的二进制数的异或运算。
为更加具体起见, 给出一个 β=8, 《=10以及 /=3的例子。 8位的数据 bits分别用 O ο2, ο3, ο4, ο5, ο6, ο7, ο8表示。 对这 8bits的数据进行编码并分别存储在 10个 存储节点中, 每个存储节点存储 i+l=4bits。 具体说明如下:
设有限域 F2,的生成多项式为 /(X) = X8 + X4 + X3 + X2 + 1,其乘法群 F2'8的生成元为 w, 则 v -' =w 2"=l。 令 v=w I7, 则 V的指数和 0形成了子域 GF(24)。 存储节点 1的编码向 量为 l,v,v2,v3, 即为 N1={1, w17, w34, w51}. 而另外 7个存储节点存储的向量空间分 别为
W21 ,
Figure imgf000011_0001
w41, w58}, N9-{w8, w25, w4 w59}, N10={w9, w2\ w43, w60}„ 指定前 8个元素分别 表示为 1 =00000001, w = 00000010, w2= 00000100, w3= 00001000, w4= 00010000, w5= 00100000, w6= 01000000, w7= 10000000。 那么对于存储节点 1, 其编码向量可 以计算出, V =
Figure imgf000011_0002
w3+w所以节点存储的 编码数据分别为。 04+05+0S, 02+03+04+07和 02+04。 同理, 可以依次计算出其它节点 的数据块存储情况, 图 5给出了本实施例中 GPSRC(10, 2)存储的编码数据分布图。
通过本实施例中 GPSRC码(General Projective Self-Repairing Codes , 通用射影自 修复码)的构造过程可知,文件 S被存储在 η个节点中,每个节点存储的数据量为 并且每个节点存储数据的编码向量是相互独立。 当 Λ 2时, PSRC码和 GPSRC码均不 满足 MDS特性。 可见 GPSRC码的重建过程不同于之前的 RS码、 EC码以及 RGC码 等。
GPSRC的编码矩阵的任意一列的连续 B个元素相互独立。 不妨假设数据收集者分 别下载了节点 /, ..., i+B的第一个编码数据, 编码向量分别为 w'', w^, ..., wi+B~ 如果存在 B个不全为 0的系数 c2,…, cB, 使得 c】 w' + c2 ...+ cB W'+B-' =0。 那么 对上式两端同时除以 ,则得到 ^^^::^+…+^^^1等于 0,这与 l,w1,...,H^1是GF(2β) 的一组基是相互矛盾的。
因此, GPSRC码的重建数据的方法为: 下栽连续的 β个存储节点的第 /列编码数
替换页 (细则第 26条) 据, 1≤/≤(ί + 1)。 我们知道, 编码矩阵的任意一列的连续的 8个元素均相互独立, 所 以可以解码出 β个原始数据, 即可以恢复出原始数据 β。
请参见图 6, 在图 6中示出了本实施例中 GPSRC码的数据重建过程, 包括如下步 骤:
步骤 S61选择等于存储文件数据量或数据块数据量的存储节点: 在本步骤中, 由 t-1个存储节点中,选择等于存储文件数据量或存储文件等分后得到的数据块数据量个 存储节点, 例如, 如果丈件或数据块中数据为 8bits, 则选择 8个存储节点。 值得一提 的是,如杲存储文件只有一个数据块,且为 B个,则上迷选择的存储节点的数量为 B; 如果该存储文件被等分, 则上述存储节点的数量是该数据块中数据的数量。 不管何种 情况出现, 在本实施例中, 这些被选择的存储节点一定是连续的。 在本实施例中, 作 为一个例子, 在存储文件只有一个数据块且其中数据量为 B的情况下, 选择的存储节 点数量为 B, 此处 B的数值与存储文件包括的数据量 B是相同的。
步骤 S62分别下载所选存储节点中的第 I列编码数据: 在本步骤中, 下载上述步 骤中连续的 8个存储节点的第 /列编码数据, 其中, 1≤/≤(/ + 1)。
步骤 S63将各存储节点下栽的编码数据分别与其对应的解码向量运算,得到其数 据块: 由于从各存储节点下载的数据是编码数据, 需要将其解码, 并组合起来才能得 到当初经过编码存储在存储节点的原始数据。 而在本步驟中, 就是将下载的编码数椐 分别按照取得该数据的存储节点的位置进行解码。 通常来讲, 各个存储节点的编码是 不同, 将各存储节点用于编码的编码向量按照其存储数据的位置对应起来时, 就形成 该存储节点的编码矩阵。 解码也是一样, 同样存在用于解码的向量或矩阵。 由于编码 矩阵的任意一列的连续的 β个元素均相互独立, 故通过下栽的数据与解码矩阵, 解码 出原始数据。实际上,使用的是解码矩阵中与下载数据对应的解码向量。在本步骤中, 解码矩阵是各存储节点编码矩阵的逆矩阵, 按照编码数据所在位置, 即可由解码矩阵 中得到解码向量。 所以, 在本步驟中, 解码向量通过取得各存储节点的编码向量后求 其逆而得。 编码数据与解码矩阵的运算为其对应的二进制数进行异或运算。
步骤 S64组合得到的数据块, 得到存储文件: 将解码出的数据进行整合, 恢复出 原始数据 Β。
请参见图 7 , 图 7示出本实施例中数据修复的过程, 包括如下步骤:
替换页 (细则第 26条) 步骤 S71确定失效存储节点, 并设置其编码数据: 在本步骤中, 确定一个存储节 点是否失效, 如果一个存储节点失效, 由其所在位置(或节点编号)可以得到该存储 节点的编码矩阵或编码向量。 在本步骤中, 当确定一个存储节点失效后, 可以先设置 其编码数据为 Vi, v2,...,Va ; 在后面的步骤中, 逐个得到上述编码数据中的每个数据块, 将其组合后存储在新的节点, 即可完成数据修复。
步骤 S72分别由至少两个存储节点下载至少一个编码数据修复失效存储节点的编 码数据: 在本步骤中, 分别由至少两个未失效的存储节点中分别下载至少一个编码数 据, 分别得到上述步骤中设置的失效节点的编码数据或编码数据块。 具体来讲, 在本 实施例中, 由一未失效节点下载其编码数据块 Ml , 由另一未失效节点下载其编码数据 块^ , 其中, 这两个未失效存储节点下载的数据存在以下关系: v, = Ml + "2 ; 对所述下 载的编码数据块进行运算, 得到失效存储节点的编码向量 v,。 由再一未失效节点下栽 其编码向量 ¾3 , 将其与上述步驟中已经下载的编码数据配合, 其中, 该再一存储节点 和已经现在过编码数据的存储节点上下载的数据存在以下关系: V2 = M23; 对这编码 数据块进行运算, 得到失效存储节点的编码向量 v2。 之后, 选择新的未失效存储节点 重复上述步骤, 直到得到失效存储节点的编码向量 va。 在本步骤中, 上述编码数据之 间的运算为其对应的二进制数进行异或运算; 此外, 在本步骤中, 上述下栽进行运算 的编码数据块的存储节点相同或不相同, 即在某些情况下, 可以由一个存储节点下载 两个编码数据并进行运算。 当然, 在一些情况下, 一个存储节点也可以根据情况选择 下载多个数据块并进行运算。
步骤 S73得到失效存储节点的编码数据并存储在新节点: 在本步骤中, 将上述步 骤中得到的多个编码数据块组合在一起, 请将其存储在一个新的存储节点上, 完成数 据修复。
在本实施例中, 在 PSRC(n, Ar)码中, 共有 r/个存储节点, 每个存储节点存储《的 编码数据量。 当一个存储节点 Λ/,失效时, 可以通过选择任意 1个存储及其相应的另一 个存储节点并下栽这 2个存储节点来恢复出失效节点 Λ/,存储的数据。 GPSRC(n, /r)码中, 当一个存储节点失效时, 那么最多从( " +l ) = ( f+2 )个存储节点中各下载一个数据, 修复带宽为 ( = ( t+2 )。
替换页 (细则第 26条) 一个失效的数据可以通过任意的选择 1 个节点的数据并对应的下载另一个节点的 一个数据来恢复。 假设一个节点丟失数据的编码向量为 V,, V2, …, va, 那么可以任 意的选择一个节点的编码向量 Wl 以及相对应的另一个节点的编码向量 《2, 使得 V l^+I^ 之后, 选择修复 V2的一个编码向量为 《2以及其相对应的编码向量 " 3使得 V2="2+"3。 同样的道理, 可以得到 V3=W3+l4, ..., va = U+M+,。 所以修复编码向量 V,, V2, 共下载了最多(《+1)个存储节点的编码向量 (Wt, 《2, ua+ ), 修复带宽为
(«+1)。 同时, 我们称该修复过程为最佳带宽修复过程。
在图 5给出的 GPSRC(10,2)码中,当节点 1失效时,首先下载节点 2的 {«!==00010100} 和节点 6的编码向量 {w2 = 00100000+00110101 = 00010101}可以修复向量 ^=",+"2 = 00000001} 0 根据最佳带宽修复过程, 下载节点 3 的 {«3=01011010}节点 4 的 {«4=01010000}和节点 7的 {w5=11001001}即可恢复出节点 1的所有失效数据。 修复过 程为 {Vi^ +l^, 3=«i+M3i V4="4+"3, Vfl^+I^+Vje 爹复带宽为 5, 复节点为 5。 其 他节点的修复带宽也均是 5。
如图 8所示, 节点 1存储数据量可以由其它节点的数据块相异或而得出, 具体地 说, Λ/ι = Λ/2(ο3+ο5) + N3(o2+oA+os+o7) + Λ/4(ο5+ο7) + Λ/6(θι+ο3+ο5) + /N ^+OA+C^+OS)。 那么若 节点 1 失效, 在修复过程中需要下载节点 2 的数据块 (o3+o5)、 节点 3 的数据块 (θ2+ο4+ο5+ο7), 节点 4的数据块 (os+o7)、 节点 6的数据块 (0 i"O3+05)和节点 7的数据块
(CH+04+07+08)即可修复节点 1 存储的数据。 其它节点存储的数据的修复过程与第一个 节点的表示方法类似地得出。
这里补充说明的一点是, 每个节点存储的原始数据块之间是可以相异或的。 具体 地说, 为了修复节点 9存储的数据块, 需要从前 8个节点存储的数据块中选择一些数 据块进行异或运算。 然而, 这些节点存储的原始数据是并不能直接修复出节点 9丢失 的数据块。 这时我们需要将前面节点存储数据块进行简单异或来进行修复。 比如, 为 了修复出节点 9 的数据块 ( +(¾), 可以选择节点 8 的数据块 (^+02+03+04+08)、 (ο357+ο8)简单异或, 得到数据块 (^+02+04+05+07)。 同时选择节点 4的数据块 (ο4)、
(05+07)简单异或得到 (04+05+07)。 所以有, (θι+02) = (Oi+02+0 +Os+07) + (Ο4+Ο5+Ο7)» 同理 可以修复出节点 9的其它数据块, 节点 10的修复方式亦然。
根据以上分析, 我们给出 GPSRC的一般修复过程。 首先, 可以从两个节点分别下
替换页 (细则第 26条) 栽 t个编码数据, 可以修复失效节点的 ί个编码数据; 同时, 我们下载一个编码数据 和已经下载的 2t个编码数据一起修复失效节点剩下的一个编码数据。以上爹复过程的 修复带宽为 2t+l、 修复节点为 3。 同理, 可以从两个节点中分别下栽 (f-1)个编码数据 块并从另外两个节点下栽两个编码数据, 这样, 修复带宽为 2ί, 修复节点为 4。 同理 可以得出其它节点的修复过程, 统称这些修复过程为一般修复过程。 一般修复过程在 修复带宽和修复节点性能中有一个折中, 该折中函数可以表示为
/+d = 2t+4 = 2(l+S ) , for t+2 > d> 2
其中, y为修复带宽, d为修复节点。 所以修复带宽可以表示为
= + 22≤4≤(, + 2)。 图 9和图 10分别给出了参数 8=16 r=4和 8=32, ^=4 k , f
时 GPSRC和 MSR码的折中曲线。可以得到当给定修复节点数量时, GPSRC的修复带宽 小于 MSR码的修复带宽, 而当给定修复带宽时, GPSRC的修复节点数量也小于 MSR 码的修复节点。 因此, 可以说, 一般情况下 GPSRC在修复带宽和修复节点性能中均优 于 MSR码, 尽管其代价为失去 MDS特性。
在本实施例中的通用射影自修复码 (GPSRC ) 与 RGC码不同之处在于, RGC码主 要思想还是利用 MDS属性, 当网络中一些存储节点失效, 需要从现有有效节点中下栽 信息来使得丟失的数据修复丢失的数据模块, 并将其存储在新的节点上。 再生过程需 要确保两点: 1 ) 失效的节点间是相互独立的, 再生过程可以循环递推; 2 )任意1^个 节点就足够恢复原始文件。 RGC码中要重构任意一个模块, 至少需要和其他 k个节点 通信, 当只有一个模块丢失, 所需要的最小通信量是与所有活动的 n-1个节点通信, 而 GPSRC码则比较灵活, 修复节点和修复带宽可以折中考虑, 最少只需要和 2个节点进 行通信。
HSRC码的编码需要计算多项式相对较复杂, 系统计算复杂度较高。 同时为了修 复一个特定的失效节点, 一旦随机的选择了一个节点为辅助节点, 就只剩下一个节点 可供选。 GPSRC码则不同, 修复一个失效节点可以存在多种修复方案。 具体来说, 对于一个失效节点, 至少存在一个节点对可以进行 "复。
在本实施例中, GPSRC码在修复节点和修复带宽方面可以折中考虑, 具体编码方 案实施过程中可以达到修复节点少, 修复带宽小的效益, 特别适合应用于实际的分布 式存储系统。 同时, GPSRC码提供了有效的冗余修复方案, 具体包括: 1 )丢失的编
替换页 (细则第 26条) 码块可以直接下载其他编码模块的若干子集进行修复, 下栽的数据量小于整个文件的 数据量; 2 )丟失的编码块可以通过固定数目的编码模块进行^ "复, 该固定数目只与 系统丟失了多少模块数有关, 而与具体哪些模块丟失无关。 这些属性使得修复一个丢 失模块的负栽比较低, 同时可以独立并发地修复不同丟失模块。
GPSRC码不仅满足 PSRC的基本特性, 而且在选择存储节点的数量上更灵活, 相 比于之前的编码方案, GPSRC的编码效率更高。 一个 GPSRC(n,k)码可以通过远小于 k 个节点来修复一个失效模块, 而且很多情况下一个节点的修复能力不止一个, 那么修 复一个丟失模块所需要的节点数大幅度减少, 从而也减少了系统的通信开销; GPSRC 码的构造过程、 修复过程和重建过程均只涉及异或运算, 所以计算复杂度很低、 计算 开销很小, 适合实际的存储系统; GPSRC码可以并发修复不同的模块, 很大程度上降 低了系统修复时延, 这使得 GPSRC易于实施、 修复代价低。
以上所述实施例仅表达了本发明的几种实施方式, 其描述较为具体和详细, 但并 不能因此而理解为对本发明专利范围的限制。 应当指出的是, 对于本领域的普通技术 人员来说, 在不脱离本发明构思的前提下, 还可以做出若干变形和改进, 这些都属于 本发明的保护范围。 因此, 本发明专利的保护范围应以所附权利要求为准。
替换页 (细则第 26条)

Claims

权利要求书
1、 一种通用射影自修复码的编码方法, 其特征在于, 包括如下步骤:
A )取得需要存储的、数据量为 B的文件, 将其等分为 k个数据块,每个数 据块包括 m个数椐;
B)设置大小为 q的基本有限域 所述每个数据块在所述基本有限域 上用长度为 m的向量表示; 所述基本有限域的 m-维向量空间为 W, 所述 W的所有子 空间组成射影几何 PG (m-l,q); 所述 W的( t+1 ) -维子空间为 t-空间, 所述 t-空间的 集合 S为 t-扩展;得到第一有限域 GEfe'+和表示所述向量空间 W的第二有限域 G ^), GF{q)^GF{q'+ )aGF(qm) 其中, B、 k、 q、 t和 m均为正整数, t+1能整除 m;
C )取得表示所述第二有限域 非零元素的循环乘法群 G/^")', w为其 本原元;取得表示所述第一有限域 非零元素的循环乘法群 GE '+1)', V为其本原 元; 构建存储节点/的编码向量^- '-1 '-^ 2,..., '-'^, 存储节点 的编码向量分别 为所述 t-扩展的一组基; 其中, ,'为表示存储节点数的正整数, / = U,...,i;
D)将对应于各存储节点 ,·的编码向量分别与一个数据块相乘, 得到该数据 块存储在该存储节点的编码数据。
2、 根据权利要求 1 所述的通用射影自修复码的编码方法, 其特征在于, 还包括 如下步骤: 将多个数据块分别与各存储节点的编码数据相乘后得到的编码数据分别依 次存储在各存储节点。
3、 根据权利要求 2所迷的通用射影自修复码的编码方法, 其特征在于, 所述步 骤 D ) 中编码向量与数据块相乘为其对应的二进制数进行异或运算。
4、 一种在采用如权利要求 1 中所述的通用射影自修复码编码方法的存储系统中 数据重构方法, 其特征在于, 包括如下步骤:
I)选择 t- 1 个存储节点中的连续的、 等于存储文件数据量或存储文件等分后 得到的数据块数据量个存储节点;
J) 下载所述选择的存储节点中的第 /列的编码数据, /为正整数, 1≤/≤(/ + 1); K)分别取得所述选择的存储节点的解码向量, 与其下载的编码数据运算, 得 到解码后的数据块;
L)处理所述分别得到的数据块, 得到存储文件。
替换页 (细则第 26条)
5、 根据权利要求 4所述的数据重构方法, 其特征在于, 步骤 K )所述的解码向 量为各存储节点的编码向量的逆矩阵, 其通过取得各存储节点的编码向量后求其逆而 得。
6、 根据权利要求 5所述的数据重构方法, 其特征在于, 步骤 K ) 中所述编码数 据与解码矩阵的运算为其对应的二进制数进行异或运算。
7、根据权利要求 6所述的数据重构方法, 其特征在于, 在所述步骤 L )中组合所 述步骤 K ) 中得到的数据块, 得到存储文件; 所述组合包括按照设定顺序排列所述数 据块。
8、 一种在采用如权利要求 1 中所述的通用射影自修复码编码方法的存储系统中 数据重构的方法, 其特征在于, 包括如下步骤:
M )确认一存储节点已经失效并得到该存储节点的编码数据块,设该失效的存 储节点的编码数据块为 V|, v2,...,vff
N )依次由未失效的至少两个存储节点分别下栽至少一个编码数据块, 并运算 得到所述失效存储节点的编码数据块;
0 )将得到的多个表示失效节点编码数据的编码数据块存储在新的存储节点。
9、 根据权利要求 8所述的数据重构的方法, 其特征在于, 所述步骤 N )进一步 包括:
N1 ) 由一未失效节点下载其编码数据块 w,, 由另一未失效节点下载其编码数 据块《2 , 其中, +«2; 对所述下栽的编码数据块进行运算, 得到失效存储节点的 编码向量 νι ;
N2 ) 由再一未失效节点下载其编码向量 M3 , 其中, V2 - M2 +^ ; 对所述下载的 编码数据块进行运算, 得到失效存储节点的编码向量 v2
N3 )选择新的未失效存储节点重复步骤 N2 ), 直到得到失效存储节点的编码 向量 。
10、 根据权利要求 9所述的数据重构的方法, 其特征在于, 所述步骤 Ν ) 中的运 算为其对应的二进制数进行异或运算; 所述步骤 Ν ) 中下载进行运算的编码数据块的 存储节点相同或不相同。
替换页 (细则第 26条)
PCT/CN2013/070001 2013-01-04 2013-01-04 一种通用射影自修复码的编码、数据重构和修复方法 WO2014106316A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2013/070001 WO2014106316A1 (zh) 2013-01-04 2013-01-04 一种通用射影自修复码的编码、数据重构和修复方法
CN201380063753.0A CN104838626B (zh) 2013-01-04 2013-01-04 一种通用射影自修复码的编码、数据重构和修复方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/070001 WO2014106316A1 (zh) 2013-01-04 2013-01-04 一种通用射影自修复码的编码、数据重构和修复方法

Publications (1)

Publication Number Publication Date
WO2014106316A1 true WO2014106316A1 (zh) 2014-07-10

Family

ID=51062122

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/070001 WO2014106316A1 (zh) 2013-01-04 2013-01-04 一种通用射影自修复码的编码、数据重构和修复方法

Country Status (2)

Country Link
CN (1) CN104838626B (zh)
WO (1) WO2014106316A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732203B (zh) * 2021-03-31 2021-06-22 中南大学 一种再生码构造方法、文件重构方法及节点修复方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101316274A (zh) * 2008-05-12 2008-12-03 华中科技大学 一种适用于广域网的数据容灾系统
CN102624866A (zh) * 2012-01-13 2012-08-01 北京大学深圳研究生院 一种存储数据的方法、装置及分布式网络存储系统
CN102710757A (zh) * 2012-05-21 2012-10-03 北京航空航天大学 一种分布式云存储数据完整性保护方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102222202B (zh) * 2011-06-09 2013-07-10 重庆邮电大学 高效细粒度数据完整性检验方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101316274A (zh) * 2008-05-12 2008-12-03 华中科技大学 一种适用于广域网的数据容灾系统
CN102624866A (zh) * 2012-01-13 2012-08-01 北京大学深圳研究生院 一种存储数据的方法、装置及分布式网络存储系统
CN102710757A (zh) * 2012-05-21 2012-10-03 北京航空航天大学 一种分布式云存储数据完整性保护方法

Also Published As

Publication number Publication date
CN104838626B (zh) 2017-12-01
CN104838626A (zh) 2015-08-12

Similar Documents

Publication Publication Date Title
US9647698B2 (en) Method for encoding MSR (minimum-storage regenerating) codes and repairing storage nodes
WO2014153716A1 (zh) 一种最小带宽再生码的编码和存储节点修复方法
CN101427495B (zh) 用于通信系统的基于多域的码生成器和解码器
WO2013104135A1 (zh) 一种存储数据的方法、装置及分布式网络存储系统
CN110178122B (zh) 分布式存储系统的数据同步修复方法及存储介质
Gad et al. Repair-optimal MDS array codes over GF (2)
US11500725B2 (en) Methods for data recovery of a distributed storage system and storage medium thereof
CN103124182A (zh) 文件下载和流系统
CN109491835B (zh) 一种基于动态分组码的数据容错方法
WO2012008921A1 (en) Data encoding methods, data decoding methods, data reconstruction methods, data encoding devices, data decoding devices, and data reconstruction devices
WO2016058262A1 (zh) 一种基于二进制域里德所罗门码的数据编解码方法
WO2015180038A1 (zh) 部分复制码的构建方法、装置及其数据修复的方法
CN113391946B (zh) 一种分布式存储中的纠删码的编解码方法
CN107733562B (zh) 极化码的编解码方法及装置
WO2013159341A1 (zh) 基于同态的自修复码的编码、解码和数据修复方法及其存储系统
WO2014059651A1 (zh) 一种射影自修复码的编码、数据重构及修复方法
CN112130772A (zh) 一种基于稀疏随机纠删码技术的区块链安全存储方法
WO2014012246A1 (zh) 用于分布式网络存储的自修复码的编码、重构和恢复方法
WO2013023604A1 (zh) Ldpc码校验矩阵的构造方法、装置和编码方法及系统
WO2017041232A1 (zh) 一种二进制循环码的编解码框架
WO2017041233A1 (zh) 一种功能修复再生码的编码和存储节点修复方法
WO2014106316A1 (zh) 一种通用射影自修复码的编码、数据重构和修复方法
WO2014005279A1 (zh) 一种可精确再生的分布式存储码的构建方法及装置
CN108512553B (zh) 一种降低带宽消耗的截短再生码构造方法
WO2017041231A1 (zh) 一种精确修复的二进制再生码编解码

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: 13870091

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13870091

Country of ref document: EP

Kind code of ref document: A1