Channel ship congestion prediction method and system based on multi-agent cooperation, and medium

By constructing a dynamic topology map of the waterway and combining it with deep learning technology, the method of predicting waterway congestion through multi-agent collaboration solves the problems of insufficient prediction timeliness and weak data adaptation capability in existing technologies. It achieves accurate prediction of medium and long-term trends and adaptive processing of multi-source data, thereby improving the accuracy and robustness of prediction.

CN122175416APending Publication Date: 2026-06-09ZHONGSHUI SANLI DATA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGSHUI SANLI DATA TECH CO LTD
Filing Date
2026-05-11
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing waterway vessel congestion prediction technologies suffer from insufficient prediction timeliness, weak multi-source data adaptability, and poor model adaptability, making it difficult to achieve accurate prediction of medium- and long-term trends and effective adaptation to different waterways and scenarios.

Method used

A multi-agent collaborative approach is adopted. By constructing a dynamic topology map of the waterway, combining a bi-branch temporal graph convolutional network and deep reinforcement learning, the connectivity weights between nodes are dynamically calculated to capture short-term and long-term features. Deep reinforcement learning agents are introduced to perceive the environmental state and generate fusion weights, thereby achieving full-cycle congestion prediction.

Benefits of technology

It significantly improves the accuracy and robustness of forecasts, and can output short-term, medium-term and long-term forecast results in parallel, providing multi-level early warning support and reducing the probability of congestion and flight delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122175416A_ABST
    Figure CN122175416A_ABST
Patent Text Reader

Abstract

This invention provides a method, system, and medium for predicting waterway vessel congestion based on multi-agent collaboration. The prediction method includes: at each time step, dynamically calculating the connectivity weights between nodes based on the vessel traffic flow characteristics, waterway environmental characteristics, and historical congestion characteristics of the current node, generating an adjacency matrix for the current time step, and constructing a dynamic waterway topology graph; inputting the dynamic waterway topology graph and corresponding node features into a two-branch temporal graph convolutional network, outputting short-term and long-term feature vectors; using a deep reinforcement learning-driven adaptive gating fusion module to generate a fusion weight vector in real time, and weighting and fusing the short-term and long-term feature vectors according to the fusion weight vector to generate multi-scale spatiotemporal fusion features; inputting the multi-scale spatiotemporal fusion features into a full-cycle prediction output head, and outputting short-term, medium-term, and long-term waterway congestion prediction results in parallel. This invention significantly improves prediction accuracy and adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence, and in particular relates to ship traffic management and intelligent prediction technology, specifically a method, system and medium for predicting waterway ship congestion based on multi-agent collaboration. Background Technology

[0002] With the continuous growth of global maritime and inland waterway trade, the density of vessels in waterways has increased significantly. Vessel congestion has become a core issue restricting waterway traffic efficiency and increasing navigation safety risks. As a result, waterway vessel congestion prediction technology has become a research hotspot in the field of vessel traffic management.

[0003] Currently, the publicly available technologies and related solutions in the industry can be mainly divided into the following categories:

[0004] The first category is navigation scheduling technology based on satellite navigation. The most representative example is a Beidou-based ship navigation scheduling method and system with authorization announcement number CN115641750B. This scheme obtains the number and location information of ships through the Beidou navigation system, calculates the channel congestion density, and trains the channel state model by combining ship flow and average speed to achieve real-time judgment of congestion status. However, this scheme can only complete the state recognition after congestion occurs, and cannot achieve advance prediction. Moreover, it does not introduce intelligent agent technology and does not have autonomous decision-making and adaptive learning capabilities.

[0005] The second category is deep learning-based ship traffic prediction technology. Existing solutions mostly use models such as convolutional neural networks (CNN), bidirectional long short-term memory networks (LSTM), and temporal graph convolutional networks (T-GCN) to combine ship traffic prediction with Automatic Identification System (AIS) data and waterway environmental data, indirectly providing support for congestion prediction. However, such solutions have limited ability to express nonlinear time-series features, and the medium- and long-term prediction errors increase significantly with the increase of prediction time. Furthermore, they lack the ability to autonomously fuse and dynamically adapt to multi-source heterogeneous data, and the prediction accuracy decreases significantly after changes in operating conditions.

[0006] Based on the above-mentioned existing technologies, current technologies related to predicting waterway vessel congestion have the following shortcomings:

[0007] First, the forecasting timeliness is insufficient. Existing solutions mostly focus on real-time judgment of congestion status or can only achieve short-term traffic forecasting. They cannot accurately predict medium- and long-term congestion trends, making it difficult to provide sufficient decision-making window for ship scheduling and waterway management, and failing to prevent congestion events from the source.

[0008] Second, the ability to adapt and process multi-source data is weak. Existing solutions mostly rely on single data sources such as AIS and Beidou positioning. The fusion and utilization rate of multi-source heterogeneous data such as meteorology, hydrology, port scheduling, and ship navigation intentions is low. Furthermore, there is a lack of independent data cleaning, anomaly identification, and fault tolerance capabilities. Data loss and false data will directly lead to a decrease in prediction accuracy and insufficient system stability.

[0009] Third, the models have poor adaptability and generalization ability. Most existing prediction models have a fixed architecture and cannot be adjusted and optimized autonomously according to changes in waterway conditions (such as ship type adjustment, waterway construction, extreme weather). Their generalization ability is weak, and the prediction results vary greatly in different waterways and different scenarios, making it difficult to adapt to complex navigation environments. Summary of the Invention

[0010] The purpose of this invention is to provide a method, system, and medium for predicting waterway vessel congestion based on multi-agent collaboration, in order to solve the technical problems mentioned in the background art.

[0011] To achieve the above objectives, the present invention provides the following technical solution.

[0012] According to an embodiment of the present invention, a method for predicting waterway vessel congestion based on multi-agent cooperation is provided, comprising the following steps:

[0013] Obtain the prediction input dataset and divide the channel spatial topology nodes into independent nodes for lock approach channels, channel intersection areas, shoal restricted areas, construction control areas, and regular navigation sections according to navigation characteristics;

[0014] At each time step, based on the ship traffic flow characteristics, waterway environment characteristics, and historical congestion characteristics of the current node, the connectivity weights between nodes are dynamically calculated and a corresponding adjacency matrix is ​​generated to construct a dynamic topology graph of the waterway.

[0015] The dynamic topology map of the waterway and the corresponding node features are input into a dual-branch temporal graph convolutional network. The short-time dynamic feature extraction branch captures the short-time sudden features of congestion and outputs short-time feature vectors, while the long-time cumulative feature extraction branch captures the long-time cumulative features of congestion and outputs long-time feature vectors.

[0016] The short-term and long-term feature vectors are input into the deep reinforcement learning-driven adaptive gating fusion module, which generates a fusion weight vector with the dynamic environmental state of the waterway and the target prediction duration as input. The weighted fusion is then used to obtain multi-scale spatiotemporal fusion features.

[0017] Multi-scale spatiotemporal fusion features are input into the full-cycle prediction output head, which outputs short-term, medium-term, and long-term waterway congestion prediction results in parallel.

[0018] Furthermore, the step of generating the corresponding adjacency matrix includes:

[0019] Divide the target waterway into N segment nodes and construct a directed topology graph of the waterway. ,in, It is a set of nodes containing N flight segment nodes; Let be the set of directed edges at time step t, where the edge weights represent the strength of the navigational connection between two nodes; Let be the dynamic adjacency matrix at time step t;

[0020] At each time step t, the adjacency matrix is ​​dynamically updated according to the navigation association rules between upstream and downstream of the waterway. Wherein, the edge weight from node i to node j at time step t. satisfy:

[0021] If node i and node j are directly connected upstream and downstream flight segments, then ;

[0022] If node i and node j are not directly connected upstream and downstream flight segments, then ;

[0023] in, Indicates the traffic association weight, , This represents the flow of ships entering node j from node i within time step t. This represents the total outbound traffic of node i within time step t;

[0024] Indicates the weight of congestion diffusion. , This represents the congestion level at node i at time step t, and k represents the preset diffusion coefficient.

[0025] These are the navigation constraint weights, used to characterize the constraints imposed by navigation conditions on node connectivity. The available channel width, water level, visibility, and control status of node j are jointly determined, and when node j is in a no-navigation state, ;

[0026] For the updated dynamic adjacency matrix After normalization, a dynamic adjacency matrix is ​​obtained for graph convolution calculation. Furthermore, it generates a sequence of dynamic channel topology maps containing T time steps. .

[0027] Furthermore, the step of outputting the short-time feature vector includes:

[0028] The short-time dynamic feature extraction branch integrates the gated recurrent unit with the dynamic graph convolution. Taking the dynamic topology map of the waterway and the corresponding node features as input, it extracts the spatial topological dynamic changes of ship traffic flow through dynamic graph convolution, extracts short-time temporal dependencies through the gated recurrent unit, and outputs short-time feature vectors.

[0029] Furthermore, in the short-term dynamic feature extraction branch, multi-layered stacked gated dynamic graph convolutional units are used. The processing steps of each gated dynamic graph convolutional unit include:

[0030] In the dynamic graph convolutional layer, the node features at the current time step t are input. With dynamic adjacency matrix Extract spatial topological features;

[0031] In the gated loop unit, spatial features As input, the information flow is controlled by update and reset gates to capture temporal dynamic features and obtain the spatiotemporal fusion features of the current time step. ;

[0032] By stacking multiple gated dynamic graph convolutional units, the final features of the short-time dynamic feature extraction branch are output. ,in, This represents the number of feature channels for the short-time dynamic feature extraction branch.

[0033] Furthermore, the step of outputting the long-term feature vector includes:

[0034] The long-term cumulative feature extraction branch adopts an architecture that connects a feature coupling encoding module and a multi-head sliding window temporal attention module. The feature coupling encoding module performs coupling encoding on the multi-source features in the prediction input dataset to mine the coupling correlation between features. The multi-head sliding window temporal attention module uses a sliding window attention mechanism in the time dimension to capture long-term temporal dependencies and outputs a long-term feature vector.

[0035] Furthermore, the long-term cumulative feature extraction branch includes a multi-feature coupled coding layer and a multi-head sliding window long-term attention layer;

[0036] in:

[0037] In the multi-feature coupled coding layer, the ship traffic flow features are first processed. Waterway environmental characteristics Dispatch and control characteristics Historical congestion characteristics Performing linear mappings separately yields results with dimensions of [missing information]. The feature encoding is given by N, where N represents the number of segment nodes and T represents the total number of time steps. The feature channel count of the long-term cumulative feature extraction branch is calculated; then, the coupling weights between features are calculated through a cross-attention mechanism to generate coupled encoded features. ;

[0038] In a multi-head sliding window long-term attention layer, the encoded features are coupled. The input is a multi-head temporal attention module, which uses an expanded sliding window mechanism to broaden the temporal receptive field, capture long-term temporal dependencies, and output long-term temporal encoded features. N represents the number of segment nodes, and T represents the total number of time steps; This represents the number of feature channels in the long-term cumulative feature extraction branch.

[0039] Furthermore, the deep reinforcement learning-driven adaptive gating fusion module incorporates a learning agent, which is connected to a policy network. The learning agent acquires the dynamic environmental state of the waterway at each time step t. And the target prediction duration identifier p is used as input, state This includes the congestion index, ship traffic, and waterway environmental parameters for each waterway topology node;

[0040] The policy network outputs fusion weights based on real-time decisions. Where N represents the total number of nodes in the channel space topology; multi-scale spatiotemporal fusion features are independently calculated for each node i. ;

[0041] The learning agent uses the prediction error of the full-cycle prediction output head under the corresponding prediction time as the reward signal, and updates the parameters of the policy network online through the policy gradient algorithm, so that the fusion weights are adaptively adjusted according to the dynamic environment state of the channel.

