# Study on Classification of Fishing Vessel Operation Types Based on Dilated CNN-IndRNN
## 2 Methods
### Data Preprocessing  
Preprocessing for AIS data is mainly reflected in the treatment of missing values and outliers. Missing values need to be completed by interpolation according to the before and after data. Outliers should be recognized first and then completed by interpolation after deleting. Currently, AIS technology is not yet fully matured, resulting in a partial absence of ship track trajectory points; therefore, some processing of the missing data is needed. Figure 1 shows the missing trajectory data map; the blue points indicate the actual data that have been recorded, and the black points indicate the missing data to compensate for the missing data values [20]. The numbers are markers for the points. Since the trajectory data is a column of time series, the location where the missing values need to be interpolated can be determined based on the time interval between  
Figure 1: Schematic of AIS missing values. two neighboring data points, and the number of missing points is directly proportional to the time interval. The larger the time interval between two neighboring data points, the greater the number of missing points. To identify missing values, we used the method of judging the time interval to identify missing values, with a time interval of 10 min. Let the time series of the original AIS data be \(T=\{t_{1},t_{2},\ldots,t_{n}\}\), and calculate the time interval between any two adjacent time points \(\Delta t=t_{j}-t_{k}\), when \(\Delta t<20\), which does not need to be supplemented. When \(20\leq\Delta t<30\), it needs to supplement one point. When \(30\leq\Delta t<40\), it needs to supplement two points, and so on. In the filling in of missing values, the data were supplemented using Lagrange interpolation. A polynomial passing through all known points can be obtained by Lagrange interpolation. Based on the existing trajectory of the fishing boat, all known points can be brought in to obtain the polynomial, and then the value at the missing place can be calculated from the polynomial, as shown in the following formula [21]. \[P_{n}(t)=\sum_{i=1}^{n}k_{t_{i}}(\prod_{j\
eq i}^{1\leq j\leq n}\frac{(t-t_{j} )}{(t_{i}-t_{j})}) \tag{1}\]  
Due to the different configuration of fishing vessel facilities for different types of operations, the range of speed and heading range that can be reached is also different, and there is no clear regulation. AIS data of fishing boats record the instantaneous speed and instantaneous course of fishing boats, which are easily affected by waves, strong winds, and other factors, and are prone to noise values. Therefore, it is necessary to process the abnormal value of the collected AIS data to avoid adverse effects on the subsequent model training. Let D be the difference between the current velocity value and the previous velocity value, and F be the velocity threshold. When D > F, the distance I between the current data point and the previous data point is calculated by the current velocity. The distance I is compared with the actual distance d between the two data points calculated by the Haversine formula. If the distance I is close to the actual distance d, it is considered that the current velocity value is normal. On the contrary, it is considered that the current velocity value is abnormal, and the data value needs to be corrected. The Harversine formula is:  
\[d=2r\sin^{-1}\left(\sqrt{\sin^{2}\left(\frac{\phi_{2}-\phi_{1}}{2}\right)+\cos (\phi_{1})\cos(\phi_{2})\sin^{2}\left(\frac{\psi_{2}-\psi_{1}}{2}\right)}\right) \tag{2}\]  
where, d represents the actual distance between the two points and \(r\) represents the radius of the earth, generally selected as 6,378,137 m. \((\psi_{1},\phi_{1}). (\psi_{2},\phi_{2})\) represents the latitude and longitude of the previous data point and the latter data point, respectively. The latitude and longitude anomaly refers to the non-normal deviation of the trajectory point in a small time, which will adversely affect the judgment of the subsequent model.