Repair tree construction method based on simulated annealing algorithm and data repair method
By constructing a repair tree using the simulated annealing algorithm, the problems of long construction time and poor reliability in existing repair tree technologies are solved, realizing an efficient data recovery method. By utilizing bandwidth resources to construct a near-optimal repair tree, the repair efficiency of distributed storage systems is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CENT SOUTH UNIV
- Filing Date
- 2023-03-02
- Publication Date
- 2026-06-09
AI Technical Summary
Existing repair tree construction methods suffer from high encoding and decoding time, complex algorithms, and poor reliability in distributed storage systems. Especially in real-world network environments, traditional methods struggle to effectively utilize node bandwidth resources and construct the optimal repair tree.
A simulated annealing algorithm is used to construct a repair tree. By obtaining the adjacency matrix of the number of nodes and the transmission bandwidth, the parameters of the simulated annealing algorithm are set, a Prufer sequence is randomly generated, and the bottleneck bandwidth is optimized by the Monte Carlo criterion and the Markov chain process to construct an approximately optimal repair tree.
It achieves a repair tree construction with fast encoding and decoding speed, flexible algorithm, good search effect and high reliability, which can efficiently utilize node bandwidth resources in real network environment and reduce transmission traffic and computing overhead.
Smart Images

Figure CN116578439B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer technology, specifically relating to a method for constructing a repair tree and a data repair method based on a simulated annealing algorithm. Background Technology
[0002] With the rapid development of computer technology and the increasing popularity of internet applications, the amount of network information has exploded, and the data volume of large-scale distributed data systems has generally reached the petabyte (PB) level. Considering cost factors, components of distributed storage systems often use commercial architectures, making node failures very common. For example, in a Facebook cluster with a storage capacity of hundreds of petabytes, there are more than 50 instances of machine downtime exceeding 15 minutes per day. Therefore, ensuring the reliability and availability of distributed storage systems is crucial. To improve reliability, systems often add redundancy to ensure that data can be repaired in the event of corruption.
[0003] The traditional method is to use mirroring, which involves backing up the original data multiple times. When data fails, data blocks are simply pulled from the backups for repair. While this approach is simple and efficient, it requires storing several times the size of the original file, resulting in enormous storage overhead. Moreover, with the ever-increasing volume of data, the cost of mirroring is becoming increasingly unbearable.
[0004] To address this, researchers have proposed using erasure codes to encode data, allowing for data recovery according to certain rules when data is corrupted. Traditional erasure codes divide the original data into k blocks, multiplying each block by an n*m generator matrix to obtain n encoded blocks, which are stored on different hosts. Compared to the original file, erasure codes generate nk redundant blocks. Classical erasure codes can provide the system with the ability to tolerate the corruption of any nk blocks. When a data block becomes unavailable, data needs to be downloaded from any of the other k surviving nodes and repaired through decoding. Erasure codes that satisfy this property are also called Maximum Distance Separable (MDS) codes.
[0005] Erasure coding can significantly reduce data storage overhead, but its encoding and decoding operations require substantial computational resources. Furthermore, most erasure coding methods often require transmitting several times the amount of data compared to the corrupted data to complete the repair, greatly increasing network traffic and potentially causing congestion. Therefore, erasure coding takes significantly longer to repair data compared to mirroring. Thus, erasure coding sacrifices some repair efficiency to improve storage efficiency; consequently, improving the repair speed of erasure coding has become a hot research topic.
[0006] To reduce transmission traffic during the repair process, researchers have proposed Regenerating Code. Regenerating Code involves a trade-off between node storage capacity and repair bandwidth, corresponding to two optimal families of regenerating codes: Minimum Bandwidth Regenerating (MBR) and Minimum Storage Regenerating (MSR). Minimum Bandwidth Regenerating Code downloads data packets from the remaining n-1 nodes, totaling the amount of lost data, to repair the failed node, minimizing the amount of data transmitted. However, this scheme still incurs significant computational and transmission overhead.
[0007] In complex network environments, data from each node is generally not directly transmitted to auxiliary nodes for repair. This is because auxiliary nodes have limited capacity to handle simultaneous download and computation tasks; excessive data transmission from a single node can cause congestion. Furthermore, some nodes have very low bandwidth directly to auxiliary nodes, while relaying data can achieve higher transmission rates. Typically, a repair tree with high transmission rates from each data node to the auxiliary node needs to be constructed through carefully planned transmission paths. However, according to Cayley's theorem, in a complete graph with n nodes, there are n... n-2 Given a set of distinct spanning trees, it is clearly impractical to traverse all of them and find the optimal one.
[0008] Therefore, researchers have proposed a parallel repair algorithm (PPR) based on the divide-and-conquer approach. In this scheme, for each round, the nodes that need to transmit data are divided into several pairs, and then data is transmitted within each pair until all data has been transmitted to the same new node. This transmission method can be represented by a binary repair tree. While this algorithm alleviates congestion to some extent, it clearly does not fully utilize the bandwidth resources of each node and does not consider the heterogeneity of transmission bandwidth between nodes in a real-world network environment.
[0009] Furthermore, researchers have proposed a pipelined acceleration algorithm that divides the data packets to be transmitted into many fragments and transmits these fragments in a pipelined manner. When the number of fragments is large enough, the transmission speed of a link will approach the lowest bandwidth of that link. A repair tree can be viewed as the parallel operation of several links. Therefore, the repair speed of a repair tree depends on the minimum bandwidth represented by all its edges. Finding the optimal repair tree is actually finding the maximum bottleneck tree, which can be solved using the method of solving the minimum spanning tree. In an ideal situation without any constraints, a multinomial-time algorithm such as Prim's algorithm or Kruskal's algorithm can be used to find the maximum bottleneck tree. However, in real-world applications, the number of tasks a server can handle simultaneously is limited, meaning the number of other nodes a node can connect to during the repair process is limited. The number of other nodes a node can connect to is called its degree, meaning that nodes in a real network environment have a degree constraint. With this constraint, finding the maximum bottleneck tree becomes an NP-hard problem, with no algorithm available in polynomial time complexity. Traversing the entire search space has exponential complexity, which is unacceptable in real-world scenarios.
[0010] In summary, existing methods for constructing repair trees, and methods for data recovery using constructed repair trees, all suffer from problems such as high encoding and decoding time, complex algorithms, and poor reliability. Summary of the Invention
[0011] One of the objectives of this invention is to provide a repair tree construction method based on simulated annealing algorithm that features fast encoding and decoding speed, flexible algorithm, good search effect and high reliability.
[0012] The second objective of this invention is to provide a data recovery method that includes the repair tree construction method based on the simulated annealing algorithm.
[0013] The repair tree construction method based on simulated annealing algorithm provided by this invention includes the following steps:
[0014] S1. Obtain the number of nodes and the adjacency matrix representing the transmission bandwidth between each node;
[0015] S2. Set the initial and control parameters for the simulated annealing algorithm;
[0016] S3. Randomly generate a Prufer sequence that meets the specified requirements as the initial sequence;
[0017] S4. Perform simulated annealing algorithm on the initial sequence generated in step S3, and record the Prufer sequence corresponding to the maximum bottleneck bandwidth obtained during the algorithm process as the current solution;
[0018] S5. Perturb the current solution to obtain a valid new solution;
[0019] S6. Calculate the bottleneck bandwidth of the new solution obtained in step S5 and the corresponding current solution, and decide whether to accept the new solution according to the Monte Carlo criterion;
[0020] S7. Repeat steps S5 to S6 until the set conditions are met to obtain the Prufer sequence corresponding to the maximum bottleneck bandwidth.
[0021] S8. Decode the Prufer sequence obtained in step S7 to obtain an unrooted tree, and use the auxiliary nodes in the unrooted tree as the root nodes to obtain the final repair tree.
[0022] Step S2 specifically includes the following steps:
[0023] The parameters set include the maximum degree d, the initial temperature T0, the temperature decay coefficient α, the correction coefficient k, the termination temperature ET, and the Markov chain length L; at the same time, the current iteration number is set to 0, and the current temperature T is set as the initial temperature T0.
[0024] Step S3 specifically includes the following steps:
[0025] A random Prufer sequence is generated as the initial sequence. The length of the generated Prufer sequence is n-2, where n is the sum of points participating in the repair. The repair tree corresponding to the generated Prufer sequence satisfies the set degree constraint.
[0026] Step S4 specifically includes the following steps:
[0027] When calculating the bottleneck bandwidth of the Prufer sequence, a decoding operation is performed on the Prufer sequence to obtain the spanning tree represented by the Prufer sequence; the decoding operation includes:
[0028] A. The Prufer sequence is represented as a = [a1, a2, ..., a...]. n-2 Create a new set G = [1, 2, ..., n];
[0029] B. Obtain the smallest number from set G that has not appeared in sequence a, and connect the node represented by the smallest number to the node represented by the first item in the Prufer sequence with an edge. Then remove the smallest number from set G and remove the first item from the Prufer sequence.
[0030] C. Repeat step B a total of n-2 times. Finally, connect the nodes represented by the two remaining numbers in set G with an edge to complete the decoding operation.
[0031] Step S5 specifically includes the following steps:
[0032] Record the number of times each node appears;
[0033] Randomly change the number at one position in the current solution and then make a judgment:
[0034] If the new solution obtained does not satisfy the set degree constraint rules, then cancel the current change and randomly change the number of one position of the current solution again until the new solution obtained satisfies the set degree constraint rules.
[0035] Step S6 specifically includes the following steps:
[0036] Calculate the bottleneck bandwidth of the new solution and the bottleneck bandwidth of the old solution, and decide whether to accept the new solution based on the Monte Carlo criterion, thereby escaping local optima and moving towards global optima:
[0037] If the bottleneck bandwidth of the new solution is better, then the new solution is accepted directly.
[0038] If the bottleneck bandwidth of the new solution is worse, then the new solution will be accepted with a set probability.
[0039] The process of accepting new solutions with a predetermined probability includes the following steps:
[0040] Make a judgment:
[0041] like If the new solution is accepted, it is not accepted; otherwise, it is not accepted; where random(0,1) is a randomly generated decimal between 0 and 1; f_new is the bottleneck bandwidth of the new solution; f_old is the bottleneck bandwidth of the old solution; T is the current temperature; and k is the correction coefficient.
[0042] Step S7 specifically includes the following steps:
[0043] a. Increment the current iteration count by 1 and perform a check:
[0044] If the set Markov chain length is reached, the current iteration count is reset to 0, and subsequent steps are performed.
[0045] If the set Markov chain length is not reached, return to step S5 and proceed to the next iteration;
[0046] b. Multiply the current temperature by the temperature decay coefficient to obtain the updated current temperature, and then perform a judgment:
[0047] If the current temperature is lower than the termination temperature, the iteration ends;
[0048] If the current temperature is not lower than the termination temperature, return to step S5 and proceed to the next iteration.
[0049] The decoding described in step S8 specifically includes the following steps:
[0050] 1) The final Prufer sequence is represented as b = [b1, b2, ..., b...]. n-2 Create a new set g = [1, 2, ..., n];
[0051] 2). Obtain the smallest number from set g that has not appeared in sequence b, connect the node represented by the smallest number with the node represented by the first item in the Prufer sequence, then remove the smallest number from set b and remove the first item from the Prufer sequence.
[0052] 3) Repeat step 2) a total of n-2 times. Finally, connect the nodes represented by the two remaining numbers in set g with an edge to obtain the spanning tree represented by the Prufer sequence. The decoding operation is now complete.
[0053] The present invention also provides a data recovery method including the aforementioned repair tree construction method based on simulated annealing algorithm, specifically including the following steps:
[0054] (1). Obtain n-1 surviving nodes to be transmitted and 1 auxiliary node to be recovered;
[0055] (2). Based on the nodes obtained in step (1), the repair tree construction method based on the simulated annealing algorithm is used to construct an approximately optimal repair tree;
[0056] (3). Based on the approximate optimal repair tree obtained in step (2), calculate the data transmission path to obtain the data transmission path;
[0057] (4). Based on the data transmission path obtained in step (3), the backup data is transmitted to the auxiliary node to be restored, and the data restoration is completed through calculation.
[0058] The repair tree construction method and data repair method based on simulated annealing algorithm provided by this invention are designed with a heuristic construction method for the repair tree. Based on the idea of random optimization, a Markov process is performed for each temperature to ensure a higher probability of finding the optimal solution. The Monte Carlo criterion is used to ensure that it will gradually approach the optimal solution and will escape local optima. Therefore, the encoding and decoding speed of this invention is fast, the algorithm is flexible, the search effect is good, and the reliability is high. Attached Figure Description
[0059] Figure 1 This is a schematic diagram of the method flow for constructing the present invention.
[0060] Figure 2This is a schematic diagram illustrating the process of converting a tree into a Prufer sequence in the construction method of this invention.
[0061] Figure 3 This is a schematic diagram illustrating the process of restoring the Prufer sequence to a tree in the construction method of this invention.
[0062] Figure 4 This is a schematic diagram illustrating bottleneck bandwidth calculation in an embodiment of the construction method of the present invention.
[0063] Figure 5 This is a schematic diagram of the repair tree in an embodiment of the construction method of the present invention.
[0064] Figure 6 This is a schematic diagram of the method flow for the repair method of the present invention. Detailed Implementation
[0065] like Figure 1 The diagram shown illustrates the method flow of the construction method of this invention: The repair tree construction method based on simulated annealing algorithm provided by this invention includes the following steps:
[0066] S1. Obtain the number of nodes and the adjacency matrix representing the transmission bandwidth between each node;
[0067] S2. Set the initial and control parameters of the simulated annealing algorithm; specifically, this includes the following steps:
[0068] The parameters set include the maximum degree d, the initial temperature T0, the temperature decay coefficient α, the correction coefficient k, the termination temperature ET, and the Markov chain length L; at the same time, the current iteration number is set to 0, and the current temperature T is set to the initial temperature T0.
[0069] S3. Randomly generate a Prufer sequence that meets the specified requirements as the initial sequence; specifically, this includes the following steps:
[0070] A Prufer sequence is randomly generated as the initial sequence. The length of the generated Prufer sequence is n-2, where n is the total number of points involved in the repair. The repair tree corresponding to the generated Prufer sequence satisfies the set degree constraint.
[0071] In practice, an array or hash table is used to record the number of times each node appears; an array of length n-2 is created, and the n-2 positions of the array are traversed to generate a random integer i in the range [1, n]. If the number i appears at a frequency not less than the maximum value d of the set degree, the array is regenerated; otherwise, the current position of the array is assigned the value i, and the number of occurrences of the number is incremented by one. The array obtained after traversal is the required randomly generated valid Prufer sequence. This application uses an array to record the number of times each node appears.
[0072] S4. Perform simulated annealing on the initial sequence generated in step S3, and record the Prufer sequence corresponding to the maximum bottleneck bandwidth obtained during the algorithm as the current solution; specifically, this includes the following steps:
[0073] When calculating the bottleneck bandwidth of the Prufer sequence, a decoding operation is performed on the Prufer sequence to obtain the spanning tree represented by the Prufer sequence; the decoding operation includes:
[0074] A. The Prufer sequence is represented as a = [a1, a2, ..., a...]. n-2 Create a new set G = [1, 2, ..., n];
[0075] B. Obtain the smallest number from set G that has not appeared in sequence a, and connect the node represented by the smallest number to the node represented by the first item in the Prufer sequence with an edge. Then remove the smallest number from set G and remove the first item from the Prufer sequence.
[0076] C. Repeat step B a total of n-2 times, and finally connect the nodes represented by the two remaining numbers in set G with an edge to complete the decoding operation;
[0077] S5. Perturb the current solution to obtain a valid new solution; specifically, this includes the following steps:
[0078] Record the number of times each node appears;
[0079] Randomly change the number at one position in the current solution and then make a judgment:
[0080] If the new solution obtained does not satisfy the set degree constraint rules, then cancel the current change and randomly change the number of one position of the current solution again until the new solution obtained satisfies the set degree constraint rules.
[0081] In practical implementation, if the degree limit is set so that the degree of each node does not exceed d, then the number of CNT arrays (using the array CNT to record the number of occurrences of each node) of Prufer sequences that satisfy the degree limit should meet the following conditions:
[0082] max(cnt[i])+1≤d
[0083] Where 1≤i≤n; the advantage of this perturbation method is that, theoretically, any feasible solution can be searched, which also gives a probability of finding the optimal solution to the problem;
[0084] S6. Calculate the bottleneck bandwidth of the new solution obtained in step S5 and the corresponding current solution, and decide whether to accept the new solution based on the Monte Carlo criterion; specifically, this includes the following steps:
[0085] Calculate the bottleneck bandwidth of the new solution and the bottleneck bandwidth of the old solution, and decide whether to accept the new solution based on the Monte Carlo criterion, thereby escaping local optima and moving towards global optima:
[0086] If the bottleneck bandwidth of the new solution is better, then the new solution is accepted directly.
[0087] If the bottleneck bandwidth of the new solution is worse, then the new solution is accepted with a set probability; specifically, the following steps are included:
[0088] Make a judgment:
[0089] like If the new solution is accepted, then it is accepted; otherwise, it is rejected.
[0090] Where random(0,1) is a randomly generated decimal between 0 and 1; f_new is the bottleneck bandwidth of the new solution; f_old is the bottleneck bandwidth of the old solution; T is the current temperature; and k is the correction coefficient.
[0091] This is done to simulate the annealing process of solids in physics. Initially, the temperature is high, the molecules in the solid move violently, and the random search results are high. As the annealing process proceeds, the temperature gradually decreases, the state inside the solid gradually stabilizes, and the search process gradually moves toward the optimal solution.
[0092] S7. Repeat steps S5 to S6 until the set conditions are met to obtain the Prufer sequence corresponding to the maximum bottleneck bandwidth; specifically, the following steps are included:
[0093] a. Increment the current iteration count by 1 and perform a check:
[0094] If the set Markov chain length is reached, the current iteration count is reset to 0, and subsequent steps are performed.
[0095] If the set Markov chain length is not reached, return to step S5 and proceed to the next iteration;
[0096] b. Multiply the current temperature by the temperature decay coefficient to obtain the updated current temperature, and then perform a judgment:
[0097] If the current temperature is lower than the termination temperature, the iteration ends;
[0098] If the current temperature is not lower than the termination temperature, return to step S5 and proceed to the next iteration;
[0099] S8. Decode the Prufer sequence obtained in step S7 to obtain an unrooted tree, and use the auxiliary nodes in the unrooted tree as the root nodes to obtain the final repair tree; the decoding specifically includes the following steps:
[0100] 1) The final Prufer sequence is represented as b = [b1, b2, ..., b...]. n-2 Create a new set g = [1, 2, ..., n];
[0101] 2). Obtain the smallest number from set g that has not appeared in sequence b, connect the node represented by the smallest number with the node represented by the first item in the Prufer sequence, then remove the smallest number from set b and remove the first item from the Prufer sequence.
[0102] 3) Repeat step 2) a total of n-2 times. Finally, connect the nodes represented by the two remaining numbers in set g with an edge to obtain the spanning tree represented by the Prufer sequence. The decoding operation is now complete.
[0103] A repair tree is a spanning tree with n nodes. An auxiliary node is chosen as the root node to receive data from other nodes, process it, and restore the original data. The remaining nodes represent surviving nodes that need to transmit data. Each edge in a repair tree has a weight representing the bandwidth between two nodes. Each transmission link from a leaf node to the root node uses a pipelined acceleration algorithm to transmit data. Its transmission speed is limited by the minimum bandwidth on the link; therefore, the repair speed of the repair tree is limited by its minimum edge size, known as the bottleneck bandwidth. In real-world networks, each node can only process a limited number of tasks in parallel. Therefore, it is assumed that the maximum number of other nodes connected to each node in the repair tree, i.e., the degree, is d. Any tree with n nodes can also represent a repair tree, representing the data transmission path for each node.
[0104] In practice, a repair tree with n nodes can be represented by a Prufer sequence of length n-2, with a one-to-one correspondence between them. The method to transform a tree with n nodes into a Prufer sequence is as follows: iteratively delete nodes until only two nodes remain in the graph. In each iteration, find the node with the smallest index among all leaf nodes (nodes with degree 1), add its adjacent nodes to the Prufer sequence, and delete it and its connected edges. The total number of iterations and the number of times a node appears in the Prufer sequence equals its degree in the tree minus one.
[0105] like Figure 2 The diagram shows the process of transforming a tree into the Prufer sequence [3,3,5]. It is easy to see that the degree of each node is [1,1,3,1,2], which corresponds to the number of times each node appears in the Prufer sequence plus one. Therefore, the Prufer sequence is very suitable as a representation of a spanning tree with degree constraints, and it is also suitable as a representation of the state of a solid in the simulated annealing algorithm.
[0106] like Figure 3As shown, it is a process diagram for restoring the Prufer sequence [3, 3, 5] to a tree. The minimum weight of the edges connected during the decoding process is the bottleneck bandwidth.
[0107] The construction method of the present invention will be further described below in conjunction with an embodiment:
[0108] Given 5 nodes (4 surviving nodes that need to transmit data and 1 auxiliary node that receives data), and the bandwidth matrix is The generation process of an approximately optimal repair tree:
[0109] (a) Set parameters n = 5, d = 2, T = 1000, α = 0.95, k = 10, ET = 0.001, L = 50, g = 0. Create an array cnt of length n to represent the occurrence times of each node, initially 0. Then create an array a of length n - 2 to represent the Prufer sequence. Traverse each position of this sequence. For position i (1 ≤ i ≤ n - 2), randomly obtain a number x between 1 and n. If cnt[x] + 1 < d, then let a[i] = x and cnt[x] = cnt[x] + 1; otherwise, regenerate x. In this way, an initial sequence can be obtained, for example, a = [4, 3, 1]. Record the currently found optimal solution m = a and the maximum bottleneck bandwidth fm = 0, and then start to execute the simulated annealing algorithm.
[0110] (b) Perturb the current solution a = [4, 3, 1] to generate a new solution. Randomly select a position, for example, select position i = 3, and then generate a random number between 1 and n, for example, x = 2. At this time, cnt[x] = 0, so cnt[x] + 1 < d = 2 satisfies the degree limit. Therefore, let b = a and b[3] = 2, obtaining the new solution b = [4, 3, 2].
[0111] (c) Calculate the tangled bottleneck bandwidth through the decoding operation, as Figure 4 shown, fa = 15, fb = 20. Because fb > fa, according to the Monte Carlo criterion, accept the new solution, that is, let a = b, and update the cnt array to [0, 1, 1, 1, 0]. And because fb > fm, update m = b and fm = fb = 20. Repeat the operation in the next loop. Assume that b = [1, 3, 2] is obtained, and calculate the bottleneck bandwidth fa = 20, fb = 15. Because fb <= fa, according to the Monte Carlo rule, it is necessary to accept the new solution with a probability of Accept the new solution;
[0112] (d) Let the iteration number g = g + 1. If the iteration number g is equal to the Markov chain length L, then reset g = 0 and execute step (e); otherwise, return to step (b);
[0113] (e) Multiply the current temperature by the temperature decay coefficient. If the current temperature is less than the termination temperature, end the algorithm; otherwise, return to step (b).
[0114] (f) Decode the Prufer sequence with the maximum bottleneck bandwidth to obtain an unrooted tree. Take the auxiliary node as the root node to obtain an approximately optimal repair tree.
[0115] Figure 5 An example of the optimized search result of the repair tree constructed by this method is shown. It is not difficult to prove that the repair tree is optimal. This is because the method is based on the simulated annealing algorithm, which is essentially a heuristic solution based on probability optimization. Therefore, the method of this invention can obtain the optimal solution.
[0116] like Figure 6 The diagram shown illustrates the process flow of the repair method of the present invention: The data recovery method provided by the present invention, which includes the repair tree construction method based on the simulated annealing algorithm, specifically includes the following steps:
[0117] (1). Obtain n-1 surviving nodes to be transmitted and 1 auxiliary node to be recovered;
[0118] (2). Based on the nodes obtained in step (1), the repair tree construction method based on the simulated annealing algorithm is used to construct an approximately optimal repair tree;
[0119] (3). Based on the approximate optimal repair tree obtained in step (2), calculate the data transmission path to obtain the data transmission path;
[0120] (4). Based on the data transmission path obtained in step (3), the backup data is transmitted to the auxiliary node to be restored, and the data restoration is completed through calculation.
Claims
1. A method for constructing a repair tree based on the simulated annealing algorithm, comprising the following steps: S1. Obtain the number of nodes and the adjacency matrix representing the transmission bandwidth between each node; S2. Set the initial and control parameters for the simulated annealing algorithm; S3. Randomly generate a Prufer sequence that meets the specified requirements as the initial sequence; S4. Perform simulated annealing algorithm on the initial sequence generated in step S3, and record the Prufer sequence corresponding to the maximum bottleneck bandwidth obtained during the algorithm process as the current solution; S5. Perturb the current solution to obtain a valid new solution; S6. Calculate the bottleneck bandwidth of the new solution obtained in step S5 and the corresponding current solution, and decide whether to accept the new solution according to the Monte Carlo criterion; S7. Repeat steps S5 to S6 until the set conditions are met to obtain the Prufer sequence corresponding to the maximum bottleneck bandwidth. S8. Decode the Prufer sequence obtained in step S7 to obtain an unrooted tree, and use the auxiliary nodes in the unrooted tree as the root nodes to obtain the final repair tree.
2. The repair tree construction method based on simulated annealing algorithm according to claim 1, characterized in that... Step S2 specifically includes the following steps: The parameters set include the maximum degree d, the initial temperature T0, the temperature decay coefficient α, the correction coefficient k, the termination temperature ET, and the Markov chain length L; at the same time, the current iteration number is set to 0, and the current temperature T is set as the initial temperature T0.
3. The repair tree construction method based on simulated annealing algorithm according to claim 2, characterized in that... Step S3 specifically includes the following steps: A random Prufer sequence is generated as the initial sequence. The length of the generated Prufer sequence is n-2, where n is the sum of points participating in the repair. The repair tree corresponding to the generated Prufer sequence satisfies the set degree constraint.
4. The repair tree construction method based on simulated annealing algorithm according to claim 3, characterized in that... Step S4 specifically includes the following steps: When calculating the bottleneck bandwidth of the Prufer sequence, the Prufer sequence is decoded to obtain the spanning tree represented by the Prufer sequence; the decoding operation includes: A. The Prufer sequence is represented as a = [a1, a2, ..., a...]. n-2 Create a new set G = [1, 2, ..., n]; B. Obtain the smallest number from set G that has not appeared in sequence a, and connect the node represented by the smallest number to the node represented by the first item in the Prufer sequence with an edge. Then remove the smallest number from set G and remove the first item from the Prufer sequence. C. Repeat step B a total of n-2 times. Finally, connect the nodes represented by the two remaining numbers in set G with an edge to complete the decoding operation.
5. The repair tree construction method based on simulated annealing algorithm according to claim 4, characterized in that... Step S5 specifically includes the following steps: Record the number of times each node appears; Randomly change the number at one position in the current solution and then make a judgment: If the new solution obtained does not satisfy the set degree constraint rules, then cancel the current change and randomly change the number of one position of the current solution again until the new solution obtained satisfies the set degree constraint rules.
6. The repair tree construction method based on simulated annealing algorithm according to claim 5, characterized in that... Step S6 specifically includes the following steps: Calculate the bottleneck bandwidth of the new solution and the bottleneck bandwidth of the old solution, and decide whether to accept the new solution based on the Monte Carlo criterion, thereby escaping local optima and moving towards global optima: If the bottleneck bandwidth of the new solution is better, then the new solution is accepted directly. If the bottleneck bandwidth of the new solution is worse, then the new solution will be accepted with a set probability.
7. The repair tree construction method based on simulated annealing algorithm according to claim 6, characterized in that... The process of accepting new solutions with a predetermined probability includes the following steps: Make a judgment: like If the new solution is accepted, it is not accepted; otherwise, it is not accepted; where random(0,1) is a randomly generated decimal between 0 and 1; f_new is the bottleneck bandwidth of the new solution; f_old is the bottleneck bandwidth of the old solution; T is the current temperature; and k is the correction coefficient.
8. The repair tree construction method based on simulated annealing algorithm according to claim 7, characterized in that... Step S7 specifically includes the following steps: a. Increment the current iteration count by 1 and perform a check: If the set Markov chain length is reached, the current iteration count is reset to 0, and subsequent steps are performed. If the set Markov chain length is not reached, return to step S5 and proceed to the next iteration; b. Multiply the current temperature by the temperature decay coefficient to obtain the updated current temperature, and then perform a judgment: If the current temperature is lower than the termination temperature, the iteration ends; If the current temperature is not lower than the termination temperature, return to step S5 and proceed to the next iteration.
9. The repair tree construction method based on simulated annealing algorithm according to claim 8, characterized in that... The decoding described in step S8 specifically includes the following steps: 1) The final Prufer sequence is represented as b = [b1, b2, ..., b...]. n-2 Create a new set g = [1, 2, ..., n]; 2). Obtain the smallest number from set g that has not appeared in sequence b, connect the node represented by the smallest number with the node represented by the first item in the Prufer sequence, then remove the smallest number from set b and remove the first item from the Prufer sequence. 3) Repeat step 2) a total of n-2 times. Finally, connect the nodes represented by the two remaining numbers in set g with an edge to obtain the spanning tree represented by the Prufer sequence. The decoding operation is now complete.
10. A data recovery method comprising the repair tree construction method based on the simulated annealing algorithm as described in any one of claims 1 to 9, specifically comprising the following steps: (1). Obtain n-1 surviving nodes to be transmitted and 1 auxiliary node to be recovered; (2). Based on the nodes obtained in step (1), the repair tree construction method based on simulated annealing algorithm as described in any one of claims 1 to 9 is used to construct an approximately optimal repair tree; (3). Based on the approximate optimal repair tree obtained in step (2), calculate the data transmission path to obtain the data transmission path; (4). Based on the data transmission path obtained in step (3), the backup data is transmitted to the auxiliary node to be restored, and the data restoration is completed through calculation.