Ship abnormal behavior detection method based on improved graph attention neural network

By improving the graph attention neural network, a multi-layer graph attention structure and a double-layer graph encoding method are constructed, which solves the problem of insufficient detection accuracy and robustness in ship abnormal behavior detection, and achieves efficient identification of abnormal behavior between single ships and ships.

CN120354292AActive Publication Date: 2025-07-22OCEAN UNIV OF CHINA

Patent Information

Application Number
CN202510269834.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-07-22
Estimated Expiration
2045-03-07

AI Technical Summary

Technical Problem

The prior art has complex problems such as poor detection accuracy, insufficient data acquisition and processing, insufficient model accuracy and robustness in the detection of ship abnormal behavior, and it is difficult to deal with the complex problems of interaction between ships.

Method used

The improved graph attention neural network is adopted to construct a multi-layer graph attention structure, including dynamic depth hollow graph convolution module and spatiotemporal graph attention network module. Combining time information and multi-head attention mechanism, the ship trajectory data is processed through dynamic graph convolution and cavity convolution, the space-time characteristics are constructed and the dependence between trajectory points is learned, and the bilayer graph attention neural network structure is designed to detect abnormal behaviors between single ships and ships.

Benefits of technology

It improves the accuracy and robustness of ship abnormal behavior detection, can better capture spatiotemporal and spatial characteristics and attribute characteristics, effectively identify abnormal behaviors between a single ship and a ship, and has high accuracy and real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120354292A_ABST
    Figure CN120354292A_ABST
Patent Text Reader

Abstract

The invention provides a ship abnormal behavior detection method based on an improved graph attention neural network, and belongs to the field of ship abnormal behavior detection. Through AIS data, a graph structure including attribute features such as ship position, speed and course is constructed, attribute features of ship tracks are expanded by using dynamic cavity graph convolution, and a space-time attention mechanism is fused into a multi-head attention mechanism, so that the model has the capability of processing time dimension features to better extract space-time features of the ship tracks, and the time-space attention mechanism is optimized. The detection effect of the abnormal behavior of the single ship is improved; in the aspect of abnormal behavior detection between ships, a two-layer graph coding structure is constructed, the first-layer graph coding adopts a coding mode of single ship detection to obtain trajectory features of the ships, and the second-layer graph coding constructs relation features between ship trajectories based on the trajectory features of each ship. Effective detection of abnormal behaviors between ships is realized in combination with the attention mechanism of the GAT, and the method has good accuracy and robustness and high practical value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of ship abnormal behavior detection, and particularly relates to a ship abnormal behavior detection method based on an improved graph attention neural network. Background Art

[0002] With the increase in global maritime activities, maritime traffic management and environmental protection are facing major challenges. Ship abnormal behavior has become a key factor affecting maritime safety, not only posing a threat to the safety of personnel and ships, but also potentially causing irreversible harm to the marine environment.

[0003] In the prior art, research on ship abnormal behavior detection methods mainly focuses on two directions: on the one hand, it analyzes according to the historical movement trajectories of ships in the past, and judges whether it is an abnormal risk behavior by determining whether the movement trajectory of the ship is similar to the previous movement trajectory. For example, Lin et al. developed a grid-based method to detect abnormal ship behavior, using a density-based clustering algorithm to analyze historical position data and identify the navigation patterns of inland river ships. Chen et al. constructed a ship behavior dictionary through clustering analysis of a large amount of AIS historical data sets. Then, a sequence-to-sequence model based on a bidirectional gated recurrent unit was trained for trajectory classification to predict the navigation intention of ships. On the other hand, it focuses on the analysis of the navigation process, and detects abnormal ship states through data-driven and deep learning technologies. For example, Hu et al. proposed a method based on transfer learning to detect abnormal ship trajectories, using a variational autoencoder to explore the spatial similarity and potential relationships within the trajectory dimension. Run et al. established a graph neural network (GNN) model to construct a ship trajectory feature map, and used message passing and Delaunay triangulation to identify ship behavior patterns.

[0004] The above methods mainly focus on analyzing AIS trajectory data and detecting various abnormal behaviors of individual ships, but there are still certain limitations in data acquisition and processing, such as the problem that the data source is not comprehensive enough and the data quality is not high enough. The accuracy and robustness of the algorithm model also need to be further improved to cope with the complex and changeable maritime traffic environment. In actual use, due to the interaction and joint actions between ships, some abnormal behaviors and safety accidents are caused. Therefore, the navigation relationship between ships also needs to be considered; because traditional methods cannot capture the dependencies between different time series and attribute features, it is difficult to handle the complex problems of interactions between ships, which also greatly increases the difficulty of abnormal behavior detection. Summary of the Invention