[0042] Furthermore, the full-cycle prediction output head includes three fully connected layers corresponding to the short-term, medium-term, and long-term prediction cycles, respectively.

[0043] Each fully connected layer takes multi-scale spatiotemporal fusion features as input and outputs prediction results including:

[0044] The probability of congestion at each channel topology node at the corresponding predicted time step, the congestion level of each channel topology node, the expected duration of congestion events at each channel topology node, and the upstream and downstream channel topology nodes affected by the expected spread of congestion events.

[0045] The congestion levels are categorized as smooth, mostly smooth, lightly congested, moderately congested, and severely congested.

[0046] According to another embodiment of the present invention, a prediction system for implementing the multi-agent cooperative waterway vessel congestion prediction method is provided, comprising the following modules:

[0047] The data acquisition module is used to acquire the prediction input dataset and divide the channel spatial topology nodes into independent nodes such as lock approach channels, channel intersection areas, shoal restricted areas, construction control areas, and regular navigation sections according to navigation characteristics.

[0048] The channel dynamic topology graph construction module is used to dynamically calculate the connectivity weights between nodes and generate the corresponding adjacency matrix at each time step based on the ship traffic flow characteristics, channel environment characteristics and historical congestion characteristics of the current node, and to construct the channel dynamic topology graph.

[0049] The dual-branch spatiotemporal feature extraction backbone network module is used to input the channel dynamic topology map and corresponding node features into the dual-branch temporal graph convolutional network. The short-time dynamic feature extraction branch captures short-time abrupt congestion features and outputs short-time feature vectors, while the long-time cumulative feature extraction branch captures long-time cumulative congestion features and outputs long-time feature vectors.

[0050] The multi-scale gated feature fusion module is used to input short-time feature vectors and long-time feature vectors into the deep reinforcement learning-driven adaptive gated fusion module, and generate a fusion weight vector with the dynamic environmental state of the waterway and the target prediction duration as inputs. The weighted fusion is then used to obtain multi-scale spatiotemporal fusion features.

[0051] The full-cycle congestion prediction output head is used to input multi-scale spatiotemporal fusion features into the full-cycle prediction output head and output short-term, medium-term and long-term waterway congestion prediction results in parallel.

[0052] According to another embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, causes the processor to perform the steps of the method for predicting waterway vessel congestion based on multi-agent cooperation.

[0053] Compared with existing technologies, the beneficial effects of the multi-agent collaborative waterway vessel congestion prediction method of this invention include, but are not limited to:

[0054] This invention dynamically calculates the connectivity weights between nodes at each time step based on the ship traffic flow characteristics, waterway environment characteristics, and historical congestion characteristics of the current node, generates the adjacency matrix for the current time step, and constructs a dynamic topology graph of the waterway, which effectively improves the accuracy of spatial dependency modeling and captures the congestion propagation trend more accurately.

[0055] In the short-term dynamic feature extraction branch of this invention, the combination of GRU and dynamic graph convolution can capture rapidly changing features, while in the long-term dynamic feature extraction branch, feature coupling coding and multi-head sliding window attention can capture slow evolution patterns, thereby significantly reducing the full-cycle congestion prediction error.

[0056] This invention introduces a deep reinforcement learning agent that perceives the environmental state and target prediction duration in real time, and generates fusion weights online. This enables the model to automatically adjust its dependence on short-term and long-term features under different operating conditions, significantly improving prediction robustness and generalization ability.

[0057] The full-cycle congestion prediction output head of this invention can output short-term, medium-term and long-term waterway congestion prediction results in parallel, directly connect to the decision output agent, realize the end-to-end closed loop from data collection to decision suggestions, provide multi-level early warning support for waterway scheduling and ship passage planning, and effectively reduce the probability of congestion and navigation delays. Attached Figure Description

[0058] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0059] In the attached diagram:

[0060] Figure 1 This is a system architecture diagram of the present invention;

[0061] Figure 2 This is a flowchart illustrating the implementation of the multi-agent collaborative waterway vessel congestion prediction method of the present invention.

[0062] Figure 3 This is a schematic diagram of the fusion model structure of the predictive analysis agent provided by the present invention;

[0063] Figure 4 This is a sub-flowchart of the waterway vessel congestion prediction method of the present invention;

[0064] Figure 5 This is a structural block diagram of the waterway vessel congestion prediction system based on multi-agent cooperation of the present invention;

[0065] Figure 6 A structural block diagram of a computer device provided by the present invention. Detailed Implementation

[0066] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0067] It should be noted that, unless otherwise specified, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0068] To address the problems of insufficient timeliness, weak data adaptability, and disconnect between prediction and application in existing technologies for predicting waterway vessel congestion, this invention constructs a multi-agent collaborative architecture, combining multi-source data fusion, deep learning, reinforcement learning, and other solutions. Specifically, this invention sets up a data acquisition agent, a data processing agent, a prediction and analysis agent, and a decision output agent, with each agent working together to achieve accurate and efficient prediction of waterway vessel congestion.

[0069] Among them, the data acquisition agent has the authority to read and report data, and outputs raw collected data unidirectionally to the data processing agent; the data processing agent has the authority to clean, standardize and fuse data, and outputs standardized prediction input datasets unidirectionally to the prediction analysis agent; the prediction analysis agent has the authority to extract features and predict congestion, and outputs full-cycle congestion prediction results unidirectionally to the decision output agent; the decision output agent has the authority to issue early warnings and generate scheduling suggestions, and feeds back the actual error of the prediction results to the prediction analysis agent for online parameter updates of the reinforcement learning module, thus forming a synergy.

