Marine traffic conflict early warning method based on fuzzy risk and hierarchical attention

The maritime traffic conflict early warning method based on fuzzy risk and hierarchical attention solves the problems of large error and uncertainty in risk quantification in traditional methods, and achieves more accurate risk quantification and efficient conflict identification. It is applicable to maritime traffic scenarios of various ship types.

CN121528031AInactive Publication Date: 2026-02-13YANGSHAN PORT MARITIME SAFETY ADMINISTRATION OF THE PEOPLES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511716833.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-02-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In maritime traffic conflict early warning, traditional methods suffer from problems such as large errors, weak targets being submerged by sea clutter, confusion of multiple target trajectories, and uncertainty in risk quantification, leading to untimely warnings or misjudgments and increasing the risk of maritime accidents.

Method used

A method based on fuzzy risk and hierarchical attention is adopted. Through multi-source data acquisition and synchronous preprocessing, combined with information geometric manifold modeling and patch Transformer attention mechanism, the risk of conflict between ships is quantified, and early warning results and avoidance suggestions are generated through target offsetting strategy.

Benefits of technology

It improves the accuracy of multi-source data processing, comprehensively captures ship motion dependence, quantifies risks to better reflect the actual environment, enhances the efficiency of multi-target conflict identification and the practicality of early warning decision-making, adapts to complex maritime environments, and reduces the monitoring burden on crew members.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121528031A_ABST
    Figure CN121528031A_ABST
Patent Text Reader

Abstract

The invention discloses a maritime traffic conflict early-warning method based on fuzzy risk and hierarchical attention, and belongs to the field of maritime traffic safety management, and the method comprises the steps: S1, carrying out the collection and synchronous preprocessing of multi-source data; s2, based on manifold features and AIS time sequence patch features, fusing information geometric manifold modeling and a patch Transform attention mechanism, and outputting a ship space-time joint embedding and dynamic adjacency matrix; s3, combining a fuzzy set theory to quantify a conflict risk between ships, and outputting a comprehensive fuzzy risk value and a risk level; and S4, based on the comprehensive fuzzy risk value and the risk level, effective conflict pairs are extracted through a target offset strategy, and an early warning result and avoidance suggestions are generated in combination with conflict types. By the adoption of the maritime traffic conflict early warning method based on the fuzzy risk and the hierarchical attention, high-precision and high-robustness conflict early warning and compliance avoidance decision making are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of maritime traffic safety management technology, and in particular to a maritime traffic conflict early warning method based on fuzzy risk and hierarchical attention. Background Technology

[0002] As a core carrier of global trade (handling approximately 90% of transoceanic cargo transport), the safety of maritime traffic directly impacts supply chain stability and the safety of life and property. With the growth of shipping volume and the increasing size of ships, maritime traffic density continues to rise, significantly increasing the risk of conflict in ship encounters (head-on, crossing, overtaking). Statistics show that approximately 60% of maritime accidents stem from untimely or misjudged traffic conflict warnings. The core technical bottlenecks leading to warning failures include weak target signals being submerged by sea clutter, confusion of multiple target trajectories, and uncertainty in risk quantification. Summary of the Invention

[0003] The purpose of this invention is to provide a maritime traffic conflict early warning method based on fuzzy risk and hierarchical attention, thereby solving the aforementioned technical problems.

[0004] To achieve the above objectives, this invention provides a maritime traffic conflict early warning method based on fuzzy risk and hierarchical attention, comprising the following steps: S1. Multi-source data acquisition and synchronous preprocessing: Simultaneously acquire radar echo data, AIS ship dynamic data and meteorological environment data, and extract manifold features and AIS time-series patch features after spatiotemporal synchronous processing. S2, Layered attention spatiotemporal joint modeling: Based on the manifold features and AIS temporal patch features output from step S1, information geometric manifold modeling and patch Transformer attention mechanism are integrated. The long-term and short-term dependencies of ship motion are captured through temporal attention encoding, and the dynamic association of ships is learned through spatial attention modeling. The ship spatiotemporal joint embedding and dynamic adjacency matrix are output. S3. Fuzzy risk quantification based on manifold differences: Using the ship spatiotemporal joint embedding and dynamic adjacency matrix output in step S2, combined with fuzzy set theory, the risk of conflict between ships is quantified, and a comprehensive fuzzy risk value and risk level are output. S4. Multi-objective conflict association and early warning decision-making: Based on the comprehensive fuzzy risk value and risk level output in step S3, effective conflict pairs are extracted through the target offset strategy, and early warning results and avoidance suggestions are generated in combination with conflict types.

