[go: up one dir, main page]

CN104838626B - A kind of coding, data reconstruction and the restorative procedure of general projection selfreparing code - Google Patents

A kind of coding, data reconstruction and the restorative procedure of general projection selfreparing code Download PDF

Info

Publication number
CN104838626B
CN104838626B CN201380063753.0A CN201380063753A CN104838626B CN 104838626 B CN104838626 B CN 104838626B CN 201380063753 A CN201380063753 A CN 201380063753A CN 104838626 B CN104838626 B CN 104838626B
Authority
CN
China
Prior art keywords
data
node
vector
memory node
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201380063753.0A
Other languages
Chinese (zh)
Other versions
CN104838626A (en
Inventor
李挥
朱兵
侯韩旭
陈畅民
周敬邦
范曦东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN GUANGXIN NETWORK MEDIA CO Ltd
Peking University Shenzhen Graduate School
Original Assignee
SHENZHEN GUANGXIN NETWORK MEDIA CO Ltd
Peking University Shenzhen Graduate School
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 SHENZHEN GUANGXIN NETWORK MEDIA CO Ltd, Peking University Shenzhen Graduate School filed Critical SHENZHEN GUANGXIN NETWORK MEDIA CO Ltd
Publication of CN104838626A publication Critical patent/CN104838626A/en
Application granted granted Critical
Publication of CN104838626B publication Critical patent/CN104838626B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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

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(q t+1)和第二有限域GF(qm),;构建存储节点i的编码向量Vi={wi‑1,wi‑1v,wi‑1v2,...,wi‑1vt},存储节点i的编码向量分别为所述t‑扩展的一组基;其中,i为表示存储节点数的正整数,i=1,2,...,t;得到该数据块存储在该存储节点的编码数据。本发明还涉及一种对使用上述编码方法的系统进行数据重构和数据修复的方法。实施本发明的通用射影自修复码的编码、数据重构和修复方法,具有以下有益效果:其修复数据较为简单、下载的数据量较小。

The present invention relates to an encoding method of a general projective self-repairing code, comprising the following steps: obtaining a data block to be stored; setting a basic finite field GF(q) whose size is q, and each data block is in the basic finite field The above is represented by a vector with length m; get the first finite field GF( q t+1 ) and the second finite field GF(q m ), ; Construct the encoding vector V i of the storage node i = {w i‑1 , w i‑1 v, w i‑1 v 2 ,..., w i‑1 v t }, and the encoding vectors of the storage node i are respectively A set of bases for the t-expansion; wherein, i is a positive integer representing the number of storage nodes, i=1, 2,..., t; the coded data stored in the storage node of the data block is obtained. The present invention also relates to a method for data reconstruction and data restoration of the system using the above encoding method. Implementing the encoding, data reconstruction and repairing method of the universal projective self-repairing code of the present invention has the following beneficial effects: the repairing data is relatively simple, and the amount of downloaded data is small.

Description

一种通用射影自修复码的编码、数据重构和修复方法Encoding, data reconstruction and repair method of a general projective self-repair code

技术领域technical field

本发明涉及分布式网络存储领域,更具体地说,涉及一种通用射影自修复码的编码、数据重构和修复方法。The invention relates to the field of distributed network storage, more specifically, to a method for encoding, data reconstruction and repair of a general projective self-repair code.

背景技术Background technique

随着信息产生量的迅速增长,有效地存储海量数据的存储系统已经越来越重要。分布式存储系统以其高效的可扩展性和高可用性成为存储海量数据的有效系统。然而在分布式存储系统中,存储数据的存储节点是不可靠的。为了能够由不可靠的存储节点提供可靠的存储服务,需要在存储系统中引入冗余。引入冗余最简单的方法就是对原始数据直接备份,直接备份虽然简单但是其存储效率和系统可靠性不高,而通过编码引入冗余的方法可以提高其存储效率。在目前的存储系统中,编码方法一般采用MDS(Maximum DistanceSeparable最大距离可分离)码,MDS码可以达到存储空间效率的最佳,一个(n,k)MDS纠错码需要将一个原始文件分成k个大小相等的模块,并通过线性编码生成n个互不相关的编码模块,由n个节点存储不同的模块,并满足MDS属性(n个编码模块中任意k个就可重构原始文件)。这种编码技术在提供有效的网络存储冗余中占有重要的地位,特别适合存储大的文件以及档案数据备份应用。With the rapid increase of information generation, the storage system for effectively storing massive data has become more and more important. Distributed storage system has become an effective system for storing massive data due to its efficient scalability and high availability. However, in a distributed storage system, the storage nodes that store data are unreliable. In order to be able to provide reliable storage services by unreliable storage nodes, it is necessary to introduce redundancy into the storage system. The easiest way to introduce redundancy is to directly back up the original data. Although direct backup is simple, its storage efficiency and system reliability are not high, and the method of introducing redundancy through coding can improve its storage efficiency. In the current storage system, the encoding method generally adopts MDS (Maximum Distance Separable maximum distance separable) code, MDS code can achieve the best storage space efficiency, a (n, k) MDS error correction code needs to divide an original file into k modules of equal size, and generate n independent coding modules through linear coding, and store different modules by n nodes, and satisfy the MDS property (any k of n coding modules can reconstruct the original file). This encoding technique plays an important role in providing efficient network storage redundancy, especially for storing large files and archival data backup applications.

在分布式存储系统中,把大小为B的数据存储在n个存储节点中,每个存储节点存储的数据大小为α。数据接收者只需要连接并下载n个存储节点中的任意k个存储节点的数据即可恢复出原始数据B,这一过程称为数据重建过程。RS码是满足MDS码特性的一种码字。当存储系统中的存储节点失效时,为了保持存储系统的冗余量,需要恢复该失效节点存储的数据并将该数据存储在新节点中,该过程称为修复过程。然而,在修复过程中,RS码首先需要下载k个存储节点的数据并恢复出原始数据,之后为新节点编码出失效节点的存储数据。为了恢复一个存储节点的数据而解码出整个原始数据显然对传输带宽是一种浪费。In a distributed storage system, the data of size B is stored in n storage nodes, and the size of data stored in each storage node is α. The data receiver only needs to connect and download the data of any k storage nodes among the n storage nodes to restore the original data B. This process is called the data reconstruction process. The RS code is a code word that satisfies the characteristics of the MDS code. When a storage node in the storage system fails, in order to maintain the redundancy of the storage system, it is necessary to recover the data stored in the failed node and store the data in a new node. This process is called a repair process. However, in the repair process, the RS code first needs to download the data of k storage nodes and restore the original data, and then encode the storage data of the failed node for the new node. It is obviously a waste of transmission bandwidth to decode the entire original data in order to recover the data of a storage node.

然而,系统节点失效或者文件损耗,系统的冗余度会随着时间而逐渐减小,因此需要一种机制来保证系统的冗余。文献[R.Rodrigues and B.Liskov,“High Availabilityin DHTs:Erasure Coding vs.Replication”,Workshop on Peer-to-Peer Systems(IPTPS)2005.]中提出的EC(Erasure Codes纠错码)码,该码在存储开销上是比较有效的,然而支持冗余恢复所需要的通信开销也比较大。图1表示只要系统中有效节点数d≥k,就可以从现有节点中获得原始文件;图2表示恢复失效节点所存储内容的过程。从图1、图2中可以看出整个恢复过程是:1)首先从系统中的k个存储节点中下载数据并重构原始文件;2)由原始文件再重新编码出新的模块,存储在新节点上。该恢复过程表明修复任何一个失效节点所需要的网络负载至少为k个节点所存储的内容。However, if the system node fails or the file is lost, the redundancy of the system will gradually decrease with time, so a mechanism is needed to ensure the redundancy of the system. The EC (Erasure Codes Error Correcting Code) code proposed in the document [R.Rodrigues and B.Liskov, "High Availability in DHTs: Erasure Coding vs. Replication", Workshop on Peer-to-Peer Systems (IPTPS) 2005.], the The code is more efficient in terms of storage overhead, but the communication overhead required to support redundancy recovery is also relatively large. Figure 1 shows that as long as the number of effective nodes d≥k in the system, the original file can be obtained from the existing nodes; Figure 2 shows the process of restoring the stored content of the failed node. It can be seen from Figure 1 and Figure 2 that the whole recovery process is: 1) first download data from k storage nodes in the system and reconstruct the original file; 2) recode the new module from the original file and store it in on the new node. The recovery process shows that the network load required to repair any failed node is at least the content stored by k nodes.

同时,为了降低修复过程中所使用的带宽,文[A.G.Dimakis,P.G.Godfrey,M.J.Wainwright,K.Ramchandran,“Network coding for distributed storagesystems”,IEEE Proc.INFOCOM,Anchorage,Alaska,May 2007.]利用网络编码理论的思想提出了再生码(RGC,Regenerating Codes),RGC码也满足MDS码特性。再生码的修复过程中,新节点需要在剩下的存储节点中连接d个存储节点并分别从这d个存储节点中下载β大小的数据,所以RGC码的修复带宽为dβ。同时给出了RGC码功能修复的模型并提出了RGC码的两类最佳码:最小存储再生码(MSR,Minimum-storage Regenerating)和最小修复带宽再生码(MBR,Minimum-bandwidth Regenerating)。RGC码的修复带宽优于RS码,但RGC的修复过程需要连接d(d>k)个存储节点(d称为修复节点)。另外,修复节点需要对其存储的数据执行随机线性网络编码操作。为了满足所有编码包是相互独立的,RGC码的运算需要在一个较大的有限域内。At the same time, in order to reduce the bandwidth used in the restoration process, the paper [A.G.Dimakis, P.G.Godfrey, M.J.Wainwright, K.Ramchandran, "Network coding for distributed storagesystems", IEEE Proc.INFOCOM, Anchorage, Alaska, May 2007.] utilizes network The idea of coding theory proposes regenerating codes (RGC, Regenerating Codes), and RGC codes also satisfy the characteristics of MDS codes. During the repairing process of the regenerative code, the new node needs to connect d storage nodes among the remaining storage nodes and download data of size β from the d storage nodes respectively, so the repair bandwidth of the RGC code is dβ. At the same time, the model of RGC code function repair is given and two kinds of optimal codes of RGC code are proposed: minimum storage regenerating code (MSR, Minimum-storage Regenerating) and minimum repair bandwidth regenerating code (MBR, Minimum-bandwidth Regenerating). The repair bandwidth of RGC code is better than that of RS code, but the repair process of RGC needs to connect d (d>k) storage nodes (d is called repair node). Additionally, repair nodes need to perform randomized linear network coding operations on the data they store. In order to satisfy that all code packets are independent of each other, the operation of the RGC code needs to be in a larger finite field.

