Multi-source data fusion-based ship traffic flow prediction method and system
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 existing technology is solved, and efficient, accurate and real-time prediction of ship traffic flow is achieved, ensuring the safe navigation of ships.
Patent Information
- Application Number
- CN202510238375.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-03-28
- 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-time performance, and poses safety risks.
Using a multi-source data fusion method, historical ship behavior data, marine environment data, meteorological condition data and traffic flow data in the target sea area are obtained and processed. Through time and space matching processing and topological map construction, a multi-graph fusion neural network prediction model is formed to achieve real-time prediction of ship traffic flow.
It improves the accuracy and real-time nature of ship traffic flow prediction, enhances the ability to understand complex space-time relationships, provides a reliable basis for ship planning and management decisions, and ensures the safe, convenient and efficient navigation of the ship.
Smart Images

Figure CN119721409A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship traffic flow prediction, and in particular to a ship traffic flow prediction method and system based on multi-source data fusion. Background Art
[0002] With the rapid development of my country's water transport industry, port channels, as the main trade routes for ocean transport, are becoming more and more important in international trade. The density of ships entering and leaving ports continues to increase, and the water 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 promoting scientific research.
[0003] At present, traditional ship traffic flow prediction usually only focuses on AIS data, while the ocean environment, meteorological conditions and traffic flow will have a significant impact on the ship traffic flow. Since the ocean environment, meteorological conditions and traffic flow are data of different modes and highly dynamically changing, the existing technology only relies on AIS data to hardly capture these changes comprehensively. It has certain limitations in the case of increasing number of ships and increasingly complex navigation environment. If data of multiple modes are constructed into a topological graph, there will be multiple ship information corresponding to the same ocean, meteorological and traffic flow information, which makes it difficult to reasonably define the attributes of nodes and edges, and easily causes information redundancy, resulting in waste of computing resources and time-consuming calculations, resulting in insufficient accuracy and real-time performance of ship traffic flow prediction, and thus 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 realize 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 realize 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, comprising the following steps: 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. Perform time-space matching processing on historical ship behavior data, historical marine environment data, historical meteorological condition data and 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; S4, constructing a multi-graph fusion neural network prediction model, using the data set to train the multi-graph fusion neural network prediction model, and obtaining a ship traffic flow prediction model; 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.
[0007] Furthermore, in S2, the time-space matching processing of 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 historical ship behavior data, historical marine environment data, historical meteorological condition data, and 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. Assign historical ship behavior data, historical ocean environment data, historical meteorological condition data and historical traffic flow data to corresponding grid cells according to timestamps and spatial coordinates, and determine the corresponding relationship between the historical ship behavior data, historical ocean environment data, historical meteorological condition data and historical traffic flow data.
[0008] Furthermore, in S3, constructing a ship information topology map based on the historical ship behavior data after time-space matching processing includes: Define the nodes and edges in the ship information topology graph respectively; 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.
[0009] Furthermore, 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 nodes in the ocean environment topology map are defined as: 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.
[0010] Further, 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.
[0011] Furthermore, 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 cells of the target sea area are defined as nodes in the traffic flow topology graph, and the connection relationship between adjacent grid cells is defined as edges in the traffic flow topology graph; Define the characteristics of nodes and edges in the traffic flow topology graph respectively; The characteristics of nodes in the traffic flow topology are defined as: the number of ships, ship density and average speed within the grid cell; 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°].
[0012] Furthermore, in S4, a multi-graph fusion neural network prediction model is constructed, and 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 future times based on the prediction results.
[0013] The present invention also provides a ship traffic flow prediction system based on multi-source data fusion, which is used to execute any of the ship traffic flow prediction methods based on multi-source data fusion described above, and 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, is used to perform time-space matching processing on historical ship behavior data, historical marine environment data, historical meteorological condition data and 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 is connected to the topology map building module and is used to build a multi-map fusion neural network prediction model. The multi-map fusion neural network prediction model is trained using a data set 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.
[0014] The embodiments of the present invention have the following technical effects: 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, defines the attributes of nodes and edges of each topological graph respectively, comprehensively considers the dynamic changes and mutual effects of marine environment data, meteorological condition data and traffic flow data in time and space on ship behavior, and improves the prediction accuracy of ship traffic flow. At the same time, a multi-graph fusion neural network prediction model is formed by using a graph convolution network and a cross-attention mechanism. The ship information graph, the marine environment graph, the meteorological condition graph and the traffic flow graph are processed respectively by multiple graph convolution networks, and the high-level features in each graph structure are extracted. Then, the features of different graph structures are effectively integrated through the cross-attention mechanism, so that the output of each graph convolution layer can pay attention to the information of other graph convolution layers, thereby better integrating the information of different graph structures, enhancing the model's ability to understand complex spatiotemporal 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 safe, convenient and efficient navigation of ships. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 It is a flow chart of a ship traffic flow prediction method based on multi-source data fusion provided by an embodiment of the present invention; Figure 2 It is a structural schematic diagram of a ship traffic flow prediction system based on multi-source data fusion provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0018] The present invention proposes a ship traffic flow prediction method based on multi-source data fusion. Figure 1 is a flow chart of a ship traffic flow prediction method based on multi-source data fusion provided by an embodiment of the present invention, see Figure 1, including: S1. Obtain 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.
[0019] In some embodiments, historical ship behavior data includes, but is not limited to: the position, speed, and heading of the ship, which can be obtained through the ship automatic identification system (AIS, Automatic Identification System); Marine environmental data include but are not limited to: water depth, current direction and current speed, etc., which can be obtained through marine management agencies, third-party data platforms or sensor networks; Meteorological condition data include but are 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; Traffic flow data includes but is not limited to: the number and distribution of ships, etc., which can be obtained through port management agencies, third-party data platforms or sensor networks.
[0020] S2. Perform time-space matching processing on historical ship behavior data, historical ocean environment data, historical meteorological condition data and historical traffic flow data.
[0021] Specifically include: S21. Set a time base, and align the timestamps of historical ship behavior data, historical ocean environment data, historical meteorological condition data, and historical traffic flow data with the time base.
[0022] In some embodiments, UTC time (Coordinated Universal Time) may be used as a time reference, and the timestamp corresponding to each data may be converted into UTC time and adjusted to the same time granularity.
[0023] S22. Divide the target sea area into uniform grid cells according to the size of the target sea area and the required resolution.
[0024] In some embodiments, each grid unit may be regarded as a node in a graph structure, and each node has its specific location coordinates.
[0025] S23. Assign historical ship behavior data, historical ocean environment data, historical meteorological condition data and historical traffic flow data to corresponding grid cells according to timestamps and spatial coordinates, and determine the corresponding relationship between the historical ship behavior data, historical ocean environment data, historical meteorological condition data and historical traffic flow data.
[0026] In some embodiments, if the sampling frequency of a certain type of data is inconsistent with that of other data, interpolation or downsampling is required to ensure data synchronization.
[0027] In some embodiments, data may be missing in time or space. In this case, data from adjacent points may be used to fill the gaps through interpolation methods, such as linear interpolation, Kriging interpolation, and the like.
[0028] In some embodiments, in order to improve the effect of model training, it is usually necessary to standardize or normalize the data so that the data is within the same scale range, for example, using Z-score standardization or minimum and maximum scaling method.
[0029] Arrange temporally continuous data in chronological order to form a time series, and ensure that the data at each moment contains the corresponding spatial location information.
[0030] Time-space matching can reduce errors caused by data misalignment, improve the accuracy of prediction results, ensure the uniformity of all data in time and space dimensions, and help the model better learn the intrinsic connections between data.
[0031] S3. Based on the historical ship behavior data, historical marine environment data, historical meteorological condition data and historical traffic flow data after time-space matching processing, construct the ship information topology map, marine environment topology map, meteorological condition topology map and traffic flow topology map respectively, and construct a data set based on the ship information topology map, marine environment topology map, meteorological condition topology map and traffic flow topology map.
[0032] In some embodiments, constructing a ship information topology map based on historical ship behavior data after time-space matching processing includes: Define the nodes and edges in the ship information topology graph respectively; 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.
[0033] By defining relative distance and speed difference as edge features, it can help identify potential collision risks, while introducing the repulsive force field strength can be used to simulate the mutual repulsion between ships, helping to predict and avoid dangerous situations, significantly improving the prediction accuracy and interpretability of the model, and enhancing the understanding of complex ship behavior.
[0034] In some embodiments, constructing an ocean environment topology map based on historical ocean 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 nodes in the ocean environment topology map are defined as: 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.
[0035] The ocean is a complex system that contains a variety of physical processes. These features can be used to simulate these processes to a certain extent. Defining the difference in water velocity can help identify changes in the strength of the water flow, while the consistency of the water flow direction is helpful in analyzing the stability of the water flow. By defining such edge features, 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.
[0036] In some embodiments, 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.
[0037] Wind direction consistency, wind speed difference, and wave height difference can help the model capture changes in local meteorological conditions. For example, wind speed difference can reflect the gradient of the wind field, which is very important for predicting storm paths or sailing speeds under the influence of wind. Wind direction consistency and wind speed difference can help identify the stability and intensity changes of the wind field. This information is crucial for predicting the wind conditions that ships may encounter. Wave height difference can be used to analyze the propagation and attenuation of waves, which is very important for assessing the safety and comfort of ship navigation. High waves can cause ships to jolt, affecting sailing speed and safety. These features help the model understand the interactions between different locations, thereby establishing a more coherent relationship in time and space dimensions, and more accurately understanding and predicting ship traffic flows.
[0038] In some embodiments, constructing a traffic flow topology map based on historical traffic flow data after time-space matching processing includes: Define the nodes and edges in the traffic flow topology graph respectively; The grid cells of the target sea area are defined as nodes in the traffic flow topology graph, and the connection relationship between adjacent grid cells is defined as edges in the traffic flow topology graph; Define the characteristics of nodes and edges in the traffic flow topology graph respectively; The characteristics of nodes in the traffic flow topology are defined as: the number of ships, ship density and average speed within the grid cell; 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°].
[0039] Among them, the number of ship flows refers to the number of ships flowing from one grid unit 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 movement 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 flow and better predict future traffic flow patterns. The direction of ship flow is usually expressed in angles ranging from 0 to 360 degrees. For example, 0 degrees represents the north direction, 90 degrees represents the east direction, 180 degrees represents the south direction, and 270 degrees represents the west direction.
[0040] The number of ship flows, flow directions, and average speed differences can help the model capture subtle changes in local areas. For example, the number of ship flows can reflect how busy an area is, while the average speed difference can reveal speed differences between different areas. The number and direction of ship flows can help the model identify different traffic patterns, such as busy waterways, avoidance behaviors, etc. These patterns are very useful for predicting future traffic flows; the average speed difference can be used to analyze the behavior of ships, such as whether to slow down or speed up 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 density of ships in an area is high and the flow direction is inconsistent, the risk of collision may be high. Combining the number and direction of ship flows can more comprehensively capture the dynamic characteristics of traffic flows and improve the prediction accuracy and practicality of the model.
[0041] S4. Construct a multi-graph fusion neural network prediction model, use the data set to train the multi-graph fusion neural network prediction model, and obtain a ship traffic flow prediction model.
[0042] Specifically, 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; The gated recurrent unit layer is used to process time series data, capture long-term dependencies, and 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 future times based on the prediction results.
[0043] The multi-graph fusion neural network prediction model combines the advantages of spatiotemporal graph convolutional networks, cross-attention mechanisms, and gated recurrent units. The spatiotemporal graph convolutional networks can more effectively process data in both time and space dimensions and capture complex spatiotemporal dependencies. The cross-attention mechanism enables the model to infuse important nodes and edges in different topological graphs, interact and fuse information from different graph structures, and the gated recurrent unit is good at processing time series data, so it can better capture long-distance dependencies. The marine environment, meteorological conditions, and traffic flow are all highly dynamic and will 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, and significantly improve prediction efficiency, thereby improving the accuracy, real-time, and practicality of ship traffic flow predictions.
[0044] In some embodiments, the calculation process of the crisscross attention mechanism and the gated recurrent unit is as follows: Mode A represents the node features of the ship information topology graph after the spatiotemporal graph convolution layer; Mode B represents the node features of the ocean environment topology graph after the spatiotemporal graph convolution layer; Mode C represents the node features of the meteorological condition topology graph after the spatiotemporal graph convolution layer; Mode D represents the node features of the traffic flow topology graph after the spatiotemporal graph convolution layer.
[0045] For mode A, the node feature matrix X A ∈ , represents a real number set, N represents the number of nodes, d A Represents the characteristic dimension of the node; the same applies to mode B, mode C, and mode D.
[0046] Perform a linear transformation on the data of each modality to generate query, key, and value vectors. For modality A: Query Matrix Q A =X A ×W A Q , where W AQ represents the query weight matrix of modality A; Key matrix K A =X A ×W A K , where W A K represents the key weight matrix of mode A; Value Matrix V A =X A ×W A V , where W A V Represents the value weight matrix of mode A; The same goes for mode B, mode C, and mode D.
[0047] Calculate the attention score of each modality to other modalities; take the cross attention of modality A to modality B as an example: Calculate the attention score matrix S AB : ; Among them, d k Indicates the dimensions of the key matrix.
[0048] Use the Softmax function to normalize the attention score matrix: Nor AB =softmax(S AB ); among them, Nor AB Represents the normalized attention score matrix.
[0049] The normalized attention score matrix is used to perform weighted summation on the value matrix of modality B to obtain the final cross-attention output: O AB = Nor AB ×V B ; Among them, O AB represents the cross attention output of modality A to modality B, V B Represents the matrix of values for mode B.
[0050] The cross-attention outputs of all modalities are fused to obtain a fusion feature. For example, the spliced cross-attention output O can be obtained by splicing. The spliced cross-attention output O is input into the gated recurrent unit for time series prediction: h t =GRU(h t-1 ,O); Among them, h t represents the hidden state at the current moment, GRU represents the gated recurrent unit, and h t-1Represents the hidden state at the previous moment, that is, the hidden state vector.
[0051] In some embodiments, mean square error (MSE) may be used as a loss function to measure the difference between the predicted result and the actual value.
[0052] 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.
[0053] In some embodiments, the ship traffic flow information at future times includes but is not limited to the position, speed, heading, interaction (such as relative distance, collision risk) of each ship, density changes of ships in the target sea area, speed distribution, flow characteristics (such as time series analysis, directional analysis, and periodic changes of traffic flow), etc.
[0054] 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, defines the attributes of nodes and edges of each topological graph respectively, comprehensively considers the dynamic changes and mutual effects of marine environment data, meteorological condition data and traffic flow data in time and space on ship behavior, and improves the prediction accuracy of ship traffic flow. At the same time, a multi-graph fusion neural network prediction model is formed by using a graph convolution network and a cross-attention mechanism. The ship information graph, the marine environment graph, the meteorological condition graph and the traffic flow graph are processed respectively by multiple graph convolution networks, and the high-level features in each graph structure are extracted. Then, the features of different graph structures are effectively integrated through the cross-attention mechanism, so that the output of each graph convolution layer can pay attention to the information of other graph convolution layers, thereby better integrating the information of different graph structures, enhancing the model's ability to understand complex spatiotemporal 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 safe, convenient and efficient navigation of ships.
[0055] Figure 2 is a schematic diagram of the structure 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, such as Figure 2 As shown, 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, is used to perform time-space matching processing on historical ship behavior data, historical marine environment data, historical meteorological condition data and 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 is connected to the topology map building module and is used to build a multi-map fusion neural network prediction model. The multi-map fusion neural network prediction model is trained using a data set 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.
[0056] It should be noted that the terms used in the present invention are only for describing specific embodiments, rather than limiting the scope of the present application. As shown in the present specification, unless the context clearly indicates an exception, the words "one", "a", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of more restrictions, the elements defined by the sentence "include one..." do not exclude the presence of other identical elements in the process, method or device including the elements.
[0057] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are 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 on the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. 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 a direct connection, or it can be an indirect connection through an intermediate medium, or it can be a connection between the 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.
[0058] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions 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; 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; 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 1 is characterized in that: In S3, constructing a ship information topology map based on the historical ship behavior data after time-space matching processing 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.
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 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.
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 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.
6. 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°].
7. The method for predicting ship traffic flow based on multi-source data fusion according to claim 1 is characterized in that: In S4, a multi-graph fusion neural network prediction model is constructed, and 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 future times based on the prediction results.
8. 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 7, 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
Ship traffic flow prediction method based on improved graph convolutional neural network
CN114565124A
Port ship traffic flow prediction method considering spatial dependence
CN114565180A
Traffic flow prediction method and system based on machine learning
CN118538035A
Multi-modal traffic flow prediction method based on multi-source data feature fusion
CN119323879A
Dynamic traffic guidance method and device based on multi-source data fusion and storage medium
CN119323883A