[0005] Therefore, the maritime traffic conflict early warning method based on fuzzy risk and hierarchical attention, as described above, has the following beneficial effects: 1. Improved accuracy of multi-source data processing: Synchronized radar echoes, AIS ship dynamics and meteorological data are aligned in time and space through UTC time unification and WebMercator coordinate transformation, and then manifold features are extracted (based on KL divergence to distinguish targets from sea clutter), which solves the problems of large errors and weak targets being submerged by sea clutter in traditional single-source data, and provides high-quality data support for subsequent modeling; 2. More comprehensive capture of spatiotemporal correlation: In the hierarchical attention mechanism, temporal attention (Transformer encoder) can accurately capture the long-term and short-term motion dependence of ships (such as the difference between constant speed cruising and sudden turning), and spatial attention (dynamic adjacency matrix) can learn the dynamic correlation of ships (such as the differentiated correlation strength of encountering / overtaking ships), avoiding the trajectory prediction bias caused by the traditional model ignoring spatiotemporal coupling. 3. Risk quantification is more in line with the actual environment: Ship spacing, relative speed, and manifold differences are used as risk factors. The uncertainty of sea clutter interference and prediction error is handled by a "low-medium-high" triangular fuzzy membership function. Compared with traditional deterministic risk assessment, the risk level determination is more robust and adaptable to complex and ever-changing marine environments. 4. More efficient multi-target conflict identification: By using a target offsetting strategy to extract effective conflict pairs (deduplicating already associated ships) according to risk priority, the duplicate warnings caused by trajectory confusion in multi-target scenarios are resolved. The conflict identification efficiency is improved by more than 30% compared with traditional methods, and it is especially suitable for ports and coastal areas with dense ships. 5. Strong Practicality of Early Warning Decisions: Based on the conflict type (encounter / crossing / overtaking), a three-level early warning system is generated (Level 1 ≤ 3min high risk, Level 2 3-6min medium risk, Level 3 > 6min low risk), and compliant avoidance suggestions are output (such as starboard turning for encountering vessels, and starboard avoidance for crossing scenarios). This can directly guide crew operations, reduce the monitoring burden, shorten decision-making time, and is suitable for various vessel types such as cargo ships, passenger ships, and tugboats. It can be extended to different maritime traffic scenarios such as ocean-going, coastal, and wind farm areas, and has strong engineering application value.

[0006] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0007] Figure 1 This is a flowchart of the maritime traffic conflict early warning method based on fuzzy risk and hierarchical attention according to the present invention. Detailed Implementation

[0008] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of the present invention and are not intended to limit the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of this application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout.

[0009] It should be noted that the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such as a process, method, system, product, or server that includes a series of steps or units, not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or device.

[0010] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0011] like Figure 1 As shown, the maritime traffic conflict early warning method based on fuzzy risk and hierarchical attention includes the following steps: S1. Multi-source data acquisition and synchronous preprocessing: Simultaneously acquire radar echo data, AIS ship dynamic data and meteorological environment data, and extract manifold features and AIS time-series patch features after spatiotemporal synchronous processing. Step S1 specifically includes the following steps: S11. Synchronously acquire radar echo data AIS ship dynamic data and meteorological and environmental data To obtain the original dataset ,in, , For frame index, For distance units, For azimuth units; , They represent Ships at each time step Latitude, longitude, relative speed, and heading towards the ground; , These represent wave height, wind speed, and wave period, respectively. S12, Spatiotemporal Synchronization: Unifying radar echo data AIS ship dynamic data and meteorological and environmental data The timestamp is UTC time, and AIS vessel dynamic data is also included. WGS84 geographic coordinates Converted to radar pixel coordinates via Web Mercator projection To obtain synchronized multi-source data ; S13. Extracting Manifold Features: Based on information geometry theory, the statistical characteristics of radar echoes are modeled as a Hermitian positive definite manifold to extract the differential features between the target and sea clutter. ; in, ; ; In the formula, Represents the characteristic matrix of the manifold; Represents manifold distance; Represents the trace of a matrix; This represents the covariance matrix of the detection unit; express The sample covariance matrix of each reference unit; Represents a determinant; express An identity matrix of order 1; Indicates the first Complex pulse vectors of reference units; express The conjugate transpose of; Simultaneously, AIS time-series patch features are extracted: using the patch time-series coding approach, AIS ship time-series data is divided into fixed-length patches, and each fixed-length patch is linearly projected into a high-dimensional embedding vector. Sine position coding is added to preserve the temporal order, thus obtaining AIS time-series patch features. : ; In the formula, Indicates a ship No. The original data matrix of each AIS timing patch; Represents the projection weight matrix; Indicates the bias term; Indicates the first The location encoding of each AIS timing patch, and , and They represent the first The first AIS timing patch peacekeeping dimensional components, Indicates the embedding dimension.