专利PCT/CN2012/071177中提出了一种RGC码,该方案中修复一个丢失的编码模块只需要一小部分的数据量,而不需要重构整个文件。RGC码应用线性网络编码思想,利用NC(Network Coding,网络编码)属性(即最大流最小割)来改善修复一个编码模块所需要的开销,从网络信息论上可以证明用和丢失模块相同数据量的网络开销就可修复丢失模块。Patent PCT/CN2012/071177 proposes an RGC code, in which only a small amount of data is needed to repair a lost coding module, and the entire file does not need to be reconstructed. The RGC code applies the idea of linear network coding, and uses the NC (Network Coding, network coding) attribute (that is, the maximum flow minimum cut) to improve the overhead required to repair a coding module. From the network information theory, it can be proved that the same data volume as the lost module can be used. The network overhead is enough to repair missing modules.

RGC码主要思想还是利用MDS属性,当网络中一些存储节点失效,也就相当于存储数据丢失,需要从现有有效节点中下载信息来使得丢失的数据修复丢失的数据模块,并将其存储在新的节点上。随着时间的推移,很多原始节点可能都会失效,一些再生的新节点可以在自身再重新执行再生过程,继而生成更多的新节点。因此再生过程需要确保两点:1)失效的节点间是相互独立的,再生过程可以循环递推;2)任意k个节点就足够恢复原始文件。The main idea of the RGC code is to use the MDS attribute. When some storage nodes in the network fail, it is equivalent to the loss of stored data. It is necessary to download information from existing valid nodes to make the lost data repair the lost data module and store it in on the new node. As time goes by, many original nodes may fail, and some regenerated new nodes can re-execute the regeneration process on themselves, and then generate 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 recursively recursive; 2) Any k nodes are enough to restore the original file.

图3描述了当一个节点失效后的再生过程。分布式系统中n个存储节点各自存储α个数据,当有一个节点失效,新节点通过从其他d≥k个存活节点中下载数据来再生,每个节点的下载量为β,每个存储节点i通过一对节点Xi in,Xi out来表示,这对节点通过一个容量为该节点的存储量(即α)的边连接。再生过程通过一个信息流图描述,Xin从系统中任意d个可用节点中各自收集β个数据,通过在Xout中存储α个数据,任何一个接收者都可以访问Xout。从信源到信宿的最大信息流是由图中最小割集决定,当信宿要重构原始文件时,这个流的大小不能低于原始文件的大小。Figure 3 describes the regeneration process when a node fails. In the distributed system, n storage nodes each store α data. When a node fails, the new node regenerates by downloading data from other d≥k surviving nodes. The download amount of each node is β, and each storage node i is represented by a pair of nodes X i in and X i out , which are connected by an edge whose capacity is the storage capacity of the node (ie α). The regeneration process is described by an information flow graph. Xin collects β pieces of data from any d available nodes in the system. Through Store α data in X out , and any receiver can access X out . 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 this flow cannot be lower than the size of the original file.

每个节点存储量α和再生一个节点所需要的带宽γ之间存在一个折中,因此又引入最小带宽再生码(MBR)和最小存储再生码(MSR)。对于最小存储点可以知道每个节点至少存储M/k比特,因此可推出MSR码中当d取最大值即一个新来者同时和所有存活的n-1个节点通信时,修复带宽γMSR最小即而MBR码拥有最小修复带宽,可以推出当d=n-1时,获得最小修复负载There is a compromise between the storage capacity α of each node and the bandwidth γ needed to regenerate a node, so the minimum bandwidth reproduction code (MBR) and the minimum storage reproduction code (MSR) are introduced. For the minimum storage point, it can be known that each node stores at least M/k bits, so it can be deduced that in the MSR code When d takes the maximum value, that is, a newcomer communicates with all surviving n-1 nodes at the same time, the repair bandwidth γ MSR is the smallest The MBR code has the minimum repair bandwidth, and it can be deduced that when d=n-1, the minimum repair load can be obtained

对于节点失效修复问题,考虑了三种修复模型:精确修复:失效的模块需要正确构造,恢复的信息和丢失的一样(核心技术为干扰队列和NC);功能修复:新产生的模块可以包含不同于丢失节点的数据,只要修复的系统支持MDS码属性(核心技术为NC);系统部分精确修复:是介于精确修复和功能修复之间的一个混合修复模型,在这个混合模型中,对于系统节点(存储未编码数据)要求必须精确恢复,即恢复的信息和失效节点所存储的信息一样,对于非系统节点(存储编码模块),则不需要精确修复,只需要功能修复使得恢复的信息能够满则MDS码属性(核心技术为干扰队列和NC)。For the problem of node failure repair, three repair models are considered: precise repair: the failed module needs to be constructed correctly, and the restored information is the same as the lost one (the core technology is interference queue and NC); functional repair: the newly generated module can contain different For the data of lost nodes, as long as the repaired system supports the MDS code attribute (the core technology is NC); system partial precise repair: it is a hybrid repair model between precise repair and functional repair. In this hybrid model, for the system Nodes (storing unencoded data) require accurate recovery, that is, the restored information is the same as the information stored in the failed node. For non-system nodes (storage encoding modules), precise repair is not required, only functional repair is required so that the restored information can MDS code attributes are full (the core technology is interference queue and NC).

为了使RGC码运用到实际的分布式系统中,即使不是最优情况也至少需要从k个节点下载数据才能修复丢失模块,因此即使修复过程所需要的数据传输量比较低,RGC码也需要高的协议负载和系统设计(NC技术)复杂度来实现。另外RGC码中未考虑工程解决方法,如懒修复过程,因此不能避免临时失效所带来的修复负载。最后基于NC的RGC码的编解码实现所需要的计算开销比较大,比传统的EC码要高一个阶数。In order to apply the RGC code to the actual distributed system, even if it is not optimal, at least k nodes need to download data to repair the lost module, so even if the amount of data transmission required for the repair process is relatively low, the RGC code needs to be high. The protocol load and system design (NC technology) complexity to achieve. In addition, engineering solutions, such as lazy repair process, are not considered in the RGC code, so the repair load caused by temporary failure cannot be avoided. Finally, the NC-based RGC code encoding and decoding requires relatively large calculation overhead, which is one order higher than the traditional EC code.

专利PCT/CN2012/083174中提出了一种实用射影自修复码的编码、数据重构及修复方法。实用射影自修复码(PPSRC,Practical Projective Self-repairing Codes)同样具有自修复码的两个典型属性:丢失的编码模块可从其他编码模块中下载少于整个文件的数据进行修复;丢失的编码模块从一个给定数的模块中修复,该给定数只与丢失了多少模块数有关,而与具体哪些模块丢失无关。这些属性使得修复一个丢失模块的负载比较低,另外由于系统中各节点地位相同、负载均衡使得在网络的不同位置,可以独立并发地修复不同丢失模块。Patent PCT/CN2012/083174 proposes a practical projective self-repair code encoding, data reconstruction and repair method. Practical Projective Self-repairing Codes (PPSRC, Practical Projective Self-repairing Codes) also have two typical properties of self-repairing codes: the missing coding module can download less than the entire file's data from other coding modules for repair; the missing coding module Repair from a given number of modules that only depends on how many modules are missing, not which modules are missing. These properties make the load of repairing a missing module relatively low. In addition, because all nodes in the system have the same status and load balance, different missing modules can be repaired independently and concurrently at different locations in the network.

该码字除了满足以上条件外还有以下特性:当一个节点失效时,可以有(n‐1)/2对修复节点可供选择;当有(n‐1)/2个节点同时失效时,我们仍然可以使用剩下的(n+1)/2个节点中的2两个节点来修复失效节点。In addition to meeting the above conditions, the codeword has the following characteristics: when a node fails, there are (n-1)/2 pairs of repair nodes to choose from; when (n-1)/2 nodes fail at the same time, We can still use 2 of the remaining (n+1)/2 nodes to repair the failed node.

PPSRC码的编码以及自修复过程仅涉及异或运算,并不像一般自修复码,其编码需要计算多项式相对较复杂,PPSRC码的计算复杂度小于PSRC码(Projective Self-repairing Codes,射影自修复码)。同时,PPSRC码的修复带宽和修复节点优于MSR码。PPSRC码的冗余是可控的,适用于一般的存储系统,PPSRC码的重建带宽达到最佳。总而言之,PPSRC码有效地减少了数据存储节点,降低了系统数据存储的冗余度,很大程度上提高了实用自修复码的使用价值。The encoding and self-repairing process of PPSRC codes only involve XOR operations, unlike general self-repairing codes, whose encoding requires calculation of polynomials is relatively complex, and the computational complexity of PPSRC codes is less than that of PSRC codes (Projective Self-repairing Codes, projective self-repairing codes) code). At the same time, the repair bandwidth and repair nodes of PPSRC codes are better than MSR codes. The redundancy of the PPSRC code is controllable, suitable for general storage systems, and the reconstruction bandwidth of the PPSRC code is optimal. All in all, the PPSRC code effectively reduces the number of data storage nodes, reduces the redundancy of system data storage, and greatly improves the use value of practical self-repair codes.