[0005] To solve the defects such as poor detection accuracy in the existing methods for detecting abnormal behaviors of ships, the present invention proposes a method for detecting abnormal behaviors of ships based on an improved graph attention neural network. By constructing trajectory features to identify abnormal ship states, and by expanding trajectory features and fusing time information, the ability to capture spatio-temporal features and attribute features is enhanced, effectively improving the accuracy of feature extraction and abnormal detection.

[0006] The present invention is implemented by the following technical solutions: A method for detecting abnormal behaviors of ships based on an improved graph attention neural network, wherein the improved graph attention neural network adopts a multi-layer graph attention structure, and each layer of the graph attention structure includes a dynamic depth dilated graph convolution module DDGC and a spatio-temporal graph attention network module TGAT; The dynamic depth dilated graph convolution module DDGC fuses a dynamic graph convolution module and a dilated graph convolution module to expand features according to ship navigation trajectory data, and uses different dilated convolution rates to reduce the noise information introduced by feature expansion; The spatio-temporal graph attention network module TGAT introduces time information as input, and is composed of a spatio-temporal attention mechanism, a multi-head attention mechanism and an information aggregation module to convert ship track point information into ship trajectory features with spatio-temporal characteristics;

[0007] The method for detecting abnormal behaviors of ships includes the following steps:

[0008] Step A, obtain ship trajectory data and construct a temporary adjacency relation matrix through a dynamic graph convolution module, then expand a single ship trajectory data, and process the expanded ship trajectory data based on a dilated graph convolution module;

[0009] Step B, input the processed ship trajectory data into the spatio-temporal graph attention network module TGAT, and construct a spatio-temporal multi-head attention mechanism to enrich the spatio-temporal features of the ship trajectory data and learn the dependence relationship between trajectory points;

[0010] Step C, obtain ship trajectory features through multiple information aggregations based on the multi-layer graph attention structure, and then judge whether there is an abnormal state in a single trajectory.

[0011] Further, in step C, after determining the behavior of a single ship trajectory, it also includes step D for detecting abnormal behaviors between ships. The detection of abnormal behaviors between ships requires a joint analysis of the navigation trajectories and motion states of multiple ships in the area. For this purpose, a double-layer graph attention neural network structure is designed. The first layer of the graph attention neural network adopts an improved graph attention neural network module for extracting the navigation trajectory features of ships; The second layer of the graph attention neural network uses the ship trajectory features in the area as nodes, and designs an inter-ship relationship detection network InGAT to detect abnormal behaviors between ships. InGAT combines a graph encoding and an interactive attention mechanism to establish the edge relationship of the graph structure, that is:

[0012] Step D: Based on the trajectory features of each ship, construct the relationship features between ship trajectories. Through the ship - to - ship relationship detection network InGAT, combine graph encoding and interactive attention mechanism to establish the edge relationship of the graph structure, and realize the detection of abnormal behaviors between ships.

[0013] Compared with the prior art, the advantages and positive effects of the present invention are as follows:

[0014] This solution constructs a novel graph attention neural network, studies and analyzes the abnormal behavior patterns of ships in different scenarios, and designs corresponding graph encoding methods to process ship trajectory data;

[0015] For the detection of single - ship abnormal behaviors, construct graph encoding methods from both the overall and local levels, and incorporate deep graph convolution methods to enrich the trajectory data features. It can be extended according to the data features of the trajectory, effectively solving the problem of small scale of ship trajectory point features. In order to enable the model to better process non - equidistant trajectory time - series data, a time attention module is used to improve the graph attention mechanism, reduce the influence of time factors on trajectory features, improve the model's ability to process time - series data and extract trajectory attribute features, and more accurately identify the abnormal states during ship navigation;

[0016] For the detection of abnormal behaviors between ships, adopt a two - layer graph encoding structure. The first - layer graph encoding is based on the feature extraction part of single - ship abnormal behavior detection, and converts the trajectory data of multiple ships in the area into trajectory features. The second - layer graph encoding encodes the ship trajectory features of the entire area as nodes, fuses the interactive attention mechanism to establish the trajectory relationship features between ship trajectories, and learns and focuses on the abnormal features between trajectories through the graph attention mechanism, realizing the effective detection of abnormal behaviors between ships.

[0017] And experimental verification shows that this method performs excellently in various abnormal behavior detection tasks, has high accuracy and real - time performance, significantly improves the accuracy and response time in ship abnormal behavior detection, performs excellently in ship - to - ship abnormal behavior detection tasks, and has good accuracy and robustness, with broad practical application value and promotion prospects. Brief Description of the Drawings