[0070] In one embodiment of the present invention, a method for predicting waterway vessel congestion based on multi-agent collaboration is provided. This method constructs a multi-agent collaborative system, which includes a data acquisition agent, a data processing agent, a predictive analysis agent, and a decision output agent. Specifically, the data acquisition agent collects multi-source heterogeneous navigation data through a standardized interface and outputs the raw data unidirectionally to the data processing agent. The data processing agent receives the raw data, performs data cleaning, standardization, and spatiotemporal correlation fusion on the multi-source heterogeneous data to generate a standardized prediction input dataset, and outputs the prediction input dataset unidirectionally to the predictive analysis agent. The predictive analysis agent receives the prediction input dataset, generates a full-cycle congestion prediction result based on a dual-branch temporal graph convolutional network, and outputs the full-cycle congestion prediction result unidirectionally to the decision output agent. The decision output agent receives the full-cycle congestion prediction result, generates early warning information and scheduling suggestions based on the prediction result, and feeds back the prediction error obtained by comparing the full-cycle congestion prediction result with the actual congestion state to the predictive analysis agent for online parameter updates of the built-in reinforcement learning module of the predictive analysis agent.

[0071] in:

[0072] The data acquisition intelligent agent provided by this invention integrates standardized interfaces of the Beidou navigation system, AIS system, waterway monitoring cameras, meteorological monitoring equipment, hydrological monitoring equipment, and port scheduling system, enabling comprehensive collection of all elements of waterway navigation data, such as basic ship information (type, tonnage, speed, and heading), waterway environmental information (wind speed, visibility, water level, and current speed), port scheduling information (ship entry and exit plans, berth occupancy status), and waterway operating condition information (waterway width, shoal location, and construction area).

[0073] Therefore, the data acquisition intelligent agent of the present invention can realize real-time data acquisition and on-demand data acquisition;

[0074] In this embodiment, the data acquisition frequency of the data acquisition agent is set according to the data type as follows: the acquisition frequency of ship dynamic data (AIS / BeiDou positioning data) is 1 time / minute; the acquisition frequency of waterway environment and hydrological data is 1 time / 15 minutes; port scheduling and waterway control data are acquired in an event-triggered manner, and are acquired immediately when the data is updated; the acquisition frequency of waterway monitoring video data is 1 time / 5 minutes, which is used for visual verification of ship flow and congestion status.

[0075] In the data processing intelligent agent provided by the present invention, the data processing intelligent agent is used to generate a predictive input dataset. For example, the data processing intelligent agent of the present invention removes false data and excessive data in multi-source heterogeneous data through an anomaly identification algorithm, and supplements missing data through a time-series interpolation algorithm to complete data cleaning.

[0076] For example, in the identification of abnormal data, this invention uses the 3σ criterion to remove outliers. For single-dimensional time series data, the mean μ and standard deviation σ of its historical 7 days are calculated. Data that exceeds the range of [μ-3σ,μ+3σ] are judged as abnormal data and removed.

[0077] The data processing agent then standardizes the cleaned data by unifying its data format, spatiotemporal coordinate system, and units of measurement. It also performs spatiotemporal correlation matching on the standardized ship dynamic data, waterway environment data, port scheduling data, and waterway operating condition data to achieve multi-source data fusion and generate a standardized prediction input dataset.

[0078] Meanwhile, it is understood that the data processing intelligent agent of the present invention can also dynamically adjust the data processing strategy according to changes in data quality in order to improve data availability.

[0079] Furthermore, in the predictive analysis agent provided by this invention, the predictive analysis agent takes the standardized dataset output by the data processing agent as input, constructs a dual-branch temporal graph convolutional network (DB-RL-TGCN) for adaptive perception of waterway spatiotemporal characteristics, and uses this network as a prediction model. This model has undergone structural improvements tailored to the data characteristics of the waterway domain, enabling full-cycle congestion prediction for short-term (1-6 hours), medium-term (6-24 hours), and long-term (24-72 hours). At the same time, the predictive analysis agent has a built-in model parameter optimization unit to achieve dynamic adaptive adjustment of all dimensions of the model parameters.

[0080] like Figures 1-4 As shown, in one implementation of the present invention, the prediction method provided by the embodiment of the present invention is applied to a predictive analysis agent, including the following steps:

[0081] Step S101: Obtain the standardized prediction input dataset generated by the data processing agent;

[0082] In one specific implementation, the input to the predictive analysis agent of the present invention is the standardized predictive input dataset output by the data processing agent. In this embodiment, the standardized predictive input dataset is a three-dimensional tensor, the structure of which can be represented as: Where N is the total number of topological nodes in the waterway space. The target waterway is divided into several independent topological nodes according to navigation characteristics. The division rule is that the lock approach channel, waterway intersection area, shoal restricted area, construction control area, and regular navigation section are each treated as independent nodes, which fits the actual navigation scenario of the waterway. T is the length of the input historical time series. The default is to use the historical 24-hour time series data, with a time step of ∆t=15 minutes, that is, T=96 time steps. F is the total number of feature dimensions, with a total of F=18 dimensions, divided into 4 categories of waterway feature groups: ship traffic flow characteristics (6 dimensions), waterway environment characteristics (5 dimensions), scheduling and control characteristics (4 dimensions), and historical congestion characteristics (3 dimensions).

[0083] Step S102: Input the predicted input dataset into the channel dynamic topology graph construction module. At each time step, based on the ship traffic flow characteristics, channel environment characteristics and historical congestion characteristics of the current node, dynamically calculate the connectivity weight between nodes, generate the adjacency matrix of the current time step, and construct the channel dynamic topology graph.

[0084] In one specific implementation, the present invention at each time step The adjacency matrix of the dynamically updated channel topology map can characterize the dynamic connectivity between channel nodes and the correlation with congestion spread.

[0085] In this embodiment, the target waterway is divided into N segment nodes, and a directed topology graph of the waterway is constructed. , where V is a set of nodes containing N flight segment nodes; Let be the set of directed edges at time step t, where the edge weights represent the strength of the navigational connection between two nodes; Let be the dynamic adjacency matrix at time step t, and be the directed weighting matrix;

[0086] At each time step t, the adjacency matrix is ​​dynamically updated according to the navigation association rules between upstream and downstream of the waterway. Wherein, the edge weight from node i to node j at time step t. satisfy:

[0087] If node i and node j are directly connected upstream and downstream flight segments, then ;

[0088] If node i and node j are not directly connected upstream and downstream flight segments, then ;

[0089] in, Indicates the traffic association weight, , This represents the flow of ships entering node j from node i within time step t. This represents the total outbound traffic of node i within time step t;

[0090] Indicates the weight of congestion diffusion. , This represents the congestion level at node i at time step t, and k represents the preset diffusion coefficient.

[0091] In this embodiment, the diffusion coefficient k is a preset positive real number used to adjust the attenuation rate of congestion diffusion. In this embodiment, the default value of k is 0.5. For different types of channel nodes, the diffusion coefficient k can be adjusted. For example, for nodes that are prone to congestion diffusion, such as lock approach channels and channel intersections, the value of k ranges from 0.6 to 0.8. For nodes with a slower congestion diffusion rate, such as regular navigation sections, the value of k ranges from 0.3 to 0.5. For one-way traffic nodes, such as shoal restricted areas and construction control areas, the value of k ranges from 0.2 to 0.4.

[0092] These are the navigation constraint weights, used to characterize the constraints imposed by navigation conditions on node connectivity. The available channel width, water level, visibility, and control status of node j are jointly determined, and when node j is in a no-navigation state, This can characterize the constraints of navigation conditions on node connectivity;

[0093] For the updated dynamic adjacency matrix After normalization, a dynamic adjacency matrix is ​​obtained for graph convolution calculation. Furthermore, it generates a sequence of dynamic channel topology maps containing T time steps. The normalization process is represented as follows:

[0094]

[0095] In the formula, It is the identity matrix. For matrix The degree matrix, Represents a dynamic adjacency matrix;

[0096] The channel dynamic topology graph construction module in this embodiment takes a standardized dataset X, channel node partitioning rules, and real-time navigation data for each node as input; the output is a standardized dynamic adjacency matrix for each time step t. Waterway dynamic topology sequence .

[0097] This invention dynamically calculates the connectivity weights between nodes at each time step based on the ship traffic flow characteristics, waterway environment characteristics, and historical congestion characteristics of the current node, generates the adjacency matrix for the current time step, and constructs a dynamic topology graph of the waterway. This effectively improves the accuracy of spatial dependency modeling and captures the congestion propagation trend more accurately.

[0098] Furthermore, such as Figures 1-4 As shown, the prediction method of the present invention further includes the following steps:

[0099] Step S103: Input the channel dynamic topology map and corresponding node features into a two-branch temporal graph convolutional network, which includes a short-time dynamic feature extraction branch and a long-time cumulative feature extraction branch; wherein, the short-time dynamic feature extraction branch is used to capture the short-time abrupt features of congestion and output a short-time feature vector; the long-time cumulative feature extraction branch is used to capture the long-time cumulative features of congestion and output a long-time feature vector.

[0100] In one specific implementation, the short-time dynamic feature extraction branch integrates the gated recurrent unit with the dynamic graph convolution. Taking the channel dynamic topology map and corresponding node features as input, the branch extracts the spatial topological dynamic changes of ship traffic flow through the dynamic graph convolution and extracts short-time temporal dependencies through the gated recurrent unit. This accurately identifies the short-time abrupt changes in congestion and outputs a short-time feature vector.

[0101] Specifically, in the short-term dynamic feature extraction branch of this invention, multi-layered stacked gated dynamic graph convolutional units are used, and the processing steps of each gated dynamic graph convolutional unit include:

[0102] In the dynamic graph convolutional layer, the node features at the current time step t are input. With dynamic adjacency matrix Extract spatial topological features, represented as:

[0103]

[0104] in, , For the trainable weights and biases of the graph convolutional layer, It is the ReLU activation function. For the extracted spatial features; The node features represent the current time step t;

[0105] In the gated loop unit, spatial features As input, the information flow is controlled by update and reset gates to capture temporal dynamic features and obtain the spatiotemporal fusion features of the current time step. , is represented as:

[0106]

[0107] In the formula, To reset the door, To update the door, For trainable weights, For trainable bias, For Hadama accumulation, The spatiotemporal fusion features output at the current time step; This represents the spatiotemporal fusion feature output from the previous time step; Indicates the candidate hidden state; Represents the Sigmoid function; Represents the hyperbolic tangent function;

[0108] Furthermore, this invention stacks multiple gated dynamic graph convolutional units to output the final features of the short-time dynamic feature extraction branch. ,in, This represents the number of feature channels for the short-term dynamic feature extraction branch, such as 64. In this embodiment, the input data for the short-term dynamic feature extraction branch is a sequence of dynamic topology graphs. Standardized dataset X; output is short-time dynamic spatiotemporal features. It can effectively characterize the spatiotemporal evolution of congestion changes within 1 to 6 hours;

[0109] Preferably, this embodiment employs a two-layer stacked gated dynamic graph convolutional unit. The first layer unit has an input feature dimension of 18 dimensions, which is consistent with the feature dimension F of the input dataset, and an output feature dimension of 32 dimensions. The second layer unit has an input feature dimension of 32 dimensions and an output feature dimension of 64 dimensions. The number of feature channels... The default value is 64. For large-scale waterway networks with N > 50 nodes, it can be... Adjusted to 128; for small-scale waterway networks with N ≤ 20 nodes, it can be... Adjusted to 32;

[0110] To prevent gradient explosion during training, this embodiment uses L2 norm clipping for the gradients of GRU units, with a clipping threshold set to 10.

[0111] In the short-term dynamic feature extraction branch set up in this invention, the combination of GRU and dynamic graph convolution can capture rapidly changing features.

[0112] Furthermore, in a specific implementation of the present invention, the step of outputting long-term feature vectors is implemented using the following method: the long-term cumulative feature extraction branch adopts an architecture that connects a feature coupling encoding module and a multi-head sliding window temporal attention module. The feature coupling encoding module performs coupling encoding on the multi-source features in the prediction input dataset to mine the coupling correlation between features. The multi-head sliding window temporal attention module uses a sliding window attention mechanism in the time dimension to capture long-term temporal dependencies and outputs long-term feature vectors.