然而,PPSRC码也存在一定的不足之处。首先,PPSRC码的编解码过程较为复杂,有限域及其子域的划分运算量相对较大,并且数据重构过程比较繁琐;其次,在PPSRC码中,编码模块是不可再分的,因此修复编码模块也必须是不可再分的。同时,PPSRC码的整个编解码过程运算复杂度较高,冗余量虽然可控但其实还是相当大的。通常PPSRC码存储节点数选取非常大,对于相对小一些的文件来说就显得完全没有必要了。这些均增加了PPSRC码在实际分布式存储系统中实施难度,该射影自修复码通用性不强。However, PPSRC codes also have certain shortcomings. First of all, the encoding and decoding process of PPSRC codes is relatively complicated, the division of finite fields and their subfields requires a relatively large amount of computation, and the data reconstruction process is relatively cumbersome; secondly, in PPSRC codes, the coding module cannot be further divided, so repairing Encoding modules must also be indivisible. At the same time, the entire encoding and decoding process of the PPSRC code has high computational complexity, and although the redundancy is controllable, it is still quite large. Usually, the number of PPSRC code storage nodes is very large, which is completely unnecessary for relatively small files. These all increase the difficulty of implementing PPSRC codes in actual distributed storage systems, and the projective self-repairing codes are not universal.

发明内容Contents of the invention

本发明要解决的技术问题在于,针对现有技术的上述运算复杂、修复花销较大的缺陷,提供一种运算简单、修复数据花销较小的通用射影自修复码的编码、数据重构和修复方法。The technical problem to be solved by the present invention is to provide a universal projective self-healing code encoding and data reconstruction with simple operation and low repair data cost in view of the above-mentioned defects of the prior art that are complex in operation and expensive in repairing and repair methods.

本发明解决其技术问题所采用的技术方案是:构造一种通用射影自修复码的编码方法,其特征在于,包括如下步骤:The technical solution adopted by the present invention to solve its technical problems is: construct a kind of coding method of general projective self-repairing code, it is characterized in that, comprises the steps:

A)取得需要存储的、数据量为B的文件,将其等分为k个数据块,每个数据块包括m个数据;A) Obtain the file that needs to be stored and the amount of data is B, and divide it into k data blocks, and each data block includes m data;

B)设置大小为q的基本有限域GF(q),所述每个数据块在所述基本有限域上用长度为m的向量表示;所述基本有限域的m-维向量空间为W,所述W的所有子空间组成射影几何PG(m-1,q);所述W的(t+1)-维子空间为t-空间,所述t-空间的集合S为t-扩展;得到第一有限域GF(qt+1)和表示所述向量空间W的第二有限域GF(qm),其中,B、k、q、t和m均为正整数,t+1整除m;B) setting the size as the basic finite field GF(q) of q, each data block is represented by a vector of length m on the basic finite field; the m-dimensional vector space of the basic finite field is W, All subspaces of the W form a projective geometry PG(m-1,q); the (t+1)-dimensional subspace of the W is a t-space, and the set S of the t-space is a t-expansion; Obtain a first finite field GF(q t+1 ) and a second finite field GF(q m ) representing said vector space W, Among them, B, k, q, t and m are all positive integers, and t+1 divides m;

C)取得表示所述第二有限域GF(qm)非零元素的循环乘法群GF(qm)*,w为其本原元;取得表示所述第一有限域GF(qt+1)非零元素的循环乘法群GF(qt+1)*,v为其本原元;构建存储节点i的编码向量Vi={wi-1,wi-1v,wi-1v2,...,wi-1vt},存储节点i的编码向量分别为所述t-扩展的一组基;其中,i为表示存储节点数的正整数,i=1,2,...,t;C) Obtain the cyclic multiplicative group GF(q m ) * representing the non-zero elements of the second finite field GF(q m ), w is its primitive element; obtain representing the first finite field GF(q t+1 ) cyclic multiplicative group GF(q t+1 ) * of non-zero elements, v is its primitive element; construct the encoding vector V i ={w i-1 ,w i-1 v,w i-1 for storing node i v 2 ,...,w i-1 v t }, the encoding vectors of the storage node i are respectively a set of bases of the t-expansion; wherein, i is a positive integer representing the number of storage nodes, i=1,2 ,...,t;

D)将对应于各存储节点i的编码向量分别与一个数据块相乘,得到该数据块存储在该存储节点的编码数据。D) Multiply the encoding vector corresponding to each storage node i by a data block to obtain the encoded data of the data block stored in the storage node.

更进一步地,还包括如下步骤:将多个数据块分别与各存储节点的编码数据相乘后得到的编码数据分别依次存储在各存储节点。Furthermore, the method further includes the following step: the coded data obtained by multiplying the multiple data blocks by the coded data of each storage node are respectively stored in each storage node sequentially.

更进一步地,所述步骤D)中编码向量与数据块相乘为其对应的二进制数进行异或运算。Furthermore, in the step D), the encoding vector is multiplied by the data block to perform an XOR operation on its corresponding binary number.

本发明还涉及一种在上述的通用射影自修复码编码方法的存储系统中进行的数据重构的方法,包括如下步骤:The present invention also relates to a data reconstruction method carried out in the storage system of the above-mentioned universal projective self-repair code encoding method, comprising the following steps:

I)选择t-1个存储节点中的连续的、等于存储文件数据量或存储文件等分后得到的数据块数据量个存储节点;1) select t-1 consecutive storage nodes equal to the data block data volume obtained after storing the file data volume or storing the file in equal parts;

J)下载所述选择的存储节点中的第l列的编码数据,l为正整数,1≤l≤(t+1);J) Download the encoded data of the lth column in the selected storage node, where l is a positive integer, 1≤l≤(t+1);

K)分别取得所述选择的存储节点的解码向量,与其下载的编码数据运算,得到解码后的数据块;K) Obtaining the decoding vectors of the selected storage nodes respectively, and computing with the encoded data downloaded, to obtain decoded data blocks;

L)处理分别得到的所述解码后的数据块,得到存储文件。L) Processing the respectively obtained decoded data blocks to obtain a storage file.

更进一步地,步骤K)所述的解码向量为各存储节点的编码向量的逆矩阵,其通过取得各存储节点的编码向量后求其逆而得。Furthermore, the decoding vector described in step K) is an inverse matrix of the encoding vectors of each storage node, which is obtained by obtaining the encoding vectors of each storage node and calculating its inverse.

更进一步地,步骤K)中所述编码数据与解码矩阵的运算为其对应的二进制数进行异或运算。Furthermore, the operation of the encoded data and the decoding matrix in step K) is to perform an XOR operation on the corresponding binary numbers.

更进一步地,在所述步骤L)中组合所述步骤K)中得到的数据块,得到存储文件;所述组合包括按照设定顺序排列所述数据块。Furthermore, in the step L), the data blocks obtained in the step K) are combined to obtain a storage file; the combination includes arranging the data blocks in a set order.

本发明还涉及一种在上述的通用射影自修复码编码方法的存储系统中进行的数据修复的方法,包括如下步骤:The present invention also relates to a method for data repair performed in the storage system of the above-mentioned universal projective self-repair code encoding method, comprising the following steps:

M)确认一存储节点已经失效并得到该存储节点的编码向量,设该失效的存储节点的编码向量为v1,v2,...,vαM) Confirm that a storage node has failed and obtain the code vector of the storage node, set the code vector of the failed storage node as v 1 , v 2 ,..., v α ;

N)依次由未失效的至少两个存储节点分别下载至少一个编码向量,并运算得到所述失效存储节点的编码向量;N) sequentially downloading at least one encoding vector from at least two unfailed storage nodes respectively, and calculating and obtaining the encoding vector of the failed storage node;

O)将得到的多个表示失效节点编码数据的编码向量存储在新的存储节点。O) Store the obtained coded vectors representing the coded data of the failed node in the new storage node.

更进一步地,所述步骤N)进一步包括:Further, said step N) further comprises:

N1)由一未失效节点下载其编码向量u1,由另一未失效节点下载其编码向量u2,其中,v1=u1+u2;对所述下载的编码向量进行运算,得到失效存储节点的向量v1N1) A non-failure node downloads its coding vector u 1 , and another non-failure node downloads its coding vector u 2 , where v 1 =u 1 +u 2 ; the downloaded coding vector is calculated to obtain the invalidation store the vector v1 of the nodes;

N2)由再一未失效节点下载其编码向量u3,其中,v2=u2+u3;对所述下载的编码向量进行运算,得到失效存储节点的编码向量v2N2) downloading its coded vector u 3 from yet another unfailed node, where v 2 =u 2 +u 3 ; performing operations on the downloaded coded vector to obtain the coded vector v 2 of the failed storage node;

N3)选择新的未失效存储节点重复步骤N2),直到得到失效存储节点的编码向量vαN3) Select a new unfailed storage node and repeat step N2) until the code vector v α of the failed storage node is obtained.

更进一步地,所述步骤N)中的运算为其对应的二进制数进行异或运算;所述步骤N)中下载进行运算的编码向量的存储节点相同或不相同。Furthermore, the operation in the step N) is an XOR operation for the corresponding binary number; the storage nodes of the encoded vectors downloaded for operation in the step N) are the same or different.

实施本发明的通用射影自修复码的编码、数据重构和修复方法,具有以下有益效果:由于将存储文件分为数据块,且分别对数据块编码并将得到的相互独立的编码数据存储在多个存储节点,所以,在修复数据时可以单独下载各存储节点存储的数据块子集对失效的存储节点进行修复,其修复数据较为简单、下载的数据量较小。Implementing the encoding, data reconstruction and repairing method of the general projective self-repairing code of the present invention has the following beneficial effects: since the storage file is divided into data blocks, and the data blocks are encoded separately and the obtained mutually independent encoded data is stored in Multiple storage nodes, therefore, when repairing data, the subset of data blocks stored in each storage node can be downloaded separately to repair the failed storage node, the repair data is relatively simple, and the amount of downloaded data is small.