[0012] S2, Layered attention spatiotemporal joint modeling: Based on the manifold features and AIS temporal patch features output from step S1, information geometric manifold modeling and patch Transformer attention mechanism are integrated. The long-term and short-term dependencies of ship motion are captured through temporal attention encoding, and the dynamic association of ships is learned through spatial attention modeling. The ship spatiotemporal joint embedding and dynamic adjacency matrix are output. Step S2 specifically includes the following steps: S21. Based on the Transformer encoder, hierarchical attention calculation is performed on the ship patch embedding to capture the long and short-term temporal dependencies of ship motion. At the same time, manifold features are incorporated to enhance the target discriminability, resulting in the ship temporal embedding. S211, the manifold characteristic matrix Mapping to the embedding dimension With AIS timing patch features Element-by-element addition: ; In the formula, Indicates a ship No. Embedded vectors after fusing manifold features from AIS temporal patches; Describes a linear mapping function, and , Represents a linear mapping function The weight matrix; Indicates the bias term; Indicates the input to the linear mapping function eigenvalues ​​of the manifold; Indicates a ship To the Each AIS timing patch corresponds to a manifold feature at each time step; S212 employs a 2-layer pre-normalized Transformer encoder, with each layer containing a multi-head self-attention and position feedforward network, and the output patch is embedded. : ; in, ; ; ; ; In the formula, Presentation layer normalization operation; This indicates the ship after the first layer of encoder processing. The embedding vector; This represents a multilayer perceptron; and This represents the weight matrix of the first and second layers of the MLP model; and This represents the bias terms of the first and second layers of the MLP model; Represents the activation function of the Gaussian error linear unit; This indicates a multi-head self-attention mechanism; Indicates a splicing operation; Indicates the first The output of each attention head; Indicates the output weights; This represents the Softmax activation function; , and Represent the query, key, and value matrix respectively; and , , and Represents the generation of the first The weight matrix of the query, key, and value matrix for each attention head; Indicates the number of heads of attention; S213, Patch embedding Average pooling is performed to obtain the ship Temporal embedding : ; S22. By using the adaptive graph learning approach and combining manifold distance to optimize the adjacency matrix, the dynamic spatial associations between ships are learned, resulting in spatiotemporal joint embedding. S221, Calculation of Ships With ships Initial affinity between : ; In the formula, and Representing ships and ships Graph embedding; This indicates a modified linear unit activation function; Indicates transpose; S222, Utilizing manifold distance Optimize initial affinity : ; in, ; In the formula, This indicates the optimized affinity; Indicates the attenuation coefficient; Indicates KL divergence; Representing ships and ships At time step The covariance matrix of the corresponding detection unit; This represents the length of the time window used to calculate the manifold distance; S223, Affinity for the optimized Perform softmax normalization to obtain the spatial attention weights of the dynamic adjacency matrix: ; In the formula, Indicates a ship For ships Spatial attention weights; Indicates temperature parameter; Indicates a ship With ships The optimized affinity between them; Indicates the total number of ships; S224, Spatial Attention Weights Based on Dynamic Adjacency Matrix Spatial attention fusion is performed on the ship temporal embedding to obtain a spatiotemporal joint embedding. : ; In the formula, Indicates a ship Temporal embedding; Indicates the fusion weights; This indicates the bias term.

