## 3 Methodology
### Path Selection Strategy Based on Improved Dijkstra and Load Balancing  
Firstly, improve the minimum communication cost algorithm to record link information during node search. Defining the set of all nodes in the network as \(V\), labeled nodes as \(S\), and unlabeled nodes as \(U\) satisfies the following criteria:  
\[V=S+U, \tag{15}\]  
The initial node is denoted as \(s\), and its communication cost is initialized to 0. The communication cost of the remaining nodes is infinite. Add \(s\) to \(S\). Compare the path weights of \(s\) with all its adjacent nodes, select the node with the smallest weight as the starting node for the next hop, and add it to \(S\). Traverse the communication cost of all neighboring nodes \(j\) of the current node. If the communication cost of a neighboring node \(k\) is greater than the sum of the communication cost of the current node and the communication cost from the current node to \(j\), update the communication cost of the neighboring node and add \(k\) to \(S\). Repeat this step until the endpoint is found or \(U\) is empty. Specifically,  
\[w_{sk}=\min(w_{sj}), \tag{16}\]  
The communication cost between the starting node \(s\) and the newly added node \(j\) is recorded as  
\[w_{sj}=\min(w_{sj},w_{sk}+w_{kj}), \tag{17}\]The minimum communication cost matrix for updating the starting node is  
\[W_{s,i}^{*}=W_{s,i}^{*}+W_{j,i}^{*}, \tag{18}\]  
Define the shortest path vector \(\overrightarrow{p}\) and record the shortest path from the update starting node to the current one  
\[\overrightarrow{p}_{s,i}=\overrightarrow{p}_{s,i}+\overrightarrow{p}_{j,i}, \tag{19}\]  
If the endpoint cannot be found, return to the previous branch node and search for the endpoint from other branches. At this point, the update records the minimum communication cost matrix and the shortest path vector,  
\[W_{s,i}^{*}=W_{s,i}^{*}(past);\overrightarrow{p}_{s,i}=\overrightarrow{p}_{s,i}(past), \tag{20}\]  
Secondly, a load-balancing algorithm is proposed to solve the problem of excessive load on some links in the network. The ratio of the data volume \(M_{data}\) transmitted by link e to the link bandwidth \(B_{e}\) is defined as the load \(Z_{e}\) of link \(e\). Then, we used a variance of \(Z_{e}\) as a variable to measure the load situation:  
\[Z_{variance}=\frac{\sum\limits_{e\in E}\bigl{(}Z_{e}-Z_{average}\bigr{)}^{2}} {n}, \tag{21}\]  
Among them, \(Z_{average}\) is the average load, and \(n\) is the number of nodes. When \(Z_{variance}\) exceeds the load threshold of \(Z_{\max}\), it indicates that the network needs to perform load-balancing operations. Therefore,  
\[Z_{e}=\min(Z_{e},Z_{\max}), \tag{22}\]  
At this point, load balancing is achieved by reducing the number of links connected at both ends of the high load link. Finally, in order to achieve the optimal recovery method for multi-node failed networks, a link selection strategy is proposed by comprehensively considering the minimum communication cost algorithm and load-balancing algorithm. For topology \(G_{damage}\), the objective function is set to the communication cost \(W\) and load-balancing degree \(Z_{variance}\) of the network, and a weight coefficient \(k\) is introduced to achieve a balance between communication cost and load-balancing degree. The final recovery method requires the minimum value of the objective function, at which point the restored network topology is also load balanced with low communication costs,  
\[\min\bigl{(}W\bigl{(}G_{damage}\bigr{)}+k*Z_{variance}\bigl{(}G_{damage}\bigr{)} \bigr{)}, \tag{23}\]  
When solving the function, if \(G_{damage}\) is discrete and finite, the enumeration method can be used to obtain the optimal solution. If \(G_{damage}\) is continuous, basic optimization methods such as gradient descent can be used to obtain the optimal solution. However, if the initial value is not selected well, it is easy to become stuck in local optimal solutions.