附图说明Description of drawings

图1是现有技术中EC码的数据重构示意图;FIG. 1 is a schematic diagram of data reconstruction of an EC code in the prior art;

图2是现有技术中EC码的失效存储节点修复示意图;Fig. 2 is a schematic diagram of repairing a failed storage node of an EC code in the prior art;

图3是现有技术中RGC码的数据重构示意图;FIG. 3 is a schematic diagram of data reconstruction of an RGC code in the prior art;

图4是本发明通用射影自修复码的编码、数据重构和修复方法实施例中编码流程图;Fig. 4 is an encoding flowchart in an embodiment of the encoding, data reconstruction and repairing method of the general projective self-repairing code of the present invention;

图5是所述实施例中一种情况下编码数据的存储分布示意图;Fig. 5 is a schematic diagram of storage distribution of encoded data in a case in the embodiment;

图6是所述实施例中数据重构流程图;Fig. 6 is the flowchart of data reconstruction in the described embodiment;

图7是所述实施例中数据修复流程图;Fig. 7 is a flow chart of data restoration in the described embodiment;

图8是所述实施例中一种情况下编码数据的修复示意图;Fig. 8 is a schematic diagram of repairing encoded data in a situation in the embodiment;

图9是所述实施例中一种情况下GPRSC码和MSR码的修复节点和修复带宽的折中曲线比较示意图;Fig. 9 is a comparison schematic diagram of the compromise curve of the repair node and the repair bandwidth of the GPRSC code and the MSR code under a situation in the embodiment;

图10是所述实施例中另一种情况下GPRSC码和MSR码的修复节点和修复带宽的折中曲线比较示意图。Fig. 10 is a schematic diagram of comparison curves of repair nodes and repair bandwidths of GPRSC codes and MSR codes in another case in the embodiment.

具体实施方式detailed description

下面将结合附图对本发明实施例作进一步说明。Embodiments of the present invention will be further described below in conjunction with the accompanying drawings.

如图4所示,在本发明通用射影自修复码的编码、数据重构和修复方法实施例中,该编码方法包括如下步骤:As shown in Figure 4, in the embodiment of the encoding, data reconstruction and repairing method of the general projective self-repairing code of the present invention, the encoding method includes the following steps:

步骤S41取得数据块:在本步骤中,取得需要存储的数据块,该数据块可能是将需要存储的、数据量为B的文件等分为k份而得到的数据块中的一个,在这种情况下,每个数据块包括m个数据,B=mk;也可以是数据量为B的文件只有一个数据块,在这种情况下,数据块的数据量为B;在多个数据块的情况下,对于本实施例中的方法而言,也是逐个按照本实施例中所揭示的编码方法取得一个数据块存储在各存储节点的编码数据,并将这些数据存储在对应的存储节点中。因此,每个数据块存储在一个节点上的编码数据相互之间是独立的;同时,一个数据块存储在一个存储节点上的编码数据(该数据包括多个数据项)的数据项之间,也是独立的、不相关的。Step S41 obtains the data block: in this step, obtain the data block that needs to be stored, and this data block may be one of the data blocks obtained by dividing the file that needs to be stored and has a data volume of B into k parts. In this case, each data block includes m data, B=mk; it can also be that a file with a data volume of B has only one data block, in this case, the data volume of the data block is B; in multiple data blocks In this case, for the method in this embodiment, one by one according to the encoding method disclosed in this embodiment, one by one obtains a block of encoded data stored in each storage node, and stores the data in the corresponding storage node . Therefore, the encoded data stored on a node for each data block is independent of each other; at the same time, a data block is stored between the data items of the encoded data (the data includes multiple data items) stored on a storage node, It is also independent and unrelated.

步骤S42设置基本有限域,并将数据块在基本有限域上表示,进而得到第一有限域和第二有限域:在本步骤中,定义GF(q)表示大小为q的有限域,W为GF(q)的m-维向量空间。射影几何PG(m-1,q)是由W的所有子空间组成。其中,PG(m-1,q)的点为1-维子空间,线为2-维子空间。可以验证PG(m-1,q)中共有(qm-1)/(q-1)个点、有(qm-1)(qm-1-1)/(q2-1)(q-1)个线。任意的两个不同的点都包含在同一个线中,任意的两个不同的线都相交于一个点。Step S42 sets the basic finite field, and expresses the data block on the basic finite field, and then obtains the first finite field and the second finite field: in this step, define GF(q) to represent a finite field whose size is q, and W is The m-dimensional vector space of GF(q). Projective geometry PG(m-1,q) consists of all subspaces of W. Among them, the points of PG(m-1,q) are 1-dimensional subspaces, and the lines are 2-dimensional subspaces. It can be verified that there are (q m -1)/(q-1) points in PG(m-1, q), and there are (q m -1)(q m-1 -1)/(q 2 -1)( q-1) lines. Any two different points are included in the same line, and any two different lines intersect at a point.

通常称W的(t+1)-维子空间为t-空间。PG(m-1,q)的t-扩展为t-空间的集合S,其划分了PG(m-1,q)的点。存在PG(m-1,q)的t-扩展的充要条件是t+1整除m。扩展有限域可以构造t-扩展,我们用m-维有限域GF(qm)表示向量空间W。在扩展有限域中,用GF(qm)*表示GF(qm)的非零元素。显然GF(qm)*是循环乘法群。其中,B、k、q、t和m均为正整数,t+1可以整除m。The (t+1)-dimensional subspace of W is usually called t-space. The t-expansion of PG(m-1,q) is the set S of t-spaces partitioning the points of PG(m-1,q). A necessary and sufficient condition for the existence of a t-extension of PG(m-1,q) is that t+1 divides m. Extended finite fields can construct t-extended, we use m-dimensional finite field GF(q m ) to represent the vector space W. In the extended finite field In , use GF(q m ) * to denote the non-zero elements of GF(q m ). Obviously GF(q m ) * is a cyclic multiplicative group. Wherein, B, k, q, t and m are all positive integers, and t+1 can divide m evenly.

步骤S43得到各存储节点的编码向量:在本步骤中,用w为GF(qm)*的一个固定生成元,而v为GF(qt+1)*的一个生成元,w和v分别称为GF(qm)*和GF(qt+1)*的本原元。对于GF(qm)*的任意元素z,我们用zGF(qt+1)*={z x:x∈GF(qt+1)*}表示GF(qm)*的陪集。当i=0,1,2,…,(qm–1)/(qt+1–1)–1时,陪集wiGF(qt+1)形成了PG(m,q)的一个t-扩展。考虑到实际应用,码字的运算域为GF(2)。大小为B的文件被分割为大小相等的若干数据块,每个数据块的编解码方法都是一样的。因此,我们只给出一个数据块的编解码方法,不失一般性,考虑一个数据文件只含有一个数据块,大小为B,可以用长度为B的GF(2)上的元素表示。令t为满足(t+1)整除B的正整数,N为正整数(2B–1)/(2t+1–1),也就是GF(qB)*在GF(qt+1)*中陪集的个数。令V1={1,v,v2,…,vt}为向量空间GF(2t+1)的一组基。对于i=1,2,…,n,节点i的编码向量分别为t-扩展的一组基,即Vi={wi–1,wi–1v,wi–1v2,…,wi–1vt}是对应于节点i,i=1,2,…,n的编码向量。本实施例中,在一些情况下,也可以先设置上述步骤S42、S43,在按照步骤S42、S43的限制,去划分数据块。也就是说,在一些情况下,可以先执行上述步骤S42、43,再执行步骤S41。这些步骤之间可以视具体情况加以调节。Step S43 obtains the encoding vector of each storage node: in this step, w is a fixed generator of GF(q m ) * , and v is a generator of GF(q t+1 ) * , w and v are respectively Called primitive elements of GF(q m ) * and GF(q t+1 ) * . For any element z of GF(q m ) * , we use zGF(q t+1 ) * ={zx:x∈GF(q t+1 ) * } to represent the coset of GF(q m ) * . When i=0, 1, 2, ..., (q m –1)/(q t+1 –1) –1, the coset w i GF(q t+1 ) forms the PG(m, q) A t-expansion. Considering the practical application, the operation field of the code word is GF(2). A file of size B is divided into several data blocks of equal size, and the codec method of each data block is the same. Therefore, we only give the encoding and decoding method of one data block. Without loss of generality, consider that a data file contains only one data block with a size of B, which can be represented by elements on GF(2) with a length of B. Let t be a positive integer that satisfies (t+1) divisibility of B, N is a positive integer (2 B –1)/(2 t+1 –1), that is, GF(q B ) * in GF(q t+1 ) * the number of cosets. Let V 1 ={1,v,v 2 ,...,v t } be a set of basis of the vector space GF(2 t+1 ). For i=1,2,...,n, the coding vectors of node i are a set of t-expanded basis respectively, that is, V i ={w i–1 ,w i–1 v,w i–1 v 2 ,… ,w i–1 v t } is the encoding vector corresponding to node i, i=1,2,...,n. In this embodiment, in some cases, the above steps S42 and S43 may also be set first, and then the data blocks are divided according to the restrictions of steps S42 and S43. That is to say, in some cases, the above steps S42 and 43 may be performed first, and then step S41 is performed. These steps can be adjusted according to specific conditions.