[0113] In one specific implementation, the long-term cumulative feature extraction branch includes a multi-feature coupled coding layer and a multi-head sliding window long-term attention layer;

[0114] in:

[0115] In the multi-feature coupled coding layer, the ship traffic flow features are first processed. Waterway environmental characteristics Dispatch and control characteristics Historical congestion characteristics Performing linear mappings separately yields results with dimensions of [missing information]. The feature encoding is given by N, where N represents the number of segment nodes and T represents the total number of time steps. The feature channel count of the long-term cumulative feature extraction branch is calculated; then, the coupling weights between features are calculated through a cross-attention mechanism to generate coupled encoded features. , is represented as:

[0116]

[0117] In the formula, Indicates the characteristics of the waterway environment. Indicates the characteristics of ship traffic flow; Indicates scheduling and control characteristics, Indicates historical congestion characteristics;

[0118] CrossAttention is the cross-attention function, expressed as:

[0119]

[0120] In the formula, Q, K, and V are the query matrix, key matrix, and value matrix, respectively. The feature dimension is T; T represents the matrix transpose.

[0121] In a multi-head sliding window long-term attention layer, the encoded features are coupled. The input is a multi-head temporal attention module, which uses an expanded sliding window mechanism to broaden the temporal receptive field, capture long-term temporal dependencies, and output long-term temporal encoded features. N represents the number of segment nodes, and T represents the total number of time steps; This represents the number of feature channels for the long-term cumulative feature extraction branch, with a value of 64.

[0122] Therefore, in the long-term dynamic feature extraction branch of this invention, feature coupling coding and multi-head sliding window attention can capture the slow evolution pattern, thereby significantly reducing the full-cycle congestion prediction error.

[0123] Furthermore, such as Figures 1-4 As shown, the prediction method of the present invention further includes the following steps:

[0124] Step S104: Input the short-term feature vector and the long-term feature vector into the deep reinforcement learning-driven adaptive gating fusion module. This module has a built-in deep reinforcement learning agent. The learning agent takes the current channel dynamic environment state and target prediction duration as input, makes decisions in real time to generate a fusion weight vector, and performs weighted fusion of the short-term feature vector and the long-term feature vector according to the fusion weight vector to generate multi-scale spatiotemporal fusion features.

[0125] This invention introduces a deep reinforcement learning agent that can perceive the environmental state and target prediction duration in real time, and generate fusion weights online. This enables the model to automatically adjust its dependence on short-term and long-term features under different operating conditions, significantly improving prediction robustness and generalization ability.

[0126] Furthermore, the prediction method of the present invention also includes the following steps:

[0127] Step S105: Input the multi-scale spatiotemporal fusion features into the full-cycle prediction output head and output the short-term, medium-term and long-term waterway congestion prediction results in parallel.

[0128] In the adaptive gating fusion module of step S104 of the present invention, a policy network is introduced into the learning agent, and the learning agent acquires the dynamic environmental state of the waterway at each time step t. The target prediction duration identifier p is used as input, where the environmental state This includes the congestion index, ship traffic, and waterway environmental parameters for each waterway topology node;

[0129] The policy network outputs fusion weights based on the real-time decision. Where N represents the total number of topological nodes in the waterway space;

[0130] Furthermore, this invention independently calculates multi-scale spatiotemporal fusion features for each node i. , is represented as:

[0131]

[0132] In the formula, , Let represent the short-term feature vector and the long-term feature vector of node i, respectively. This represents the fusion weight of node i under the prediction duration p;

[0133] The learning agent uses the prediction error of the full-cycle prediction output head at the corresponding prediction duration as the reward signal, and updates the parameters of the policy network online through a policy gradient algorithm, so that the fusion weights are adaptively adjusted according to the dynamic environment state of the channel. In one implementation, the policy network of this embodiment adopts a 3-layer fully connected neural network, and the input is the state. The concatenated vector with the predicted duration identifier p has the following output dimensions: the first fully connected layer has a dimension of 32 and uses ReLU activation; the second fully connected layer has a dimension of 16 and uses ReLU activation; the third fully connected layer has a dimension of 1 and uses Sigmoid activation. The output value is the fusion weight. The weight values ​​range from [0,1].

[0134] The reward function of the learning agent in this invention uses the negative value of the prediction error as its core, and incorporates a weight constraint term, as follows:

[0135]

[0136] In the formula, This represents the reward value obtained by the learning agent at time step t; This represents the predicted congestion level under the prediction duration indicator p. Compared with the true value The mean square error; This represents the regularization coefficient, with a default value of 0.01. It is used to prevent the fusion weights from being overly biased towards 0 or 1, thereby improving the model's generalization ability. Indicates a secondary penalty item; The fusion weights represent the output of the policy network;

[0137] This embodiment uses the REINFORCE policy gradient algorithm, with a discount factor γ set to 0.95 and a learning rate set to 1e-4; during the model pre-training phase, the policy network parameters are fixed. After the dual-branch feature extraction network converges, the online training of the policy network is started. During the online training process, after each prediction cycle, the reward value is calculated based on the actual prediction error to complete one parameter update of the policy network.

[0138] Furthermore, in one implementation of the present invention, the full-cycle prediction output head provided in this embodiment includes three independent fully connected layers, corresponding to the short-term prediction cycle, the medium-term prediction cycle, and the long-term prediction cycle, respectively. Each fully connected layer takes multi-scale spatiotemporal fusion features as input and outputs prediction results including: the probability of congestion occurrence of each channel topology node at the corresponding prediction time step, the congestion level of each channel topology node, the expected duration of congestion events at each channel topology node, and the upstream and downstream channel topology nodes affected by the expected spread of congestion events. In addition, each fully connected layer outputs the probability of congestion occurrence, the congestion level, the expected duration of congestion events, and the upstream and downstream nodes affected by congestion spread of each channel topology node at the corresponding prediction time step. For example, the congestion level in the embodiment of the present invention can be divided into smooth flow, basically smooth flow, light congestion, moderate congestion, and severe congestion.

