## 3 Methodology
### Link Quality Prediction Algorithm  
This article proposes a multi-node failure recovery method for air-sea cross-domain communication networks using a combination of minimum communication cost and load balancing. We obtain the communication cost prediction matrix through link quality prediction and select the method with the minimum communication cost to reconstruct the network. To solve the problem of excessive load on certain links in the network, a shortest path algorithm based on minimum communication cost and load balancing is designed. The relationship between minimizing communication costs and balancing link loads enables the entire network to achieve information balance and fast transmission. In the following two subsections, a comprehensive derivation and detailed explanation of the link quality prediction algorithm, as well as the path selection strategy, will be provided.  
Accumulate the original link quality data \(W^{(0)}=\left\{w^{(0)}(1),w^{(0)}(2),\ldots,w^{(0)}(n)\right\}\) to obtain generated data \(W^{(1)}=\left\{w^{(1)}(1),w^{(1)}(2),\ldots,w^{(1)}(n)\right\}\),  
\[w^{(1)}(k)=\sum_{i=1}^{k}w^{(0)}(i),\;k=1,2,\ldots,n, \tag{9}\]  
The average generated sequence is \(z^{(1)}=\left\{z^{(1)}(2),z^{(1)}(3),\ldots,z^{(1)}(n)\right\},\)  
\[z^{(1)}(k)=\frac{1}{2}\Big{[}w^{(1)}(k)+w^{(1)}(k-1)\Big{]},k=2,3,\ldots,n, \tag{10}\]  
Generate a first-order differential equation based on the preprocessed cumulative sequence. The predicted sequence obtained by solving it through matrix method is  
\[\hat{w}^{(1)}(k+1)=\Big{[}w^{(1)}(1)-\frac{\hat{b}}{\hat{d}}\Big{]}e^{-\hat{ a}k}+\frac{\hat{b}}{\hat{d}},k=1,2,\ldots,n-1\] \[u=\begin{bmatrix}a\\ b\end{bmatrix},B=\begin{bmatrix}-z^{(1)}(2)&1\\ -z^{(1)}(3)&1\\ \ldots&\ldots\\ -z^{(1)}(n)&1\end{bmatrix},Y=\begin{bmatrix}w^{(0)}(2)\\ w^{(0)}(3)\\ \ldots\\ w^{(0)}(n)\end{bmatrix}\quad, \tag{11}\] \[\hat{u}=\begin{bmatrix}\hat{a}&\hat{b}\end{bmatrix}^{\mathsf{T}}= \big{(}B^{\mathsf{T}}B\big{)}^{-1}B^{\mathsf{T}}Y\]  
Due to the fixed and invariant time response function structure of the classical gray prediction model [29], this situation results in poor adaptability to changes in the original data. Therefore, optimization algorithms are used to optimize the time response function, making it have variable weighting coefficients. The optimized predicted value is  
\[\hat{w}^{(1)}(k)=\left[w^{(1)}(\beta)-\frac{\hat{b}}{\hat{a}}\right]e^{-\hat{a} (k-\beta)}+\frac{\hat{b}}{\hat{a}},k=2,3,\ldots,n, \tag{12}\]  
where \(w^{(1)}(\beta)\) is the initial condition of the time response function. The optimal values for \(\alpha\) and \(\beta\) are calculated based on the condition that the average absolute percentage error between the predicted value and the actual value is minimized. The objective function for optimization can be derived as  
\[\begin{split}\min_{a,\beta}\frac{1}{n}\sum_{k=1}^{n}\left|\frac {\hat{w}^{(0)}(k)-w^{(0)}(k)}{w^{(0)}(k)}\right|\times 100\%\\ s.t.\left\{\begin{array}{l}B=\left[\begin{array}{ccc}-z^{(1)}(2)&1 \\ -z^{(1)}(3)&1\\ \ldots&\ldots\\ -z^{(1)}(n)&1\end{array}\right],Y=\left[\begin{array}{c}w^{(0)}(2)\\ w^{(0)}(3)\\ \ldots\\ w^{(0)}(n)\end{array}\right]\\ \hat{w}^{(1)}(k)=\left[w^{(1)}(\beta)-\frac{\hat{b}}{\hat{a}}\right]e^{-\hat{a }(k-\beta)}+\frac{\hat{b}}{\hat{a}}\\ \left[\begin{array}{c}\hat{a}\quad\hat{b}\end{array}\right]^{T}=\left(B^{T }B\right)^{-1}B^{T}Y\\ \hat{w}^{(0)}(k)=\hat{w}^{(1)}(k)-\hat{w}^{(1)}(k-1)\\ \alpha\in(0,1);\beta\in[0,1];k=1,2,\ldots,n\end{array}\right.\end{split}, \tag{13}\]  
After finding the optimal solution through the above method, performing a subtraction operation on it can obtain the predicted link quality sequence:  
\[\hat{w}^{(0)}(k)=\left(1-e^{\hat{a}}\right)\left[w^{(0)}(1)-\frac{\hat{b}}{ \hat{a}}\right]e^{-\hat{a}(k-1)},k=2,3,\ldots,n, \tag{14}\]