步骤S44依据得到的编码向量,得到存储在各存储节点的编码数据:在本步骤中,节点i存储的编码数据为数据文件与编码向量wi–1vj的乘积,j=0,1,2,…,t。对于所有存储节点而言,分别使用对应的上述编码向量与数据块运算得到存储在该存储节点的、对应于该数据块的编码数据(在存储文件只有一个数据块时对应该存储文件)。此时,乘积是指数据文件与编码向量对应的二进制数的异或运算。Step S44 obtains the coded data stored in each storage node according to the coded vector obtained: in this step, the coded data stored by node i is the product of the data file and the coded vector w i–1 v j , j=0,1, 2,...,t. For all storage nodes, use the corresponding encoding vectors and data block operations to obtain the encoded data corresponding to the data block stored in the storage node (corresponding to the storage file when there is only one data block in the storage file). At this time, the product refers to the XOR operation of the binary numbers corresponding to the data file and the encoding vector.

总之,取数据量大小为B的文件(为简单起见这里不进行文件分块,各文件快的编解码是一样的),将该文件用GF(2)(为不失一般性,此处q=2)上长度为B的向量表示;取正整数t,满足(t+1)整除B。v是GF(2t+1)的本原元,构造编码向量Vi={wi–1,wi–1v,wi–1v2,…,wi– 1vt};节点i存储的编码数据为数据文件与编码向量wi–1vj的乘积,j=0,1,2,…,t。乘积是指数据文件与编码向量对应的二进制数的异或运算。In short, take a file with a data size of B (for simplicity, the file is not divided into blocks, and the fast codec of each file is the same), and use GF(2) for this file (without loss of generality, here q =2) A vector representation whose length is B; take a positive integer t to satisfy (t+1) divisibility of B. v is the primitive element of GF(2 t+1 ), construct the encoding vector V i ={wi –1 ,wi –1 v,wi –1 v 2 ,…, wi– 1 v t }; node The coded data stored in i is the product of the data file and the coded vector w i–1 v j , j=0,1,2,...,t. The product refers to the XOR operation of the binary numbers corresponding to the data file and the encoding vector.

为更加具体起见,给出一个B=8,n=10以及t=3的例子。8位的数据bits分别用o1,o2,o3,o4,o5,o6,o7,o8表示。对这8bits的数据进行编码并分别存储在10个存储节点中,每个存储节点存储t+1=4bits。具体说明如下:To be more specific, an example of B=8, n=10 and t=3 is given. The 8-bit data bits are represented by o 1 , o 2 , o 3 , o 4 , o 5 , o 6 , o 7 , and o 8 respectively. The 8bits of data are encoded and stored in 10 storage nodes, and each storage node stores t+1=4bits. The specific instructions are as follows:

设有限域的生成多项式为f(x)=x8+x4+x3+x2+1,其乘法群的生成元为w,则令v=w17,则v的指数和0形成了子域GF(24)。存储节点1的编码向量为1,v,v2,v3,即为N1={1,w17,w34,w51}。而另外7个存储节点存储的向量空间分别为N2={w,w18,w35,w52},N3={w2,w19,w36,w53},N4={w3,w20,w37,w54},N5={w4,w21,w38,w55},N6={w5,w22,w39,w56},N7={w6,w23,w40,w57},N8={w7,w24,w41,w58},N9={w8,w25,w42,w59},N10={w9,w26,w43,w60}。指定前8个元素分别表示为1=00000001,w=00000010,w2=00000100,w3=00001000,w4=00010000,w5=00100000,w6=01000000,w7=10000000。那么对于存储节点1,其编码向量可以计算出,v=w17=w7+w4+w3,v2=w34=w6+w3+w2+w,v3=w51=w3+w所以节点存储的编码数据分别为o1,o4+o5+o8,o2+o3+o4+o7和o2+o4。同理,可以依次计算出其它节点的数据块存储情况,图5给出了本实施例中GPSRC(10,2)存储的编码数据分布图。bounded The generator polynomial of f(x)=x 8 +x 4 +x 3 +x 2 +1, its multiplicative group The generator of is w, then Let v=w 17 , then the exponent of v and 0 form the subfield GF(2 4 ). The encoding vector of storage node 1 is 1, v, v 2 , v 3 , that is, N 1 ={1, w 17 , w 34 , w 51 }. The vector spaces stored by the other seven storage nodes are respectively N 2 ={w,w 18 ,w 35 ,w 52 }, N 3 ={w 2 ,w 19 ,w 36 ,w 53 }, N 4 ={w 3 , w 20 , w 37 , w 54 }, N 5 ={w 4 , w 21 , w 38 , w 55 }, N 6 ={w 5 , w 22 , w 39 , w 56 }, N 7 ={ w 6 , w 23 , w 40 , w 57 }, N 8 ={w 7 , w 24 , w 41 , w 58 }, N 9 ={w 8 , w 25 , w 42 , w 59 }, N 10 = {w 9 , w 26 , w 43 , w 60 }. The first eight elements are specified as 1=00000001, w=00000010, w 2 =00000100, w 3 =00001000, w 4 =00010000, w 5 =00100000, w 6 =01000000, w 7 =10000000. Then for storage node 1, its encoding vector can be calculated, v=w 17 =w 7 +w 4 +w 3 , v 2 =w 34 =w 6 +w 3 +w 2 +w, v 3 =w 51 = w 3 +w So the encoded data stored by the nodes are o 1 , o 4 +o 5 +o 8 , o 2 +o 3 +o 4 +o 7 and o 2 +o 4 respectively. Similarly, the data block storage conditions of other nodes can be calculated sequentially. FIG. 5 shows the distribution diagram of encoded data stored by GPSRC (10, 2) in this embodiment.

通过本实施例中GPSRC码(General Projective Self-Repairing Codes,通用射影自修复码)的构造过程可知,文件B被存储在n个节点中,每个节点存储的数据量为(t+1)并且每个节点存储数据的编码向量是相互独立。当k>2时,PSRC码和GPSRC码均不满足MDS特性。可见GPSRC码的重建过程不同于之前的RS码、EC码以及RGC码等。Through the construction process of the GPSRC code (General Projective Self-Repairing Codes, general projective self-repairing code) in this embodiment, it can be seen that the file B is stored in n nodes, and the amount of data stored in each node is (t+1) and The encoded vectors of data stored by each node are independent of each other. When k>2, neither the PSRC code nor the GPSRC code satisfies the MDS characteristic. It can be seen that the reconstruction process of the GPSRC code is different from the previous RS code, EC code and RGC code.

GPSRC的编码矩阵的任意一列的连续B个元素相互独立。不妨假设数据收集者分别下载了节点i,i+1,…,i+B的第一个编码数据,编码向量分别为wi,wi+1,…,wi+B–1。如果存在B个不全为0的系数c1,c2,…,cB,使得c1wi+c2wi+1+…+cB wi+B–1=0。那么对上式两端同时除以wi,则得到c1+c2w1+…+cBwB–1等于0,这与1,w1,…,wB–1是GF(2B)的一组基是相互矛盾的。The consecutive B elements in any column of the coding matrix of GPSRC are independent of each other. It may be assumed that the data collectors downloaded the first coded data of nodes i, i+1,...,i+B respectively, and the coded vectors are respectively w i , w i+1 ,...,w i+B–1 . If there are B coefficients c 1 , c 2 , . . . , c B that are not all zero, such that c 1 w i + c 2 w i+1 + . Then divide both sides of the above formula by w i , then get c 1 +c 2 w 1 + …+c B w B 1 is equal to 0, which is GF(2 The set of bases of B ) are contradictory.

因此,GPSRC码的重建数据的方法为:下载连续的B个存储节点的第l列编码数据,1≤l≤(t+1)。我们知道,编码矩阵的任意一列的连续的B个元素均相互独立,所以可以解码出B个原始数据,即可以恢复出原始数据B。Therefore, the method for reconstructing the data of the GPSRC code is: downloading the encoded data of column l of consecutive B storage nodes, 1≤l≤(t+1). We know that the consecutive B elements in any column of the encoding matrix are independent of each other, so B original data can be decoded, that is, the original data B can be recovered.

请参见图6,在图6中示出了本实施例中GPSRC码的数据重建过程,包括如下步骤:Referring to Fig. 6, the data reconstruction process of GPSRC code in the present embodiment is shown in Fig. 6, comprises the following steps:

步骤S61选择等于存储文件数据量或数据块数据量的存储节点:在本步骤中,由t-1个存储节点中,选择等于存储文件数据量或存储文件等分后得到的数据块数据量个存储节点,例如,如果文件或数据块中数据为8bits,则选择8个存储节点。值得一提的是,如果存储文件只有一个数据块,且为B个,则上述选择的存储节点的数量为B;如果该存储文件被等分,则上述存储节点的数量是该数据块中数据的数量。不管何种情况出现,在本实施例中,这些被选择的存储节点一定是连续的。在本实施例中,作为一个例子,在存储文件只有一个数据块且其中数据量为B的情况下,选择的存储节点数量为B,此处B的数值与存储文件包括的数据量B是相同的。Step S61 selects storage nodes equal to the data volume of the stored file or the data volume of the data block: in this step, among the t-1 storage nodes, select the data volume equal to the data volume of the stored file or the data volume of the data block obtained after the storage file is equally divided Storage nodes, for example, if the data in the file or data block is 8 bits, select 8 storage nodes. It is worth mentioning that if the storage file has only one data block, and it is B, then the number of storage nodes selected above is B; if the storage file is divided equally, the number of storage nodes above is the data quantity. No matter what happens, in this embodiment, these selected storage nodes must be continuous. In this embodiment, as an example, in the case where the storage file has only one data block and the amount of data in it is B, the number of storage nodes selected is B, where the value of B is the same as the amount of data B included in the storage file of.

步骤S62分别下载所选存储节点中的第l列编码数据:在本步骤中,下载上述步骤中连续的B个存储节点的第l列编码数据,其中,1≤l≤(t+1)。Step S62 Download the lth column of encoded data in the selected storage nodes: in this step, download the lth column of encoded data of the B consecutive storage nodes in the above step, where 1≤l≤(t+1).