[0018] Figure 1 It is a schematic diagram of the ship abnormal behavior detection architecture according to the embodiment of the present invention;

[0019] Figure 2 It is a schematic diagram of the network architecture of the DDGc - TGAT module according to the embodiment of the present invention;

[0020] Figure 3 It is a schematic diagram of the ship - to - ship abnormal behavior detection process according to the embodiment of the present invention;

[0021] Figure 4 Schematic diagram of multi-source ship track data in the embodiment of the present invention, where (a) is Bay A and (b) is Bay B;

[0022] Figure 5 Schematic diagram of abnormal ship track data in the embodiment of the present invention;

[0023] Figure 6 Schematic diagram for comparing the training effects of various neural network models in the embodiment of the present invention, where (a) is the model accuracy and (b) is the model loss rate;

[0024] Figure 7 Visualization effect diagram of features in the embodiment of the present invention;

[0025] Figure 8 Effect diagram of ship abnormal state detection in the embodiment of the present invention; where (a) is the state of direction deviation and abnormal speed reduction, and (b) is the state of signal interruption and long-time stillness,

[0026] Figure 9 Effect diagram of abnormal state detection between ships in the embodiment of the present invention, where (a) is the state of alternating AIS devices, (b) is the state of ship collision risk, (c) is the state of collaborative trawling operation, and (d) is the state of normal track. Detailed implementation manners

[0027] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the following further describes the present invention with reference to the accompanying drawings and embodiments. Many specific details are set forth in the following description in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0028] First, the overall architecture principle of ship abnormal behavior detection in this solution is described:

[0029] The ship track data contains the timing information of ship movement. In this embodiment, the timing relationship is converted into a graph structure through graph convolution and graph encoding, enabling the graph attention neural network to deeply analyze the potential features in the track data. From the perspectives of single-ship and inter-ship navigation track anomalies, the behavior patterns of ship tracks are studied. The overall network structure of abnormal behavior detection is as Figure 1 shown.

[0030] For ship abnormal behavior detection, an improved graph attention neural network (DDGC-TGAT) is first constructed, including a dynamic dilated graph convolution (DDGC) module and a spatio-temporal graph attention network (TGAT) module, which can obtain ship trajectory features integrating spatio-temporal information and effectively detect the behavior patterns of single-ship navigation trajectories. On this basis, a layer of graph attention neural network (InGAT) is constructed, which uses an interactive attention mechanism to construct the relationship features between ship trajectories, fuses with the improved graph attention neural network, and combines the edge relationship detection ability of the graph attention mechanism to achieve abnormal behavior detection between ships. The single-ship trajectory data is processed by the dynamic dilated graph convolution module to expand the trajectory data features of the ship, and then the TGAT module is used to learn the dependence relationship between trajectory points and the trajectory attribute features, so as to accurately judge whether there is an abnormal state in a single trajectory; for the problem of abnormal behavior detection between ships, the trajectory features of multiple ships in the same spatio-temporal range are used as the meta-nodes of the ship relationship detection network (InGAT), and the interactive attention mechanism is used to establish the relationship features between ship trajectories, which can learn the abnormal relationship features of the trajectories and complete the data analysis and behavior detection of abnormal trajectories between ships.

[0031] Embodiment 1, a ship abnormal behavior detection method based on an improved graph attention neural network, combined with Figure 2 As shown, the improved graph attention neural network (DDGC-TGAT) adopts a multi-layer graph attention structure (three layers in this embodiment), and each layer contains a dynamic dilated graph convolution module (DDGc) and a spatio-temporal graph attention network module (TGAT). The DDGc module combines dynamic graph convolution and dilated graph convolution, can expand features according to ship navigation trajectory data, and uses different dilated convolution rates to reduce the noise information introduced by feature expansion, so that the expanded trajectory features can accurately reflect the driving state of the ship. The TGAT module introduces time information ( Figure 2 the time interval information in it) as input, and is composed of a spatio-temporal attention mechanism, a multi-head attention mechanism and an information aggregation module, which can convert ship track point information into ship trajectory features with spatio-temporal characteristics.

[0032] The temporal attention mechanism consists of two parts: the temporal mapping gate and the temporal decay gate. The temporal mapping gate maps the time interval variable between each adjacent ship trajectory point into a weight value, and superimposes it on the trajectory features of the corresponding node in the graph to form the spatio-temporal feature information of the ship. The temporal decay gate generates a corresponding decay coefficient, which acts on the node features processed by the attention head to reduce the impact of excessive time information on the spatio-temporal features of the node. The multi-head attention mechanism uses multiple attention heads to calculate the weights of each graph node that has fused spatio-temporal information, so as to capture the semantic information and complex relationships between trajectory nodes. The information aggregation module can fuse the feature information processed by the spatio-temporal attention mechanism and the multi-head attention mechanism, and aggregate the feature information processed by the multi-layer DDGC-TGAT structure.

