Multi-fault data recovery method based on erasure codes and related equipment
By defaulting the reliance order and data sending rules of the erasure code type, the multi-failure data recovery method is optimized, and the problems of low recovery efficiency of multi-node fault data and network blockage are solved, and efficient data recovery and rapid response are achieved.
Patent Information
- Application Number
- CN202411030520.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-07-30
AI Technical Summary
The existing multi-failure data recovery method based on erasure coding is inefficient in multi-node failure situations and ignores the dependence between groups, resulting in increased complexity and increased possibility of network blockage.
Using preset dependency recovery sequence and data transmission limit/priority rules of preset erasure coding type, determine the time slot data transmission path of each multi-node failure situation, form a time slot recovery plan, considering the dependence between groups and quickly adapt to different fault scenarios through a set of preset time slot recovery schemes.
It improves the efficiency of multi-failure data recovery, reduces network blockage, enhances the stability and flexibility of the system, and can quickly respond to different failure scenarios without real-time calculation of recovery strategies.
Smart Images

Figure CN119052060A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of multi-fault data recovery based on erasure codes, and more specifically, to a multi-fault data recovery method based on erasure codes, a multi-fault data recovery apparatus based on erasure codes, a multi-fault data recovery device based on erasure codes, and a computer-readable storage medium. Background Art
[0002] With the increase in data size and users' demand for low latency, developing large-scale clusters has become a trend.
[0003] The existing multi-fault data recovery method based on erasure code is simply a repeated application of the single node fault recovery method. Specifically, the working principle of the single node fault recovery method (such as the single node fault recovery method based on RS coding) is that, assuming that the cluster has 5 nodes, assuming that 5 data blocks are a group, and the data blocks in a group are placed on 5 nodes respectively, there will be a data block of many groups on one node. If only node 1 fails, there is no dependency between groups during repair, and recovery through the single node fault recovery method will have a good effect. However, when performing multi-fault data recovery based on a single node fault recovery method, when multiple node failures occur, such as when nodes 1 and 2 fail, it is necessary to repair data blocks of multiple groups on nodes 1 and 2. When repairing data blocks, there are dependencies between groups, and the repair becomes more complicated due to the complexity of concurrent failures. For example, if nodes 1 and 2 are involved, it is necessary to first identify which data groups share the same parts in order to repair these groups synchronously, because they may rely on the same undamaged part for recovery. Existing methods ignore the relationship between groups when simply repeatedly applied. Therefore, the efficiency of multi-fault data recovery based on a single node fault recovery method is low.
[0004] Therefore, there is an urgent need for a multi-fault data recovery method based on erasure codes that can improve the efficiency of multi-fault data recovery. Summary of the invention
[0005] The embodiments of the present application provide a method for recovering multiple fault data based on erasure codes, a device for recovering multiple fault data based on erasure codes, a device for recovering multiple fault data based on erasure codes, and a computer-readable storage medium, which can perform multiple fault data recovery based on erasure codes while improving the efficiency of multi-fault data recovery and reducing network congestion.
[0006] In a first aspect, an embodiment of the present application provides a multi-fault data recovery method based on erasure codes, comprising:
[0007] Based on the preset dependency recovery order of the preset erasure code type, as well as the preset data sending restriction rules and / or the preset data sending priority rules, at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node failure condition is determined to obtain the time slot recovery scheme corresponding to each preset multi-node failure condition; wherein the preset multi-node failure condition is used to characterize the failure conditions of various data blocks to be recovered of multiple nodes appearing in the cluster; the preset dependency recovery order is the recovery order of the dependency on the recovery of at least one data block to be recovered; the time slot data transmission path is used to characterize the path by which the time slot sending node corresponding to the time slot sends the corresponding time slot sending data block to the corresponding time slot receiving node;
[0008] Obtaining a preset time slot recovery solution set based on the time slot recovery solution corresponding to each preset node failure condition;
[0009] Determining a target time slot recovery scheme corresponding to the current multi-node failure situation in the preset time slot recovery scheme set;
[0010] Execute the target time slot recovery scheme, wherein the target time slot recovery scheme is used to: in each target time slot, according to at least one time slot data transmission path corresponding to the target time slot, at least one target time slot sending node sends the corresponding at least one target time slot sending data block to the corresponding at least one target time slot receiving node.
[0011] In a second aspect, an embodiment of the present application provides a multi-fault data recovery device based on erasure codes, comprising:
[0012] A determination unit, configured to determine at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node failure condition based on a preset dependency recovery order of a preset erasure code type, as well as preset data transmission restriction rules and / or preset data transmission priority rules, so as to obtain a time slot recovery scheme corresponding to each preset multi-node failure condition; wherein the preset multi-node failure condition is used to characterize the failure conditions of various data blocks to be recovered of multiple nodes in the cluster; the preset dependency recovery order is the recovery order of the dependency on recovering at least one data block to be recovered; the time slot data transmission path is used to characterize the path by which the time slot sending node corresponding to the time slot sends the corresponding time slot sending data block to the corresponding time slot receiving node;
[0013] An obtaining unit, configured to obtain a set of preset time slot recovery schemes based on the time slot recovery scheme corresponding to each preset node failure condition;
[0014] The determining unit is further configured to determine a target time slot recovery scheme corresponding to the current multi-node failure situation in the preset time slot recovery scheme set;
[0015] An execution unit is used to execute the target time slot recovery scheme, wherein the target time slot recovery scheme is used to: in each target time slot, according to at least one time slot data transmission path corresponding to the target time slot, at least one target time slot sending node sends the corresponding at least one target time slot sending data block to the corresponding at least one target time slot receiving node.
[0016] In a third aspect, an embodiment of the present application provides a multi-fault data recovery device based on erasure codes, comprising:
[0017] CPU, memory, input and output interfaces, wired or wireless network interfaces, and power supply;
[0018] The memory is a short-term storage memory or a persistent storage memory;
[0019] The central processing unit is configured to communicate with the memory and execute instruction operations in the memory to perform the aforementioned erasure code-based data recovery method.
[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on a computer, the computer executes the aforementioned data recovery method based on erasure codes.
[0021] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when the computer program product is run on a computer, enables the computer to execute the aforementioned data recovery method based on erasure codes.
[0022] It can be seen from the above technical scheme that the embodiments of the present application have the following advantages: based on the preset dependency recovery order of the preset erasure code type, as well as the preset data sending restriction rules and / or the preset data sending priority rules, at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node fault situation can be determined to obtain a time slot recovery scheme corresponding to each preset multi-node fault situation, the preset multi-node fault situation is used to characterize the fault conditions of various data blocks to be recovered of multiple nodes appearing in the cluster, the preset dependency recovery order is the recovery order of the dependency existing in the recovery of at least one data block to be recovered, the time slot data transmission path is used to characterize the path from the time slot sending node corresponding to the time slot, sending the corresponding time slot sending data block to the corresponding time slot receiving node, based on the time slot recovery scheme corresponding to each preset node fault situation, a preset time slot recovery scheme set is obtained, the target time slot recovery scheme corresponding to the current multi-node fault situation is determined in the preset time slot recovery scheme set, the target time slot recovery scheme is executed, and the recovery order of the dependency existing in the recovery of at least one data block to be recovered is considered, that is, the dependency relationship between groups is considered, and therefore, the efficiency of multi-fault data recovery can be improved. Furthermore, the transmission timing of data blocks can be restricted by preset data transmission restriction rules and / or preset data transmission priority rules, which can reduce the possibility of network congestion. Secondly, by presetting a set of time slot recovery solutions, the system can quickly adapt to different fault scenarios without the need to calculate the recovery strategy in real time, thereby improving the response speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A schematic diagram of the architecture of a multi-fault data recovery system based on erasure codes disclosed in an embodiment of the present application;
[0024] Figure 2 A flowchart of a multi-fault data recovery method based on erasure codes disclosed in an embodiment of the present application;
[0025] Figure 3 This is a schematic diagram of an array form of RDP encoding disclosed in an embodiment of the present application;
[0026] Figure 4 A schematic diagram of a process of RDP decoding repair and Z-shaped dependency disclosed in an embodiment of the present application;
[0027] Figure 5 A schematic diagram of a stage recovery solution corresponding to a preset multi-node failure situation disclosed in an embodiment of the present application;
[0028] Figure 6 A schematic diagram of a preset dependency recovery order corresponding to an RDP code and an RDP class code disclosed in an embodiment of the present application;
[0029] Figure 7 A schematic diagram of a time slot recovery solution disclosed in an embodiment of the present application;
[0030] Figure 8 A schematic diagram of another time slot recovery solution disclosed in an embodiment of the present application;
[0031] Fig. 9 A flowchart of another method for recovering data from multiple faults based on erasure codes disclosed in an embodiment of the present application;
[0032] Fig.10 A schematic diagram of the structure of a data recovery device based on erasure codes disclosed in an embodiment of the present application;
[0033] Fig.11 A schematic diagram of the structure of a data recovery device based on erasure codes disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0034] The embodiments of the present application provide a multi-fault data recovery method based on erasure codes, a multi-fault data recovery device based on erasure codes, a multi-fault data recovery equipment based on erasure codes, and a computer-readable storage medium, which can perform multi-fault data recovery based on erasure codes while improving the efficiency of multi-fault data recovery and reducing network congestion.
[0035] See also Figure 1 , the architecture of the multi-fault data recovery system based on erasure code in the embodiment of the present application may include:
[0036] Management node 101, recovery node 102 of the cluster and data node 103 of the cluster. When performing multi-fault data recovery based on erasure code, management node 101 can be connected with recovery node 102 and data node 103. Management node 101 can obtain a time slot recovery scheme corresponding to each preset multi-node fault situation based on a preset dependent recovery order of a preset erasure code type, as well as a preset data transmission restriction rule and / or a preset data transmission priority rule, and obtain a preset time slot recovery scheme set based on the time slot recovery scheme corresponding to each preset node fault situation. Management node 101 can obtain current fault data of recovery node 102 and data node 103, determine the current multi-node fault situation based on the current fault data, and then determine the target time slot recovery scheme corresponding to the current multi-node fault situation in the preset time slot recovery scheme set, and deploy the target time slot recovery scheme to recovery node 102 and data node 103, so that recovery node 102 and data node 103 execute the target time slot recovery scheme.
[0037] It is understandable that the management node 101 can be a node in the cluster or a node outside the cluster. Secondly, the management node 101 can be a recovery node 102 or a data node 103. The management node 101 can also be other reasonable nodes, which are not specifically limited here.
[0038] based on Figure 1 The multi-fault data recovery system based on erasure coding is shown in Figure 2 , Figure 2 The present invention discloses a method for recovering data from multiple faults based on erasure codes, which includes:
[0039] 201. Based on a preset dependency recovery order of a preset erasure code type, as well as preset data sending restriction rules and / or preset data sending priority rules, determine at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node failure condition, so as to obtain a time slot recovery plan corresponding to each preset multi-node failure condition, wherein the preset multi-node failure condition is used to characterize the failure conditions of various data blocks to be recovered of multiple nodes appearing in the cluster, the preset dependency recovery order is the order of recovery of the dependency for recovering at least one data block to be recovered, and the time slot data transmission path is used to characterize the path from the time slot sending node corresponding to the time slot to send the corresponding time slot sending data block to the corresponding time slot receiving node.
[0040] In this embodiment, when performing multi-fault data recovery based on erasure codes, at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node fault condition can be determined based on the preset dependency recovery order of the preset erasure code type, as well as the preset data sending restriction rules and / or the preset data sending priority rules, so as to obtain a time slot recovery plan corresponding to each preset multi-node fault condition, wherein the preset multi-node fault condition is used to characterize the fault conditions of various data blocks to be recovered of multiple nodes appearing in the cluster, the preset dependency recovery order is the recovery order of the dependency for recovering at least one data block to be recovered, and the time slot data transmission path is used to characterize the path from the time slot sending node corresponding to the time slot to send the corresponding time slot sending data block to the corresponding time slot receiving node.
[0041] Specifically, the preset erasure code type may include but is not limited to RDP, RDP-class encoding, the preset dependency recovery order based on the preset erasure code type includes but is not limited to the Z-type dependency recovery order of RDP-class encoding, and the time slot recovery scheme includes at least one time slot data transmission path corresponding to each time slot, and each time slot data transmission path is used to represent the path by which at least one time slot sending node corresponding to the time slot sends the corresponding at least one time slot sending data block to the corresponding at least one time slot receiving node.
[0042] Specifically, the preset erasure code types may include but are not limited to RDP (Rate-Distortionless Precoding, row diagonal parity check), RDP class, etc., where RDP is a special matrix encoding method that creates redundant copies through XOR operations on data blocks so that data can be restored through other copies when they are damaged.
[0043] It is worth mentioning that RDP-type encoding technologies use exclusive OR (XOR) operations to store and transmit data. They are characterized by the existence of a Z-shaped dependency structure, which means that the recovery of data blocks needs to consider the correlation between the previous and next elements to ensure that they are recovered in the correct order. Even in the case of multiple node failures, the data blocks to be recovered (including but not limited to lost data blocks, etc.) can be efficiently reconstructed.
[0044] 202. Obtain a set of preset time slot recovery solutions based on the time slot recovery solution corresponding to each preset node failure condition.
[0045] After obtaining the time slot recovery scheme corresponding to each preset multi-node failure situation, a preset time slot recovery scheme set may be obtained based on the time slot recovery scheme corresponding to each preset node failure situation.
[0046] Specifically, for example, a cluster has 6 nodes and there are three preset node failure conditions, namely, the data blocks of nodes 1 and 2 are both lost, the data blocks of nodes 1 and 2 are partially lost, and the data blocks of nodes 1, 2 and 3 are all lost. After obtaining the time slot recovery plans corresponding to these three preset multi-node failure conditions, a preset time slot recovery plan set can be obtained based on the time slot recovery plans corresponding to these three preset node failure conditions.
[0047] 203. Determine a target time slot recovery solution corresponding to the current multi-node failure situation in a preset time slot recovery solution set.
[0048] After obtaining a set of preset time slot recovery solutions based on the time slot recovery solutions corresponding to each preset node failure situation, a target time slot recovery solution corresponding to the current multi-node failure situation may be determined in the set of preset time slot recovery solutions.
[0049] Specifically, for example, if the current multi-node failure situation is that the data blocks of node 1 and node 2 are both lost, then in the preset time slot recovery plan set, the time slot recovery plan corresponding to the preset multi-node failure situation of "both the data blocks of node 1 and node 2 are lost" can be used as the target time slot recovery plan.
[0050] 204. Execute a target time slot recovery scheme, wherein the target time slot recovery scheme is used to: in each target time slot, according to at least one time slot data transmission path corresponding to the target time slot, at least one target time slot sending node sends at least one corresponding target time slot sending data block to at least one corresponding target time slot receiving node.
[0051] After determining the target time slot recovery plan corresponding to the current multi-node failure situation in the preset time slot recovery plan set, the target time slot recovery plan can be executed, wherein the target time slot recovery plan is used to: in each target time slot, according to at least one time slot data transmission path corresponding to the target time slot, at least one target time slot sending node sends the corresponding at least one target time slot sending data block to the corresponding at least one target time slot receiving node.
[0052] Specifically, the method for executing the target time slot recovery scheme may be to deploy the target time slot recovery scheme to each node of the cluster so that each node executes the target time slot recovery scheme.
[0053] In an embodiment of the present application, at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node fault situation can be determined based on a preset dependency recovery order of a preset erasure code type, as well as preset data sending restriction rules and / or preset data sending priority rules, so as to obtain a time slot recovery plan corresponding to each preset multi-node fault situation. The preset multi-node fault situation is used to characterize the fault conditions of various data blocks to be recovered of multiple nodes appearing in the cluster. The preset dependency recovery order is the recovery order of the dependency existing in the recovery of at least one data block to be recovered. The time slot data transmission path is used to characterize the path from the time slot sending node corresponding to the time slot to the corresponding time slot receiving node. A set of preset time slot recovery plans is obtained based on the time slot recovery plans corresponding to each preset node fault situation. The target time slot recovery plan corresponding to the current multi-node fault situation is determined in the preset time slot recovery plan set, and the target time slot recovery plan is executed. The recovery order of the dependency existing in the recovery of at least one data block to be recovered is taken into account, that is, the dependency relationship between groups is taken into account. Therefore, the efficiency of multi-fault data recovery can be improved. Furthermore, the transmission timing of data blocks can be restricted by preset data transmission restriction rules and / or preset data transmission priority rules, which can reduce the possibility of network congestion. Secondly, by presetting a set of time slot recovery schemes, the system can quickly adapt to different fault scenarios without the need to calculate the recovery strategy in real time, thereby improving the response speed.
[0054] In the embodiment of the present application, based on the preset dependency recovery order of the preset erasure code type, and the preset data transmission restriction rule and / or the preset data transmission priority rule, at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node failure situation is determined to obtain a time slot recovery solution corresponding to each preset multi-node failure situation. There are multiple methods, based on Figure 2 The data recovery method based on erasure code is shown, and one method thereof is described below.
[0055] In this embodiment, when performing multi-fault data recovery based on erasure codes, at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node fault condition can be determined based on the preset dependency recovery order of the preset erasure code type, as well as the preset data sending restriction rules and / or the preset data sending priority rules, so as to obtain a time slot recovery plan corresponding to each preset multi-node fault condition; wherein the preset multi-node fault condition is used to characterize the fault conditions of various data blocks to be recovered of multiple nodes appearing in the cluster; the preset dependency recovery order is the recovery order of the dependency for recovering at least one data block to be recovered; the time slot data transmission path is used to characterize the path by which the time slot sending node corresponding to the time slot sends the corresponding time slot sending data block to the corresponding time slot receiving node.
[0056] Specifically, the preset erasure code types may include but are not limited to RDP (Rate-Distortionless Precoding, row diagonal parity check), RDP class, etc., where RDP is a special matrix encoding method that creates redundant copies through XOR operations on data blocks so that data can be restored through other copies when damaged. More specifically, (k, m) RDP encoding is a data recovery strategy for erasure codes that combines the preset redundancy (k) and the minimum number of damaged nodes (m) to provide fault tolerance. Data recovery can be performed using algorithms such as EVENODD and STAR, rather than being limited to RDP itself.
[0057] It is worth mentioning that RDP-type encoding technologies use exclusive OR (XOR) operations to store and transmit data. They are characterized by the existence of a Z-shaped dependency structure, which means that the recovery of data blocks needs to consider the correlation between the previous and next elements to ensure that they are recovered in the correct order. Even in the case of multiple node failures, the data blocks to be recovered (including but not limited to lost data blocks, etc.) can be efficiently reconstructed.
[0058] It should be understood that the preset dependency recovery order of the preset erasure code type may be the preset dependency recovery order of RDP and the RDP class. The preset dependency recovery order of RDP and the RDP class is specifically described below.
[0059] In early applications, RDP was mainly used to solve disk failure problems (such as RAID-6). For details, please refer to Figure 3 , Figure 3 A schematic diagram of an array form of RDP encoding disclosed in an embodiment of the present application, comprising Figure 3 It can be seen that the preset erasure code type is (4,2)RDP encoding. Figure 3 The two-dimensional stripe is formed by the data of multiple disks (6 nodes, namely N0 to N5). Each disk (node) corresponds to a stripe in the array. The 0th to 3rd rows in the array belong to the original stripe, and the 4th to 5th rows belong to the check stripe. A stripe refers to all the data placed on a node when encoding with erasure code, for example Figure 3 The two parity stripes refer to the data blocks of nodes N4 and N5. Figure 3 For example, RDP uses these original stripes to generate two parity stripes, so RDP can tolerate the failure of up to two stripes. When any two original stripes in the array fail, RDP can use the two parity stripes and the remaining original stripes to repair the failed stripes.
[0060] Specifically, the RDP encoding generates two check stripes, namely a row check stripe and a diagonal check stripe. Please refer to Formula 1 and Formula 2. Formula 1 and Formula 2 correspond to methods for generating row check stripes and diagonal check stripes, respectively.
[0061]
[0062] It should be understood that the decoding and repair operation of RDP encoding utilizes the characteristics of the XOR operation: A⊕A=0. For example, when it is necessary to repair data block D 0,0 According to Formula 2, P 0,5 =D 0,0 ⊕D 3,2 ⊕D 2,3 ⊕P 1,4 , so we can get D 0,0 =P 0,5 ⊕D 3,2 ⊕D 2,3 ⊕P 1,4 That is to say, for the characteristics of the XOR operation, because A^A=0, and now A^B=C is calculated, C is stored as the verification data. When A is lost, only C^B=A^B^B=A is needed to restore the data, where "⊕" is the XOR mathematical operation symbol and "^" is a symbol in computer language.
[0063] Also, see Figure 4 , Figure 4 A schematic diagram of a process of RDP decoding repair and Z-shaped dependency disclosed in an embodiment of the present application, comprising Figure 4As can be seen, due to the data requirements of the repair data block, RDP repair has a Z-shaped dependency. For example, when repairing the 0,1 band, you need to press D 0,0 →D 0,1 →D 1,0 →D 1,1 →D 2,0 →D 2,1 →D 3,0 →D 3,1 It can be understood that RDP encoding is an array code, such as Figure 4 As shown in the figure, during repair, repairing D(0,1) requires D(0,0), showing a Z-shaped trend in the array, so it is called Z-shaped dependency. At the same time, RDP-type erasure codes such as EVENODD and STAR have additional encoding and decoding processes compared to RDP, but the row check and diagonal check methods are consistent with RDP, so they are called RDP-type erasure codes. The additional encoding process means that there is an additional calculation step before and after encoding in EVENODD and other codes. Except for this step, their encoding / decoding process is the same as RDP. Therefore, the preset dependency recovery order of RDP and RDP-type is the Z-shaped dependency recovery order.
[0064] It should be understood that the embodiments of the present application will continue to be described with examples of RDP and RDP class, and the Z-shaped dependency recovery order of RDP and RDP class.
[0065] Among them, based on the preset dependent recovery order of the preset erasure code type, as well as the preset data sending restriction rules and / or the preset data sending priority rules, the method of determining at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node fault situation to obtain the time slot recovery solution corresponding to each preset multi-node fault situation may be, first, for each preset multi-node fault situation, based on the preset dependent recovery order, determining at least one stage data transmission path corresponding to each recovery stage corresponding to the preset multi-node fault situation to obtain the stage recovery solution corresponding to the preset multi-node fault situation; wherein the stage data transmission path is used to characterize the path of the stage sending node corresponding to the recovery stage, sending the stage sending data block corresponding to the data block to be recovered to the stage receiving node, so as to restore the path of the data block to be recovered in the recovery stage, and then based on the stage recovery solution corresponding to the preset multi-node fault situation, as well as the preset data sending restriction rules and / or the preset data sending priority rules, determining at least one time slot sending data block, at least one time slot sending node and at least one time slot receiving node corresponding to each time slot corresponding to the preset multi-node fault situation, obtaining at least one time slot data transmission path corresponding to each time slot, to obtain the time slot recovery solution corresponding to the preset multi-node fault situation.
[0066] For details, please refer to Figure 5 , Figure 5 A schematic diagram of a stage recovery scheme corresponding to a preset multi-node failure situation disclosed in an embodiment of the present application, comprising Figure 5 It can be seen that Figure 5 for Figure 4 Corresponding phase recovery scheme, a Round means that the new node (recovery nodes N0 and N1) collects data from other surviving nodes (other nodes N2 to N5 in the cluster except the recovery node) and repairs and generates a data block to be recovered (such as the lost data block, etc.), Cluster is the data cluster, Figure 5 In the , all small blocks except # are data blocks. Figure 5 In order to decode and repair a data block, the node must collect all the data blocks connected by the arrow. The specific encoding and decoding formula can be combined with Figure 3 , as well as the understanding of formula 1 and formula 2, will not be repeated here.
[0067] It is worth mentioning that first determining the stage recovery plan corresponding to the preset multi-node failure situation, and then determining the corresponding time slot recovery plan can achieve the following effects: First, a well-organized recovery plan can be obtained. Through stage division, the complex recovery process can be decomposed into smaller and more manageable parts, making the recovery strategy more orderly and efficient. Secondly, step-by-step recovery can be carried out, and each stage focuses on repairing a specific set of data blocks to be recovered, which helps to avoid problems caused by handling too many complex tasks at the same time and ensures the timely recovery of key data. Then, refined management can be carried out. The stage recovery sequence takes into account the dependencies between data, ensuring that the next stage can only be entered after the data recovery of the previous stage is completed to ensure data consistency. Furthermore, the adaptability and flexibility of recovery can be improved. If additional node failures or other problems are encountered in some stages, the recovery order can be adjusted in a targeted manner instead of adjusting the paths of all time slots globally. Finally, resource optimization can be carried out. The stage strategy allows resources to be allocated on demand. For example, the sending priority may be increased or other restrictions may be relaxed in critical stages to maximize the use of network bandwidth and other resources. In summary, this staged approach not only improves the efficiency of data recovery, but also enhances the stability and flexibility of the system.
[0068] Among them, based on the stage recovery plan corresponding to the preset multi-node fault situation, as well as the preset data sending restriction rules and / or the preset data sending priority rules, at least one time slot sending data block, at least one time slot sending node and at least one time slot receiving node corresponding to each time slot corresponding to the preset multi-node fault situation are determined, and at least one time slot data transmission path corresponding to each time slot is obtained. The method for obtaining the time slot recovery plan corresponding to the preset multi-node fault situation may be, first, in the stage recovery plan corresponding to the preset multi-node fault situation, the order of the recovery stages from front to back is used as the traversal order, wherein the traversal order is used to characterize the sending priority of the data blocks sent in each stage in each recovery stage, and then based on the traversal order, traversal is performed in the stage recovery plan, and according to the preset data sending restriction rules and / or the preset data sending priority rules, at least one time slot sending data block, at least one time slot sending node and at least one time slot receiving node corresponding to each time slot corresponding to the preset multi-node fault situation are determined, and at least one time slot data transmission path corresponding to each time slot is obtained, so as to obtain the time slot recovery plan corresponding to the preset multi-node fault situation.
[0069] Specifically, "using the order of the recovery phase from the beginning to the end as the traversal order, and using the order of the recovery phase from the beginning to the end as the traversal order" can be understood as the first-in-first-out principle. The first-in-first-out principle means that when selecting data blocks for transmission, due to the limitation of Z-shaped dependency, the data in the front round should be selected for transmission as much as possible, for example Figure 5 The data of Round1 should be selected before Round2.
[0070] It is important to understand that for RDP encoding and RDP-like encoding, Round is sorted according to Z-shaped dependency, see Figure 6 , and please continue to read Figure 5 , Figure 6 A schematic diagram of a preset dependency recovery order corresponding to an RDP code and an RDP class code disclosed in an embodiment of the present application, comprising Figure 5 and Figure 6 From the dependency recovery directions corresponding to N0 and N1 (at least one time slot data transmission path corresponding to each time slot), it can be seen that the preset dependency recovery order corresponding to the RDP code and the RDP-like code is Z-type.
[0071] It is worth mentioning that taking the order of the recovery phases from front to back as the traversal order and traversing in the stage recovery plan based on the traversal order can achieve the following effects: First, following the timeline of fault recovery ensures the logical clarity of data recovery and avoids confusion caused by staggered time points. Second, dependency satisfaction can be achieved. In the case of Z-shaped dependencies, early recovery operations may require previous data blocks. Sequential processing can ensure that these dependencies are met in time to help meet the dependencies between data.
[0072] Among them, traversing in the stage recovery scheme based on the traversal order, determining at least one time slot sending data block, at least one time slot sending node and at least one time slot receiving node corresponding to each time slot corresponding to the preset multi-node failure situation according to the preset data sending restriction rules and / or the preset data sending priority rules, and obtaining at least one time slot data transmission path corresponding to each time slot, so as to obtain the time slot recovery scheme corresponding to the preset multi-node failure situation can be a method of traversing in the stage recovery scheme based on the traversal order, determining at least one time slot sending data block, at least one time slot sending node and at least one time slot receiving node corresponding to the target time slot according to the preset data sending restriction rules, and obtaining at least one time slot data transmission path for the target time slot; wherein, if the time slot sending node of the target time slot is the first-stage sending node of the target recovery stage, the time slot sending node of the target time slot does not receive the stage sending data block of the target recovery stage sent by the second-stage sending node; the second-stage sending node is any stage sending node in the target recovery stage except the first-stage sending node, so as to obtain the time slot recovery scheme corresponding to the preset multi-node failure situation.
[0073] Specifically, "if the time slot sending node of the target time slot is the first stage sending node of the target recovery phase, then the time slot sending node of the target time slot does not receive the stage sending data block of the target recovery phase sent by the second stage sending node" can be understood as a rule to ensure that each data block is transmitted only once, that is, in the same time slot, if the Roundx data on node a is selected to be sent, node a cannot receive Roundx data from other nodes; if node a has already sent Roundx data, it cannot receive Roundx data from other nodes; wherein, the Roundx data on node a refers to a specific data block, such as Figure 5 In the example, the data of Round0 on node 2 (N2) refers to data block D 3,2 Specifically, that is to say, Figure 5 Each round in the above example corresponds to a data block repair and a repair formula (such as R1 and D 0,0 =P 0,5 ⊕D 3,2 ⊕D 2,3 ⊕P1,4 ), if it is decided that N2 sends D in time slot 1 (R1) 3,2 , and N3 sends D 2,3 To N2, at this time, after the first time slot ends, D on N2 2,3 There is no data block to calculate with it, resulting in a waste of network bandwidth.
[0074] It should be understood that the rule of ensuring that each data block is transmitted only once is consistent with the above decoding formula (such as D 0,0 =P 0,5 ⊕D 3,2 ⊕D 2,3 ⊕P 1,4 ) remain consistent, each data block only participates in one calculation, and each transmission represents that the data block participates in one calculation. If the same data block is sent multiple times and cannot be used for calculation, network bandwidth will be wasted.
[0075] It is worth mentioning that since the node in a recovery phase is the node that sends the data block, it means that the node is not used for the recovery calculation (XOR calculation) of the data block to be recovered in the recovery phase. If other nodes in the recovery phase send data blocks to this node, the network bandwidth is occupied in vain, because the node still needs to send the data blocks sent by other nodes to the node used for recovery calculation in subsequent time slots, or other nodes still need to send data blocks to the node used for recovery calculation in subsequent time slots.
[0076] Among them, traversing in the stage recovery scheme based on the traversal order, determining at least one time slot sending data block, at least one time slot sending node and at least one time slot receiving node corresponding to each time slot corresponding to the preset multi-node failure situation according to the preset data sending restriction rules and / or the preset data sending priority rules, and obtaining at least one time slot data transmission path corresponding to each time slot, so as to obtain the time slot recovery scheme corresponding to the preset multi-node failure situation can be, firstly determining the sending data priority and / or receiving data priority corresponding to each node in the cluster based on the preset data sending priority rules, and then traversing in the stage recovery scheme based on the traversal order, determining at least one time slot sending data block, at least one time slot sending node and at least one time slot receiving node corresponding to each time slot corresponding to the preset multi-node failure situation according to the sending data priority and / or receiving data priority corresponding to each node in the cluster, and obtaining at least one data transmission path corresponding to each time slot, so as to obtain the time slot recovery scheme corresponding to the preset multi-node failure situation.
[0077] Specifically, the higher the sending data priority corresponding to a node is, the higher the node will be given priority in sending data blocks, and the higher the receiving data priority corresponding to a node is, the higher the node will be given priority in receiving data blocks.
[0078] Among them, the method for determining the sending data priority and / or receiving data priority corresponding to each node in the cluster based on the preset data sending priority rule may be: determining the receiving data priority of the recovery node in the cluster as the first level, and determining the receiving data priority of the nodes in the cluster other than the recovery node as the second level, wherein the first level is higher than the second level; and / or determining the receiving data priority of the nodes in the cluster whose performance is greater than or equal to the preset maximum performance threshold as the first level, and determining the receiving data priority of the nodes in the cluster whose performance is less than the preset maximum performance threshold as the second level, wherein the first level is higher than the second level; and / or determining the sending data priority of the nodes in the cluster whose performance is less than or equal to the preset minimum performance threshold as the first level, and determining the sending data priority of the nodes in the cluster whose performance is greater than the preset minimum performance threshold as the second level, wherein the first level is higher than the second level.
[0079] Specifically, the repair node may be given priority in receiving data by presetting a data transmission priority rule, and the higher the node performance, the lower the data transmission priority, and the lower the node performance, the lower the data reception priority.
[0080] It is worth mentioning that the higher the node performance, the higher the priority of receiving data, which can make high-performance nodes such as recovery nodes mainly responsible for receiving data blocks sent by other nodes and performing recovery calculations (XOR operations). The lower the node performance, the higher the priority of sending data, which can make low-performance nodes mainly responsible for sending data blocks to high-performance nodes for recovery calculations, thereby ensuring that the entire system meets basic recovery requirements while taking into account performance balance.
[0081] It is also worth mentioning that such a design strategy can also enable the system to respond to sudden failures more effectively, prioritize the recovery of critical data, and reduce the risk of service interruption. Secondly, it can also take advantage of the capability differences of resources in the cluster to improve resource utilization. Then, inefficient communication can be avoided, unnecessary bandwidth consumption can be reduced, and the efficiency of the overall recovery process can be improved. Finally, the priority strategy can be flexibly adjusted according to different scenarios to adapt to the changing network environment and workload.
[0082] It is also worth mentioning that the multi-fault data recovery method based on erasure code proposed in the embodiment of the present application can be an algorithm for optimizing concurrent fault repair for RDP-type coding. The algorithm combines the preset dependency recovery order, the preset data sending restriction rules and / or the preset data sending priority rules, and can use the greedy idea and the idle uplink and downlink bandwidth of the node to reschedule and allocate network data transmission during RDP repair, so that the traffic is load balanced between the distributed cluster node network, reducing the possibility of network congestion. Specifically, the algorithm can schedule network data transmission during RDP repair according to one premise and five rules (combined with the preset dependency recovery order, the preset data sending restriction rules and / or the preset data sending priority rules). One premise is that a node can only send or receive one data block in each time slot. This premise is equivalent to "network bandwidth parity between cluster nodes". The premise is proposed to facilitate problem modeling. Uplink and downlink bandwidth refers to the network bandwidth between two nodes for a node, which is divided into uplink and downlink, and there is no conflict between the two. Uplink and downlink bandwidth refers to the uplink and downlink network bandwidth between all nodes. The greedy idea refers to an algorithm idea that conforms to human intuition. For example, for a Z-shaped dependency, the earlier the data at the front of the Z-shaped dependency is collected, the better (first-in-first-out principle), which can avoid waiting. The lower the node performance, the less you want it to receive data for processing, so its data is sent out first (the lower the node performance, the lower the priority of receiving data). The greedy idea is reflected in the preset dependency recovery order (such as the first-in-first-out principle) and the preset data sending priority rules (the repair node receives data first, the higher the node performance, the lower the priority of sending data, and the lower the node performance, the lower the priority of receiving data).
[0083] It is also worth mentioning that the preset dependency recovery order, preset data sending restriction rules and preset data sending priority rules effectively utilize the idle upstream and downstream bandwidth between nodes and avoid the situation where the downstream data blocks of the Z-shaped dependency are repaired first and then the upstream data blocks are repaired, resulting in the downstream data blocks always lacking a data block to complete the complete repair. Therefore, the preset dependency recovery order, preset data sending restriction rules and preset data sending priority rules can reduce the possibility of network congestion and speed up the repair speed.
[0084] Among them, based on the preset dependent recovery order of the preset erasure code type, and the preset data transmission restriction rule and / or the preset data transmission priority rule, at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node failure situation is determined to obtain a time slot recovery scheme corresponding to each preset multi-node failure situation. There may be multiple schemes, which are described below respectively:
[0085] (i) In the time slot recovery scheme corresponding to the preset multi-node failure situation, the number of time slot data transmission paths corresponding to each time slot is one.
[0086] For details, please refer to Figure 7 , Figure 7 A schematic diagram of a time slot recovery scheme disclosed in an embodiment of the present application, comprising Figure 7 It can be seen that when the network bandwidth between the nodes of the distributed cluster is equal and concurrent failures on two of the six nodes need to be repaired, the data blocks can be sent in the direction of the arrows in the figure and at the start of the arrows. For example, N2 in the leftmost column (R1) corresponds to N2 sending D(3,2) to N0, which consumes a total of 32 time slots.
[0087] It is worth mentioning that in Figure 5 In the example, the network bandwidth is ignored and only the direction of data flow is described. Figure 7 In the case of equal network bandwidth, due to the limitation of node download bandwidth, four nodes transmit data blocks to one node at the same time, which is equivalent to four nodes sending data blocks to the destination node one by one. Therefore, Figure 7 The multi-fault recovery consumes a total of 4*8=32 time slots.
[0088] (ii) In the preset time slot recovery scheme corresponding to the multi-node failure situation, the number of time slot data transmission paths corresponding to the time slot may be multiple.
[0089] For details, please refer to Figure 8 , Figure 8 A schematic diagram of another time slot recovery scheme disclosed in an embodiment of the present application, comprising Figure 8 It can be seen that according to Figure 8 The data block starting from the arrow direction is sent, such as Figure 8 N2 in the leftmost column (R1) corresponds to N2 sending D(3,2) to N0.
[0090] The second solution can schedule the transmission time of data blocks based on the above premise and five greedy rules. One premise is that the five greedy rules are the first-in-first-out principle (rule 1), ensuring that each data block is transmitted only once (rule 2), repair nodes receive data first (rule 3), the higher the node performance, the lower the priority of sending data (rule 4), and the lower the node performance, the lower the priority of receiving data (rule 5). The steps involved in the scheduling algorithm are as follows:
[0091] Step 1. Create a new time slot;
[0092] Step 2. Figure 5 As shown, traverse from front to back according to the Round order (Rule 1);
[0093] Step 3. In each Round, select the nodes that need to send and receive data blocks according to priority (rule 2345).
[0094] Step 4. No data block can be sent in this time slot. If the repair is complete, end the algorithm; otherwise, return to step 1.
[0095] like Figure 8 As shown in the figure, the algorithm optimizes the RDP encoding to repair the network data transmission process of the failed nodes 0 and 1 on 6 nodes. Taking the first time slot (S1) as an example, the algorithm Figure 5 Start the optimization on the data transfer model shown, first select D in Round 1 3,2 Transmit to node 0, and then select send data D 2,3 Due to rule 2, the data block cannot be transmitted to node 2, so it is sent to node 4. Similarly, when all nodes have sent the data that can be sent in this time slot, the time slot ends and enters the next time slot, and the cycle continues until all data is sent.
[0096] Specifically, by Figure 5 It can be seen that the R1 recovery phase is used to 0,5 , D 3,2 , D 2,3 and P 1,4 Perform an XOR operation to restore D 0,0 For example, first choose D 3,2 Transmit to N0 (because according to rule 3, node 0 is the recovery node and has the highest receiving priority), and then select N3's data D 2,3 Transmitted to N4 (because according to Rule 2, data D 2,3 It cannot be transmitted to N2, nor can it be sent to its own node N3, so it is considered to be transmitted to N4 and N5, and N4 has a higher receiving priority than N5, so N3's data D 2,3 Transmitted to N4, at this time, due to the premise that "a node can only send or receive one data block in each time slot", P 0,5 It is no longer possible to send data in S1, and there are still N4 and N5 data blocks that have not been sent in the S1 time slot. In order to minimize the waste of network bandwidth, we can still traverse the data blocks of R2 based on the "first-in, first-out principle" of rule 1. Figure 5 It can be seen that the R2 recovery phase is used to 0,0 , D 0,2 , D 0,3 and P 0,4 Perform an XOR operation to restore D 0,1 , because N4 needs to send P in the R2 recovery phase 0,4 , so it can be determined that the data block sent by N4 in the S1 time slot is P 0,4, and then traverse the data block of R3, by Figure 5 It can be seen that N5 needs to send P in the R3 recovery phase. 1,5 , so it can be determined that the data block sent by N5 in the S1 time slot is P 1,5 Secondly, N4 can receive D 2,3 and locally saved P 1,4 First, perform an XOR operation, and then at S3, N4 converts D 2,3 With P 1,4 The result of the XOR operation is sent to N0. It can be understood that Figure 8 The logic of determining the time slot data transmission path from S2 to S10 can be deduced from the logic of S1, which is based on the above premise and five rules, and will not be described in detail here.
[0097] It is understandable that, in addition to the above-described method for obtaining a time slot recovery solution corresponding to each preset multi-node failure situation, other reasonable methods may also be used, which are not specifically limited here.
[0098] It is worth mentioning that in the second solution, by presetting the dependent recovery order, and presetting the data transmission restriction rules and / or the presetting the data transmission priority rules, as many time slot data transmission paths as possible that meet the rules can be set (determined) in the time slot, so that the idle network bandwidth can be better utilized in the repair process. Figure 7 and Figure 8 Comparison between Figure 8 As shown in , the repair is completed after S10, and only 10 time slots are needed to complete the same Figure 7 In the case of repair, you can Figure 7 The 32 time slots are optimized to Figure 8 The 10 time slots increase the throughput of cluster repair.
[0099] It is also worth mentioning that the phased recovery scheme (such as Figure 5 ) can be recovered according to the Z-shaped dependency, but ignores the network bandwidth, while the time slot recovery scheme (such as Figure 7 and Figure 8) combines the definition of network bandwidth equivalence and time slots, and transmits data blocks according to Z-shaped dependencies, preset data transmission restriction rules and / or preset data transmission priority rules. The priority of sending data blocks on a node to other nodes can be determined, and choosing which data block to send first is crucial to the repair process. Due to the existence of Z-shaped dependencies, determining the priority can plan the data transmission path according to the priority to avoid nodes waiting idle for the required data blocks. If the priority is not determined, all nodes may send data to the same destination node, but the download bandwidth of the destination node is limited. However, there is another idle node waiting for data at this time, and this part of the network bandwidth is wasted. It should be understood that the network bandwidth in the cluster is usually relatively stable and will only fluctuate within a small range. Therefore, it is important to consider the network bandwidth factor in the process of concurrent recovery of multiple faults.
[0100] After obtaining the time slot recovery scheme corresponding to each preset multi-node failure situation, a preset time slot recovery scheme set may be obtained based on the time slot recovery scheme corresponding to each preset node failure situation.
[0101] After obtaining a set of preset time slot recovery solutions based on the time slot recovery solutions corresponding to each preset node failure situation, a target time slot recovery solution corresponding to the current multi-node failure situation may be determined in the set of preset time slot recovery solutions.
[0102] After determining the target time slot recovery plan corresponding to the current multi-node failure situation in the preset time slot recovery plan set, the target time slot recovery plan can be executed, wherein the target time slot recovery plan is used to: in each target time slot, according to at least one time slot data transmission path corresponding to the target time slot, at least one target time slot sending node sends the corresponding at least one target time slot sending data block to the corresponding at least one target time slot receiving node.
[0103] For details, please refer to Fig. 9 , Fig. 9 FIG. 1 is a flow chart of another method for recovering data from multiple faults based on erasure codes disclosed in an embodiment of the present application, which includes: Fig. 9 It can be seen that the algorithm can be used on all nodes of the distributed RDP erasure code cluster to generate optimized network transmission plans in advance. When a node fails, the transmission plan is selected according to the failure type. Each node transmits data according to the planned time slot until all data transmission is completed and the repair is completed.
[0104] The method for executing the target time slot recovery scheme may be to deploy the target time slot recovery scheme to each node of the cluster so that each node executes the target time slot recovery scheme. The specific deployment method is not limited here.
[0105] It is understandable that, in addition to the method of executing the target time slot recovery solution above, other reasonable methods may also be used, which are not specifically limited here.
[0106] In this embodiment, based on the preset dependency recovery order of the preset erasure code type, as well as the preset data sending restriction rules and / or the preset data sending priority rules, at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node fault situation can be determined to obtain a time slot recovery plan corresponding to each preset multi-node fault situation. The preset multi-node fault situation is used to characterize the fault conditions of various data blocks to be recovered of multiple nodes appearing in the cluster. The preset dependency recovery order is the recovery order of the dependency existing in the recovery of at least one data block to be recovered. The time slot data transmission path is used to characterize the path from the time slot sending node corresponding to the time slot to the corresponding time slot receiving node. Based on the time slot recovery plan corresponding to each preset node fault situation, a preset time slot recovery plan set is obtained. The target time slot recovery plan corresponding to the current multi-node fault situation is determined in the preset time slot recovery plan set, and the target time slot recovery plan is executed. The recovery order of the dependency existing in the recovery of at least one data block to be recovered is taken into account, that is, the dependency relationship between groups is taken into account. Therefore, the efficiency of multi-fault data recovery can be improved. Furthermore, the transmission timing of data blocks can be restricted by preset data transmission restriction rules and / or preset data transmission priority rules, which can reduce the possibility of network congestion. Secondly, by presetting a set of time slot recovery schemes, the system can quickly adapt to different fault scenarios without the need to calculate the recovery strategy in real time, thereby improving the response speed. Next, a complete method for optimizing concurrent fault repair for RDP-type encoding is provided. Furthermore, first determine the stage recovery scheme corresponding to the preset multi-node fault situation, and then determine the corresponding time slot recovery scheme, which not only improves the efficiency of data recovery, but also enhances the stability and flexibility of the system. Furthermore, the order of the recovery stages from front to back is used as the traversal order, and traversing in the stage recovery scheme based on the traversal order can achieve dependency satisfaction. In the case of Z-shaped dependencies, early recovery operations may require previous data blocks. Processing in sequence can ensure that these dependencies are met in time to help meet the dependencies between data. Finally, the preset dependency recovery order, preset data sending restriction rules, and preset data sending priority rules effectively utilize the idle upstream and downstream bandwidth between nodes, and avoid the situation where the downstream data blocks of the Z-shaped dependency are repaired first and then the upstream data blocks are repaired, resulting in the downstream data blocks always lacking a data block to complete the complete repair. Therefore, the preset dependency recovery order, preset data sending restriction rules, and preset data sending priority rules can reduce the possibility of network congestion and speed up the repair speed.
[0107] The above describes the multi-fault data recovery method based on erasure code in the embodiment of the present application. The following describes the multi-fault data recovery device based on erasure code in the embodiment of the present application. Fig.10 , an embodiment of a multi-fault data recovery device based on erasure codes in an embodiment of the present application includes:
[0108] The determination unit 1001 is used to determine at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node failure condition based on a preset dependency recovery order of a preset erasure code type, as well as a preset data transmission restriction rule and / or a preset data transmission priority rule, so as to obtain a time slot recovery scheme corresponding to each preset multi-node failure condition; wherein the preset multi-node failure condition is used to characterize the failure conditions of various data blocks to be recovered of multiple nodes appearing in the cluster; the preset dependency recovery order is the recovery order of the dependency on recovering at least one data block to be recovered; the time slot data transmission path is used to characterize the path by which the time slot sending node corresponding to the time slot sends the corresponding time slot sending data block to the corresponding time slot receiving node;
[0109] An obtaining unit 1002 is configured to obtain a set of preset time slot recovery schemes based on the time slot recovery schemes corresponding to each preset node failure condition;
[0110] The determining unit 1001 is further configured to determine a target time slot recovery scheme corresponding to the current multi-node failure situation in the preset time slot recovery scheme set;
[0111] The execution unit 1003 is used to execute the target time slot recovery scheme, wherein the target time slot recovery scheme is used to: in each target time slot, according to at least one time slot data transmission path corresponding to the target time slot, at least one target time slot sending node sends the corresponding at least one target time slot sending data block to the corresponding at least one target time slot receiving node.
[0112] In an embodiment of the present application, at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node fault situation can be determined based on a preset dependency recovery order of a preset erasure code type, as well as preset data sending restriction rules and / or preset data sending priority rules, so as to obtain a time slot recovery plan corresponding to each preset multi-node fault situation. The preset multi-node fault situation is used to characterize the fault conditions of various data blocks to be recovered of multiple nodes appearing in the cluster. The preset dependency recovery order is the recovery order of the dependency existing in the recovery of at least one data block to be recovered. The time slot data transmission path is used to characterize the path from the time slot sending node corresponding to the time slot to the corresponding time slot receiving node. A set of preset time slot recovery plans is obtained based on the time slot recovery plans corresponding to each preset node fault situation. The target time slot recovery plan corresponding to the current multi-node fault situation is determined in the preset time slot recovery plan set, and the target time slot recovery plan is executed. The recovery order of the dependency existing in the recovery of at least one data block to be recovered is taken into account, that is, the dependency relationship between groups is taken into account. Therefore, the efficiency of multi-fault data recovery can be improved. Furthermore, the transmission timing of data blocks can be restricted by preset data transmission restriction rules and / or preset data transmission priority rules, which can reduce the possibility of network congestion. Secondly, by presetting a set of time slot recovery solutions, the system can quickly adapt to different fault scenarios without the need to calculate the recovery strategy in real time, thereby improving the response speed.
[0113] The following is a detailed description of a multi-fault data recovery device based on erasure codes in an embodiment of the present application. Another embodiment of the multi-fault data recovery device based on erasure codes in an embodiment of the present application includes:
[0114] A determination unit, configured to determine at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node failure condition based on a preset dependency recovery order of a preset erasure code type, as well as preset data transmission restriction rules and / or preset data transmission priority rules, so as to obtain a time slot recovery scheme corresponding to each preset multi-node failure condition; wherein the preset multi-node failure condition is used to characterize the failure conditions of various data blocks to be recovered of multiple nodes in the cluster; the preset dependency recovery order is the recovery order of the dependency on recovering at least one data block to be recovered; the time slot data transmission path is used to characterize the path by which the time slot sending node corresponding to the time slot sends the corresponding time slot sending data block to the corresponding time slot receiving node;
[0115] An obtaining unit, configured to obtain a set of preset time slot recovery schemes based on the time slot recovery scheme corresponding to each preset node failure condition;
[0116] The determining unit is further configured to determine a target time slot recovery scheme corresponding to the current multi-node failure situation in the preset time slot recovery scheme set;
[0117] An execution unit is used to execute the target time slot recovery scheme, wherein the target time slot recovery scheme is used to: in each target time slot, according to at least one time slot data transmission path corresponding to the target time slot, at least one target time slot sending node sends the corresponding at least one target time slot sending data block to the corresponding at least one target time slot receiving node.
[0118] The determination unit is specifically used to determine, for each of the preset multi-node fault conditions, at least one stage data transmission path corresponding to each recovery stage corresponding to the preset multi-node fault condition based on the preset dependent recovery order, so as to obtain the stage recovery plan corresponding to the preset multi-node fault condition; wherein the stage data transmission path is used to represent a path for sending the stage sending data block corresponding to the data block to be recovered to the stage receiving node by the stage sending node corresponding to the recovery stage to restore the data block to be recovered in the recovery stage, and based on the stage recovery plan corresponding to the preset multi-node fault condition, as well as the preset data sending restriction rules and / or the preset data sending priority rules, determine at least one time slot sending data block, at least one time slot sending node and at least one time slot receiving node corresponding to each time slot corresponding to the preset multi-node fault condition, and obtain at least one time slot data transmission path corresponding to each time slot, so as to obtain the time slot recovery plan corresponding to the preset multi-node fault condition.
[0119] The determination unit is specifically used to use the order of recovery stages from front to back as the traversal order in the stage recovery plan corresponding to the preset multi-node fault situation; wherein the traversal order is used to characterize the sending priority of the data block sent in each stage in each recovery stage, and traverse the stage recovery plan based on the traversal order, and determine at least one time slot sending data block, at least one time slot sending node and at least one time slot receiving node corresponding to each time slot corresponding to the preset multi-node fault situation according to the preset data sending restriction rules and / or preset data sending priority rules, and obtain at least one time slot data transmission path corresponding to each time slot, so as to obtain the time slot recovery plan corresponding to the preset multi-node fault situation.
[0120] The determination unit is specifically used to traverse the stage recovery plan based on the traversal order, determine at least one time slot sending data block, at least one time slot sending node and at least one time slot receiving node corresponding to the target time slot according to the preset data sending restriction rule, and obtain at least one time slot data transmission path of the target time slot; wherein, if the time slot sending node of the target time slot is the first stage sending node of the target recovery stage, the time slot sending node of the target time slot does not receive the stage sending data block of the target recovery stage sent by the second stage sending node; the second stage sending node is any stage sending node in the target recovery stage except the first stage sending node, so as to obtain the time slot recovery plan corresponding to the preset multi-node failure situation.
[0121] The determination unit is specifically used to determine the sending data priority and / or receiving data priority corresponding to each node in the cluster based on the preset data sending priority rule, traverse the stage recovery plan based on the traversal order, and determine at least one time slot sending data block, at least one time slot sending node and at least one time slot receiving node corresponding to each time slot corresponding to the preset multi-node failure situation according to the sending data priority and / or receiving data priority corresponding to each node in the cluster, and obtain at least one data transmission path corresponding to each time slot, so as to obtain a time slot recovery plan corresponding to the preset multi-node failure situation.
[0122] The determination unit is specifically used to determine the receiving data priority of the recovery node in the cluster as a first level, and determine the receiving data priority of the nodes in the cluster other than the recovery node as a second level, wherein the first level is higher than the second level; and / or determine the receiving data priority of the nodes in the cluster whose performance is greater than or equal to a preset maximum performance threshold as a first level, and determine the receiving data priority of the nodes in the cluster whose performance is less than the preset maximum performance threshold as a second level, wherein the first level is higher than the second level; and / or determine the sending data priority of the nodes in the cluster whose performance is less than or equal to a preset minimum performance threshold as a first level, and determine the sending data priority of the nodes in the cluster whose performance is greater than the preset minimum performance threshold as a second level, wherein the first level is higher than the second level.
[0123] The execution unit is specifically configured to deploy the target time slot recovery scheme to each node of the cluster so that each node executes the target time slot recovery scheme.
[0124] In this embodiment, each unit in the data recovery device based on erasure code performs the above Figure 2 The operation of the data recovery device based on erasure codes in the illustrated embodiment will not be described in detail here.
[0125] See below Fig.11 Another embodiment of the multi-fault data recovery device 1100 based on erasure code in the embodiment of the present application includes:
[0126] CPU 1101, memory 1105, input / output interface 1104, wired or wireless network interface 1103 and power supply 1102;
[0127] The memory 1105 is a temporary storage memory or a permanent storage memory;
[0128] The CPU 1101 is configured to communicate with the memory 1105 and execute the instructions in the memory 1105 to perform the aforementioned Figure 2 The method in the illustrated embodiment.
[0129] The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium includes instructions, when the instructions are executed on a computer, the computer executes the aforementioned Figure 2 The method in the illustrated embodiment.
[0130] The present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the aforementioned Figure 2 The method in the illustrated embodiment.
[0131] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0132] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0133] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0134] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0135] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0136] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A multi-fault data recovery method based on erasure codes, It is characterized in that include: Based on the preset dependency recovery order of the preset erasure code type, as well as the preset data sending restriction rules and / or the preset data sending priority rules, at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node failure condition is determined to obtain the time slot recovery scheme corresponding to each preset multi-node failure condition; wherein the preset multi-node failure condition is used to characterize the failure conditions of various data blocks to be recovered of multiple nodes appearing in the cluster; the preset dependency recovery order is the recovery order of the dependency on the recovery of at least one data block to be recovered; the time slot data transmission path is used to characterize the path by which the time slot sending node corresponding to the time slot sends the corresponding time slot sending data block to the corresponding time slot receiving node; Obtaining a preset time slot recovery solution set based on the time slot recovery solution corresponding to each preset node failure condition; Determining a target time slot recovery scheme corresponding to the current multi-node failure situation in the preset time slot recovery scheme set; Execute the target time slot recovery scheme, wherein the target time slot recovery scheme is used to: in each target time slot, according to at least one time slot data transmission path corresponding to the target time slot, at least one target time slot sending node sends the corresponding at least one target time slot sending data block to the corresponding at least one target time slot receiving node.
2. The method according to claim 1, It is characterized in that The method of determining at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node failure situation based on the preset dependency recovery order of the preset erasure code type, and the preset data transmission restriction rule and / or the preset data transmission priority rule, so as to obtain the time slot recovery scheme corresponding to each preset multi-node failure situation, includes: For each of the preset multi-node failure conditions, based on the preset dependent recovery order, at least one stage data transmission path corresponding to each recovery stage corresponding to the preset multi-node failure condition is determined to obtain a stage recovery solution corresponding to the preset multi-node failure condition; wherein the stage data transmission path is used to represent a path for a stage sending node corresponding to the recovery stage to send a stage sending data block corresponding to the data block to be recovered to a stage receiving node to recover the data block to be recovered in the recovery stage; Based on the stage recovery plan corresponding to the preset multi-node fault situation, as well as the preset data sending restriction rules and / or the preset data sending priority rules, determine at least one time slot sending data block, at least one time slot sending node and at least one time slot receiving node corresponding to each time slot corresponding to the preset multi-node fault situation, and obtain at least one time slot data transmission path corresponding to each time slot, so as to obtain the time slot recovery plan corresponding to the preset multi-node fault situation.
3. The method according to claim 2, It is characterized in that The phase recovery scheme corresponding to the preset multi-node fault situation, the preset data transmission restriction rule and / or the preset data transmission priority rule are based on determining at least one time slot transmission data block, at least one time slot transmission node and at least one time slot receiving node corresponding to each time slot corresponding to the preset multi-node fault situation, and obtaining at least one time slot data transmission path corresponding to each time slot, so as to obtain the time slot recovery scheme corresponding to the preset multi-node fault situation, including: In the stage recovery scheme corresponding to the preset multi-node failure situation, the order of the recovery stages from front to back is used as the traversal order; wherein the traversal order is used to characterize the sending priority of the data blocks sent in each stage of each recovery stage; Based on the traversal order, traverse the stage recovery plan, and determine at least one time slot sending data block, at least one time slot sending node and at least one time slot receiving node corresponding to each time slot corresponding to the preset multi-node failure situation in accordance with the preset data sending restriction rules and / or the preset data sending priority rules, and obtain at least one time slot data transmission path corresponding to each time slot, so as to obtain the time slot recovery plan corresponding to the preset multi-node failure situation.
4. The method according to claim 3, It is characterized in that The traversing the stage recovery scheme based on the traversal order, determining at least one time slot sending data block, at least one time slot sending node, and at least one time slot receiving node corresponding to each time slot corresponding to the preset multi-node failure situation according to the preset data sending restriction rule and / or the preset data sending priority rule, and obtaining at least one time slot data transmission path corresponding to each time slot, so as to obtain the time slot recovery scheme corresponding to the preset multi-node failure situation, includes: The stage recovery scheme is traversed based on the traversal order, and at least one time slot sending data block, at least one time slot sending node and at least one time slot receiving node corresponding to the target time slot are determined according to the preset data sending restriction rule, so as to obtain at least one time slot data transmission path of the target time slot; wherein, if the time slot sending node of the target time slot is the first stage sending node of the target recovery stage, the time slot sending node of the target time slot does not receive the stage sending data block of the target recovery stage sent by the second stage sending node; the second stage sending node is any stage sending node in the target recovery stage except the first stage sending node, so as to obtain the time slot recovery scheme corresponding to the preset multi-node failure situation.
5. The method according to claim 3, It is characterized in that The traversing the stage recovery scheme based on the traversal order, determining at least one time slot sending data block, at least one time slot sending node, and at least one time slot receiving node corresponding to each time slot corresponding to the preset multi-node failure situation according to the preset data sending restriction rule and / or the preset data sending priority rule, and obtaining at least one time slot data transmission path corresponding to each time slot, so as to obtain the time slot recovery scheme corresponding to the preset multi-node failure situation, includes: Determine the sending data priority and / or receiving data priority corresponding to each node in the cluster based on the preset data sending priority rule; Based on the traversal order, traverse the stage recovery plan, and determine at least one time slot sending data block, at least one time slot sending node and at least one time slot receiving node corresponding to each time slot corresponding to the preset multi-node failure situation according to the sending data priority and / or receiving data priority corresponding to each node in the cluster, and obtain at least one data transmission path corresponding to each time slot to obtain a time slot recovery plan corresponding to the preset multi-node failure situation.
6. The method according to claim 5, It is characterized in that The determining, based on the preset data sending priority rule, the sending data priority and / or the receiving data priority corresponding to each node in the cluster includes: Determine the priority of receiving data of the recovery node in the cluster as a first level, and determine the priority of receiving data of nodes in the cluster other than the recovery node as a second level, wherein the first level is higher than the second level; and / or Determine the priority of receiving data of nodes in the cluster whose performance is greater than or equal to a preset maximum performance threshold as a first level, and determine the priority of receiving data of nodes in the cluster whose performance is less than the preset maximum performance threshold as a second level, wherein the first level is higher than the second level; and / or The data transmission priority of the nodes in the cluster whose performance is less than or equal to the preset minimum performance threshold is determined as the first level, and the data transmission priority of the nodes in the cluster whose performance is greater than the preset minimum performance threshold is determined as the second level, wherein the first level is higher than the second level.
7. The method according to claim 1, It is characterized in that The executing the target time slot recovery scheme includes: The target time slot recovery scheme is deployed to each node of the cluster so that each of the nodes executes the target time slot recovery scheme.
8. A multi-fault data recovery device based on erasure code, It is characterized in that include: A determination unit, configured to determine at least one time slot data transmission path corresponding to each time slot corresponding to each preset multi-node failure condition based on a preset dependency recovery order of a preset erasure code type, as well as preset data transmission restriction rules and / or preset data transmission priority rules, so as to obtain a time slot recovery scheme corresponding to each preset multi-node failure condition; wherein the preset multi-node failure condition is used to characterize the failure conditions of various data blocks to be recovered of multiple nodes in the cluster; the preset dependency recovery order is the recovery order of the dependency on recovering at least one data block to be recovered; the time slot data transmission path is used to characterize the path by which the time slot sending node corresponding to the time slot sends the corresponding time slot sending data block to the corresponding time slot receiving node; An obtaining unit, configured to obtain a set of preset time slot recovery schemes based on the time slot recovery scheme corresponding to each preset node failure condition; The determining unit is further configured to determine a target time slot recovery scheme corresponding to the current multi-node failure situation in the preset time slot recovery scheme set; An execution unit is used to execute the target time slot recovery scheme, wherein the target time slot recovery scheme is used to: in each target time slot, according to at least one time slot data transmission path corresponding to the target time slot, at least one target time slot sending node sends the corresponding at least one target time slot sending data block to the corresponding at least one target time slot receiving node.
9. A multi-fault data recovery device based on erasure code, It is characterized in that include: CPU and memory; The memory is a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium comprises instructions, and when the instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method for repairing and optimizing erasure code storage single node failure
CN113541870A
Data recovery method and device in erasure code storage system
CN117349082A
