Marine affair knowledge graph discovery-based ship speed prediction method and system
By using a graph neural network framework based on maritime knowledge graphs, combined with Bi-LSTM and RotatE models, the computational complexity and semantic gap of ship speed prediction in existing technologies are solved, achieving accurate ship speed prediction in complex port environments and improving the reliability and robustness of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-03
- Publication Date
- 2026-05-15
AI Technical Summary
Existing ship speed prediction methods suffer from computational complexity and require a large number of ship geometric parameters in large-scale, real-time prediction scenarios. Furthermore, data-driven models cannot effectively capture and understand the complex semantic relationships of the port environment, resulting in limited reliability, robustness, and interpretability of the models in complex dynamic scenarios.
A graph neural network (MKG-GNN) framework based on maritime knowledge graph is adopted. A maritime knowledge graph is constructed by acquiring multi-source data, a bidirectional long short-term memory network (Bi-LSTM) is used for data interpolation, and the RotatE model is used to map entities and relations to complex vector space. Finally, the graph neural network is used to predict ship speed.
It enables accurate prediction of ship speed in complex port environments, improves the accuracy and stability of prediction, reduces prediction errors, and has the foresight of environmental perception, enabling it to understand the spatial environment and state of the ship.
Smart Images

Figure CN122045688A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent transportation technology, and in particular to a method and system for predicting ship speed based on maritime knowledge graph discovery. Background Technology
[0002] With the development of global trade, the safety and efficiency of maritime transport have become crucial. Accurate ship speed prediction is of paramount importance for ensuring navigational safety, improving port scheduling efficiency, and optimizing ship energy consumption.
[0003] Currently, ship speed prediction methods are mainly divided into two categories: physical model-based and data-driven models. While physical models have clear theoretical explanations, they suffer from limitations in large-scale, real-time prediction scenarios due to their computational complexity and the need for numerous ship geometric parameters. Data-driven models, especially those represented by deep learning, have achieved breakthroughs in end-to-end prediction accuracy, but they generally suffer from the semantic gap problem. These models typically treat prediction as a simple time-series mapping, failing to effectively capture and understand the complex semantic relationships within the port environment, such as channel constraints, interactions with neighboring vessels, and berth status. This severely limits the reliability, robustness, and interpretability of the models in complex dynamic scenarios. Therefore, how to integrate domain knowledge into data-driven models and bridge the semantic gap is a key challenge currently facing the technology. Summary of the Invention
[0004] This invention is made to solve the above problems, and aims to provide a graph neural network ship speed prediction framework MKG-GNN based on maritime knowledge graph discovery, which integrates structured maritime domain knowledge into the prediction model to achieve more accurate ship speed prediction.
[0005] This invention provides a ship speed prediction method based on maritime knowledge graph discovery, characterized by the following steps: Step 1, acquiring the target ship's original AIS data, port context data, and meteorological environment data, and performing data cleaning; using a bidirectional long short-term memory network model to interpolate the cleaned irregular trajectory data to generate a standard speed sequence with equal time intervals; Step 2, extracting core entities that have a significant impact on ship behavior from the multi-source data processed in Step 1, and defining various relationships between core entities to construct a maritime knowledge graph; Step 3, using knowledge graph embedding technology to map the entities and relationships in the maritime knowledge graph to a complex vector space to obtain context-enhanced representation vectors; Step 4, inputting the standard speed sequence obtained in Step 1 and the context-enhanced representation vectors obtained in Step 3 into a graph neural network model for training and prediction, and outputting the prediction result of ship speed for future periods.
[0006] Preferably, in step 1, the bidirectional long short-term memory network model is a Bi-LSTM model, which performs interpolation through both forward LSTM and backward LSTM; the hidden state update formula of the forward LSTM is: The hidden state update formula for backward LSTM is: In the formula, Indicates the first The features of each observation point are spliced together with the time interval; after bidirectional hidden state fusion, the velocity sequence with equal time intervals is output.
[0007] Preferably, step 2, constructing the maritime knowledge graph, specifically includes: step 2-1, taking ships as the core entities in the maritime knowledge graph; step 2-2, identifying berth entities and anchorage entities, including: setting speed and position stability thresholds to identify ship berthing points from AIS data; using density clustering algorithms to aggregate berthing points into high-density areas; and performing spatial overlay analysis of the clustering results with coastline vector data to identify berth entities and anchorage entities; step 2-3, obtaining weather state entities, including: identifying continuous data points in meteorological data as various weather states and using them as weather state entities; step 2-4, aligning the time of meteorological data with the time in AIS data, and connecting ships, berth entities, anchorage entities, and weather state entities according to various defined relationships, thereby completing the construction of the maritime knowledge graph.
[0008] Preferably, in step 3, the RotatE model is used to map all entities and relations in the maritime knowledge graph to a complex vector space. The RotatE model embeds entities and relations as complex vectors, and the magnitude of each element of the relation vector is constrained to 1, making it a pure rotation.
[0009] Preferably, the RotatE model uses a relation vector r to map from the head entity vector h to the tail entity vector t, and the mapping relationship is expressed as follows: ,in For Hadama accumulation.
[0010] This invention provides a ship speed prediction system based on maritime knowledge graph discovery, characterized by: a data acquisition and processing module configured to acquire the target ship's original AIS data, port context data, and meteorological environment data, and perform data cleaning; and to use a bidirectional long short-term memory network model to interpolate the cleaned irregular trajectory data to generate a standard speed sequence with equal time intervals. The knowledge graph construction module is configured to extract core entities that have a significant impact on ship behavior from processed multi-source data, define various relationships between core entities, and construct a maritime knowledge graph. The knowledge embedding module is configured to use knowledge graph embedding technology and the RotatE model to map entities and relationships in the maritime knowledge graph to a complex vector space to form context-enhanced representation vectors. The speed prediction module is configured to input the speed sequence and the context-enhanced representation vectors into a graph neural network model and output the prediction results of ship speeds in future time periods.
[0011] The present invention provides an electronic device, including a memory and a processor. The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the method described above.
[0012] The present invention provides a computer storage medium storing computer-executable instructions thereon, which, when executed by a processor, implement the steps of the method described above.
[0013] Technical effect 1. This invention introduces a maritime knowledge graph, enabling the prediction model to understand the spatial environment and state of the ship, thus overcoming the limitation of traditional time series models lacking spatial semantic understanding.
[0014] 2. By using knowledge graph embedding technology, symbolic domain knowledge is transformed into continuous vector representations, effectively integrating temporal dynamic information and multi-source contextual information, providing richer evidence for prediction.
[0015] 3. The graph neural network architecture of this invention deeply integrates temporal information with spatial semantics. Experimental results in multiple real port scenarios such as complex maneuvers, berthing, and departure show that its prediction performance comprehensively surpasses existing mainstream and advanced models, demonstrating excellent accuracy and stability. Attached Figure Description
[0016] The above and other objects, features, and advantages of this application will become more apparent from the following detailed description of the embodiments in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain the application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0017] Figure 1 This is a flowchart of the ship speed prediction method based on maritime knowledge graph discovery in an embodiment of the present invention; Figure 2 This is a diagram of the overall framework of MKG-GNN in an embodiment of the present invention; Figure 3 This is a diagram of the Bi-LSTM architecture in an embodiment of the present invention; Figure 4 This is a comparison chart of the prediction results of different models and the original data in a complex maneuvering scenario according to an embodiment of the present invention. Detailed Implementation
[0018] To make the technical means, creative features, objectives and effects of this invention easy to understand, the following embodiments, in conjunction with the accompanying drawings, specifically illustrate a method and system for predicting ship speed based on maritime knowledge graph discovery.
[0019] This embodiment provides a method for predicting ship speed based on the discovery of maritime knowledge graphs.
[0020] Figure 1 This is a flowchart of the ship speed prediction method based on maritime knowledge graph discovery in an embodiment of the present invention; Figure 2 This is a diagram of the overall framework of MKG-GNN in an embodiment of the present invention; Figure 3 This is a diagram of the Bi-LSTM architecture in an embodiment of the present invention.
[0021] like Figures 1-2 As shown, the ship speed prediction method based on maritime knowledge graph discovery in this embodiment includes the following steps: Step S1: Acquire the raw AIS data, port context data, and meteorological environmental data of the target vessel, and perform data cleaning. Introduce an innovative Bi-LSTM model (its architecture is as follows). Figure 3 As shown in the figure, the cleaned irregular trajectory data is interpolated to generate a standard velocity sequence with equal time intervals.
[0022] To address the issues of missing trajectory segments and irregular time series in the original AIS data, this step introduces an innovative bidirectional long short-term memory network model, Bi-LSTM, for trajectory interpolation and data standardization. This process is executed jointly by forward and backward LSTMs.
[0023] In formula (1) Indicates the first The splicing of characteristics of each observation point and time interval, This represents the hidden state from the previous time step. Its hidden state update follows the standard LSTM gating mechanism, but introduces an additional time interval. The input features enable the model to perceive the temporal distance between observation points. A backward LSTM captures future information.
[0024] The fusion of bidirectional hidden states employs a concatenation strategy to form a representation vector containing the complete temporal context. After interpolation, a velocity sequence with equal time intervals is output. This velocity sequence is more accurate and smoother than traditional methods.
[0025] Step S2: Extract core entities that have a significant impact on ship behavior from the multi-source data processed in the previous step, define five core relationships to connect these entities, and construct a maritime knowledge graph.
[0026] In this step, spatial entity identification employs a data-driven approach, treating ships as nodes in the graph and connecting them with events and weather by associating static attributes with dynamic states. Spatial entities are identified by setting speed and position stability thresholds using a data-driven method. Then, the DBSCAN density clustering algorithm is used to aggregate these anchorages into high-density regions. Finally, the clustering results are spatially overlaid with NOAA coastline vector data for analysis. Clusters near the coastline are identified as berths, while clusters in open water are identified as anchorages. Environmental entities represent weather conditions; meteorological data is sourced from NOAA, and continuous data points in the meteorological data are classified as various weather conditions. Temporal entities align the time of the meteorological data with the time in the AIS data to ensure consistency in time when constructing the maritime knowledge graph. This guarantees consistency between the knowledge graph construction and actual navigation patterns.
[0027] Step S3 involves transforming the knowledge graph into a low-dimensional vector representation using knowledge graph embedding technology. The RotatE model is then used to map all entities and relations in the knowledge graph to a complex vector space, forming context-enhanced representation vectors.
[0028] This step uses knowledge graph embedding to transform the knowledge graph into a vector representation. By comparing various mainstream knowledge graph embedding methods, including TransE, DistMult, and ComplEx, this embodiment proposes and adapts a RotatE model, which can better handle this type of problem.
[0029] In the formula, Indicates the tail entity. Indicates the head entity. Relationships are represented. Both entities and relationships are embedded as complex vectors. This is the Hadamard product. The magnitude of each element in the relation vector r is constrained to 1, making it a pure rotation. This design allows the model to naturally model and infer combinatorial relations by equating a single rotation to the rotation of two consecutive relations.
[0030] Step S4: Input the standard velocity sequence obtained in step S1 and the context-enhanced representation vector generated in step S3 into the improved neural network model (GNN). Aggregate the state information of neighboring ships and fuse the context information provided by the knowledge graph to output an accurate prediction of the future velocity sequence.
[0031] In this step, a GNN model is used to predict ship speed in a typical port environment, and the predicted ship speed results are obtained. The superiority of the proposed framework is verified by comparing it with four mainstream baseline models: DLinear, PatchTST, LSTM, and NLinear.
[0032] The following section will verify the port vessel speed prediction method based on maritime knowledge graph provided in the above embodiments based on a specific scenario.
[0033] Figure 4 This is a comparison chart of the prediction results of different models and the original data in a complex maneuvering scenario according to an embodiment of the present invention.
[0034] The following verification examples are built on the deep learning framework PyTorch and implemented using the Python programming language.
[0035] Step A: Acquire AIS data and create a dataset. This example selects a complex, traffic-intensive navigation scenario. The data comes from a publicly available AIS dataset from the Port of Long Beach, California, in June 2023, containing 2.47 million records. The data is then cleaned, outliers are removed, and a BiLSTM model is used to convert irregular trajectory data into a fixed 2-minute interval sequence. In this scenario, ship speeds change frequently, without a smooth cruising phase; typical speed change curves are shown below. Figure 4 As shown by the black curve in the middle.
[0036] Step B involves establishing a knowledge graph-enhanced speed prediction model. The processed training set is fed into the proposed MKG-GNN network for feature learning. To ensure effective network operation, the model hyperparameters are set as follows: learning rate 0.0001, hidden layer dimension 96, GNN layer number 3, and attention head number 4. Through knowledge graph construction, embedding learning, and end-to-end training of the graph neural network, the model learns the dynamic patterns of ships in complex environments, ultimately achieving speed prediction for the next 6 time steps. The prediction results are as follows: Figure 4 As shown by the broken line. The evaluation metrics for embedding learning are as follows: in, It is a test set of triples. It is the first The ranking of the correct entities in each test triplet. It is an indicator function, equal to 1 when the condition is true and 0 otherwise. GS is a function negatively correlated with the standard deviation. The higher the GS score, the more stable the model's performance.
[0037] Table 1 shows the comparison results of the KGE models.
[0038] Table 1 As shown in Table 1, the MKG-GNN model embedding method proposed in this embodiment performs well in all evaluation metrics compared with other embedding methods, indicating that our model has extremely high accuracy in actual prediction.
[0039] Step C involves prediction under complex maneuvering navigation scenarios. These scenarios are characterized by frequent turning, acceleration, and deceleration maneuvers, indicating that the vessel is performing complex maneuvers in a busy port area, such as avoiding other vessels, waiting for berth, or conducting berthing operations. These maneuvers result in large speed variations and insignificant linear characteristics, placing extremely high demands on the model's context awareness and nonlinearity capture capabilities.
[0040] Step D: Quantitative evaluation of model prediction performance. The fitted ship speed at future time points is used as the final prediction result, such as... Figure 4 As shown. To quantitatively evaluate the port vessel speed prediction method based on maritime knowledge graph discovery proposed in this embodiment, an experiment was conducted in a typical complex maneuvering navigation scenario, and compared with four mainstream models: DLinear, PatchTST, LSTM, and NLinear. Evaluation metrics such as mean absolute error (MAE), mean square error (MSE), and root mean square error (RMSE) were used. The calculation formulas are as follows: Where N is the total number of samples and H is the prediction step size. Indicates the first The sample in the future Step speed, The mean square root of the predicted value is the actual velocity. The mean squared difference between the predicted and actual values is calculated using the MSE (mean squared error). The root squared error of the mean squared error is the square root of the MSE. When local anomalies or noise exist in the data, the mean squared error of the predicted value is better than the mean squared error of the MSE, as it more accurately reflects the model's stability and general performance.
[0041] Table 2 shows the comparison results of evaluation indicators for different models.
[0042] Table 2 As shown in Table 2, the proposed MKG-GNN model achieved the highest scores across all evaluation metrics in this scenario. Its MAE value is approximately 47.3% higher than the second-ranked DLinear's 0.961. Its RMSE is 0.647, while the worst-performing NLinear model has an RMSE of 4.317, a difference of nearly seven times. This demonstrates the basic achievement of accurate ship speed detection in complex maneuvering navigation scenarios.
[0043] In summary, the present invention, by adopting the above technical solution, has the following technical effects compared with the prior art: 1. This invention constructs a joint-driven model of temporal dynamics and spatial semantics by endogenously embedding structured maritime domain knowledge into a deep learning prediction framework. This effectively overcomes the "semantic gap" of traditional data-driven models and achieves more accurate predictions of ship behavior in complex port environments. In its modeling, this invention introduces a bidirectional temporal mechanism and a graph topology structure to jointly optimize data quality and interaction relationships. Specifically: At the data processing layer, the introduction of a bidirectional long short-term memory network (Bi-LSTM) indicates that the inertia of historical trajectories and the constraints of future trajectories are considered simultaneously. Ignoring the bidirectional mechanism (e.g., using only forward LSTM or linear interpolation) will fail to accurately recover the nonlinear trajectory loss caused by signal loss in AIS data, potentially leading to noise interference in the input data and causing the model to learn incorrect motion patterns. At the graph construction layer, the topological modeling of entities and relationships is reflected in the aggregation of neighboring ships and the environment. Ignoring this topology structure will make it impossible to distinguish the differentiated physical constraints of different functional areas (e.g., berths and channels) on ship speeds, resulting in a lack of spatial correlation in the prediction results.
[0044] Furthermore, the beneficial effects of this invention lie in its ability to achieve a paradigm shift from simple "numerical fitting" to "semantic understanding" by introducing knowledge graph embedding (RotatE). Specifically, the introduction of knowledge graph context embedding vectors is crucial in this invention's predictive model. Without this, the model would only focus on historical numerical changes in speed data, mechanically extrapolating from time-series trends. Even when the ship is in a specific phase of berthing deceleration or evasive maneuvering, it would fail to perceive the environmental intent, leading to severe prediction lag or bias. This invention applies quantitative semantic constraints to this blind extrapolation behavior through RotatE embedding technology. When making prediction decisions, the model no longer solely considers whether historical speeds are stable, but intelligently weighs whether historical trends align with the current spatial semantic environment (e.g., whether entering a speed-limited zone or approaching a berth). This imbues predictive decisions with environmental awareness and foresight, avoiding short-sighted behavior that relies solely on data inertia. By minimizing the loss function that includes semantic bias, the model actively guides the predicted trajectory of ship speed to conform as closely as possible to the physical logic of port operations (such as actively converging to zero in berthing scenarios) and tends to generate speed curves that are more consistent with actual maneuvering patterns, thereby significantly reducing prediction errors in complex scenarios (experiments show that MAE is reduced by about 47.3%).
[0045] 2. This invention can be used to develop safer and more efficient ship scheduling and collision avoidance schemes in smart port management systems, and has a wide range of applications for improving port navigation efficiency and ensuring water traffic safety.
[0046] The embodiments described in this specification are merely examples of implementations of the inventive concept. The scope of protection of this invention should not be considered as limited to the specific forms described in the embodiments. The scope of protection of this invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.
Claims
1. A method for predicting ship speed based on maritime knowledge graph discovery, characterized in that, Includes the following steps: Step 1: Obtain the target vessel's original AIS data, port context data, and meteorological environment data, and perform data cleaning; use a bidirectional long short-term memory network model to interpolate the cleaned irregular trajectory data to generate a standard speed sequence with equal time intervals. Step 2: Extract core entities that have a significant impact on ship behavior from the multi-source data processed in Step 1, and define various relationships between the core entities to construct a maritime knowledge graph. Step 3: Using knowledge graph embedding technology, the entities and relationships in the maritime knowledge graph are mapped to a complex vector space to obtain context-enhanced representation vectors; Step 4: Input the standard velocity sequence obtained in Step 1 and the context-enhanced representation vector obtained in Step 3 into the graph neural network model for training and prediction, and output the prediction result of the ship speed in the future period.
2. The ship speed prediction method based on maritime knowledge graph discovery according to claim 1, characterized in that: In step 1, the bidirectional long short-term memory network model is a Bi-LSTM model, which performs interpolation through both forward LSTM and backward LSTM; the hidden state update formula of the forward LSTM is: The hidden state update formula of the backward LSTM is: In the formula, Indicates the first The features of each observation point are spliced together with the time interval; after bidirectional hidden state fusion, the velocity sequence with equal time intervals is output.
3. The ship speed prediction method based on maritime knowledge graph discovery according to claim 1, characterized in that: Step 2, constructing the maritime knowledge graph, specifically includes: Step 2-1: Designate the ship as the core entity in the maritime knowledge graph; Step 2-2, identify berth entities and anchorage entities, including: Set speed and position stability thresholds to identify ship mooring points from AIS data; Density clustering algorithm is used to aggregate mooring points into high-density regions; The clustering results are spatially overlaid with the coastline vector data to identify berth entities and anchorage entities. Steps 2-3: Obtain the weather state entity, including: Continuous data points in meteorological data are identified as various weather states and treated as weather state entities. Steps 2-4 align the time of the meteorological data with the time in the AIS data, and connect the ship, the berth entity, the anchorage entity, and the weather status entity according to the defined relationships, thereby completing the construction of the maritime knowledge graph.
4. The ship speed prediction method based on maritime knowledge graph discovery according to claim 1, characterized in that: In step 3, the RotatE model is used to map all entities and relations in the maritime knowledge graph to a complex vector space. The RotatE model embeds entities and relations as complex vectors, with each element of the relation vector constrained to a magnitude of 1, making it a pure rotation.
5. The ship speed prediction method based on maritime knowledge graph discovery according to claim 4, characterized in that: The RotatE model uses a relation vector r to map from the head entity vector h to the tail entity vector t, and the mapping relationship is expressed as follows: ,in For Hadama accumulation.
6. A ship speed prediction system based on maritime knowledge graph discovery, characterized in that, include: The data acquisition and processing module is configured to acquire the target vessel's raw AIS data, port context data, and meteorological environmental data, and perform data cleaning. A bidirectional long short-term memory network model is used to interpolate the cleaned irregular trajectory data to generate a standard velocity sequence with equal time intervals. The knowledge graph construction module is configured to extract core entities that have a significant impact on ship behavior from processed multi-source data, and define various relationships between the core entities to construct a maritime knowledge graph. The knowledge embedding module is configured to use knowledge graph embedding technology and the RotatE model to map entities and relations in the maritime knowledge graph to a complex vector space to form context-enhanced representation vectors. The speed prediction module is configured to input the speed sequence and the context-enhanced representation vector into a graph neural network model and output a prediction result of the ship speed in the future period.
7. An electronic device comprising a memory and a processor, characterized in that: The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the method as described in any one of claims 1-5.
8. A computer storage medium storing computer-executable instructions thereon, characterized in that: When the computer-executable instructions are executed by a processor, they implement the steps of the method as described in any one of claims 1-5.