[0033] Specifically, the ship abnormal behavior detection method includes the following steps:

[0034] Step A: First, obtain single-ship trajectory data and process it using the dynamic graph convolution module. The ship trajectory data includes attribute information such as ship position, speed, and heading. Construct a temporary adjacency relationship matrix and expand the ship trajectory data. Secondly, the dilated graph convolution module processes the ship trajectory data and discards the noise information introduced by feature expansion.

[0035] Step B: Then, the processed ship trajectory data is input into the TGAT module to construct a spatio-temporal multi-head attention mechanism to enrich the spatio-temporal features of the trajectory data and learn the dependence relationship between trajectory points.

[0036] Step C: Finally, the multi-layer graph attention structure obtains more accurate ship trajectory features through multiple information aggregations, and then can accurately judge whether there is an abnormal state in a single trajectory.

[0037] The specific implementation process of DDGC-TGAT is as follows:

[0038] In step A, assume the original data X = x1, x2,..., x n , X ∈ R n×5 , x i ∈ R 1×5 is a single ship trajectory data, where i ≥ 1. First, use dynamic graph convolution to calculate the Euclidean distance between nodes, and generate a temporary adjacency relationship matrix F d , and its calculation formula is as follows:

[0039]

[0040] where d ij represents the Euclidean distance between node i and node j, τ is a hyperparameter that controls similarity sensitivity, σ is the ReLU activation function, A ijThe mapping function, where Fa represents the generated temporary adjacency matrix. The dynamic graph convolution module expands the ship trajectory data. By means of the dilated graph convolution layer module, the receptive field is enlarged and the dilation rate is changed. The dynamic graph convolution can dynamically generate and update the graph structure, amplify the ship trajectory features according to the dynamic changes of the ship navigation trajectory, and can better capture more context information, improving the trajectory feature expansion effect of the module. The dilated graph convolution introduces a "dilation rate" during the convolution process, effectively expanding the receptive field without increasing the number of parameters, discarding most of the noise data introduced during the graph convolution feature expansion process, and improving the accuracy of the expanded trajectory features. Subsequently, it can capture the information of farther nodes and reduce the noise information, obtaining more accurate expanded trajectory features. Its calculation formula is:

[0041] P = σ(F k ·σ(F × X × W dy ) × W di )

[0042] Among them, P represents the expanded trajectory features, K represents the dilation rate of the dilated convolution, · is the element-wise multiplication, W dy represents the learnable weight matrix of the dynamic convolution layer, and W di is the learnable weight matrix of the dilated convolution layer.

[0043] In step B, the TGAT module incorporates a time attention mechanism, which can effectively fuse time information with spatial information such as ship position and speed, enabling the model to have the ability to process time-dimensional features to better extract the spatio-temporal features of ship trajectories. By calculating the attention weights between each trajectory node, the spatio-temporal dimensional feature correlation relationship between nodes is fully considered during the feature extraction process, effectively enhancing the model's spatio-temporal feature extraction ability, and thus improving the detection effect of ship trajectory abnormal states. Specifically:

[0044] Assume that the trajectory feature data P = P1, P2,..., P n , the time interval T s between the source feature node P s and the adjacent ship trajectory points = △t1, △t2,..., △t n , where △t n = |t s - t n |. The graph attention layer fuses the spatio-temporal information of the input trajectory feature data and the time interval △t n through the time mapping gate. The time mapping gate converts the time interval between adjacent ship trajectory points into time weights, and then performs weighted fusion with the node x n to obtain h n . Its calculation formula is as follows:

[0045] βn = sin(△t n ) × W sin + cos(△t n ) × W cos

[0046]

[0047] where β n represents the time mapping weight of node x n , △t n is the time interval between node x n and the source node x S , W sin and W cos are learnable weights respectively, h n represents the fused spatio-temporal feature of node x n . For the fused spatio-temporal feature h S of the source node and the fused spatio-temporal feature h n of any node, traverse all the directed edges related to h n , and calculate the attention coefficient a through normalizing the intermediate learnable weight variable α by the SoftMax function. Its calculation formula is: sj where

[0048]

[0049] W i represents the weight vector between source feature h s nodes, W j represents the weight vector of feature node h j , || represents the concatenation operation, LeakyReLU is a non-linear activation function. In order to reduce the impact of time information on trajectory data, the time interval between adjacent ship trajectory points is converted into a time decay coefficient through a time decay gate, and is weighted and fused with the fused spatio-temporal feature h S of the source node to obtain the output of the graph attention layer. The calculation formula of the output result is as follows:

[0050]

[0051] where a is the decay rate coefficient, that is, the larger the time interval, the smaller the decay coefficient, and F s is the output result of the information aggregation module.

[0052] In step C, more accurate ship trajectory features are obtained through multiple information aggregations. For the fused spatio-temporal feature h i of any node, the trajectory feature obtained by DDGc-TGAT is expressed as:

[0053]

[0054] Among them, n represents the number of ship trajectory points, σ is the RELU activation function, and a ij represents the attention coefficient.

[0055] In Embodiment 2, Embodiment 1 is for single-ship abnormal behavior detection. Many abnormal behaviors and accident risks exist between ships, and the process relationship during navigation between ships needs to be considered. For example, for two ships that may collide, from the perspective of the individual navigation trajectories of the ships alone, they are both sailing normally, but considering the interaction relationship between the ships jointly may pose a safety risk. Therefore, based on Embodiment 1, this embodiment proposes a method for checking abnormal behaviors between ships, that is, after detecting the abnormal behavior of a single ship in step C, it further includes:

[0056] Step D: Based on the detection of single-ship abnormal behavior, construct the relationship features between ship trajectories based on the trajectory features of each ship, and combine the attention mechanism of GAT to effectively detect the abnormal behaviors between ships.

[0057] The detection of abnormal behaviors between ships requires a joint analysis of the navigation trajectories and motion states of multiple ships in the area. This embodiment designs a double-layer graph attention neural network structure, and its detection process is as Figure 3 shown.

[0058] The first-layer graph attention neural network uses the DDGc-TGAT module to extract the navigation trajectory features of ships;

[0059] The second-layer graph attention neural network uses the ship trajectory features in this area as nodes and designs InGAT to detect abnormal behaviors between ships.

[0060] InGAT combines the graph encoding and interactive attention mechanism to establish the edge relationship of the graph structure, that is, represents the relationship features between ship trajectories, and combines the graph attention mechanism to analyze the trajectory relationship features to determine whether there are joint risk behaviors. Its specific implementation process is as follows:

