A Ship Traffic Flow Prediction Method and System Based on Multi-Source Data Fusion
Through multi-source data fusion and multi-graph fusion neural network prediction model, the problem of insufficient accuracy and real-time prediction of ship traffic flow in the prior art is solved, and more efficient and safe ship navigation decision support is achieved.
Patent Information
- Application Number
- CN202510238375.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-03-03
AI Technical Summary
The prior art relies on a single data source AIS data in ship traffic flow prediction, making it difficult to fully capture the dynamic changes in the marine environment, meteorological conditions and traffic flow, resulting in insufficient prediction accuracy and real-timeness, and poses safety risks.
Using a multi-source data fusion method, ship behavior data, marine environment data, meteorological condition data and traffic flow data in the target sea area are obtained and processed. By constructing corresponding topology maps and multi-graph fusion neural network prediction models, real-time prediction of ship traffic flow is achieved.
It improves the accuracy and real-timeness of ship traffic flow prediction, provides a more reliable decision-making basis, and ensures the safe, convenient and efficient navigation of the ship.
Smart Images

Figure CN119721409B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship traffic flow prediction, and particularly to a ship traffic flow prediction method and system based on multi-source data fusion. Background Art
[0002] With the rapid development of China's water transportation industry, as the main trade route of ocean transportation, the port waterway is becoming increasingly important in international trade. The navigation density of ships entering and leaving the port continues to increase, and the water area environment is becoming more and more complex. By predicting the changes in ship traffic flow, measures can be taken in advance to avoid potential collision risks, optimize ship routes, reduce unnecessary navigation and fuel consumption, and reduce transportation costs. Ship traffic flow prediction is of great significance for improving traffic safety, optimizing traffic management, protecting the environment, promoting economic development, and facilitating scientific research.
[0003] Currently, traditional ship traffic flow prediction usually only focuses on AIS data. However, the marine environment, meteorological conditions, and traffic flow all have a significant impact on ship traffic flow. Since the marine environment, meteorological conditions, and traffic flow are data of different modalities and highly dynamic, it is difficult for existing technologies to comprehensively capture these changes relying solely on AIS data. In the case of an increasing number of ships and a more complex navigation environment, there are certain limitations. When constructing multiple modalities of data onto a topological graph, there will be multiple ship information corresponding to the same marine, meteorological, and traffic flow information, making it difficult to reasonably define the attributes of nodes and edges, easily causing information redundancy, resulting in waste of computing resources and time-consuming calculations, leading to insufficient accuracy and real-time performance of ship traffic flow prediction, and thus potential safety risks.
[0004] Therefore, there is an urgent need for a ship traffic flow prediction method and system based on multi-source data fusion, which can achieve real-time prediction of ship traffic flow, improve prediction accuracy, provide a basis for ship planning and management decisions, and ensure safe, convenient, and efficient navigation of ships. Summary of the Invention
[0005] In order to solve the above technical problems, the present invention provides a ship traffic flow prediction method and system based on multi-source data fusion, which can achieve real-time prediction of ship traffic flow, improve prediction accuracy, provide a basis for ship planning and management decisions, and ensure safe, convenient, and efficient navigation of ships.
[0006] The present invention provides a ship traffic flow prediction method and system based on multi-source data fusion, including the following steps:
[0007] S1. Obtain the historical ship behavior data, historical marine environment data, historical meteorological condition data, and historical traffic flow data of each ship in the target sea area;
[0008] S2. Perform time-space matching processing on historical ship behavior data, historical marine environment data, historical meteorological condition data, and historical traffic flow data;
[0009] S3. According to the historical ship behavior data, historical marine environment data, historical meteorological condition data, and historical traffic flow data after time-space matching processing, construct a ship information topology map, a marine environment topology map, a meteorological condition topology map, and a traffic flow topology map respectively, and construct a data set based on the ship information topology map, the marine environment topology map, the meteorological condition topology map, and the traffic flow topology map;
[0010] S4. Construct a multi-graph fusion neural network prediction model, and use the data set to train the multi-graph fusion neural network prediction model to obtain a ship traffic flow prediction model;
[0011] S5. According to the ship behavior data, marine environment data, meteorological condition data, and traffic flow data of each ship in the target sea area obtained in real time, construct a ship information topology map, a marine environment topology map, a meteorological condition topology map, and a traffic flow topology map respectively, and input them into the ship traffic flow prediction model to obtain the ship traffic flow information at the future moment in the target sea area.
[0012] Further, in S2, the time-space matching processing of historical ship behavior data, historical marine environment data, historical meteorological condition data, and historical traffic flow data includes:
[0013] S21. Set a time reference, and align the timestamps of historical ship behavior data, historical marine environment data, historical meteorological condition data, and historical traffic flow data with the time reference;
[0014] S22. Divide the target sea area into uniform grid cells according to the size of the target sea area and the required resolution;
[0015] S23. Assign historical ship behavior data, historical marine environment data, historical meteorological condition data, and historical traffic flow data to the corresponding grid cells according to the timestamps and spatial coordinates, and determine the corresponding relationships among historical ship behavior data, historical marine environment data, historical meteorological condition data, and historical traffic flow data.
[0016] Further, in S3, constructing a ship information topology map according to the historical ship behavior data after time-space matching processing includes:
[0017] Define the nodes and edges in the ship information topology map respectively;
[0018] Define the ship as a node in the ship information topology map, and define the relative distance and interaction between adjacent ships as the edges in the ship information topology map;
[0019] Define the characteristics of the nodes and edges in the ship information topology graph respectively;
[0020] Define the characteristics of the nodes in the ship information topology graph as: the position, speed, and heading of the ship;
[0021] Define the characteristics of the edges in the ship information topology graph as: the relative distance, speed difference, and repulsive force field strength between adjacent ships;
[0022] Among them, the calculation formula for the repulsive force field strength is as follows:
[0023] F = k / d 船 ;
[0024] In the formula, F represents the repulsive force field strength between adjacent ships, k represents the repulsive force scaling coefficient, and d 船 represents the relative distance between adjacent ships.
[0025] Furthermore, in S3, constructing the marine environment topology graph based on the historical marine environment data after time-space matching processing includes:
[0026] Define the nodes and edges in the marine environment topology graph respectively;
[0027] Define the grid cells of the target sea area as the nodes in the marine environment topology graph, and define the connection relationship between adjacent grid cells as the edges in the ship information topology graph;
[0028] Define the characteristics of the nodes and edges in the marine environment topology graph respectively;
[0029] Define the characteristics of the nodes in the marine environment topology graph as: the water depth, water flow speed, and water flow direction of the grid cell;
[0030] Define the characteristics of the edges in the marine environment topology graph as: the distance between adjacent grid cells, the water flow speed difference, and the water flow direction consistency;
[0031] Among them, the calculation formula for the water flow direction consistency is as follows:
[0032] cosΔφ = cos(φ 1 -φ 2 );
[0033] In the formula, cosΔφ represents the water flow direction consistency between adjacent grid cells, φ represents the water flow direction, and φ 1 、φ 2 represent the water flow directions of adjacent grid cells respectively.
[0034] Furthermore, in S3, constructing the meteorological condition topology graph based on the historical meteorological condition data after time-space matching processing includes:
[0035] Define the nodes and edges in the meteorological condition topology map respectively;
[0036] Define the grid cells in the target sea area as the nodes in the meteorological condition topology map, and define the connection relationship between adjacent grid cells as the edges in the meteorological condition topology map;
[0037] Define the characteristics of the nodes and edges in the meteorological condition topology map respectively;
[0038] Define the characteristics of the nodes in the meteorological condition topology map as: wind speed, wind direction, visibility and wave height of the grid cell;
[0039] Define the characteristics of the edges in the meteorological condition topology map as: wind direction consistency, wind speed difference and wave height difference between adjacent grid cells;
[0040] Among them, the calculation formula of wind direction consistency is as follows:
[0041] cosΔα = cos(α 1 -α 2 );
[0042] In the formula, cosΔα represents the wind direction consistency between adjacent grid cells, α represents the wind direction, and α 1 , α 2 represent the wind directions of adjacent grid cells respectively.
[0043] Furthermore, in S3, constructing a traffic flow topology map based on the historical traffic flow data after time-space matching processing includes:
[0044] Define the nodes and edges in the traffic flow topology map respectively;
[0045] Define the grid cells in the target sea area as the nodes in the traffic flow topology map, and define the connection relationship between adjacent grid cells as the edges in the traffic flow topology map;
[0046] Define the characteristics of the nodes and edges in the traffic flow topology map respectively;
[0047] Define the characteristics of the nodes in the traffic flow topology map as: the number of ships, ship density and average speed in the grid cell;
[0048] Define the characteristics of the edges in the traffic flow topology map as: the number of ship flows, ship flow direction and average speed difference between adjacent grid cells; among them, the value range of the ship flow direction is [0°, 360°].
[0049] Furthermore, in S4, construct a multi-graph fusion neural network prediction model, and the multi-graph fusion neural network prediction model includes:
[0050] An input layer for inputting a ship information topology map, an ocean environment topology map, a meteorological condition topology map, and a traffic flow topology map;
[0051] Four parallel spatio-temporal graph convolutional layers:
[0052] The ship information graph convolutional layer is used to extract the spatio-temporal dependence relationship between ships according to the ship information topology map and output the node features of the ship information topology map after graph convolution;
[0053] The ocean environment graph convolutional layer is used to extract the spatial distribution and temporal variation of the ocean environment according to the ocean environment topology map and output the node features of the ocean environment topology map after graph convolution;
[0054] The meteorological condition graph convolutional layer is used to extract the spatial distribution and temporal variation of meteorological conditions according to the meteorological condition topology map and output the node features of the meteorological condition topology map after graph convolution;
[0055] The traffic flow graph convolutional layer is used to extract the spatial distribution and temporal variation of traffic flow according to the traffic flow topology map and output the node features of the traffic flow topology map after graph convolution;
[0056] A cross-attention mechanism for fusing the features output by the four spatio-temporal graph convolutional layers to obtain fused features;
[0057] A gated recurrent unit layer for outputting a hidden state vector according to the fused features;
[0058] A fully connected layer for outputting a prediction result according to the hidden state vector;
[0059] An output layer for outputting the ship traffic flow information in the target sea area at a future moment according to the prediction result.
[0060] The present invention also provides a ship traffic flow prediction system based on multi-source data fusion for performing a ship traffic flow prediction method based on multi-source data fusion described in any one of the above, and the system includes the following modules:
[0061] A data acquisition module for acquiring historical ship behavior data, historical ocean environment data, historical meteorological condition data, and historical traffic flow data of each ship in the target sea area;
[0062] A preprocessing module connected to the data acquisition module for performing spatio-temporal matching processing on the historical ship behavior data, historical ocean environment data, historical meteorological condition data, and historical traffic flow data;
[0063] The topological graph construction module, connected to the preprocessing module, is used to construct a ship information topological graph, a marine environment topological graph, a meteorological condition topological graph, and a traffic flow topological graph respectively according to the historical ship behavior data, historical marine environment data, historical meteorological condition data, and historical traffic flow data after time-space matching processing, and construct a data set according to the ship information topological graph, the marine environment topological graph, the meteorological condition topological graph, and the traffic flow topological graph;
[0064] The model construction module, connected to the topological graph construction module, is used to construct a multi-graph fusion neural network prediction model, and use the data set to train the multi-graph fusion neural network prediction model to obtain a ship traffic flow prediction model;
[0065] The output module, connected to the model construction module, is used to construct a ship information topological graph, a marine environment topological graph, a meteorological condition topological graph, and a traffic flow topological graph respectively according to the ship behavior data, marine environment data, meteorological condition data, and traffic flow data of each ship in the target sea area obtained in real time, and input them into the ship traffic flow prediction model to obtain the ship traffic flow information at the future moment in the target sea area.
[0066] The embodiments of the present invention have the following technical effects:
[0067] By combining the ship behavior data, marine environment data, meteorological condition data, and traffic flow data of each ship in the target sea area, the present invention performs time-space matching processing on all data, constructs topological graphs of different data respectively, defines the attributes of nodes and edges of each topological graph, and comprehensively considers the dynamic changes and interactions of marine environment data, meteorological condition data, and traffic flow data in time and space on ship behavior, improving the prediction accuracy of ship traffic flow. At the same time, a multi-graph fusion neural network prediction model is constructed by using a graph convolutional network and a cross-attention mechanism. The ship information graph, marine environment graph, meteorological condition graph, and traffic flow graph are processed by multiple graph convolutional networks respectively to extract high-level features in each graph structure, and then the features of different graph structures are effectively integrated through the cross-attention mechanism, enabling the output of each graph convolutional layer to pay attention to the information of other graph convolutional layers, so as to better integrate the information of different graph structures, enhancing the model's understanding ability of complex spatio-temporal relationships, improving the prediction effect of the model, realizing real-time prediction of ship traffic flow, improving prediction accuracy, providing a basis for ship planning and management decisions, and ensuring the safe, convenient, and efficient navigation of ships. Description of the Drawings
[0068] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0069] Figure 1 is a flowchart of a ship traffic flow prediction method based on multi-source data fusion provided by an embodiment of the present invention;
[0070] Figure 2 is a schematic structural diagram of a ship traffic flow prediction system based on multi-source data fusion provided by an embodiment of the present invention. Specific Embodiments
[0071] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0072] The present invention proposes a ship traffic flow prediction method based on multi-source data fusion. Figure 1 is a flowchart of a ship traffic flow prediction method based on multi-source data fusion provided by an embodiment of the present invention. Refer to Figure 1 , specifically including:
[0073] S1. Obtain the historical ship behavior data, historical marine environment data, historical meteorological condition data, and historical traffic flow data of each ship in the target sea area.
[0074] In some embodiments, the historical ship behavior data includes, but is not limited to: the position, speed, heading, etc. of the ship, which can be obtained through the Automatic Identification System (AIS);
[0075] The marine environment data includes, but is not limited to: water depth, water flow direction, water flow speed, etc., which can be obtained through marine management agencies, third-party data platforms, or sensor networks;
[0076] The meteorological condition data includes, but is not limited to: wind speed, wind direction, visibility, wave height, etc., which can be obtained through meteorological service agencies, third-party data platforms, or sensor networks;
[0077] Traffic flow data includes, but is not limited to: the number of ships, distribution, etc., which can be obtained through port management agencies, third-party data platforms or sensor networks.
[0078] S2. Perform time-space matching processing on historical ship behavior data, historical marine environment data, historical meteorological condition data and historical traffic flow data.
[0079] Specifically include:
[0080] S21. Set a time reference, and align the timestamps of historical ship behavior data, historical marine environment data, historical meteorological condition data and historical traffic flow data with the time reference.
[0081] In some embodiments, Coordinated Universal Time (UTC) can be used as the time reference, convert the timestamps corresponding to each data into UTC time, and adjust them to the same time granularity.
[0082] S22. Divide the target sea area into uniform grid cells according to the size of the target sea area and the required resolution.
[0083] In some embodiments, each grid cell can be regarded as a node in the graph structure, and each node has its specific position coordinates.
[0084] S23. Assign historical ship behavior data, historical marine environment data, historical meteorological condition data and historical traffic flow data into the corresponding grid cells according to the timestamps and spatial coordinates, and determine the corresponding relationships among historical ship behavior data, historical marine environment data, historical meteorological condition data and historical traffic flow data.
[0085] In some embodiments, if the sampling frequency of a certain type of data is inconsistent with that of other data, interpolation or downsampling is also required to ensure data synchronization.
[0086] In some embodiments, data missing may occur in time or space. For this situation, the data of adjacent points can be used to fill in through interpolation methods, such as linear interpolation, Kriging interpolation, etc.
[0087] In some embodiments, in order to improve the effect of model training, it is usually necessary to perform standardization or normalization processing on the data so that the data is within the same scale range. For example, use Z-score standardization or min-max scaling method.
[0088] Arrange the data that is continuous in time in chronological order to form a time series, and ensure that the data at each moment contains the corresponding spatial position information.
[0089] Time-space matching can reduce errors caused by data misalignment, improve the accuracy of prediction results, ensure the unity of all data in the time axis and spatial dimension, and help the model better learn the internal relationships between data.
[0090] S3. Based on the historical ship behavior data, historical marine environment data, historical meteorological condition data, and historical traffic flow data processed by time-space matching, construct a ship information topology map, a marine environment topology map, a meteorological condition topology map, and a traffic flow topology map respectively, and construct a data set according to the ship information topology map, the marine environment topology map, the meteorological condition topology map, and the traffic flow topology map.
[0091] In some embodiments, constructing a ship information topology map based on the historical ship behavior data processed by time-space matching includes:
[0092] Define the nodes and edges in the ship information topology map respectively;
[0093] Define the ship as a node in the ship information topology map, and define the relative distance and interaction between adjacent ships as the edges in the ship information topology map;
[0094] Define the characteristics of the nodes and the characteristics of the edges in the ship information topology map respectively;
[0095] Define the characteristics of the nodes in the ship information topology map as: the position, speed, and heading of the ship;
[0096] Define the characteristics of the edges in the ship information topology map as: the relative distance, speed difference, and repulsive force field intensity between adjacent ships;
[0097] Among them, the calculation formula of the repulsive force field intensity is as follows:
[0098] F = k / d 船 ;
[0099] In the formula, F represents the repulsive force field intensity between adjacent ships, k represents the repulsive force scaling coefficient, and d 船 represents the relative distance between adjacent ships.
[0100] By defining the relative distance and speed difference as edge features, it can help identify potential collision risks, and introducing the repulsive force field intensity can be used to simulate the mutual repulsion between ships, help predict and avoid dangerous situations, significantly improve the prediction accuracy and interpretability of the model, and improve the understanding of complex ship behaviors.
[0101] In some embodiments, constructing a marine environment topology map based on the historical marine environment data processed by time-space matching includes:
[0102] Define the nodes and edges in the marine environment topology map respectively;
[0103] Define the grid cells in the target sea area as the nodes in the marine environmental topology graph, and define the connection relationship between adjacent grid cells as the edges in the ship information topology graph;
[0104] Define the characteristics of the nodes and edges in the marine environmental topology graph respectively;
[0105] Define the characteristics of the nodes in the marine environmental topology graph as: the water depth, water flow velocity and water flow direction of the grid cell;
[0106] Define the characteristics of the edges in the marine environmental topology graph as: the distance between adjacent grid cells, the water flow velocity difference and the water flow direction consistency;
[0107] Among them, the calculation formula of the water flow direction consistency is as follows:
[0108] cosΔφ = cos(φ 1 - φ 2 );
[0109] In the formula, cosΔφ represents the water flow direction consistency between adjacent grid cells, φ represents the water flow direction, and φ 1 , φ 2 respectively represent the water flow directions of the adjacent grid cells themselves.
[0110] The ocean is a complex system that contains various physical processes. Using these characteristics can simulate these processes to a certain extent. Defining the water flow velocity difference can help identify the strength changes of the water flow, while the consistency of the water flow direction helps analyze the stability of the water flow. By defining such edge characteristics, the dynamic interactions between points in the ocean can be captured, thereby establishing a more coherent relationship in the time dimension, which significantly improves the effect of predicting future states or understanding historical patterns.
[0111] In some embodiments, constructing a meteorological condition topology graph based on the historical meteorological condition data after time-space matching processing includes:
[0112] Define the nodes and edges in the meteorological condition topology graph respectively;
[0113] Define the grid cells in the target sea area as the nodes in the meteorological condition topology graph, and define the connection relationship between adjacent grid cells as the edges in the meteorological condition topology graph;
[0114] Define the characteristics of the nodes and edges in the meteorological condition topology graph respectively;
[0115] Define the characteristics of the nodes in the meteorological condition topology graph as: the wind speed, wind direction, visibility and wave height of the grid cell;
[0116] Define the characteristics of the edges in the meteorological condition topology map as: the wind direction consistency, the wind speed difference, and the wave height difference between adjacent grid cells;
[0117] Among them, the calculation formula for the wind direction consistency is as follows:
[0118] cosΔα = cos(α 1 - α 2 );
[0119] In the formula, cosΔα represents the wind direction consistency between adjacent grid cells, α represents the wind direction, and α 1 , α 2 respectively represent the wind directions of the respective adjacent grid cells.
[0120] The wind direction consistency, the wind speed difference, and the wave height difference can help the model capture the changes in local meteorological conditions. For example, the wind speed difference can reflect the gradient of the wind field, which is very important for predicting storm paths or the sailing speed under the influence of wind force. The wind direction consistency and the wind speed difference can help identify the stability and intensity changes of the wind field, and this information is crucial for predicting the wind force conditions that a ship may encounter. The wave height difference can be used to analyze the propagation and attenuation of waves, which is very important for evaluating the safety and comfort of ship navigation. High waves may cause the ship to pitch, affecting the sailing speed and safety. These characteristics help the model understand the interactions between different locations, thereby establishing more coherent relationships in the time and space dimensions and more accurately understanding and predicting ship traffic flow.
[0121] In some embodiments, constructing a traffic flow topology map based on the historical traffic flow data after time - space matching processing includes:
[0122] Define the nodes and edges in the traffic flow topology map respectively;
[0123] Define the grid cells of the target sea area as the nodes in the traffic flow topology map, and define the connection relationship between adjacent grid cells as the edges in the traffic flow topology map;
[0124] Define the characteristics of the nodes and the edges in the traffic flow topology map respectively;
[0125] Define the characteristics of the nodes in the traffic flow topology map as: the number of ships, the ship density, and the average speed within the grid cell;
[0126] Define the characteristics of the edges in the traffic flow topology map as: the number of ship flows, the ship flow direction, and the average speed difference between adjacent grid cells; among them, the value range of the ship flow direction is [0°, 360°].
[0127] Among them, the number of ship flows refers to the number of ships flowing from one grid cell to another adjacent grid or area. This feature can help the model understand the intensity of ship flows between different grids or areas. The direction of ship flow refers to the main moving direction of ships flowing from one grid or area to another adjacent grid or area. This feature can help the model understand the directionality of ship flows, thus better predicting future traffic flow patterns. The direction of ship flow is usually represented by an angle, ranging from 0 to 360 degrees. For example, 0 degrees represents the due north direction, 90 degrees represents the due east direction, 180 degrees represents the due south direction, and 270 degrees represents the due west direction.
[0128] The number of ship flows, flow direction, and average speed difference can help the model capture subtle changes in a local area. For example, the number of ship flows can reflect the busyness of a certain area, while the average speed difference can reveal the speed differences between different areas. The number of ship flows and direction can help the model identify different traffic patterns, such as busy shipping lanes, avoidance behaviors, etc. These patterns are very useful for predicting future traffic flows; the average speed difference can be used to analyze the behaviors of ships, such as whether they slow down or accelerate in certain areas, which helps to understand the navigation strategies and behavior patterns of ships. By analyzing the direction and number of ship flows, potential collision risk areas can be identified. For example, if the ship density in a certain area is high and the flow directions are inconsistent, the collision risk may be relatively high. Combining the number and direction of ship flows can more comprehensively capture the dynamic characteristics of traffic flows, improving the prediction accuracy and practicality of the model.
[0129] S4. Construct a multi-graph fusion neural network prediction model, and use the data set to train the multi-graph fusion neural network prediction model to obtain a ship traffic flow prediction model.
[0130] Specifically, the multi-graph fusion neural network prediction model includes:
[0131] An input layer for inputting the ship information topology graph, ocean environment topology graph, meteorological condition topology graph, and traffic flow topology graph;
[0132] Four parallel spatio-temporal graph convolutional layers:
[0133] The ship information graph convolutional layer is used to extract the spatio-temporal dependence relationships between ships based on the ship information topology graph and output the node features of the ship information topology graph after graph convolution;
[0134] The ocean environment graph convolutional layer is used to extract the spatial distribution and temporal changes of the ocean environment based on the ocean environment topology graph and output the node features of the ocean environment topology graph after graph convolution;
[0135] The meteorological condition graph convolutional layer is used to extract the spatial distribution and temporal changes of meteorological conditions based on the meteorological condition topology graph and output the node features of the meteorological condition topology graph after graph convolution;
[0136] The traffic flow graph convolutional layer is used to extract the spatial distribution and temporal variation of traffic flow based on the traffic flow topology graph, and output the node features of the traffic flow topology graph after graph convolution;
[0137] The cross-attention mechanism is used to fuse the features output by the four spatio-temporal graph convolutional layers to obtain fused features;
[0138] The gated recurrent unit layer is used to process time series data, capture long-term dependencies, and output a hidden state vector according to the fused features;
[0139] The fully connected layer is used to output the prediction result according to the hidden state vector;
[0140] The output layer is used to output the ship traffic flow information in the target sea area at future moments according to the prediction result.
[0141] The multi-graph fusion neural network prediction model combines the advantages of spatio-temporal graph convolutional networks, cross-attention mechanisms, and gated recurrent units. Spatio-temporal graph convolutional networks can more effectively process data in both time and space dimensions simultaneously, capturing complex spatio-temporal dependencies. The cross-attention mechanism enables the model to focus on important nodes and edges in different topology graphs, interact and fuse information from different graph structures. Gated recurrent units are good at processing time series data, thus being able to better capture long-distance dependencies. The marine environment, meteorological conditions, and traffic flow are all highly dynamically changing and can affect the behavior of ships. The multi-graph fusion neural network prediction model can better understand and adapt to these dynamic changes, provide more accurate real-time predictions, significantly improve the prediction efficiency, and thus improve the accuracy, real-time performance, and practicality of ship traffic flow predictions.
[0142] In some embodiments, the calculation processes of the cross-attention mechanism and the gated recurrent unit are as follows:
[0143] Mode A represents the node features of the ship information topology graph after passing through the spatio-temporal graph convolutional layer;
[0144] Mode B represents the node features of the marine environment topology graph after passing through the spatio-temporal graph convolutional layer;
[0145] Mode C represents the node features of the meteorological condition topology graph after passing through the spatio-temporal graph convolutional layer;
[0146] Mode D represents the node features of the traffic flow topology graph after passing through the spatio-temporal graph convolutional layer.
[0147] For mode A, the node feature matrix X A ∈ , represents the set of real numbers, N represents the number of nodes, d ARepresents the feature dimension of the node; the same applies to modality B, modality C, and modality D.
[0148] Perform a linear transformation on the data of each modality to generate query, key, and value vectors. For modality A:
[0149] Query matrix Q A = X A × W A Q , where W A Q represents the query weight matrix of modality A;
[0150] Key matrix K A = X A × W A K , where W A K represents the key weight matrix of modality A;
[0151] Value matrix V A = X A × W A V , where W A V represents the value weight matrix of modality A;
[0152] The same applies to modality B, modality C, and modality D.
[0153] Calculate the attention scores of each modality to other modalities; taking the cross-attention of modality A to modality B as an example:
[0154] Calculate the attention score matrix S AB :
[0155] ;
[0156] where d k represents the dimension of the key matrix.
[0157] Use the Softmax function to normalize the attention score matrix:
[0158] Nor AB = softmax(S AB ); where Nor AB represents the normalized attention score matrix.
[0159] Use the normalized attention score matrix to perform a weighted sum on the value matrix of modality B to obtain the final cross-attention output:
[0160] O AB = NorAB ×V B ; wherein, O AB represents the cross-attention output of modality A to modality B, and V B represents the value matrix of modality B.
[0161] Fuse the cross-attention outputs of all modalities to obtain a fused feature. Exemplarily, the concatenated cross-attention output O can be obtained by concatenation. Input the concatenated cross-attention output O into a gated recurrent unit for time series prediction:
[0162] h t = GRU(h t-1 , O);
[0163] wherein, h t represents the hidden state at the current moment, GRU represents the gated recurrent unit, and h t-1 represents the hidden state at the previous moment, i.e., the hidden state vector.
[0164] In some embodiments, the mean squared error (MSE) can be used as the loss function to measure the difference between the prediction result and the actual value.
[0165] S5. Respectively construct a ship information topology map, a marine environment topology map, a meteorological condition topology map, and a traffic flow topology map based on the ship behavior data, marine environment data, meteorological condition data, and traffic flow data of each ship in the target sea area obtained in real time, and input them into the ship traffic flow prediction model to obtain the ship traffic flow information in the target sea area at a future moment.
[0166] In some embodiments, the ship traffic flow information at a future moment includes, but is not limited to, the positions, speeds, headings, interactions (such as relative distances, collision risks) of each ship, the density change, speed distribution, and flow characteristics (such as time series analysis, directional analysis, and periodic changes of traffic flow) of the ships in the target sea area, etc.
[0167] The present invention combines the ship behavior data, marine environment data, meteorological condition data, and traffic flow data of each ship in the target sea area, performs time-space matching processing on all data, and constructs topological graphs of different data respectively. The attributes of nodes and edges of each topological graph are defined respectively, comprehensively considering the dynamic changes and interactions of marine environment data, meteorological condition data, and traffic flow data in time and space on ship behavior, improving the prediction accuracy of ship traffic flow. At the same time, a multi-graph fusion neural network prediction model is constructed by using a graph convolutional network and a cross-attention mechanism. The ship information graph, marine environment graph, meteorological condition graph, and traffic flow graph are processed by multiple graph convolutional networks respectively to extract high-level features in each graph structure, and then the features of different graph structures are effectively integrated through the cross-attention mechanism, enabling the output of each graph convolutional layer to pay attention to the information of other graph convolutional layers, so as to better integrate the information of different graph structures, enhance the model's understanding ability of complex spatio-temporal relationships, improve the prediction effect of the model, realize the real-time prediction of ship traffic flow, improve the prediction accuracy, provide a basis for ship planning and management decisions, and ensure the safe, convenient, and efficient navigation of ships.
[0168] Figure 2 FIG. 4 is a schematic structural diagram of a ship traffic flow prediction system based on multi-source data fusion provided by an embodiment of the present invention. The system is used to execute a ship traffic flow prediction method based on multi-source data fusion described in the above embodiment, as Figure 2 shown, the system includes the following modules:
[0169] A data acquisition module, configured to acquire historical ship behavior data, historical marine environment data, historical meteorological condition data, and historical traffic flow data of each ship in the target sea area;
[0170] A preprocessing module, connected to the data acquisition module, configured to perform time-space matching processing on the historical ship behavior data, historical marine environment data, historical meteorological condition data, and historical traffic flow data;
[0171] A topological graph construction module, connected to the preprocessing module, configured to respectively construct a ship information topological graph, a marine environment topological graph, a meteorological condition topological graph, and a traffic flow topological graph according to the historical ship behavior data, historical marine environment data, historical meteorological condition data, and historical traffic flow data after time-space matching processing, and construct a data set according to the ship information topological graph, the marine environment topological graph, the meteorological condition topological graph, and the traffic flow topological graph;
[0172] A model construction module, connected to the topological graph construction module, configured to construct a multi-graph fusion neural network prediction model, and use the data set to train the multi-graph fusion neural network prediction model to obtain a ship traffic flow prediction model;
[0173] An output module, connected to the model construction module, is used to respectively construct a ship information topology map, a marine environment topology map, a meteorological condition topology map, and a traffic flow topology map based on the ship behavior data, marine environment data, meteorological condition data, and traffic flow data of each ship in the target sea area obtained in real time, and input them into the ship traffic flow prediction model to obtain the ship traffic flow information at a future moment in the target sea area.
[0174] It should be noted that the terms used in the present invention are only for describing specific embodiments and do not limit the scope of the present application. As shown in the specification of the present invention, unless the context clearly indicates an exception, words such as "a", "an", "one", and / or "the" do not specifically refer to the singular and may also include the plural. The term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or also includes elements inherent to such a process, method or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method or device including the said element.
[0175] It should also be noted that the orientation or positional relationship indicated by terms such as "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. Unless otherwise clearly specified and defined, terms such as "installed", "connected", "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0176] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.
Claims
1. A ship traffic flow prediction method based on multi-source data fusion, characterized in that: The steps include: S1. Obtain historical ship behavior data, historical marine environment data, historical meteorological condition data and historical traffic flow data of each ship in the target sea area; S2, performing time-space matching processing on the historical ship behavior data, the historical marine environment data, the historical meteorological condition data and the historical traffic flow data; S3, constructing a ship information topology map, a marine environment topology map, a meteorological condition topology map, and a traffic flow topology map respectively according to the historical ship behavior data, historical marine environment data, historical meteorological condition data, and historical traffic flow data after time-space matching processing, and constructing a data set according to the ship information topology map, the marine environment topology map, the meteorological condition topology map, and the traffic flow topology map; The construction of the ship information topology map includes: Define the nodes and edges in the ship information topology graph respectively; The ships are defined as nodes in the ship information topology graph, and the relative distances and interactions between adjacent ships are defined as edges in the ship information topology graph; The characteristics of nodes and edges in the ship information topology graph are defined respectively; The characteristics of the nodes in the ship information topology map are defined as: the position, speed and heading of the ship; The characteristics of the edges in the ship information topology graph are defined as: the relative distance between adjacent ships, the speed difference and the repulsive force field strength; The calculation formula of the repulsive force field strength is as follows: F=k / d 船 ; Where F represents the repulsive force field strength between adjacent ships, k represents the repulsive force scaling factor, and d 船 Indicates the relative distance between adjacent ships; S4, constructing a multi-graph fusion neural network prediction model, and using the data set to train the multi-graph fusion neural network prediction model to obtain a ship traffic flow prediction model; The multi-graph fusion neural network prediction model includes: The input layer is used to input the ship information topology map, the ocean environment topology map, the meteorological condition topology map and the traffic flow topology map; Four spatiotemporal graph convolutional layers in parallel: The ship information graph convolution layer is used to extract the spatiotemporal dependency between ships based on the ship information topology graph, and output the node features of the ship information topology graph after graph convolution; The ocean environment graph convolution layer is used to extract the spatial distribution and temporal changes of the ocean environment based on the ocean environment topology map, and output the node features of the ocean environment topology map after graph convolution; The meteorological condition graph convolution layer is used to extract the spatial distribution and temporal changes of meteorological conditions based on the meteorological condition topology graph, and output the node features of the meteorological condition topology graph after graph convolution; The traffic flow graph convolution layer is used to extract the spatial distribution and temporal variation of traffic flow based on the traffic flow topology graph, and output the node features of the traffic flow topology graph after graph convolution; The cross attention mechanism is used to fuse the features output by the four spatiotemporal graph convolutional layers to obtain fused features; A gated recurrent unit layer is used to output a hidden state vector based on the fused features; A fully connected layer, which is used to output the prediction results based on the hidden state vector; The output layer is used to output the ship traffic flow information of the target sea area at the future time according to the prediction results; S5. Based on the ship behavior data, marine environment data, meteorological condition data and traffic flow data of each ship in the target sea area obtained in real time, a ship information topology map, a marine environment topology map, a meteorological condition topology map and a traffic flow topology map are respectively constructed, and input into the ship traffic flow prediction model to obtain the ship traffic flow information of the target sea area at the future time.
2. The method for predicting ship traffic flow based on multi-source data fusion according to claim 1 is characterized in that: In S2, performing time-space matching processing on the historical ship behavior data, the historical ocean environment data, the historical meteorological condition data, and the historical traffic flow data includes: S21, setting a time base, aligning the timestamps of the historical ship behavior data, the historical ocean environment data, the historical meteorological condition data, and the historical traffic flow data with the time base; S22, dividing the target sea area into uniform grid cells according to the size of the target sea area and the required resolution; S23, assigning the historical ship behavior data, the historical ocean environment data, the historical meteorological condition data and the historical traffic flow data to corresponding grid cells according to timestamps and spatial coordinates, and determining the corresponding relationship between the historical ship behavior data, the historical ocean environment data, the historical meteorological condition data and the historical traffic flow data.
3. The method for predicting ship traffic flow based on multi-source data fusion according to claim 2 is characterized in that: In S3, constructing a marine environment topology map based on the historical marine environment data after time-space matching processing includes: Define the nodes and edges in the marine environment topology graph respectively; The grid cells of the target sea area are defined as nodes in the marine environment topology map, and the connection relationship between adjacent grid cells is defined as edges in the ship information topology map; The characteristics of nodes and edges in the marine environment topology graph are defined respectively; The characteristics of the nodes in the ocean environment topology map are defined as: the water depth, water flow velocity and water flow direction of the grid unit; The characteristics of the edges in the ocean environment topology map are defined as: the distance between adjacent grid cells, the difference in water velocity, and the consistency of water flow direction; The calculation formula for the consistency of water flow direction is as follows: cosΔφ=cos(φ1-φ2); Where cosΔφ represents the consistency of water flow direction between adjacent grid cells, φ represents the water flow direction, and φ1 and φ2 represent the water flow directions of adjacent grid cells, respectively.
4. The ship traffic flow prediction method based on multi-source data fusion according to claim 2 is characterized in that: In S3, constructing a meteorological condition topology map based on the historical meteorological condition data after time-space matching processing includes: Define the nodes and edges in the meteorological condition topology graph respectively; The grid cells of the target sea area are defined as nodes in the meteorological condition topology map, and the connection relationship between adjacent grid cells is defined as edges in the meteorological condition topology map; The characteristics of nodes and edges in the meteorological condition topology graph are defined respectively; The characteristics of the nodes in the meteorological condition topology map are defined as: wind speed, wind direction, visibility and wave height of the grid unit; The characteristics of the edges in the meteorological condition topology graph are defined as: wind direction consistency, wind speed difference and wave height difference between adjacent grid cells; The calculation formula for wind direction consistency is as follows: cosΔα=cos(α1-α2); Where cosΔα represents the wind direction consistency between adjacent grid cells, α represents the wind direction, and α1 and α2 represent the wind directions of adjacent grid cells, respectively.
5. The method for predicting ship traffic flow based on multi-source data fusion according to claim 2 is characterized in that: In S3, constructing a traffic flow topology map based on the historical traffic flow data after time-space matching processing includes: Define the nodes and edges in the traffic flow topology graph respectively; The grid units of the target sea area are defined as nodes in the traffic flow topology map, and the connection relationship between adjacent grid units is defined as edges in the traffic flow topology map; Define the characteristics of nodes and edges in the traffic flow topology graph respectively; The characteristics of the nodes in the traffic flow topology map are defined as: the number of ships, ship density and average speed in the grid unit; The characteristics of the edges in the traffic flow topology graph are defined as: the number of ship flows, the ship flow direction and the average speed difference between adjacent grid cells; where the value range of the ship flow direction is [0°, 360°].
6. A ship traffic flow prediction system based on multi-source data fusion, used to implement the ship traffic flow prediction method based on multi-source data fusion as described in any one of claims 1 to 5, characterized in that: The system includes the following modules: A data acquisition module is used to acquire historical ship behavior data, historical marine environment data, historical meteorological condition data, and historical traffic flow data of each ship in the target sea area; A preprocessing module, connected to the data acquisition module, for performing time-space matching processing on the historical ship behavior data, the historical ocean environment data, the historical meteorological condition data and the historical traffic flow data; A topology map construction module is connected to the preprocessing module and is used to construct a ship information topology map, a marine environment topology map, a meteorological condition topology map and a traffic flow topology map respectively according to the historical ship behavior data, the historical marine environment data, the historical meteorological condition data and the historical traffic flow data after time-space matching processing, and to construct a data set according to the ship information topology map, the marine environment topology map, the meteorological condition topology map and the traffic flow topology map; A model building module, connected to the topology map building module, for building a multi-map fusion neural network prediction model, using the data set to train the multi-map fusion neural network prediction model to obtain a ship traffic flow prediction model; The output module is connected to the model building module and is used to construct a ship information topology map, a marine environment topology map, a meteorological condition topology map and a traffic flow topology map according to the ship behavior data, marine environment data, meteorological condition data and traffic flow data of each ship in the target sea area acquired in real time, and input them into the ship traffic flow prediction model to obtain the ship traffic flow information of the target sea area at future times.
Citation Information
Patent Citations
Traffic flow prediction method and system based on machine learning
CN118538035A