步骤S63将各存储节点下载的编码数据分别与其对应的解码向量运算,得到其数据块:由于从各存储节点下载的数据是编码数据,需要将其解码,并组合起来才能得到当初经过编码存储在存储节点的原始数据。而在本步骤中,就是将下载的编码数据分别按照取得该数据的存储节点的位置进行解码。通常来讲,各个存储节点的编码是不同,将各存储节点用于编码的编码向量按照其存储数据的位置对应起来时,就形成该存储节点的编码矩阵。解码也是一样,同样存在用于解码的向量或矩阵。由于编码矩阵的任意一列的连续的B个元素均相互独立,故通过下载的数据与解码矩阵,解码出原始数据。实际上,使用的是解码矩阵中与下载数据对应的解码向量。在本步骤中,解码矩阵是各存储节点编码矩阵的逆矩阵,按照编码数据所在位置,即可由解码矩阵中得到解码向量。所以,在本步骤中,解码向量通过取得各存储节点的编码向量后求其逆而得。编码数据与解码矩阵的运算为其对应的二进制数进行异或运算。Step S63 calculates the encoded data downloaded by each storage node and its corresponding decoding vector to obtain its data block: since the data downloaded from each storage node is encoded data, it needs to be decoded and combined to obtain the encoded data stored in the original Store raw data for nodes. In this step, the downloaded coded data is respectively decoded according to the location of the storage node from which the data is obtained. Generally speaking, the encoding of each storage node is different, and when the encoding vectors used for encoding of each storage node are matched according to the positions of the stored data, the encoding matrix of the storage node is formed. The same is true for decoding, and there are also vectors or matrices for decoding. Since the consecutive B elements in any column of the encoding matrix are independent of each other, the original data can be decoded through the downloaded data and the decoding matrix. In practice, the decoded vector corresponding to the downloaded data in the decoded matrix is used. In this step, the decoding matrix is the inverse matrix of the encoding matrix of each storage node, and the decoding vector can be 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 encoding vector of each storage node and calculating its inverse. The operation of the encoded data and the decoding matrix is an XOR operation for its corresponding binary number.

步骤S64组合得到的数据块,得到存储文件:将解码出的数据进行整合,恢复出原始数据B。Step S64 combines the obtained data blocks to obtain a storage file: integrate the decoded data to restore the original data B.

请参见图7,图7示出本实施例中数据修复的过程,包括如下步骤:Referring to Fig. 7, Fig. 7 shows the process of data restoration in this embodiment, including the following steps:

步骤S71确定失效存储节点,并设置其编码数据:在本步骤中,确定一个存储节点是否失效,如果一个存储节点失效,由其所在位置(或节点编号)可以得到该存储节点的编码矩阵或编码向量。在本步骤中,当确定一个存储节点失效后,可以先设置其编码数据为v1,v2,...,vα;在后面的步骤中,逐个得到上述编码数据中的每个数据块,将其组合后存储在新的节点,即可完成数据修复。Step S71 determines the failure storage node, and sets its coding data: in this step, it is determined whether a storage node fails, if a storage node fails, the coding matrix or coding matrix of the storage node can be obtained by its location (or node number). vector. In this step, when a storage node is determined to be invalid, its encoded data can be set to v 1 , v 2 , ..., v α ; in the following steps, each data block in the above encoded data can be obtained one by one , store them in a new node after being combined, and the data restoration can be completed.

步骤S72分别由至少两个存储节点下载至少一个编码数据修复失效存储节点的编码数据:在本步骤中,分别由至少两个未失效的存储节点中分别下载至少一个编码数据,分别得到上述步骤中设置的失效节点的编码数据或编码数据块。具体来讲,在本实施例中,由一未失效节点下载其编码数据块u1,由另一未失效节点下载其编码数据块u2,其中,这两个未失效存储节点下载的数据存在以下关系:v1=u1+u2;对所述下载的编码数据块进行运算,得到失效存储节点的编码向量v1。由再一未失效节点下载其编码向量u3,将其与上述步骤中已经下载的编码数据配合,其中,该再一存储节点和已经现在过编码数据的存储节点上下载的数据存在以下关系:v2=u2+u3;对这编码数据块进行运算,得到失效存储节点的编码向量v2。之后,选择新的未失效存储节点重复上述步骤,直到得到失效存储节点的编码向量vα。在本步骤中,上述编码数据之间的运算为其对应的二进制数进行异或运算;此外,在本步骤中,上述下载进行运算的编码数据块的存储节点相同或不相同,即在某些情况下,可以由一个存储节点下载两个编码数据并进行运算。当然,在一些情况下,一个存储节点也可以根据情况选择下载多个数据块并进行运算。Step S72 Download at least one coded data from at least two storage nodes to repair the coded data of the failed storage node: In this step, download at least one coded data from at least two non-failed storage nodes respectively, and obtain the above steps respectively The coded data or coded data block of the set failure node. Specifically, in this embodiment, a non-failure node downloads its encoded data block u 1 , and another non-failure node downloads its coded data block u 2 , wherein the data downloaded by these two non-failure storage nodes exists The following relationship: v 1 =u 1 +u 2 ; the downloaded encoded data block is operated to obtain the encoded vector v 1 of the failed storage node. Download its coded vector u 3 from yet another unfailed node, and match it with the coded data downloaded in the above steps, wherein, there is the following relationship between this yet another storage node and the data downloaded on the storage node that has already passed the coded data: v 2 =u 2 +u 3 ; operate on the encoded data block to obtain the encoded vector v 2 of the failed storage node. Afterwards, select a new unfailed storage node and repeat the above steps until the encoding vector v α of the failed storage node is obtained. In this step, the operation between the above-mentioned coded data is an XOR operation for the corresponding binary number; in addition, in this step, the storage nodes of the coded data blocks downloaded for operation are the same or different, that is, in some In this case, one storage node can download two coded data and perform calculations. Of course, in some cases, a storage node can also choose to download multiple data blocks and perform calculations according to the situation.

步骤S73得到失效存储节点的编码数据并存储在新节点:在本步骤中,将上述步骤中得到的多个编码数据块组合在一起,请将其存储在一个新的存储节点上,完成数据修复。Step S73 Get the encoded data of the failed storage node and store it in the new node: In this step, combine multiple encoded data blocks obtained in the above steps, and store them in a new storage node to complete data restoration .

在本实施例中,在PSRC(n,k)码中,共有n个存储节点,每个存储节点存储α的编码数据量。当一个存储节点Nl失效时,可以通过选择任意1个存储及其相应的另一个存储节点并下载这2个存储节点来恢复出失效节点Nl存储的数据。GPSRC(n,k)码中,当一个存储节点失效时,那么最多从(α+1)=(t+2)个存储节点中各下载一个数据,修复带宽为(α+1)=(t+2)。In this embodiment, in the PSRC(n, k) code, there are n storage nodes in total, and each storage node stores a coded data amount of α. When a storage node N1 fails, the data stored in the failed node N1 can be recovered by selecting any one storage node and its corresponding another storage node and downloading the two storage nodes. In the GPSRC(n,k) code, when a storage node fails, then at most one data is downloaded from (α+1)=(t+2) storage nodes, and the repair bandwidth is (α+1)=(t +2).

一个失效的数据可以通过任意的选择1个节点的数据并对应的下载另一个节点的一个数据来恢复。假设一个节点丢失数据的编码向量为v1,v2,…,vα,那么可以任意的选择一个节点的编码向量u1以及相对应的另一个节点的编码向量u2,使得v1=u1+u2。之后,选择修复v2的一个编码向量为u2以及其相对应的编码向量u3使得v2=u2+u3。同样的道理,可以得到v3=u3+u4,…,vα=uα+uα+1。所以修复编码向量v1,v2,…,vα共下载了最多(α+1)个存储节点的编码向量(u1,u2,…,uα+1),修复带宽为(α+1)。同时,我们称该修复过程为最佳带宽修复过程。An invalid data can be recovered by arbitrarily selecting the data of one node and correspondingly downloading a data of another node. Assuming that the coding vectors of a node’s missing data are v 1 , v 2 ,…, v α , then the coding vector u 1 of a node and the corresponding coding vector u 2 of another node can be arbitrarily selected, so that v 1 =u 1 +u 2 . Afterwards, an encoding vector for repairing v 2 is selected as u 2 and its corresponding encoding vector u 3 such that v 2 =u 2 +u 3 . In the same way, it can be obtained that v 3 =u 3 +u 4 , ..., v α =u α +u α+1 . Therefore, to repair the encoded vectors v 1 , v 2 , ..., v α downloads the encoded vectors (u 1 , u 2 , ..., u α+1 ) of at most (α+1) storage nodes, and the repair bandwidth is (α+ 1). At the same time, we call this restoration process the optimal bandwidth restoration procedure.

在图5给出的GPSRC(10,2)码中,当节点1失效时,首先下载节点2的{u1=00010100}和节点6的编码向量{u2=00100000+00110101=00010101}可以修复向量{v1=u1+u2=00000001}。根据最佳带宽修复过程,下载节点3的{u3=01011010}节点4的{u4=01010000}和节点7的{u5=11001001}即可恢复出节点1的所有失效数据。修复过程为{v1=u1+u2,v3=u1+u3,v4=u4+u3,v2=u5+u4+v1}。修复带宽为5,修复节点为5。其他节点的修复带宽也均是5。In the GPSRC(10, 2) code given in Figure 5, when node 1 fails, first download {u 1 =00010100} of node 2 and the coded vector {u 2 =00100000+00110101=00010101} of node 6, which can be repaired Vector {v 1 =u 1 +u 2 =00000001}. According to the optimal bandwidth recovery process, downloading {u 3 =01011010} of node 3, {u 4 =01010000} of node 4 and {u 5 =11001001} of node 7 can recover all the invalid data of node 1. The restoration process is {v 1 =u 1 +u 2 , v 3 =u 1 +u 3 , v 4 =u 4 +u 3 , v 2 =u 5 +u 4 +v 1 }. The repair bandwidth is 5, and the repair node is 5. The repair bandwidth of other nodes is also 5.