[0013] Step S3 specifically includes the following steps: S31, Spatiotemporal Joint Embedding Predicting future ship positions using a 2-layer MLP: ; In the formula, Indicates a ship No. The position of each prediction step; This represents a multilayer perceptron model used to predict the future position of a ship. and This represents the weight matrix of the first and second layers of the multilayer perceptron model. and This represents the bias terms of the first and second layers of the multilayer perceptron model. S32. Dynamically correct position based on historical position error. : ; in, ; ; In the formula, Indicates the corrected ship No. The position of each prediction step; Indicates a ship Historical location prediction error correction coefficient; Indicates a ship Root mean square error of historical position prediction; This represents the maximum root mean square error of the historical position predictions for all ships. Indicates a ship In the The actual location coordinates of each time step; Indicates a ship In the Predicted location coordinates at each time step; S33, Adjusting the spacing between ships Relative velocity manifold distance Defined as risk factors, and combining with fuzzy set theory, each risk factor is defined as a low-risk-medium-risk-high-risk triangular fuzzy membership function: ; ; ; In the formula, , and They represent risk factors respectively. Fuzzy membership degrees belonging to low-risk, medium-risk, and high-risk categories, and , , , Indicates a ship In the The corrected predicted position coordinates for each prediction step. Indicates a ship In the The corrected predicted position coordinates for each prediction step; and These represent the lower and upper limits of the safe distance, respectively. , Indicates the captain; Indicates a medium risk threshold, and ; S34. Spatial Attention Weights Based on Dynamic Adjacency Matrix The fuzzy membership degrees of the three risk factors are weighted and aggregated to obtain the comprehensive fuzzy risk value among ships. : ; In the formula, , and These represent the distance between ships. Relative velocity manifold distance The weight, and ; , and These represent the distance between ships. Relative velocity manifold distance The fuzzy membership degree, and ; S35. Determine the conflict risk level using the maximum membership principle: ; In the formula, Indicates a ship With ships In the The conflict risk level of each prediction step.

[0014] S3. Fuzzy risk quantification based on manifold differences: Using the ship spatiotemporal joint embedding and dynamic adjacency matrix output in step S2, combined with fuzzy set theory, the risk of conflict between ships is quantified, and a comprehensive fuzzy risk value and risk level are output. S4. Multi-objective conflict association and early warning decision-making: Based on the comprehensive fuzzy risk value and risk level output in step S3, effective conflict pairs are extracted through the target offset strategy, and early warning results and avoidance suggestions are generated in combination with conflict types.

[0015] Step S4 specifically includes the following steps: S41, Filtering The conflict pairs are identified and sorted in descending order to obtain a conflict priority list. ;in, This indicates that a threshold value is set. S42. Initialize the associated ship set. Traverse the conflict priority list In this process, if there is Then Join the ship collection At the same time Mark them as valid conflict pairs and add them to the set of valid conflict pairs. After traversing the set, a set of valid conflict pairs is obtained. ; S43. Calculate the ship's relative heading : ; In the formula, Represents modulo operation; S44. Identify conflict types based on the relative heading and position of ships: Encounter: ,and Follow Decrease; cross: And ships On the ship The starboard or port side; Overtaking: Ships In order to catch up with the Yue ship, and ; S45. Based on conflict priority, conflict type and ship dynamic characteristics, output early warning level and targeted avoidance suggestions.

[0016] In step S45, the warning levels are divided as follows: Level 1 Warning: and ; Level 2 warning: or ; Level 3 Warning: and ; The generated avoidance suggestions are as follows: Encounter: Ship and ships All turn right, give way distance , Indicates a ship and ships The longest ship in the fleet; Crossing: If a vessel is approaching from the starboard side, give way and adjust your course by ≥15° or reduce speed by ≥2 knots; Overtaking: The overtaking vessel is the one giving way, and it overtakes the vessel being overtaken from the port side, with a relative speed of ≤3 knots.

[0017] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A maritime traffic conflict early warning method based on fuzzy risk and hierarchical attention, characterized by: Includes the following steps: S1. Multi-source data acquisition and synchronous preprocessing: Simultaneously acquire radar echo data, AIS ship dynamic data and meteorological environment data, and extract manifold features and AIS time-series patch features after spatiotemporal synchronous processing. S2, Layered attention spatiotemporal joint modeling: Based on the manifold features and AIS temporal patch features output from step S1, information geometric manifold modeling and patch Transformer attention mechanism are integrated. The long-term and short-term dependencies of ship motion are captured through temporal attention encoding, and the dynamic association of ships is learned through spatial attention modeling. The ship spatiotemporal joint embedding and dynamic adjacency matrix are output. S3. Fuzzy risk quantification based on manifold differences: Using the ship spatiotemporal joint embedding and dynamic adjacency matrix output in step S2, combined with fuzzy set theory, the risk of conflict between ships is quantified, and a comprehensive fuzzy risk value and risk level are output. S4. Multi-objective conflict association and early warning decision-making: Based on the comprehensive fuzzy risk value and risk level output in step S3, effective conflict pairs are extracted through the target offset strategy, and early warning results and avoidance suggestions are generated in combination with conflict types.