[0139] Therefore, the full-cycle congestion prediction output head of the present invention can output short-term, medium-term and long-term waterway congestion prediction results in parallel, directly connect with the decision output agent, realize the end-to-end closed loop from data collection to decision suggestions, provide multi-level early warning support for waterway scheduling and ship passage planning, and effectively reduce the probability of congestion and navigation delays.

[0140] Please refer to Figure 5 According to another embodiment of the present invention, a waterway vessel congestion prediction system based on multi-agent cooperation is provided, comprising the following modules:

[0141] The data acquisition module 201 is used to acquire a standardized prediction input dataset generated by the data processing agent; the channel spatial topology nodes in the dataset are divided into independent nodes according to navigation characteristics, including lock approach channels, channel intersection areas, shoal restricted areas, construction control areas and conventional navigation sections;

[0142] The channel dynamic topology graph construction module 202 is used to input the predicted input dataset into the channel dynamic topology graph construction module. At each time step, based on the ship traffic flow characteristics, channel environment characteristics and historical congestion characteristics of the current node, it dynamically calculates the connectivity weight between nodes, generates the adjacency matrix of the current time step, and constructs the channel dynamic topology graph.

[0143] The dual-branch spatiotemporal feature extraction backbone network module 203 is used to input the channel dynamic topology map and corresponding node features into the dual-branch temporal graph convolutional network. This network includes a short-time dynamic feature extraction branch and a long-time cumulative feature extraction branch. The short-time dynamic feature extraction branch is used to capture the short-time abrupt changes in congestion and output a short-time feature vector. The long-time cumulative feature extraction branch is used to capture the long-time cumulative features of congestion and output a long-time feature vector.

[0144] The multi-scale gated feature fusion module 204 is used to input the short-time feature vector and the long-time feature vector into the deep reinforcement learning-driven adaptive gated fusion module. The module has a built-in deep reinforcement learning agent. The learning agent takes the current channel dynamic environment state and target prediction duration as input, makes decisions in real time to generate a fusion weight vector, and performs weighted fusion of the short-time feature vector and the long-time feature vector according to the fusion weight vector to generate multi-scale spatiotemporal fusion features.

[0145] The full-cycle congestion prediction output head 205 is used to input the multi-scale spatiotemporal fusion features into the full-cycle prediction output head and output short-term, medium-term and long-term waterway congestion prediction results in parallel.

[0146] In the above embodiments of this application, the information collected is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data all comply with relevant laws, regulations and standards, take necessary protective measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse.

[0147] like Figure 6 As shown, another preferred embodiment of the present invention provides a computer device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the multi-agent cooperative method for predicting waterway vessel congestion as described in any of the above embodiments.

[0148] The computer equipment can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer equipment includes, but is not limited to, processors and memory.

[0149] Another preferred embodiment of the present invention provides a storage medium, which is a computer-readable storage medium. The computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program can implement the steps of the above-described embodiment of the waterway vessel congestion prediction method based on multi-agent cooperation. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0150] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for predicting waterway vessel congestion based on multi-agent cooperation, characterized in that, Includes the following steps: Obtain the prediction input dataset and divide the channel spatial topology nodes into independent nodes for lock approach channels, channel intersection areas, shoal restricted areas, construction control areas, and regular navigation sections according to navigation characteristics; At each time step, based on the ship traffic flow characteristics, waterway environment characteristics, and historical congestion characteristics of the current node, the connectivity weights between nodes are dynamically calculated and a corresponding adjacency matrix is ​​generated to construct a dynamic topology graph of the waterway. The dynamic topology map of the waterway and the corresponding node features are input into a dual-branch temporal graph convolutional network. The short-time dynamic feature extraction branch captures the short-time sudden features of congestion and outputs short-time feature vectors, while the long-time cumulative feature extraction branch captures the long-time cumulative features of congestion and outputs long-time feature vectors. The short-term and long-term feature vectors are input into the deep reinforcement learning-driven adaptive gating fusion module, which generates a fusion weight vector with the dynamic environmental state of the waterway and the target prediction duration as input. The weighted fusion is then used to obtain multi-scale spatiotemporal fusion features. Multi-scale spatiotemporal fusion features are input into the full-cycle prediction output head, which outputs short-term, medium-term, and long-term waterway congestion prediction results in parallel.

2. The method for predicting waterway vessel congestion based on multi-agent cooperation as described in claim 1, characterized in that, The steps for generating the corresponding adjacency matrix include: Divide the target waterway into N segment nodes and construct a directed topology graph of the waterway. , where V is a set of nodes containing N flight segment nodes; Let be the set of directed edges at time step t, where the edge weights represent the strength of the navigational connection between two nodes; Let be the dynamic adjacency matrix at time step t. Represents the set of real numbers; At each time step t, the adjacency matrix is ​​dynamically updated according to the navigation association rules between upstream and downstream of the waterway. Wherein, the edge weight from node i to node j at time step t. satisfy: If node i and node j are directly connected upstream and downstream flight segments, then ; If node i and node j are not directly connected upstream and downstream flight segments, then ; in, Indicates the traffic association weight, , This represents the flow of ships entering node j from node i within time step t. This represents the total outbound traffic of node i within time step t; Indicates the weight of congestion diffusion. , This represents the congestion level at node i at time step t, and k represents the preset diffusion coefficient. These are the navigation constraint weights, used to characterize the constraints imposed by navigation conditions on node connectivity. The available channel width, water level, visibility, and control status of node j are jointly determined, and when node j is in a no-navigation state, ; The updated dynamic adjacency matrix is ​​normalized to obtain the dynamic adjacency matrix used for graph convolution calculation. Furthermore, it generates a sequence of dynamic channel topology maps containing T time steps. .

