###### Abstract  
With the establishment of satellite constellations equipped with ship automatic identification system (AIS) receivers, the amount of AIS data is continuously increasing, and AIS data have become an important part of ocean big data. To further improve the ability to use AIS data for maritime surveillance, it is necessary to explore a ship classification and anomaly detection method suitable for spaceborne AIS data. Therefore, this paper proposes a ship classification and anomaly detection method based on machine learning that considers ship behavior characteristics for spaceborne AIS data. In view of the characteristics of different types of ships, this paper introduces the extraction and analysis of ship behavior characteristics in addition to traditional geometric features and discusses the ability of the proposed method for ship classification and anomaly detection. The experimental results show that the classification accuracy of the five types of ships can reach 92.70%, and the system can achieve better results in the other classification evaluation metrics by considering the ship behavior characteristics. In addition, this method can accurately detect anomalous ships, which further proves the effectiveness and feasibility of the proposed method  
accurate information about the target ships. AIS data can provide rich ship information, including static information (e.g., ship name, size, and type), dynamic information (e.g., ship position, speed, and heading), and voyage-related information (e.g., ship draught and destination), which can be recorded by shore-based stations or space-based AIS receivers [7]. However, because shore-based AIS cannot fully and seamlessly cover the entire ocean space, the use of AIS installed on satellites makes it possible to monitor ships around the world and further expand the application scope of AIS data. Compared with other types of ocean data, such as remote sensing images, AIS data involve the near-real-time collection and recording of global ship navigation information, which provides a large amount of research data for studying the spatial and temporal characteristics of maritime supervision and ship behavior patterns. At present, although a large amount of AIS data can be obtained, the interpretation speed of AIS data processing methods is far less than that of AIS data reception and cannot fully mine the information behind it, which means that it is highly necessary to develop an efficient and intelligent method to cope with the great deal of information. In recent years, the continuous development and innovation of artificial intelligence technologies, such as machine learning and deep learning methods, have provided advanced algorithm tools for humans to mine and use the knowledge behind AIS data. The rapid accumulation of spaceborne AIS data provides massive information for maritime traffic control and ship behavior analysis, and the use of data mining technology to mine the potential maritime traffic characteristics of AIS data to realize maritime surveillance has become a research hotspot. Examples include ship trajectory reconstruction and prediction [8; 9; 10; 11; 12], ship collision avoidance [13; 14; 15; 16], ship behavior analysis and anomaly detection [17; 18; 19; 1], global oil trade analysis, and maritime environment monitoring [7; 20]. It can be found that the current AIS data mining works have penetrated all aspects of maritime traffic and ship behavior research, which also proves the strong advantage of AIS data compared with other ship data sources. In recent years, with the development of machine learning and deep learning methods, an increasing number of scholars have applied these methods to AIS data analysis to realize in-depth data mining.