2. The maritime traffic conflict early warning method based on fuzzy risk and hierarchical attention as described in claim 1, characterized in that: Step S1 specifically includes the following steps: S11. Synchronously acquire radar echo data AIS ship dynamic data and meteorological and environmental data To obtain the original dataset ,in, , For frame index, For distance units, For azimuth units; , They represent Ships at each time step Latitude, longitude, relative speed, and heading towards the ground; , These represent wave height, wind speed, and wave period, respectively. S12, Spatiotemporal Synchronization: Unifying radar echo data AIS ship dynamic data and meteorological and environmental data The timestamp is UTC time, and AIS vessel dynamic data is also included. WGS84 geographic coordinates Converted to radar pixel coordinates via Web Mercator projection To obtain synchronized multi-source data ; S13. Extracting Manifold Features: Based on information geometry theory, the statistical characteristics of radar echoes are modeled as a Hermitian positive definite manifold to extract the differential features between the target and sea clutter. ; in, ; ; In the formula, Represents the characteristic matrix of the manifold; Represents manifold distance; Represents the trace of a matrix; This represents the covariance matrix of the detection unit; express The sample covariance matrix of each reference unit; Represents a determinant; express An identity matrix of order 1; Indicates the first Complex pulse vectors of reference units; express The conjugate transpose of; Simultaneously, AIS time-series patch features are extracted: using the patch time-series coding approach, AIS ship time-series data is divided into fixed-length patches, and each fixed-length patch is linearly projected into a high-dimensional embedding vector. Sine position coding is added to preserve the temporal order, thus obtaining AIS time-series patch features. : ; In the formula, Indicates a ship No. The original data matrix of each AIS timing patch; Represents the projection weight matrix; Indicates the bias term; Indicates the first The location encoding of each AIS timing patch, and , and They represent the first The first AIS timing patch peacekeeping dimensional components, Indicates the embedding dimension.

3. The maritime traffic conflict early warning method based on fuzzy risk and hierarchical attention as described in claim 2, characterized in that: Step S2 specifically includes the following steps: S21. Based on the Transformer encoder, hierarchical attention calculation is performed on the ship patch embedding to capture the long and short-term temporal dependencies of ship motion. At the same time, manifold features are incorporated to enhance the target discriminability, resulting in the ship temporal embedding. S211, the manifold characteristic matrix Mapping to the embedding dimension With AIS timing patch features Element-by-element addition: ; In the formula, Indicates a ship No. Embedded vectors after fusing manifold features from AIS temporal patches; Describes a linear mapping function, and , Represents a linear mapping function The weight matrix; Indicates the bias term; Indicates the input to the linear mapping function eigenvalues ​​of the manifold; Indicates a ship To the Each AIS timing patch corresponds to a manifold feature at each time step; S212 employs a 2-layer pre-normalized Transformer encoder, with each layer containing a multi-head self-attention and position feedforward network, and the output patch is embedded. : ; in, ; ; ; ; In the formula, Presentation layer normalization operation; This indicates the ship after the first layer of encoder processing. The embedding vector; This represents a multilayer perceptron; and This represents the weight matrix of the first and second layers of the MLP model; and This represents the bias terms of the first and second layers of the MLP model; Represents the activation function of the Gaussian error linear unit; This indicates a multi-head self-attention mechanism; Indicates a splicing operation; Indicates the first The output of each attention head; Indicates the output weights; This represents the Softmax activation function; , and Represent the query, key, and value matrix respectively; and , , and Represents the generation of the first The weight matrix of the query, key, and value matrix for each attention head; Indicates the number of heads of attention; S213, Patch embedding Average pooling is performed to obtain the ship Temporal embedding : ; S22. By using the adaptive graph learning approach and combining manifold distance to optimize the adjacency matrix, the dynamic spatial associations between ships are learned, resulting in spatiotemporal joint embedding. S221, Calculation of Ships With ships Initial affinity between : ; In the formula, and Representing ships and ships Graph embedding; This indicates a modified linear unit activation function; Indicates transpose; S222, Utilizing manifold distance Optimize initial affinity : ; in, ; In the formula, This indicates the optimized affinity; Indicates the attenuation coefficient; Indicates KL divergence; Representing ships and ships At time step The covariance matrix of the corresponding detection unit; This represents the length of the time window used to calculate the manifold distance; S223, Affinity for the optimized Perform softmax normalization to obtain the spatial attention weights of the dynamic adjacency matrix: ; In the formula, Indicates a ship For ships Spatial attention weights; Indicates temperature parameter; Indicates a ship With ships The optimized affinity between them; Indicates the total number of ships; S224, Spatial Attention Weights Based on Dynamic Adjacency Matrix Spatial attention fusion is performed on the ship temporal embedding to obtain a spatiotemporal joint embedding. : ; In the formula, Indicates a ship Temporal embedding; Indicates the fusion weights; This indicates the bias term.