如图8所示,节点1存储数据量可以由其它节点的数据块相异或而得出,具体地说,N1=N2(o3+o5)+N3(o2+o4+o5+o7)+N4(o5+o7)+N6(o1+o3+o5)+N7(o1+o4+o7+o8)。那么若节点1失效,在修复过程中需要下载节点2的数据块(o3+o5)、节点3的数据块(o2+o4+o5+o7)、节点4的数据块(o5+o7)、节点6的数据块(o1+o3+o5)和节点7的数据块(o1+o4+o7+o8)即可修复节点1存储的数据。其它节点存储的数据的修复过程与第一个节点的表示方法类似地得出。As shown in Figure 8, the amount of data stored in node 1 can be obtained by XORing the data blocks of other nodes, specifically, N 1 =N 2 (o 3 +o 5 )+N 3 (o 2 +o 4 +o 5 +o 7 )+N 4 (o 5 +o 7 )+N 6 (o 1 +o 3 +o 5 )+N 7 (o 1 +o 4 +o 7 +o 8 ). Then if node 1 fails, it is necessary to download the data block of node 2 (o 3 +o 5 ), the data block of node 3 (o 2 +o 4 +o 5 +o 7 ), and the data block of node 4 ( o 5 +o 7 ), the data block of node 6 (o 1 +o 3 +o 5 ) and the data block of node 7 (o 1 +o 4 +o 7 +o 8 ) can repair the data stored in node 1. The recovery process of the data stored by other nodes is derived similarly to the representation of the first node.

这里补充说明的一点是,每个节点存储的原始数据块之间是可以相异或的。具体地说,为了修复节点9存储的数据块,需要从前8个节点存储的数据块中选择一些数据块进行异或运算。然而,这些节点存储的原始数据是并不能直接修复出节点9丢失的数据块。这时我们需要将前面节点存储数据块进行简单异或来进行修复。比如,为了修复出节点9的数据块(o1+o2),可以选择节点8的数据块(o1+o2+o3+o4+o8)、(o3+o5+o7+o8)简单异或,得到数据块(o1+o2+o4+o5+o7)。同时选择节点4的数据块(o4)、(o5+o7)简单异或得到(o4+o5+o7)。所以有,(o1+o2)=(o1+o2+o4+o5+o7)+(o4+o5+o7)。同理可以修复出节点9的其它数据块,节点10的修复方式亦然。An additional point here is that the original data blocks stored by each node can be different or different. Specifically, in order to repair the data blocks stored in 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 original data stored by these nodes cannot directly repair the lost data blocks of node 9. At this time, we need to simply XOR the data blocks stored in the previous nodes to repair them. For example, in order to repair the data block (o 1 +o 2 ) of node 9, the data block (o 1 +o 2 +o 3 +o 4 +o 8 ), (o 3 +o 5 +o 7 +o 8 ) simple XOR to obtain the data block (o 1 +o 2 +o 4 +o 5 +o 7 ). Simultaneously select the data blocks (o 4 ) and (o 5 +o 7 ) of node 4 to obtain (o 4 +o 5 +o 7 ) through simple XOR. So, (o 1 +o 2 )=(o 1 +o 2 +o 4 +o 5 +o 7 )+(o 4 +o 5 +o 7 ). In the same way, other data blocks of node 9 can be repaired, and the repair method of node 10 is also the same.

根据以上分析,我们给出GPSRC的一般修复过程。首先,可以从两个节点分别下载t个编码数据,可以修复失效节点的t个编码数据;同时,我们下载一个编码数据和已经下载的2t个编码数据一起修复失效节点剩下的一个编码数据。以上修复过程的修复带宽为2t+1、修复节点为3。同理,可以从两个节点中分别下载(t-1)个编码数据块并从另外两个节点下载两个编码数据,这样,修复带宽为2t,修复节点为4。同理可以得出其它节点的修复过程,统称这些修复过程为一般修复过程。一般修复过程在修复带宽和修复节点性能中有一个折中,该折中函数可以表示为According to the above analysis, we give the general repair process of GPSRC. First, t coded data can be downloaded from two nodes separately, and t coded data of the failed node can be repaired; at the same time, we download one coded data and 2t coded data already downloaded to repair the remaining coded data of the failed node. The repair bandwidth of the above repair process is 2t+1, and the repair nodes are 3. Similarly, (t-1) coded data blocks can be downloaded from two nodes and two coded data blocks can be downloaded from the other two nodes. In this way, the repair bandwidth is 2t, and the number of repair nodes is 4. In the same way, the repair processes of other nodes can be derived, and these repair processes are collectively referred to as general repair processes. In the general repair process, there is a trade-off between repair bandwidth and repair node performance, and the trade-off function can be expressed as

γ+d=2t+4=2(1+B/k),for t+2≥d≥2γ+d=2t+4=2(1+B/k), for t+2≥d≥2

其中,γ为修复带宽,d为修复节点。所以修复带宽可以表示为Among them, γ is the repair bandwidth, and d is the repair node. So the repair bandwidth can be expressed as

图9和图10分别给出了参数B=16,k=4和B=32,k=4时GPSRC和MSR码的折中曲线。可以得到当给定修复节点数量时,GPSRC的修复带宽小于MSR码的修复带宽,而当给定修复带宽时,GPSRC的修复节点数量也小于MSR码的修复节点。因此,可以说,一般情况下GPSRC在修复带宽和修复节点性能中均优于MSR码,尽管其代价为失去MDS特性。 Figure 9 and Figure 10 show the compromise curves of GPSRC and MSR codes when parameters B=16, k=4 and B=32, k=4 respectively. It can be obtained that when the number of repair nodes is given, the repair bandwidth of GPSRC is smaller than that of MSR codes, and when the repair bandwidth is given, the number of repair nodes of GPSRC is also smaller than that of MSR codes. Therefore, it can be said that, in general, GPSRC is superior to MSR codes in repairing bandwidth and repairing node performance, although its cost is the loss of MDS characteristics.

在本实施例中的通用射影自修复码(GPSRC)与RGC码不同之处在于,RGC码主要思想还是利用MDS属性,当网络中一些存储节点失效,需要从现有有效节点中下载信息来使得丢失的数据修复丢失的数据模块,并将其存储在新的节点上。再生过程需要确保两点:1)失效的节点间是相互独立的,再生过程可以循环递推;2)任意k个节点就足够恢复原始文件。RGC码中要重构任意一个模块,至少需要和其他k个节点通信,当只有一个模块丢失,所需要的最小通信量是与所有活动的n-1个节点通信,而GPSRC码则比较灵活,修复节点和修复带宽可以折中考虑,最少只需要和2个节点进行通信。The general projective self-repair code (GPSRC) in this embodiment differs from the RGC code in that the main idea of the RGC code is to use the MDS attribute. When some storage nodes in the network fail, it is necessary to download information from existing valid nodes to make Lost data repairs lost data modules and stores them on new nodes. The regeneration process needs to ensure two points: 1) The failed nodes are independent of each other, and the regeneration process can be recursively recursive; 2) Any k nodes are enough to restore the original file. To reconstruct any module in the RGC code, it needs to communicate with at least k other nodes. When only one module is lost, the minimum amount of communication required is to communicate with all active n-1 nodes, while the GPSRC code is more flexible. The repair node and the repair bandwidth can be compromised, and only need to communicate with at least 2 nodes.

HSRC码的编码需要计算多项式相对较复杂,系统计算复杂度较高。同时为了修复一个特定的失效节点,一旦随机的选择了一个节点为辅助节点,就只剩下一个节点可供选。GPSRC码则不同,修复一个失效节点可以存在多种修复方案。具体来说,对于一个失效节点,至少存在一个节点对可以进行修复。The encoding of HSRC code needs to calculate the polynomial is relatively complex, and the system calculation complexity is relatively high. At the same time, in order to repair a specific failure node, once a node is randomly selected as a secondary node, there is only one node left to choose. The GPSRC code is different, and there are many repair schemes for repairing a failed node. Specifically, for a failed node, there is at least one node pair that can be repaired.

在本实施例中,GPSRC码在修复节点和修复带宽方面可以折中考虑,具体编码方案实施过程中可以达到修复节点少,修复带宽小的效益,特别适合应用于实际的分布式存储系统。同时,GPSRC码提供了有效的冗余修复方案,具体包括:1)丢失的编码块可以直接下载其他编码模块的若干子集进行修复,下载的数据量小于整个文件的数据量;2)丢失的编码块可以通过固定数目的编码模块进行修复,该固定数目只与系统丢失了多少模块数有关,而与具体哪些模块丢失无关。这些属性使得修复一个丢失模块的负载比较低,同时可以独立并发地修复不同丢失模块。In this embodiment, the GPSRC code can be compromised in terms of repair nodes and repair bandwidth. During the implementation of the specific coding scheme, the benefits of less repair nodes and smaller repair bandwidth can be achieved, which is especially suitable for practical distributed storage systems. At the same time, the GPSRC code provides an effective redundancy repair scheme, specifically including: 1) the lost coding block can be directly downloaded to several subsets of other coding modules for repairing, and the downloaded data volume is less than the data volume of the entire file; 2) the lost A coded block can be repaired by a fixed number of coded modules, and the fixed number is only related to how many modules are lost in the system, but has nothing to do with which modules are lost. These properties make the overhead of repairing a missing module relatively low, while simultaneously repairing different missing modules independently and concurrently.