3. The method for predicting waterway vessel congestion based on multi-agent cooperation according to claim 2, characterized in that, The steps for outputting short-time feature vectors include: The short-time dynamic feature extraction branch integrates the gated recurrent unit with the dynamic graph convolution. Taking the dynamic topology map of the waterway and the corresponding node features as input, it extracts the spatial topological dynamic changes of ship traffic flow through dynamic graph convolution, extracts short-time temporal dependencies through the gated recurrent unit, and outputs short-time feature vectors.

4. The method for predicting waterway vessel congestion based on multi-agent cooperation according to claim 3, characterized in that, In the short-time dynamic feature extraction branch, multiple stacked gated dynamic graph convolutional units are used. The processing steps of each gated dynamic graph convolutional unit include: In the dynamic graph convolutional layer, the node features at the current time step t are input. With dynamic adjacency matrix Extract spatial topological features; In the gated loop unit, spatial features As input, the information flow is controlled by update and reset gates to capture temporal dynamic features and obtain the spatiotemporal fusion features of the current time step. ; By stacking multiple gated dynamic graph convolutional units, the final features of the short-time dynamic feature extraction branch are output. Where N represents the number of segment nodes and T represents the total number of time steps. This represents the number of feature channels for the short-time dynamic feature extraction branch.

5. The method for predicting waterway vessel congestion based on multi-agent cooperation according to claim 3 or 4, characterized in that, The steps for outputting long-term feature vectors include: The long-term cumulative feature extraction branch adopts an architecture that connects a feature coupling encoding module and a multi-head sliding window temporal attention module. The feature coupling encoding module performs coupling encoding on the multi-source features in the prediction input dataset to mine the coupling correlation between features. The multi-head sliding window temporal attention module uses a sliding window attention mechanism in the time dimension to capture long-term temporal dependencies and outputs a long-term feature vector.

6. The method for predicting waterway vessel congestion based on multi-agent cooperation according to claim 5, characterized in that, The long-term cumulative feature extraction branch includes a multi-feature coupled coding layer and a multi-head sliding window long-term attention layer; in: In the multi-feature coupled coding layer, the ship traffic flow features are first processed. Waterway environmental characteristics Dispatch and control characteristics Historical congestion characteristics Performing linear mappings separately yields results with dimensions of [missing information]. The feature encoding is given by N, where N represents the number of segment nodes and T represents the total number of time steps. The feature channel count of the long-term cumulative feature extraction branch is calculated; then, the coupling weights between features are calculated through a cross-attention mechanism to generate coupled encoded features. ; In a multi-head sliding window long-term attention layer, the encoded features are coupled. The input is a multi-head temporal attention module, which uses an expanded sliding window mechanism to broaden the temporal receptive field, capture long-term temporal dependencies, and output long-term temporal encoded features. .

7. The method for predicting waterway vessel congestion based on multi-agent cooperation according to claim 6, characterized in that, The deep reinforcement learning-driven adaptive gating fusion module incorporates a learning agent, which is connected to a policy network. The learning agent acquires the dynamic environment state of the waterway at each time step t. The target prediction duration identifier p is used as input, along with the environmental state. This includes the congestion index, ship traffic, and waterway environmental parameters for each waterway topology node; The policy network outputs fusion weights based on real-time decisions. Where N represents the total number of nodes in the channel space topology; multi-scale spatiotemporal fusion features are independently calculated for each node i. ; The learning agent uses the prediction error of the full-cycle prediction output head under the corresponding prediction time as the reward signal, and updates the parameters of the policy network online through the policy gradient algorithm, so that the fusion weights are adaptively adjusted according to the dynamic environment state of the channel.

8. The method for predicting waterway vessel congestion based on multi-agent cooperation according to claim 7, characterized in that, The full-cycle prediction output head includes three fully connected layers corresponding to the short-term, medium-term, and long-term prediction cycles, respectively. Each fully connected layer takes multi-scale spatiotemporal fusion features as input and outputs prediction results including: The probability of congestion at each channel topology node at the corresponding predicted time step, the congestion level of each channel topology node, the expected duration of congestion events at each channel topology node, and the upstream and downstream channel topology nodes affected by the expected spread of congestion events. The congestion levels are categorized as smooth, mostly smooth, lightly congested, moderately congested, and severely congested.

9. A prediction system for implementing the multi-agent cooperative method for predicting waterway vessel congestion as described in any one of claims 1 to 8, characterized in that, Includes the following modules: The data acquisition module is used to acquire the prediction input dataset and divide the channel spatial topology nodes into independent nodes such as lock approach channels, channel intersection areas, shoal restricted areas, construction control areas, and regular navigation sections according to navigation characteristics. The channel dynamic topology graph construction module is used to dynamically calculate the connectivity weights between nodes and generate the corresponding adjacency matrix at each time step based on the ship traffic flow characteristics, channel environment characteristics and historical congestion characteristics of the current node, and to construct the channel dynamic topology graph. The dual-branch spatiotemporal feature extraction backbone network module is used to input the channel dynamic topology map and corresponding node features into the dual-branch temporal graph convolutional network. The short-time dynamic feature extraction branch captures short-time abrupt congestion features and outputs short-time feature vectors, while the long-time cumulative feature extraction branch captures long-time cumulative congestion features and outputs long-time feature vectors. The multi-scale gated feature fusion module is used to input short-time feature vectors and long-time feature vectors into the deep reinforcement learning-driven adaptive gated fusion module, and generate a fusion weight vector with the dynamic environmental state of the waterway and the target prediction duration as inputs. The weighted fusion is then used to obtain multi-scale spatiotemporal fusion features. The full-cycle congestion prediction output head is used to input multi-scale spatiotemporal fusion features into the full-cycle prediction output head and output short-term, medium-term and long-term waterway congestion prediction results in parallel.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the processor performs the steps of the method for predicting waterway vessel congestion based on multi-agent cooperation as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • A BeiDou-based method and system for ship navigation scheduling

    CN115641750B