[0061] Assume that n ship trajectory features are calculated through DDGc-TGAT, denoted as H n =[F1, F2,..., F n , and F n is the feature vector of trajectory n. F i and F j are the feature vectors of node i and node j respectively. Calculate the interactive features between nodes, and its calculation formula is:

[0062] e ij =Leaky ReLU(a T [WF i ||WFj )

[0063] Among them, e ij is the interaction feature between nodes i and j, a T is a learnable weight variable, W is the weight matrix of the linear transformation of node features, || represents the feature concatenation operation. Define a multi-layer perceptron MLP for calculating the interaction weights between nodes. The greater the relationship weight, the stronger the interaction between surface trajectories. The interaction relationship feature between trajectories can be expressed as:

[0064]

[0065] Among them, is the interaction feature between node i and node j. Combine the node attention weight e ij of GAT with the interaction attention weight to obtain the final attention weight representation that fuses the trajectory edge relationship feature, which is expressed as:

[0066]

[0067] Among them, represents the interaction relationship feature weight, and λ is an adjustable hyperparameter used to control the role degree of the interaction feature in the final attention. Use the softmax function to normalize the fused attention weight to obtain the final attention weight α ij , which is expressed as:

[0068]

[0069] Use the final attention weight α ij to weight and aggregate the features of neighbor nodes to obtain a new feature representation that fuses other trajectory information:

[0070]

[0071] Among them, T (l+1) represents the trajectory feature after information aggregation. Calculate and fuse all the trajectory features in the region to obtain the final interaction relationship matrix T. After processing through a linear layer to obtain a feature vector, use the SoftMax function to convert the discrimination result into a probability distribution to obtain the final abnormal behavior detection result.

[0072] It can be seen that in this embodiment, a two-layer graph encoding structure is constructed for the detection of abnormal behaviors between ships. The first-layer graph encoding uses the encoding method of single-ship detection to obtain the trajectory features of ships, and the second-layer graph encoding constructs the relationship features between ship trajectories based on the trajectory features of each ship. InGAT fuses the interactive attention mechanism with GAT, can dynamically adjust the attention weights according to the actual interaction intensity between trajectories, and better captures the complex spatio-temporal dependence relationships between trajectories through the fusion of interaction information between trajectories, improving the detection effect of behaviors between ships.

[0073] Experimental verification:

[0074] The ship trajectory data in this embodiment uses the AIS data of the watersheds in areas A and B of the gulf, with a total of 1000 real ship trajectories. However, there is a lack of abnormal ship trajectory data in the actual AIS data. To evaluate the effectiveness of the abnormal trajectory detection model, some data are randomly selected from the real data, and a script is used to generate 400 trajectory data of abnormal ship navigation. The entire trajectory data is divided into a training set, a validation set, and a test set according to the ratio of 8:1:1. The training set is used to train the model, the parameters are adjusted through the validation set, and the effect of the model is verified through the test set. The ship trajectory data is shown as Figure 4 shown.

[0075] In the abnormal data generation stage, this embodiment adopts the ship abnormal trajectory generation method (Liu et al., 2022b), and randomly generates abnormal behavior states such as abnormal deceleration, abnormal stillness, direction deviation, and signal interruption according to the real AIS trajectory data. The constructed abnormal trajectories are shown as Figure 5 shown. Normal navigation means that the trajectory data is stable and there are no obvious abnormalities. Direction deviation refers to a significant abnormality in the trajectory heading, with an obvious difference from the expected route; abnormal deceleration is manifested as a sharp drop in speed within a short period of time; abnormal stillness is manifested as staying in a static state for a long time within a specific protected area; signal loss means that the ship cannot be monitored within a certain period of time and the AIS data is lost for a long time; long-term ship stillness means that the ship stays at a certain position for a long time.

[0076] To verify the effectiveness of this solution, six deep models are selected to evaluate the problem of single-ship abnormal behavior detection, namely long short-term memory neural network (LSTM), recurrent neural network (RNN), gated recurrent unit neural network (GRU), bidirectional long short-term memory neural network (Bi-LSTM), graph convolutional network (GCN), and this method. Each model was trained for 100 rounds using the cross-entropy loss function, and the training and validation loss curves were smoothed using the sliding window technique to more clearly observe the performance trends of the models. The model training results are shown as Figure 6 shown.

[0077] The experimental results show that the DDGc-TGAT model performs better than other models on the training and validation sets. Around 20 rounds, the training loss of the model can reach a relatively low level, and it has the highest detection accuracy. The model evaluation criteria adopt four widely used machine learning metrics: accuracy, recall, precision, and F1-score. The results are shown in Table 1.

[0078] Table 1 Comparison experimental results of multiple neural network models

[0079]

[0080]

[0081] When detecting ship anomalies, DDGc-T-GAT shows good accuracy and precision, indicating that the model can accurately capture the attribute features in the ship's navigation trajectory. The ratios of recall and F1-score are also relatively high, indicating that the model also has high precision in identifying the normal driving state and abnormal behavior patterns of ships, and can effectively detect the behavior patterns of the ship's navigation trajectory. The performance of LSTM, RNN, and GRU models is not good, indicating that it is difficult for these models to directly extract the ship's navigation trajectory features from real ship trajectory data. Although the performance of the Transformer and Bi-LSTM models is also good, through data analysis, it is found that their detection effect on a certain type of abnormal behavior is very poor, and it is difficult to detect the features of this type of abnormal trajectory. In contrast, the DDGc-TGAT model is more accurate in detecting the ship's navigation trajectory state and behavior recognition.

[0082] In this embodiment, the learning effect of the normalized adjacency matrix at different positions in the visual dynamic hollow graph convolution module is visualized. Taking the ship trajectory data set as an example, each sample has 10 trajectory points. Figure 7 From left to right are the adjacency matrices produced by the first layer, the second layer, and the third layer of dynamic graph convolution according to the trajectory data. In the first layer of graph convolution, the adjacency matrix only captures and represents very little relationship and structural information between the nodes in the graph. However, as the cascade process deepens, the adjacency information that needs to be learned and processed becomes more complex. The adjacency matrix of each level is adjusted according to the output of the previous level, enabling the entire network to more deeply understand that the graph structure nodes can receive and integrate information from farther nodes. Therefore, in the third layer of graph convolution, the adjacency matrix can already learn the relationships and structural information of all landmark points.

[0083] To verify the robustness of the method in this paper, real ship navigation trajectory data from another representative sea area is selected for generalization experiments. The experimental results are as Figure 8As shown, different navigation states are represented by different colors: green indicates abnormal deceleration, yellow indicates course deviation, purple indicates signal interruption, pink indicates long-term immobility, and blue indicates normal trajectory. The experimental results show that the DDGc-TGAT model can effectively detect the trajectory states and behavior patterns of ships and has excellent performance in identifying the abnormal states of individual ships. The experimental results show that the DDGc-TGAT model can effectively identify the navigation states and behavior patterns of ships and has excellent performance in detecting the abnormal states of individual ships.

[0084] When studying the abnormal behaviors between ships, the abnormal behaviors between ships are detected on the test data set, and the detection effect is as Figure 9 shown, in Figure 9 it, the brown trajectory indicates the alternate use of AIS devices, the red trajectory indicates the risk of collision between ships, the yellow trajectory indicates joint trawling operations, and the blue trajectory indicates the normal navigation of ships. The experimental results show that this method can effectively identify the behavior patterns and trajectory relationships between ships and successfully detect the joint risk behaviors between ships.

[0085] As described above, it is only the preferred embodiment of the present invention, and it is not a limitation of the present invention in other forms. Any person skilled in the art may use the technical content disclosed above to make changes or modifications into equivalent embodiments with equivalent changes and apply them to other fields. However, as long as it does not depart from the technical solution content of the present invention, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention still fall within the protection scope of the technical solution of the present invention.

Claims

1. A method for detecting abnormal behaviors of ships based on an improved graph attention neural network, characterized in that, The improved graph attention neural network adopts a multi-layer graph attention structure. Each layer of the graph attention structure contains a dynamic depth dilated graph convolution module DDGC and a spatio-temporal graph attention network module TGAT. The dynamic depth dilated graph convolution module DDGC fuses the dynamic graph convolution module and the dilated graph convolution module to perform feature expansion based on the ship navigation trajectory data and reduce the noise information introduced by feature expansion using different dilation rates. The spatio-temporal graph attention network module TGAT takes time information as input and consists of a spatio-temporal attention mechanism, a multi-head attention mechanism, and an information aggregation module to convert the ship track information into ship trajectory features with spatio-temporal characteristics. The ship abnormal behavior detection method includes the following steps: Step A: Obtain ship trajectory data and construct a temporary adjacency relationship matrix through the dynamic graph convolution module, then expand the single-ship trajectory data, and process the expanded ship trajectory data based on the dilated graph convolution module. Step B: Input the processed ship trajectory data into the spatio-temporal graph attention network module TGAT to construct a spatio-temporal multi-head attention mechanism to enrich the spatio-temporal features of the ship trajectory data and learn the dependence relationship between trajectory points. Step C: Based on the multi-layer graph attention structure, obtain the ship trajectory features through multiple information aggregations, and then judge whether there is an abnormal state in a single trajectory.

2. The ship abnormal behavior detection method based on the improved graph attention neural network according to claim 1, wherein: In step C, after determining the behavior of a single ship trajectory, it also includes step D for detecting abnormal behavior between ships. The detection of abnormal behavior between ships requires a joint analysis of the navigation trajectories and motion states of multiple ships in the area. For this purpose, a double-layer graph attention neural network structure is designed. The first layer of the graph attention neural network uses an improved graph attention neural network module to extract the navigation trajectory features of ships. The second layer of the graph attention neural network takes the ship trajectory features in the area as nodes and designs an inter-ship relationship detection network InGAT to detect abnormal behavior between ships. InGAT combines graph encoding and interactive attention mechanisms to establish the edge relationship of the graph structure, that is: Step D: Based on the trajectory features of each ship, construct the relationship features between ship trajectories, and through the inter-ship relationship detection network InGAT, combine graph encoding and interactive attention mechanisms to establish the edge relationship of the graph structure to achieve the detection of abnormal behavior between ships.

3. The ship abnormal behavior detection method based on the improved graph attention neural network according to claim 1, characterized in that: The specific implementation in step A is as follows: (1) Assume the original data \(X = x_1,x_2,\cdots,x n , X\in R n×5 , x i \in R 1×5 is the single ship trajectory data, where \(i\geq1\). First, the dynamic graph convolution module is used to calculate the Euclidean distance between nodes, and a temporary adjacency relation matrix \(F d is generated based on the calculation result. Then, we have: Among them, d ij represents the Euclidean distance between node i and node j, x i , x j are the trajectory points of the i-th and j-th vessels respectively, τ is a hyperparameter that controls the similarity sensitivity, σ is the ReLU activation function, and A ij is a mapping function; (2) The dilated graph convolution module introduces a dilation rate during convolution, and then obtains the expanded trajectory features: P = σ(F k ·σ(F d ×X×W dy )×W di ) Among them, P represents the extended trajectory feature, F d represents dynamic graph convolution, F k represents dilated graph convolution, X represents the original ship data, K represents the dilation rate of the dilated convolution, · is element-wise multiplication, W dy represents the learnable weight matrix of the dynamic convolution layer, W di is the learnable weight matrix of the dilated convolution layer.

4. The method for detecting abnormal behaviors of ships based on an improved graph attention neural network according to claim 1, wherein: The specific implementation of step B is as follows: Assume that the trajectory feature data P = P1, P2,..., P n , the source feature node P s and the time intervals T s = △t1, △t2,..., △t n , where △t n = |t s - t n |. The input trajectory feature data and the time interval △t n are fused with the spatio-temporal information of the trajectory data through a time mapping gate. The time mapping gate converts the time intervals of adjacent ship trajectory points into time weights, and then weighted fusion with the node x n to obtain h n . Its calculation formula is as follows: β n = sin(△t n ) × W sin + cos(△t n ) × W cos Among them, β n represents the time mapping weight of node x n △t n is the time interval between node x n and the source node x S W sin and W cos are learnable weights respectively, h n represents the fused spatio-temporal feature of node x n For the fused spatio-temporal feature h S of the source node x S and the fused spatio-temporal feature h n of any node, traverse all the directed edges related to h s and calculate the attention coefficient a by normalizing the intermediate learnable weight variable α through the SoftMax function sj : Among them, W i represents the weight vector between the source feature nodes h s and W j represents the weight vector of the feature node h j || represents the concatenation operation, LeakyReLU is a non-linear activation function. To reduce the influence of time information on trajectory data, the time interval between adjacent ship trajectory points is converted into a time decay coefficient through a time decay gate, and is weighted and fused with the source feature node h s to obtain the output of the graph attention layer. The calculation formula of the output result is as follows: Among them, h n represents the fused time information feature, a sj represents the attention coefficient, represents the attenuation coefficient of node j, a is the attenuation rate coefficient, that is, the larger the time interval, the smaller the attenuation rate coefficient, F s is the output result of the information aggregation module.

5. The method for detecting abnormal behaviors of ships based on an improved graph attention neural network according to claim 1, characterized in that: In the step C, the ship trajectory features are obtained through multiple information aggregations. For any node x i As the source node, the trajectory feature representation obtained through the improved graph attention neural network is: Among them, n represents the number of ship trajectory points, and a ij represents the attention coefficient, and h i represents the feature of node x i integrating time information, represents the attenuation coefficient of node j, and W j represents the weight vector of the feature node h j of.

6. The method for detecting abnormal behaviors of ships based on an improved graph attention neural network according to claim 2, wherein: In step D, the inter-ship relationship detection network InGAT combines graph encoding and interactive attention mechanisms to establish the edge relationship of the graph structure, that is, represents the relationship features between ship trajectories, and combines the graph attention mechanism to analyze the trajectory relationship features to judge whether there is a joint risk behavior. The specific implementation process is as follows: Suppose that through the improvement of the graph attention neural network DDGc-TGAT, n ship trajectory features are calculated and represented as H n =[F1, F2,..., F n , F n is the feature vector of trajectory n, F i and F j are the feature vectors of nodes i and j respectively, and the interaction feature e ij is calculated as follows: e ij = Leaky ReLU(a T [WF i ||WF j ) where, e ij is the interaction feature between nodes i and j, a T is a learnable weight variable, W is the weight matrix of the linear transformation of node features, || represents the feature concatenation operation, and a multi-layer perceptron MLP is defined to calculate the interaction weights between nodes. The interaction relationship feature between trajectories is expressed as: Among them, is the interaction feature between node i and node j. The node attention weight e of InGAT ij is fused with the interaction attention weight to obtain the attention weight of the final fused trajectory edge relationship feature: Among them, represents the weight of the interaction relationship feature. λ is an adjustable hyperparameter used to control the role degree of the interaction feature in the final attention. The softmax function is used to normalize the fused attention weights to obtain the final attention weight α ij , which is expressed as: Using the final attention weight α ij Weight and aggregate the features of neighbor nodes to obtain a new feature representation that fuses other trajectory information: Among them, T (l+1) represents the trajectory features after information aggregation. All the trajectory features within the region are calculated and fused to obtain the final interaction relationship matrix T. After being processed by a linear layer, feature vectors are obtained. The SoftMax function is used to convert the discrimination results into a probability distribution, and the final abnormal behavior detection results are obtained.

Citation Information

Patent Citations

  • Deep learning model T-LSTM-based ship motion track prediction method

    CN116664629A

  • Multi-source ship trajectory matching method based on graph neural network

    CN118568517A

  • Dynamic spatial-temporal graph attention method for ship trajectory prediction

    WO2025039179A1

Cited By

  • Ship trajectory prediction method based on graph attention mechanism and electronic chart

    CN120632376A

  • A ship trajectory prediction method based on graph attention mechanism and electronic chart

    CN120632376B

  • Mine geological risk early warning method, device and equipment based on multi-source heterogeneous data and storage medium

    CN121071618A