Ship behavior prediction method and device
The ship behavior prediction method uses pattern recognition and Gaussian process regression to enhance accuracy and interpretability, addressing inefficiencies in current ship behavior prediction systems by leveraging historical ship trajectories for improved inland waterway management.
Patent Information
- Application Number
- CN202510807672.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2045-06-17
AI Technical Summary
It is difficult for the existing technology to achieve real-time and accurate prediction of ship behavior in complex inland waters, especially under the low density and complexity of massive AIS data, and it is difficult for existing methods to effectively improve regulatory efficiency and safety.
The ship pattern recognition model is used to identify navigation routes, and the ship behavior prediction model is trained, and the Gaussian process regression model is used to predict the ship's future trajectory, combining data cleaning and trajectory segmentation processing to improve the accuracy and interpretability of the prediction.
Accurate prediction of ship behavior is achieved, regulatory efficiency and safety are improved, and the prediction results are well interpretable.
Smart Images

Figure CN120316518A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship behavior prediction, and particularly to a ship behavior prediction method and device. Background Art
[0002] With the growth of shipping business, the inland waterway traffic environment has become increasingly complex, and accurate prediction of ship behavior has become crucial. Driven by intelligence and informatization, active traffic management has become a development trend, and ship behavior inference technology is the key to achieving this goal.
[0003] Currently, ship traffic management mainly relies on passive monitoring, which has problems such as reaction delay, low efficiency, and difficulty in emergency handling. There is an urgent need to improve the supervision effect through active management. Active water traffic management can effectively improve supervision efficiency, optimize resource allocation, and reduce accident risks. However, the low density and complexity of massive AIS (Automatic Identification System) data make ship behavior inference a technical bottleneck. In particular, the differences in the movement laws and traffic characteristics of ships in inland water areas increase the difficulty of analysis. Existing methods are difficult to extract ship behavior characteristics in real time and accurately, affecting the early warning and decision-making efficiency of the traffic situation. Therefore, how to use data mining technology to accurately infer ship behavior, improve supervision efficiency and safety, has become the core problem to be solved urgently.
[0004] To solve the problems in ship behavior inference, existing research has adopted methods such as cluster analysis for traffic pattern division. However, these methods are inefficient in processing large-scale data and do not fully utilize static features. In addition, the Kalman filter and Markov chain methods based on dynamics are widely used in ship behavior prediction, but they rely on ideal state assumptions and are difficult to adapt to complex actual situations. Although machine learning methods have been applied, their applicability and interpretability vary in different scenarios. The method based on neural network performs well in processing complex data, but due to the difficulty of model construction, high requirements for the data set, and lack of interpretability, it limits its wide application. The defects of these methods indicate that although existing research provides preliminary technical support for ship behavior inference, it still faces challenges in terms of efficiency, accuracy, and interpretability. Summary of the Invention
[0005] The present invention provides a ship behavior prediction method and device, making the prediction of ship behavior more accurate and interpretable.
[0006] According to one aspect of the present invention, there is provided a ship behavior prediction method, including: Collecting target ship trajectory data, where the target ship trajectory data at least includes the navigation time, longitude and latitude, speed, and heading of the ship; Input the target ship trajectory data into the trained ship pattern recognition model to identify the traffic pattern of the target ship trajectory data; the same traffic pattern includes ship trajectory data with the same sailing route. Select a number of first historical ship trajectory data from the set of historical ship trajectory data having the same traffic pattern as the target ship trajectory data; the first historical ship trajectory data includes at least sailing time, longitude and latitude, speed, and course. Train a ship behavior prediction model based on the first historical ship trajectory data to obtain the trained ship behavior prediction model. Input the first historical ship trajectory data into the trained ship behavior prediction model to predict each first historical ship trajectory data. Based on each predicted first historical ship trajectory data, obtain the longitude and latitude, speed, and course of the target ship within a future period of time.
[0007] Optionally, before the step of inputting the target ship trajectory data into the trained ship pattern recognition model, it further includes: Obtain historical ship trajectory data, divide the historical ship trajectory data into multiple traffic patterns, and the historical ship trajectory data includes at least the sailing time, longitude and latitude, speed, and course of the ship. Label the traffic pattern of each historical ship trajectory data, and construct a first data set with the labeled historical ship trajectory data. Train the ship pattern recognition model based on the first data set to obtain the trained ship pattern recognition model.
[0008] Optionally, before the step of obtaining historical ship trajectory data, it further includes: Collect historical Automatic Identification System (AIS) data of ships, preprocess the historical AIS data of ships to obtain the historical ship trajectory data; the preprocessing includes at least data cleaning and trajectory extraction.
[0009] Optionally, the step of preprocessing the historical AIS data of ships to obtain the historical ship trajectory data includes: Perform data cleaning on the historical AIS data of ships. Use an interpolation algorithm to repair the missing data points in the historical AIS data of ships. Perform trajectory segmentation on the historical AIS data of ships after data cleaning to obtain multiple historical ship trajectory data.
[0010] Optionally, the step of dividing the ship trajectory data into multiple traffic patterns includes: Determine the departure area and arrival area of the ship's navigation according to the geographical information of the water area; Match the start and end points of the historical ship trajectory data with the departure area and the arrival area, and divide the historical ship trajectory data whose start point belongs to the departure area and whose end point belongs to the arrival area into parent traffic patterns; Divide the historical ship trajectory data with the same navigation route in the parent traffic pattern into the same sub-traffic pattern, and each sub-traffic pattern can be used as a traffic pattern.
[0011] Optionally, selecting several first historical ship trajectory data from the set of historical ship trajectory data having the same traffic pattern as the target ship trajectory data includes: Calculate the distances between the target ship trajectory data and the historical ship trajectory data having the same traffic pattern respectively, and select the top n historical ship trajectory data with the closest distances from the set of historical ship trajectory data as the first historical ship trajectory data.
[0012] Optionally, training the ship behavior prediction model based on the first historical ship trajectory data to obtain the trained ship behavior prediction model includes: Construct a second data set with the first historical ship trajectory data; Train the ship behavior prediction model based on the second data set, and the ship behavior prediction model is based on the Gaussian process regression model; the prediction process of the Gaussian process regression model reflects the trend of the target ship trajectory following the historical ship trajectories of the same traffic pattern. Optionally, inputting the first historical ship trajectory data into the trained ship behavior prediction model to predict each of the first historical ship trajectory data includes: Input the predicted navigation time of the first historical ship trajectory data into the trained ship behavior prediction model to predict the longitude, latitude, speed and course of each first historical ship trajectory data at each moment during the predicted navigation time; the predicted navigation time is the time period that the target ship needs to predict.
[0013] Optionally, obtaining the longitude, latitude, speed and course of the target ship in a future period of time based on each predicted first historical ship trajectory data includes: For each predicted first historical ship trajectory data, take the average values of the longitude, latitude, speed and course at each moment during the predicted navigation time respectively, and the longitude, latitude, speed and course of the target ship at each moment during the predicted navigation time can be obtained.
[0014] According to another aspect of the present invention, there is provided a ship behavior prediction device, including: A data acquisition unit for acquiring target ship trajectory data, where the target ship trajectory data at least includes the navigation time, longitude and latitude, speed, and heading of the ship; A first training unit for inputting the target ship trajectory data into the trained ship pattern recognition model to identify the traffic pattern of the target ship trajectory data; the ship trajectory data with the same navigation route is included in the same traffic pattern; A data selection unit for selecting a number of first historical ship trajectory data from the set of historical ship trajectory data having the same traffic pattern as the target ship trajectory data; the first historical ship trajectory data at least includes the navigation time, longitude and latitude, speed, and heading; A second training unit for training a ship behavior prediction model based on the first historical ship trajectory data to obtain the trained ship behavior prediction model; A first prediction unit for inputting the first historical ship trajectory data into the trained ship behavior prediction model to predict each first historical ship trajectory data; A second prediction unit for obtaining the longitude and latitude, speed, and heading of the target ship within a future period of time based on each predicted first historical ship trajectory data.
[0015] According to another aspect of the present invention, there is provided an electronic device, where the electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor can execute the ship behavior prediction method according to any embodiment of the present invention.
[0016] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the ship behavior prediction method according to any embodiment of the present invention when executed.
[0017] In the technical solution of the embodiment of the present invention, first, a ship mode recognition model is used to recognize the navigation route where the ship is located, and then a historical ship trajectory that is the same as the navigation route where the ship is located is selected to train the ship behavior prediction model. The historical ship trajectory has the longitude, latitude, speed, and heading data of the ship at each moment, so that the trained ship behavior prediction model can recognize the longitude, latitude, speed, and heading data of the ship at each specific time in the navigation route, thereby accurately predicting the behavior characteristics of the target ship. In addition, in this application, the first historical ship trajectory data is used as the input of the ship behavior prediction model, and its prediction process reflects the trend that the target ship trajectory follows the historical ship trajectory on the same navigation route. Furthermore, the longitude, latitude, speed, and heading of the target ship in the next period of time are predicted through the historical ship trajectory data, so that the prediction result has good interpretability.
[0018] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0020] Figure 1 is a flowchart of a ship behavior prediction method according to Embodiment 1 of the present invention; Figure 2 is a flowchart of a ship behavior prediction method according to Embodiment 2 of the present invention; Figure 3 is a schematic diagram of an embodiment in which the present invention divides traffic patterns for trajectory data; Figure 4 is a schematic diagram of traffic pattern recognition and ship behavior prediction in the present invention; Figure 5 is a flowchart of an embodiment of ship behavior prediction in the present invention; Figure 6 is a structural diagram of a ship behavior prediction device according to Embodiment 3 of the present invention; Figure 7 is a schematic structural diagram of an electronic device for implementing the ship behavior prediction method of the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0021] To enable those skilled in the art to better understand the solution of the present invention, the following will clearly and completely describe the technical solution in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present invention.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned accompanying drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such data used in appropriate cases can be interchanged so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0023] Embodiment 1 Figure 1 A flowchart of a ship behavior prediction method is provided for Embodiment 1 of the present invention. As Figure 1 shown, the method includes: S101. Collect target ship trajectory data, where the target ship trajectory data at least includes the navigation time, longitude and latitude, speed, and heading of the ship.
[0024] It should be noted that the target ship trajectory data is the trajectory that has been traveled on the current navigation route. In this embodiment, the ship trajectory data is composed of a number of trajectory data points. For example, the longitude and latitude, speed, and heading of the ship can be collected every 30 seconds or 1 minute. The collected data points reflect a series of data points of the ship on the navigation path, thereby constituting the ship trajectory data. Each data point contains the current navigation time, longitude and latitude, speed, and heading of the ship.
[0025] S102. Input the target ship trajectory data into the trained ship pattern recognition model to identify the traffic pattern of the target ship trajectory data; the same traffic pattern includes ship trajectory data with the same navigation route.
[0026] Among them, the ship pattern recognition model is used to identify the traffic pattern of the target ship trajectory data, and the traffic pattern reflects the navigation route on which the current target ship is traveling.
[0027] In this embodiment, multiple historical ship trajectory data can be used to train a ship pattern recognition model. Each piece of historical ship trajectory data is labeled with a traffic pattern label, so that the trained ship pattern recognition model can identify the traffic pattern of the target ship trajectory data.
[0028] S103. Select several first historical ship trajectory data from the set of historical ship trajectory data that has the same traffic pattern as the target ship trajectory data; at least the sailing time, longitude and latitude, speed, and heading are included in the first historical ship trajectory data.
[0029] S104. Train a ship behavior prediction model based on the first historical ship trajectory data to obtain the trained ship behavior prediction model.
[0030] To make the prediction of ship behavior interpretable, this embodiment uses the historical ship trajectory data that has the same traffic pattern as the target ship trajectory data as the training set to train the ship behavior prediction model, so that the target ship trajectory follows the trend of the historical ship trajectories on the same sailing route.
[0031] It should be noted that since the traffic pattern recognition model can only identify the sailing route of the target ship, but cannot identify the longitude and latitude, speed, and heading of the target ship at each moment in a future time period, therefore, this application also needs to train a ship behavior prediction model to predict the sailing process of the target ship in a future time period.
[0032] S105. Input the first historical ship trajectory data into the trained ship behavior prediction model to predict each piece of the first historical ship trajectory data.
[0033] S106. Calculate the longitude and latitude, speed, and heading of the target ship in a future time period based on each predicted first historical ship trajectory data. It should be noted that in this embodiment, by using multiple historical ship trajectory data that has the same traffic pattern as the target ship trajectory data as the input of the ship behavior prediction model and calculating according to multiple output results, the longitude and latitude, speed, and heading of the target ship in a future time period are obtained. Specifically, the method of calculating the longitude and latitude, speed, and heading of the target ship in a future time period by performing weighted calculation on multiple output results is that the target ship trajectory follows the trend of the historical ship trajectories on the same sailing route.
[0034] In the technical solution of the embodiment of the present invention, first, a ship mode recognition model is used to identify the navigation route where the ship is located, and then historical ship trajectories that are the same as the navigation route where the ship is located are selected to train the ship behavior prediction model. The historical ship trajectories include the latitude and longitude, speed, and heading data of the ship at each moment, so that the trained ship behavior prediction model can identify the latitude and longitude, speed, and heading data of the ship at each specific time in the navigation route, thereby accurately predicting the behavior characteristics of the target ship. In addition, in this application, the first historical ship trajectory data is used as the input of the ship behavior prediction model, and its prediction process reflects the trend that the target ship trajectory follows the historical ship trajectories on the same navigation route. Furthermore, the latitude and longitude, speed, and heading of the target ship in the next period of time are predicted through the historical ship trajectory data, making the prediction result have good interpretability.
[0035] Embodiment 2 Figure 2 It is a flowchart of a ship behavior prediction method provided by Embodiment 2 of the present invention. As Figure 2 shown, the method includes: S201. Collect historical ship automatic identification system data, and preprocess the historical ship automatic identification system data to obtain the historical ship trajectory data; the preprocessing at least includes data cleaning and trajectory extraction.
[0036] During the process of data transmission and collection of the ship automatic identification system (AIS), there may be situations such as signal occlusion, equipment failure, and delay, resulting in different degrees of missing and incorrect data. Therefore, data preprocessing should be performed before using AIS data.
[0037] In one embodiment, preprocessing the historical ship automatic identification system data to obtain the historical ship trajectory data specifically includes: Clean the historical ship automatic identification system data; Use an interpolation algorithm to repair the missing data points in the historical ship automatic identification system data; Perform trajectory segmentation processing on the historical ship automatic identification system data after data cleaning to obtain a plurality of the historical ship trajectory data.
[0038] Specifically, for the AIS data, there are incorrect data caused by input errors or reception errors. For the data whose MMSI field is not nine digits, it is excluded. For the duplicate data with a speed greater than 2 knots but the latitude and longitude positions not updated, it is excluded. For the data whose heading field is not within 0 - 360°, it is excluded. In addition, common incorrect data also includes position drift and data missing, and this type of data can also be repaired by other methods.
[0039] The interpolation algorithm is used to repair the missing data that exists in the data itself or is generated due to cleaning. In this application, interpolation is performed according to the mode of the time intervals between adjacent trajectory points of each track, taking into account the different AIS transmission time intervals of different ships. Considering the characteristics of the trajectory data in the research waters, the linear interpolation method is adopted in this application for data completion.
[0040] Track segmentation refers to separating the ship tracks of different voyages. Since the research data has a large time span and the same ship may make multiple round trips in the research area, it is necessary to separate the AIS data of the same ship belonging to different voyages. The index at the track segmentation is judged according to the time interval threshold between adjacent trajectory points. Generally speaking, if the time interval between adjacent trajectory points exceeds 900 seconds, it is considered that the adjacent trajectory points belong to different voyages, and at this time the track needs to be segmented. The first point of the segmented AIS data is the starting point of the ship track, and the last point is the ending point of the ship track.
[0041] S202. Obtain historical ship track data, divide the historical ship track data into multiple traffic patterns, and at least include the sailing time, longitude and latitude, speed and heading of the ship in the historical ship track data; In an embodiment, dividing the historical ship track data into multiple traffic patterns specifically includes: Determine the departure area and arrival area of the ship's voyage according to the geographical information of the water area; Match the start and end points of the historical ship track data with the departure area and the arrival area, and divide the historical ship track data whose starting point belongs to the departure area and whose ending point belongs to the arrival area into the parent traffic pattern; Divide the historical ship track data with the same sailing route in the parent traffic pattern into the same sub-traffic pattern, and each sub-traffic pattern can be used as a traffic pattern.
[0042] It should be noted that the traffic pattern refers to the overall situation of ship traffic in the water area. For example, a large number of ships sailing along the same route from the same departure area to the same arrival area constitute a type of traffic pattern, and different traffic patterns form a complex water traffic network. Traffic pattern division refers to using technologies such as data mining according to ship AIS data to divide ship tracks into different track clusters to represent typical water traffic patterns. The differences in ship traffic characteristics between different track clusters are large, and the differences in ship track traffic characteristics within the same cluster are small.
[0043] In this embodiment, the parent traffic pattern refers to the set of all ship tracks with the same departure area and arrival area; the sub-traffic pattern is the set of ship tracks with the same departure area and arrival area but different sailing routes. The sub-traffic pattern is included in the parent traffic pattern.
[0044] Example of a two-stage traffic pattern division method based on origin-destination survey and trajectory clustering is as follows Figure 3 shown. As can be seen from Figure 3 the figure, for the water area with three entrances and exits in the example, a total of three judgment regions, namely A, B, and C, are set. A total of 6 types of trajectory clusters can be obtained through the order and pairing of the passing regions, which are trajectory 1 from A to B, trajectory 2 from B to A, trajectory 3 from A to C, trajectory 4 from B to C, trajectories 5 and 7 from C to A, and trajectory 6 from C to B. Among them, trajectories 5 and 7 from C to A have different route types, and they can be separated through trajectory clustering. After two divisions, a total of 7 types of sub-traffic patterns can be finally obtained.
[0045] S203. Label the traffic pattern of each historical ship trajectory data, and construct a first data set with the labeled historical ship trajectory data.
[0046] S204. Train the ship pattern recognition model based on the first data set to obtain the trained ship pattern recognition model.
[0047] For the obtained historical ship trajectory data, the historical ship trajectory data can be type-labeled, and a first data set can be constructed with the historical ship trajectory data, and the ship pattern recognition model can be trained using the first data set.
[0048] In this embodiment, first, the features of the historical ship trajectory data are extracted. The features at least include the navigation time, longitude and latitude, speed, and heading of the ship. Of course, they can also include features such as the bow direction, turning angle, acceleration, etc., and their statistical information such as mean, variance, maximum value, minimum value, median, etc., and also include the physical features of the ship, such as the length and width of the ship. Then, the data set is divided into a training set and a test set according to a ratio of 8:2.
[0049] In this embodiment, the ship pattern recognition model adopts a traffic pattern prediction model of ensemble learning decision tree, that is, multiple different models are trained respectively using the training set, such as CART, RF, AdaBoost, GB, and XGBoost are trained respectively, and these multiple models are used as base learners, and then a meta-learner is used to synthesize the outputs of these base learners to form the final prediction result.
[0050] S205. Collect target ship trajectory data, where the target ship trajectory data at least includes the navigation time, longitude and latitude, speed, and heading of the ship.
[0051] It should be noted that the target ship trajectory data is also trajectory data composed of several collected data points, and each data point contains the navigation time, longitude and latitude, speed, and heading data of the ship at that point.
[0052] S206. Input the target ship trajectory data into the trained ship pattern recognition model to identify the traffic pattern of the target ship trajectory data; the ship trajectory data with the same sailing route is included in the same traffic pattern.
[0053] It should be noted that in this embodiment, the traffic pattern recognition model can only identify the sailing route of the target ship, but cannot identify the longitude and latitude, speed, and heading of the target ship at each moment in a future time period. Therefore, this application also needs to train a ship behavior prediction model to predict the sailing process of the target ship in a future time period. As Figure 4 shown, the traffic pattern recognition model is used to identify the sailing route of the ship, and the ship behavior prediction model is used to predict the sailing behavior of the ship in a future time period. The sailing behavior includes the longitude and latitude, speed, and heading data at each moment.
[0054] S207. Calculate the distances between the target ship trajectory data and the historical ship trajectory data with the same traffic pattern respectively, and select the top n historical ship trajectory data with the closest distances from the historical ship trajectory data set as the first historical ship trajectory data.
[0055] Among them, the first historical ship trajectory data at least includes the sailing time, longitude and latitude, speed, and heading.
[0056] S208. Construct a second data set with the first historical ship trajectory data.
[0057] S209. Train the ship behavior prediction model based on the second data set. The ship behavior prediction model is based on a Gaussian process regression model; the prediction process of the Gaussian process regression model reflects the trend of the historical ship trajectories followed by the target ship trajectory with the same traffic pattern.
[0058] It should be noted that for the collected target ship trajectory data, assuming that the target ship trajectory data records the data of the target ship in the time period {t1, t n}, if you want to predict the trajectory data of the target ship in the time period {t n+1 , t n+1+k}, then you can select multiple historical ship trajectory data with the closest Euclidean distance to the target ship trajectory data from the historical ship trajectory data with the same traffic pattern. Specifically, you can calculate the Euclidean distances from the target ship data points in the time period {t1, t n} to different historical ship trajectory data respectively, and select multiple historical ship trajectory data with the smallest distance values as the first historical ship trajectory data; obtain each first historical ship trajectory data {t n+1 , t n+1+k}The trajectory data within the time period, and obtain the sailing time, longitude and latitude, speed, and course of each data point. Taking {t n+1 , t n+1+k}The longitude and latitude, speed, and course of the data points within the time period are used for Gaussian modeling to train the Gaussian process regression model. Among them, in the Gaussian process regression model, for the kernel function of the longitude and latitude parameters, a linear kernel, a radial basis kernel, and a white noise kernel can be selected; for the kernel function of the speed parameter, a linear kernel, a radial basis kernel, and a periodic kernel can be selected; for the kernel function of the course parameter, a linear kernel, a radial basis kernel, and a white noise kernel can be selected, specifically as shown in Figure 5 .
[0059] S210. Input the predicted sailing time of the first historical ship trajectory data into the trained ship behavior prediction model to predict the longitude and latitude, speed, and course of each moment of each first historical ship trajectory data during the predicted sailing time.
[0060] S211. For each first historical ship trajectory data predicted, calculate the average of the longitude and latitude, speed, and course values of each moment during the predicted sailing time, and then the longitude and latitude, speed, and course of the target ship at each moment during the predicted sailing time can be obtained. It should be noted that for the trained Gaussian process regression model, the independent variable {t n+1 , t n+1+k} of the first historical ship trajectory data can be used as the input of the Gaussian process regression model to predict the longitude and latitude, speed, and course of each moment of each historical ship trajectory data within the time period {t n+1 , t n+1+k}; then calculate the average of the longitude and latitude, speed, and course of multiple historical ship trajectory data, and the longitude and latitude, speed, and course of the target ship at each moment within the time period {t n+1 , t n+1+k} can be obtained.
[0061] The efficient division of inland river ship traffic patterns is achieved through origin-destination surveys and clustering analysis in the present invention. A ship pattern recognition model is used to identify the navigation route where the ship is located, and then historical ship trajectories with the same navigation route as the ship's current location are selected to train the ship behavior prediction model. The historical ship trajectories contain longitude, latitude, speed, and heading data for each moment of the ship, enabling the trained ship behavior prediction model to identify the longitude, latitude, speed, and heading data of the ship at each specific time on this navigation route, thereby accurately predicting the behavior characteristics of the target ship. Additionally, in this application, the first historical ship trajectory data is used as the input of the ship behavior prediction model, and its prediction process reflects the trend that the target ship's trajectory follows the historical ship trajectories on the same navigation route. Furthermore, the longitude, latitude, speed, and heading of the target ship within a certain period in the future are predicted through the historical ship trajectory data, making the prediction results highly interpretable.
[0062] Embodiment III Figure 6 FIG. is a schematic structural diagram of a ship behavior prediction device provided in Embodiment III of the present invention. As Figure 3 shown, the device includes: A data acquisition unit 601, configured to acquire target ship trajectory data, where the target ship trajectory data at least includes the navigation time, longitude, latitude, speed, and heading of the ship; A first training unit 602, configured to input the target ship trajectory data into the trained ship pattern recognition model to identify the traffic pattern of the target ship trajectory data; the same traffic pattern includes ship trajectory data with the same navigation route; A data selection unit 603, configured to select a number of first historical ship trajectory data from the set of historical ship trajectory data having the same traffic pattern as the target ship trajectory data; the first historical ship trajectory data at least includes the navigation time, longitude, latitude, speed, and heading; A second training unit 604, configured to train a ship behavior prediction model based on the first historical ship trajectory data to obtain the trained ship behavior prediction model; A first prediction unit 605, configured to input the first historical ship trajectory data into the trained ship behavior prediction model to predict each piece of the first historical ship trajectory data; A second prediction unit 606, configured to calculate the longitude, latitude, speed, and heading of the target ship within a certain period in the future based on each piece of the predicted first historical ship trajectory data.
[0063] The ship behavior prediction device provided in the embodiments of the present invention can execute the ship behavior prediction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0064] Example 4 Figure 7 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, for example, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, personal digital processors, cellular telephones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0065] As Figure 7 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0066] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0067] The processor 11 can be various general-purpose and / or special-purpose processing components having processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a ship behavior prediction method.
[0068] In some embodiments, a ship behavior prediction method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the ship behavior prediction method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute a ship behavior prediction method by any other suitable means (e.g., by means of firmware).
[0069] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0070] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer programs are executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0071] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0072] To provide for interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0073] The systems and techniques described herein can be implemented in a computing system that includes backend components (such as, for example, a data server), or a computing system that includes middleware components (such as, for example, an application server), or a computing system that includes frontend components (such as, for example, a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (such as, for example, a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0074] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0075] It should be understood that various forms of processes shown above can be used, steps can be reordered, added or deleted. For example, the steps described in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.
[0076] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A ship behavior prediction method, characterized in that, Including: Collecting target ship trajectory data, where the target ship trajectory data at least includes the sailing time, longitude and latitude, speed, and heading of the ship; Inputting the target ship trajectory data into the trained ship pattern recognition model to identify the traffic pattern of the target ship trajectory data; the ship trajectory data with the same sailing route is included in the same traffic pattern; Selecting a number of first historical ship trajectory data from the set of historical ship trajectory data that has the same traffic pattern as the target ship trajectory data; the first historical ship trajectory data at least includes the sailing time, longitude and latitude, speed, and heading; Training a ship behavior prediction model based on the first historical ship trajectory data to obtain the trained ship behavior prediction model; Inputting the first historical ship trajectory data into the trained ship behavior prediction model to predict each of the first historical ship trajectory data; Based on the predicted first historical ship trajectory data, obtaining the longitude and latitude, speed, and heading of the target ship within a future period of time.
2. The ship behavior prediction method according to claim 1, wherein Before the step of inputting the target ship trajectory data into the trained ship pattern recognition model, it further includes: Obtaining historical ship trajectory data, dividing the historical ship trajectory data into multiple traffic patterns, and the historical ship trajectory data at least includes the sailing time, longitude and latitude, speed, and heading of the ship; Labeling the traffic pattern of each historical ship trajectory data, and constructing a first data set with the labeled historical ship trajectory data; Training the ship pattern recognition model based on the first data set to obtain the trained ship pattern recognition model.
3. The ship behavior prediction method according to claim 2, wherein Before the step of obtaining historical ship trajectory data, it further includes: Collecting historical ship automatic identification system data, and preprocessing the historical ship automatic identification system data to obtain the historical ship trajectory data; the preprocessing at least includes data cleaning and trajectory extraction.
4. The ship behavior prediction method according to claim 3, characterized in that The step of preprocessing the historical ship automatic identification system data to obtain the historical ship trajectory data includes: Performing data cleaning on the historical ship automatic identification system data; Using an interpolation algorithm to repair the missing data points in the historical ship automatic identification system data; Performing trajectory segmentation processing on the historical ship automatic identification system data after data cleaning to obtain multiple historical ship trajectory data.
5. The ship behavior prediction method according to claim 2, wherein The step of dividing the ship trajectory data into multiple traffic patterns includes: Determining the departure area and arrival area of ship sailing according to the geographical information of the water area; Matching the start and end points of the historical ship trajectory data with the departure area and the arrival area, and dividing the historical ship trajectory data whose start point belongs to the departure area and end point belongs to the arrival area into the parent traffic pattern; Dividing the historical ship trajectory data with the same sailing route in the parent traffic pattern into the same sub-traffic pattern, and each sub-traffic pattern can be used as a traffic pattern.
6. The ship behavior prediction method according to claim 1, characterized in that The step of selecting a number of first historical ship trajectory data from the set of historical ship trajectory data that has the same traffic pattern as the target ship trajectory data includes: Calculate the distances between the target ship trajectory data and the historical ship trajectory data with the same traffic pattern respectively, and select the top n historical ship trajectory data with the closest distances from the set of historical ship trajectory data as the first historical ship trajectory data.
7. The ship behavior prediction method according to claim 6, wherein Training the ship behavior prediction model based on the first historical ship trajectory data to obtain the trained ship behavior prediction model, including: Constructing a second data set with the first historical ship trajectory data; Training the ship behavior prediction model based on the second data set, the ship behavior prediction model being a Gaussian process regression model; the prediction process of the Gaussian process regression model reflects the trend of the target ship trajectory following the historical ship trajectories of the same traffic pattern.
8. The ship behavior prediction method according to claim 1, characterized in that Inputting the first historical ship trajectory data into the trained ship behavior prediction model to predict each of the first historical ship trajectory data, including: Inputting the predicted navigation time of the first historical ship trajectory data into the trained ship behavior prediction model to predict the longitude, latitude, speed and heading at each moment within the predicted navigation time for each of the first historical ship trajectory data; the predicted navigation time is the time period that the target ship needs to predict.
9. The ship behavior prediction method according to claim 8, characterized in that Obtaining the longitude, latitude, speed and heading of the target ship within a future period based on each of the predicted first historical ship trajectory data, including: Taking the average of the longitude, latitude, speed and heading values at each moment within the predicted navigation time for each of the predicted first historical ship trajectory data, respectively, to obtain the longitude, latitude, speed and heading of the target ship at each moment within the predicted navigation time.
10. A ship behavior prediction device, characterized in that, Including: A data acquisition unit for collecting target ship trajectory data, where the target ship trajectory data at least includes the navigation time, longitude, latitude, speed and heading of the ship; A first training unit for inputting the target ship trajectory data into the trained ship pattern recognition model to identify the traffic pattern of the target ship trajectory data; the same traffic pattern includes ship trajectory data with the same navigation route; A data selection unit for selecting several first historical ship trajectory data from the set of historical ship trajectory data with the same traffic pattern as the target ship trajectory data; the first historical ship trajectory data at least includes the navigation time, longitude, latitude, speed and heading; A second training unit for training a ship behavior prediction model based on the first historical ship trajectory data to obtain the trained ship behavior prediction model; A first prediction unit for inputting the first historical ship trajectory data into the trained ship behavior prediction model to predict each of the first historical ship trajectory data; A second prediction unit for obtaining the longitude, latitude, speed and heading of the target ship within a future period based on each of the predicted first historical ship trajectory data.
Citation Information
Patent Citations
Navigation trajectory prediction method, computer storage medium and program product
CN114077926A
Trajectory prediction method and device
CN114092751A
Ship behavior pattern detection method and device
CN115730263A
Interpretable two-stage ship trajectory prediction method based on historical navigation mode mining
CN116227652A
Ship behavior characteristic prediction method and device
CN116680584A
Cited By
Ship resource operation state mode identification method and device
CN121210860A
A pattern recognition method and device for a ship resource operating state
CN121210860B