## 4 Intelligent Prediction of Link States
### Cnn-Eaa  
Figure 3 depicts the basic process of the CNN-EAA algorithm. The maritime vessel feature dataset with multi-attribute factors is used as the input to the CNN convolutional layer. Since there is no public dataset for maritime communication, this paper obtains it by constructing a maritime ship communication model, which has been introduced in Ref. [20]. Due to the limitation of the length of the article, Table 1 lists the communication data of the first group of ships generated in the first second; 80% of the collected sample data are used for the training set and 20% for the test set.  
Before entering the convolutional layer, the input tensor dimensions are extended by the unsqueeze layer to adapt to the input format of the one-dimensional convolutional layer, and sample features can be extracted by using the CNN convolutional layer. The pooling module reduces the amount of data in the hidden intermediate layer without losing the scale-invariance of the features, and, at the same time, at each layer, the convolution module and pooling module utilize activation functions to accelerate model convergence. After the convolution is complete, the output of the convolutional layer is spread to a 2D tensor for input to the first fully connected layer.  
If the best performance may not be achieved by simply applying convolutional operations to the information, the EAA (Efficient Additive Attention) mechanism [15] is used to weigh the input features so that the model can pay more attention to the important features  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**ShipID** & \(\mathbf{lont_{t}}\) & \(\mathbf{latt_{t}}\) & \(\mathbf{v_{t}}\) **(km/h)** & \(\mathbf{\theta_{t}}\) & **SNR (dB)** & **Link\_Connectivity** \\ \hline
1 & 113.1691 & \(-\)62.0405 & 236.0666 & 14.12 & 13.16 & 0 \\
2 & 146.0954 & 84.7322 & 12.8562 & 0.63 & 11.44 & 0 \\
3 & \(-\)134.2308 & 81.7312 & 305.6865 & 5.53 & 22.96 & 1 \\
4 & 148.8293 & \(-\)2.6385 & 336.2375 & 0.92 & 23.85 & 1 \\
5 & 47.6353 & 54.0007 & 244.3446 & 1.94 & 5.60 & 1 \\
6 & \(-\)144.8721 & \(-\)64.0963 & 272.7864 & 16.47 & 14.69 & 1 \\
7 & \(-\)79.7506 & \(-\)14.3215 & 267.5276 & 13.89 & 13.36 & 1 \\
8 & 16.7949 & 75.0855 & 141.2017 & 6.34 & 19.39 & 0 \\
9 & 164.5252 & 52.1651 & 235.9720 & 19.01 & 21.28 & 1 \\
10 & 167.3653 & 82.7882 & 61.6272 & 0.68 & 22.64 & 0 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Selected ship datasets.  
and finally complete the classification task. Therefore, an unsqueeze layer is added between the CNN and EAA to map the features extracted by the CNN to a higher-dimensional space to fit the input format of the attention layer. The features adjusted after weighting by the EAA of the attention mechanism are then passed through the squeeze layer to recover the dimensionality in order to input to the second fully connected layer for classification.  
To prevent the overfitting phenomenon, a dropout layer is also added between the CNN and EAA, which can effectively reduce the overfitting problem in deep learning training models [21].  
The training of the CNN-EAA model on ship feature attributes can lead to the prediction of link connectivity, which assists in providing longer-period communication in the ocean and improving the efficiency of information transmission.