4. The maritime traffic conflict early warning method based on fuzzy risk and hierarchical attention as described in claim 3, characterized in that: Step S3 specifically includes the following steps: S31, Spatiotemporal Joint Embedding Predicting future ship positions using a 2-layer MLP: ; In the formula, Indicates a ship No. The position of each prediction step; This represents a multilayer perceptron model used to predict the future position of a ship. and This represents the weight matrix of the first and second layers of the multilayer perceptron model. and This represents the bias terms of the first and second layers of the multilayer perceptron model. S32. Dynamically correct position based on historical position error. : ; in, ; ; In the formula, Indicates the corrected ship No. The position of each prediction step; Indicates a ship Historical location prediction error correction coefficient; Indicates a ship Root mean square error of historical position prediction; This represents the maximum root mean square error of the historical position predictions for all ships. Indicates a ship In the The actual location coordinates of each time step; Indicates a ship In the Predicted location coordinates at each time step; S33, Adjusting the spacing between ships Relative velocity manifold distance Defined as risk factors, and combining with fuzzy set theory, each risk factor is defined as a low-risk-medium-risk-high-risk triangular fuzzy membership function: ; ; ; In the formula, , and They represent risk factors respectively. Fuzzy membership degrees belonging to low-risk, medium-risk, and high-risk categories, and , , , Indicates a ship In the The corrected predicted position coordinates for each prediction step. Indicates a ship In the The corrected predicted position coordinates for each prediction step; and These represent the lower and upper limits of the safe distance, respectively. , Indicates the captain; Indicates a medium risk threshold, and ; S34. Spatial Attention Weights Based on Dynamic Adjacency Matrix The fuzzy membership degrees of the three risk factors are weighted and aggregated to obtain the comprehensive fuzzy risk value among ships. : ; In the formula, , and These represent the distance between ships. Relative velocity manifold distance The weight, and ; , and These represent the distance between ships. Relative velocity manifold distance The fuzzy membership degree, and ; S35. Determine the conflict risk level using the maximum membership principle: ; In the formula, Indicates a ship With ships In the The conflict risk level of each prediction step.

5. The maritime traffic conflict early warning method based on fuzzy risk and hierarchical attention according to claim 4, characterized in that: Step S4 Specifically, the following steps are included: S41, Filtering The conflict pairs are identified and sorted in descending order to obtain a conflict priority list. ;in, This indicates that a threshold value is set. S42. Initialize the associated ship set. Traverse the conflict priority list In this process, if there is Then Join the ship collection At the same time Mark them as valid conflict pairs and add them to the set of valid conflict pairs. After traversing the set, a set of valid conflict pairs is obtained. ; S43. Calculate the ship's relative heading : ; In the formula, Represents modulo operation; S44. Identify conflict types based on the relative heading and position of ships: Encounter: ,and Follow Decrease; cross: And ships On the ship The starboard or port side; Overtaking: Ships In order to catch up with the Yue ship, and ; S45. Based on conflict priority, conflict type and ship dynamic characteristics, output early warning level and targeted avoidance suggestions.

6. The maritime traffic conflict early warning method based on fuzzy risk and hierarchical attention as described in claim 5, characterized in that: In step S45, the warning levels are divided as follows: Level 1 Warning: and ; Level 2 warning: or ; Level 3 Warning: and ; The generated avoidance suggestions are as follows: Encounter: Ship and ships All turn right, give way distance , Indicates a ship and ships The longest ship in the fleet; Crossing: If a vessel is approaching from the starboard side, give way and adjust your course by ≥15° or reduce speed by ≥2 knots; Overtaking: The overtaking vessel is the one giving way, and it overtakes the vessel being overtaken from the port side, with a relative speed of ≤3 knots.