## 1 Introduction  
Inland waterways are usually more winding and narrower than maritime routes. Due to the limitations of the inland geographical environment, ships navigating in inland waterways require higher technical standards and risk management capabilities, making it more challenging than maritime navigation. Moreover, inland ships have limited navigation routes, and inland waterways often connect important cities and ports, carrying a large volume of cargo transport tasks. This leads to higher traffic density, more ships, and more frequent transportation activities in inland shipping. Faced with the busyness and complexity of inland navigation, traffic management departments need to bear greater regulatory pressure and responsibility to ensure the safe passage of ships and prevent accidents. Ship traffic flow prediction can analyze the navigation status of ships in future periods. Based on this analysis, ship and port managers can better plan the navigation routes of ships, select the optimal routes to reduce travel time and fuel consumption, and improve the efficiency of ship transportation. Additionally, it can help managers predict port congestion and the availability of docking areas, thus allowing for more rational arrangements of ship docking time and location. This reduces waiting times and alleviates congestion, improving port throughput efficiency. Ship traffic flow prediction can also identify potential collision risks, traffic congestion areas, and unsafe waterways in advance, helping ship and port managers take appropriate measures to avoid accidents and enhance the safety of ship transportation. The AIS system is a technology widely used for automatic ship identification and tracking. Through AIS, real-time data such as the location, speed, and course of ships can be collected and recorded. By statistically analyzing and data mining AIS historical data, the characteristics and patterns of ship traffic flow in inland waterways can be extracted, which can be used to establish models for predicting inland ship traffic flow. Furthermore, analyzing and modeling ship traffic flow using AIS historical data can continuously optimize prediction algorithms and models. With the collection of more real-time data, the prediction models can be updated and improved continuously, enhancing the accuracy and precision of predictions. With the development of the maritime economy, intelligent ships have become one of the key research directions in the field of maritime transportation. Intelligent ships can enhance the safety, environmental friendliness, and cost-effectiveness of maritime vessels, while also providing support for activities such as maritime rescue, waterway monitoring, and maritime security [1]. The real-time perception, prediction, and analysis of information related to ship positions, statuses, and behaviors are crucial foundations for ensuring the safety of intelligent ship navigation. AIS data (Automatic Identification System data) serve as a vital source of information in this context. It consists of messages automatically sent and received by vessels through the Automatic Identification System, encompassing static data, dynamic data, and navigation-related data. AIS data can reveal essential details about a vessel's identity, location, speed, direction, destination, and more, playing a critical role in the monitoring and management of maritime traffic [1]. Therefore, by employing mathematical models and algorithms, it is possible to predict the future positions of vessels within a certain time frame based on historical and real-time AIS data. This prediction can offer valuable references and support for intelligent navigation, collision avoidance decisions, energy efficiency optimization, safety warnings, and other related applications [2].