## 2 Related Work  
At present, research on ship classification and anomaly detection based on data mining technology and massive AIS information has made great progress. Ship classification mainly involves ship feature extraction and feature-based ship type identification. Different types of ships have unique appearances and behavior patterns. For example, cargo ships are usually large- and medium-sized ships carrying out ocean transportation tasks, while fishing ships are generally small- and medium-sized ships engaged in offshore activities [24]. Compared with other types of maritime data, AIS data contain rich static, motion, and ship tag information, making them more suitable for ship classification. In this section, studies related to AIS data ship classification are reviewed. [PERSON] et al. [25] proposed a trajectory-based AIS data fishing vessel classification architecture, which was processed by dividing ship trajectories into fishing vessels and non-fishing vessels as a binary classification. [PERSON] et al. [26] used the K-NN algorithm to classify ships sailing in Indonesian waters, and tested the algorithm on a real-time AIS database with a time range of 3-4 months. [PERSON] et al. [27] proposed three basic modes of ship motion according to the characteristics of ship motion and designed a classification algorithm for correlation sub-trajectories. Based on the features extracted from ship trajectories, a logistic regression model was used to build ship classifiers to solve the classification problems of fishing and cargo ships. [PERSON] et al. [28] divided each ship trajectory into multiple segments and extracted each sub-trajectory as input features using a polynomial function. Subsequently, a ship classifier based on an adaptive neuropathy fuzzy inference system (ANFIS) was constructed to classify oil tankers and fishing ships. [PERSON] et al. [29] extracted the geometric features of ships based on the sizes of ships (i.e., ship length and width) in spaceborne AIS messages and used the random forest algorithm to classify three types of ships, i.e., cargo ships, oil tankers, and fishing ships. [PERSON] et al. [30] proposed a regional ship behavior clustering method by analyzingthe AIS data of the Rotterdam port and classified ships into corresponding behavior clusters according to the static characteristics of ships. [PERSON] et al. [31] considered the German Bight as the research object and conducted ship classification research on three-month AIS data collected by shore-based and spaceborne AIS receivers. [PERSON] et al. [32] extracted the static information of ships in AIS data and used random forest to classify ships. Ship anomaly detection is of great significance for maritime safety and intelligent supervision. In recent years, ship classification based on AIS data has been applied to anomaly detection. For example, [PERSON] et al. [18] used hierarchical clustering combined with k-medoids clustering to learn typical sailing patterns and then used a Naive Bayes classifier to find anomalous ships. [PERSON] et al. [33] used a support vector machine (SVM) to classify and identify two types of anomalies: U-turn and anomalous parking routes. [PERSON] et al. [34] used the Gaussian process to learn the normal sailing modes of ships from AIS data for anomaly detection and used an activation learning paradigm to select formatted sub-samples to reduce the complexity of training. [PERSON] et al. [35] proposed a Bayesian method called the knowledge-based particle filter (KB-PF) for ship position prediction, which requires prior use of the K-nearest neighbor (KNN) algorithm to classify ship routes. [PERSON] et al. [36] proposed a multi-task deep learning architecture based on variational recurrent neural networks (VRNNs). This method re-encodes AIS data similarly to \"one-hot\" and inputs the AIS data stream into a deep neural network for training so that it can complete multiple tasks, such as trajectory reconstruction, anomaly detection, and ship type classification and identification.