GPSRC码不仅满足PSRC的基本特性,而且在选择存储节点的数量上更灵活,相比于之前的编码方案,GPSRC的编码效率更高。一个GPSRC(n,k)码可以通过远小于k个节点来修复一个失效模块,而且很多情况下一个节点的修复能力不止一个,那么修复一个丢失模块所需要的节点数大幅度减少,从而也减少了系统的通信开销;GPSRC码的构造过程、修复过程和重建过程均只涉及异或运算,所以计算复杂度很低、计算开销很小,适合实际的存储系统;GPSRC码可以并发修复不同的模块,很大程度上降低了系统修复时延,这使得GPSRC易于实施、修复代价低。The GPSRC code not only satisfies the basic characteristics of PSRC, but also is more flexible in selecting the number of storage nodes. Compared with the previous coding scheme, the coding efficiency of GPSRC is higher. A GPSRC(n,k) code can repair a failed module by far less than k nodes, and in many cases a node has more than one repair capability, so the number of nodes required to repair a lost module is greatly reduced, thereby reducing The communication overhead of the system is reduced; the construction process, repair process and reconstruction process of the GPSRC code only involve the XOR operation, so the calculation complexity is very low, the calculation cost is very small, and it is suitable for the actual storage system; the GPSRC code can repair different modules concurrently , which greatly reduces the system repair delay, which makes GPSRC easy to implement and low repair cost.

以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present invention, and the description thereof is relatively specific and detailed, but should not be construed as limiting the patent scope of the present invention. It should be pointed out that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be based on the appended claims.

Claims (10)

1. a kind of coding method of general projection selfreparing code, it is characterised in that comprise the following steps:
A) obtaining needs file store, that data volume is B, and be divided into k includes m number according to block, each data block According to;
B) the basic finite field gf (q) that size is q is set, each data block is m with length in the basic finite field Vector representation;The m- gts of the basic finite field are W, all subspaces composition projective geometry PG (m- of the W 1,q);(t+1)-n-dimensional subspace n of the W is t- spaces, and the set S in the t- spaces extends for t-;Obtain the first finite field gf (qt+1) and represent the second finite field gf (q of the vector space Wm),Wherein, B, k, Q, t and m is positive integer, t+1 aliquots m;
C) obtain and represent the second finite field gf (qm) nonzero element circulation multiplicative group GF (qm)*, w is its primitive element;Obtain Represent the first finite field gf (qt+1) nonzero element circulation multiplicative group GF (qt+1)*, v is its primitive element;Structure storage section Point i coding vector Vi={ wi-1,wi-1v,wi-1v2,...,wi-1vt, memory node i coding vector is respectively that the t- expands One group of base of exhibition;Wherein, i be represent memory node number positive integer, i=1,2 ..., t;
D it) will be multiplied respectively with a data block corresponding to each memory node i coding vector, obtain the data block and be stored in this The coded data of memory node.
2. the coding method of general projection selfreparing code according to claim 1, it is characterised in that also include following step Suddenly:The coded data obtained after multiple data blocks are multiplied with the coded data of each memory node respectively is sequentially stored in respectively respectively Memory node.
3. the coding method of general projection selfreparing code according to claim 2, it is characterised in that the step D) in compile Code vector is multiplied with data block carries out XOR for its corresponding binary number.
4. a kind of carried out in the storage system using the coding method of general projection selfreparing code as described in claim 1 Data reconstruction method, it is characterised in that comprise the following steps:
I) select t-1 memory node in it is continuous, equal to the number obtained after storage file data volume or storage file decile According to block data volume memory node;
J the coded data of the l row in the memory node of the selection) is downloaded, l is positive integer, 1≤l≤(t+1);
K the decoded vector of the memory node of the selection) is obtained respectively, the coded data computing downloaded with it, after obtaining decoding Data block;
L the decoded data block respectively obtained) is handled, obtains storage file.
5. data reconstruction method according to claim 4, it is characterised in that step K) described in decoded vector be each storage The inverse matrix of the coding vector of node, it asks its inverse to obtain after coding vector by obtaining each memory node.
6. data reconstruction method according to claim 5, it is characterised in that step K) described in coded data with decoding square The computing of battle array carries out XOR for its corresponding binary number.
7. data reconstruction method according to claim 6, it is characterised in that in the step L) in the combination step K) In obtained data block, obtain storage file;The combination includes arranging the data block according to setting order.
8. a kind of carried out in the storage system using the coding method of general projection selfreparing code as described in claim 1 Data reparation method, it is characterised in that comprise the following steps:
M) confirm that a memory node has failed and obtained the coding vector of the memory node, if the volume of the memory node of the failure Code vector is v1, v2..., vα
N at least one coding vector) is downloaded respectively by least two memory nodes not failed successively, and union obtains the mistake Imitate the coding vector of memory node;
O the coding vector of obtained multiple expression failure node coded datas) is stored in new memory node.
9. the method for data reparation according to claim 8, it is characterised in that the step N) further comprise:
N1 its coding vector u) is downloaded by a non-failure node1, its coding vector u is downloaded by another non-failure node2, wherein, v1 =u1+u2;Computing is carried out to the coding vector of the download, obtains the coding vector v of failure memory node1
N2 its coding vector u) is downloaded by further non-failure node3, wherein, v2=u2+u3;The coding vector of the download is carried out Computing, obtain the coding vector v of failure memory node2
N3) the new memory node repeat step N2 that do not fail of selection), until obtaining the coding vector v of failure memory nodeα
10. the method for data reparation according to claim 9, it is characterised in that the step N) in computing for its is right The binary number answered carries out XOR;The step N) in download the coding vector for carrying out computing memory node it is identical or not It is identical.
CN201380063753.0A 2013-01-04 2013-01-04 A kind of coding, data reconstruction and the restorative procedure of general projection selfreparing code Expired - Fee Related CN104838626B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/070001 WO2014106316A1 (en) 2013-01-04 2013-01-04 Coding method for general projective self-repairing codes, and data reconstruction and repair method

Publications (2)

Publication Number Publication Date
CN104838626A CN104838626A (en) 2015-08-12
CN104838626B true CN104838626B (en) 2017-12-01

Family

ID=51062122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201380063753.0A Expired - Fee Related CN104838626B (en) 2013-01-04 2013-01-04 A kind of coding, data reconstruction and the restorative procedure of general projection selfreparing code

Country Status (2)

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

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732203B (en) * 2021-03-31 2021-06-22 中南大学 Regeneration code construction method, file reconstruction method and node repair method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102222202A (en) * 2011-06-09 2011-10-19 重庆邮电大学 Method for detecting integration of high-efficiency finegrained data
CN102624866A (en) * 2012-01-13 2012-08-01 北京大学深圳研究生院 Method, device and distributed network storage system for storing data
CN102710757A (en) * 2012-05-21 2012-10-03 北京航空航天大学 Distributed cloud storage data integrity protection method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101316274B (en) * 2008-05-12 2010-12-01 华中科技大学 A Data Disaster Recovery System Suitable for Wide Area Network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102222202A (en) * 2011-06-09 2011-10-19 重庆邮电大学 Method for detecting integration of high-efficiency finegrained data
CN102624866A (en) * 2012-01-13 2012-08-01 北京大学深圳研究生院 Method, device and distributed network storage system for storing data
CN102710757A (en) * 2012-05-21 2012-10-03 北京航空航天大学 Distributed cloud storage data integrity protection method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于有限射影几何的细粒度数据完整性检验方法;陈龙 等;《电子学报》;20111231(第12期);第2850-2855页 *

Also Published As

Publication number Publication date
CN104838626A (en) 2015-08-12
WO2014106316A1 (en) 2014-07-10

Similar Documents

Publication Publication Date Title
CN103688514B (en) A kind of minimum memory regenerates the coding and memory node restorative procedure of code
CN103688515B (en) The coding of a kind of minimum bandwidth regeneration code and memory node restorative procedure
Oggier et al. Self-repairing homomorphic codes for distributed storage systems
CN102624866B (en) Data storage method, data storage device and distributed network storage system
US8928503B2 (en) Data encoding methods, data decoding methods, data reconstruction methods, data encoding devices, data decoding devices, and data reconstruction devices
WO2013191658A1 (en) System and methods for distributed data storage
Cadambe et al. Optimal repair of MDS codes in distributed storage via subspace interference alignment
US11500725B2 (en) Methods for data recovery of a distributed storage system and storage medium thereof
CN113505019A (en) Erasure code data and check recovery method, device, equipment and readable medium
CN102843212B (en) Coding and decoding processing method and device
CN107003933A (en) The method that construction method, device and its data of part replica code are repaired
CN103650462B (en) Coding, decoding and the data recovery method of selfreparing code based on homomorphism and storage system thereof
CN104782101B (en) Encoding, reconstruction and recovery methods for self-healing codes for distributed network storage
Mahdaviani et al. Bandwidth adaptive & error resilient MBR exact repair regenerating codes
WO2014059651A1 (en) Method for encoding, data-restructuring and repairing projective self-repairing codes
WO2017041233A1 (en) Encoding and storage node repairing method for functional-repair regenerating code
CN105245314B (en) The fault-tolerant decoding method of hybrid redundancy and system in distributed memory system
CN104838626B (en) A kind of coding, data reconstruction and the restorative procedure of general projection selfreparing code
WO2018029212A1 (en) Regenerating locally repairable codes for distributed storage systems
Chen et al. A new Zigzag MDS code with optimal encoding and efficient decoding
Mahdaviani et al. Bandwidth adaptive & error resilient regenerating codes with minimum repair bandwidth
Wei et al. expanCodes: Tailored LDPC codes for big data storage
Oggier et al. Homomorphic self-repairing codes for agile maintenance of distributed storage systems
Calis et al. Repairable block failure resilient codes
Li Flexible Coding for Distributed Systems

Legal Events

Date Code Title Description
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171201