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

By improving the graph attention neural network, constructing a multi-layer graph attention structure and fusing temporal information, the limitations of data processing and interaction problems in ship abnormal behavior detection are solved, and high-precision ship abnormal behavior detection is achieved.

CN120354292BActive Publication Date: 2025-11-25OCEAN UNIV OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies have limitations in data acquisition and processing for detecting abnormal ship behavior, resulting in poor detection accuracy. They are also unable to handle interactions between ships and complex and ever-changing maritime traffic environments. Traditional methods cannot capture the dependencies between different time series and attribute features.

Method used

An improved graph attention neural network is adopted to construct a multi-layer graph attention structure, including a dynamic deep-hole graph convolution module and a spatiotemporal graph attention network module. By fusing dynamic graph convolution and temporal information, the ability to capture spatiotemporal and attribute features is enhanced. A two-layer graph attention neural network structure is designed to detect abnormal behavior among ships.

Benefits of technology

It improves the accuracy and robustness of abnormal ship behavior detection, can accurately identify abnormal states of individual ships and between ships, has high accuracy and real-time performance, and is suitable for complex and ever-changing maritime traffic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120354292B_ABST
    Figure CN120354292B_ABST
Patent Text Reader

Abstract

The application 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; a graph structure containing attribute features such as ship position, speed and heading is constructed through AIS data, and dynamic cavity graph convolution is used to expand the attribute features of the ship trajectory; a spatiotemporal attention mechanism is integrated into a multi-head attention mechanism, so that the model has the ability to process time dimension features to better extract the spatiotemporal features of the ship trajectory, and the detection effect of the single ship abnormal behavior is improved; in terms of inter-ship abnormal behavior detection, a two-layer graph encoding structure is constructed, the first layer of graph encoding adopts the encoding mode of single ship detection to obtain the trajectory features of the ship, and the second layer of graph encoding constructs the relationship features between the ship trajectories based on the trajectory features of each ship; the attention mechanism of GAT is combined to realize effective detection of the inter-ship abnormal behavior, 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] This invention belongs to the field of abnormal ship behavior detection, specifically relating to a method for detecting abnormal ship behavior based on an improved graph attention neural network. Background Technology

[0002] With the increase in global maritime activities, maritime traffic management and environmental protection face significant challenges. Abnormal vessel behavior has become a key factor affecting maritime safety, threatening not only the safety of personnel and vessels but also potentially causing irreversible damage to the marine environment.

[0003] Existing technologies for detecting abnormal ship behavior mainly focus on two directions: One is analyzing historical ship trajectories to determine if a particular ship's trajectory is abnormal or risky, based on similarity to past trajectories. For example, Lin et al. developed a grid-based method to detect abnormal ship behavior, using density-based clustering to analyze historical location data and identify inland waterway vessel navigation patterns. Chen et al. constructed a ship behavior dictionary through cluster analysis of a large AIS historical dataset. They then trained a sequence-to-sequence model based on bidirectional gated recurrent units for trajectory classification to predict ship navigation intentions. The other approach focuses on analyzing the navigation process, using data-driven and deep learning techniques to detect abnormal ship states. For example, Hu et al. proposed a transfer learning-based method to detect abnormal ship trajectories, using variational autoencoders to explore spatial similarity and potential relationships within the trajectory dimension. Run et al. built a graph neural network (GNN) model to construct a ship trajectory feature map, using message passing and Delaunay triangulation to identify ship behavior patterns.

[0004] The aforementioned methods primarily focus on analyzing AIS trajectory data to detect various abnormal behaviors of individual vessels. However, they still have certain limitations in data acquisition and processing, such as incomplete data sources and insufficient data quality. The accuracy and robustness of the algorithm models also need further improvement to cope with the complex and ever-changing maritime traffic environment. In practical applications, the interaction and joint actions between vessels lead to some abnormal behaviors and safety incidents, thus requiring consideration of the navigation relationships between vessels. Furthermore, traditional methods cannot capture the dependencies between different time series and attribute features, making it difficult to handle the complexities of vessel interactions and significantly increasing the difficulty of abnormal behavior detection. Summary of the Invention

[0005] To address the shortcomings of existing methods for detecting abnormal ship behavior, such as poor detection accuracy, this invention proposes a method for detecting abnormal ship behavior based on an improved graph attention neural network. This method identifies abnormal ship states by constructing trajectory features and enhances the ability to capture spatiotemporal and attribute features by expanding trajectory features and fusing time information, thereby effectively improving the accuracy of feature extraction and anomaly detection.

[0006] This invention is achieved using the following technical solution: a method for detecting abnormal ship behavior based on an improved graph attention neural network. The improved graph attention neural network adopts a multi-layer graph attention structure, each layer of which includes a dynamic deep-hole graph convolutional module (DDGC) and a spatiotemporal graph attention network module (TGAT). The DDGC integrates the dynamic graph convolutional module and the holed graph convolutional module to perform feature expansion based on ship navigation trajectory data and uses different hole convolution rates to reduce noise information introduced by feature expansion. The TGAT introduces time information as input and consists of a spatiotemporal attention mechanism, a multi-head attention mechanism, and an information aggregation module to transform ship point information into ship trajectory features with spatiotemporal characteristics.

[0007] The method for detecting abnormal ship behavior includes the following steps:

[0008] Step A: Obtain ship trajectory data and construct a temporary adjacency matrix using a dynamic graph convolution module. Then, expand a single ship trajectory data and process the expanded ship trajectory data using a hole graph convolution module.

[0009] Step B: Input the processed ship trajectory data into the spatiotemporal graph attention network module TGAT to construct a spatiotemporal multi-head attention mechanism to enrich the spatiotemporal features of the ship trajectory data and learn the dependencies between trajectory points.

[0010] Step C: Based on the multi-layer graph attention structure, the ship trajectory features are obtained through multiple information aggregations, and then it is determined whether there is an abnormal state in a single trajectory.

[0011] Furthermore, in step C, after determining the behavior of a single ship trajectory, step D, which includes detecting abnormal behavior between ships, is also included. Detecting abnormal behavior between ships requires joint analysis of the navigation trajectories and motion states of multiple ships within the region. Therefore, a two-layer graph attention neural network structure is designed. The first layer uses an improved graph attention neural network module to extract the navigation trajectory features of ships. The second layer uses the ship trajectory features within the region as nodes, and an inter-ship relationship detection network (InGAT) is designed to detect abnormal behavior between ships. InGAT combines graph encoding and interactive attention mechanisms to establish edge relationships in the graph structure, i.e.:

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

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

[0014] This scheme constructs a novel graph attention neural network to study and analyze abnormal ship behavior patterns under different scenarios, and designs corresponding graph encoding methods to process ship trajectory data.

[0015] For the detection of abnormal behavior of single ships, a graph coding method is constructed from both global and local levels, and a depth graph convolution method is incorporated to enrich the trajectory data features. This method can be expanded according to the data features of the trajectory, effectively solving the problem of small feature size of ship trajectory points. In order to enable the model to better handle trajectory time-series data with non-uniform step size, a temporal attention module is adopted to improve the graph attention mechanism, reduce the impact 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 abnormal states during ship navigation.

[0016] For the detection of abnormal behavior among ships, a two-layer graph coding structure is adopted. The first layer of graph coding is based on the feature extraction part of the abnormal behavior detection of a single ship, which transforms the trajectory data of multiple ships in the region into trajectory features. The second layer of graph coding uses the trajectory features of the entire region as nodes for graph coding, and integrates an interactive attention mechanism to establish trajectory relationship features between ship trajectories. Through the graph attention mechanism, abnormal features between trajectories are learned and paid attention to, thus realizing the effective detection of abnormal behavior among ships.

[0017] Furthermore, experimental verification shows that this method performs well in various abnormal behavior detection tasks, with high accuracy and real-time performance. It significantly improves the accuracy and response time in ship abnormal behavior detection and performs well in inter-ship abnormal behavior detection tasks. It also has good accuracy and robustness, and has broad practical application value and prospects for promotion. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the ship abnormal behavior detection architecture described in an embodiment of the present invention;

[0019] Figure 2 This is a schematic diagram of the network architecture of the DDGc-TGAT module in an embodiment of the present invention;

[0020] Figure 3 This is a schematic diagram of the abnormal behavior detection process between ships according to an embodiment of the present invention;

[0021] Figure 4 This is a schematic diagram of multi-source ship tracking data according to an embodiment of the present invention, where (a) is Bay A and (b) is Bay B;

[0022] Figure 5 This is a schematic diagram of abnormal ship trajectory data according to an embodiment of the present invention;

[0023] Figure 6 This is a schematic diagram comparing the training effects of various neural network models in embodiments of the present invention, where (a) is the model accuracy and (b) is the model loss rate.

[0024] Figure 7 This is a visualization of the features of an embodiment of the present invention;

[0025] Figure 8 This is a diagram illustrating the detection effect of abnormal ship conditions according to an embodiment of the present invention; where (a) represents the state of directional deviation and abnormal speed reduction, and (b) represents the state of signal interruption and prolonged stillness.

[0026] Figure 9 The diagram shows the effect of abnormal state detection between ships in an embodiment of the present invention, where (a) is the alternating AIS equipment state, (b) is the ship collision risk state, (c) is the cooperative trawling operation state, and (d) is the normal trajectory state. Detailed Implementation

[0027] To better understand the above-described objects, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. Many specific details are set forth in the following description to provide a thorough understanding of the present invention; however, the present invention may be practiced in other ways than those described herein, and therefore, the present invention is not limited to the specific embodiments disclosed below.

[0028] First, the overall architecture and principle of this solution for detecting abnormal ship behavior will be explained:

[0029] Ship trajectory data contains temporal information about ship motion. This embodiment transforms the temporal relationships into a graph structure using graph convolution and graph encoding, enabling the graph attention neural network to deeply analyze the potential features in the trajectory data. It studies the behavioral patterns of ship trajectories from two perspectives: single-ship and inter-ship navigation trajectory anomalies. The overall network structure for anomaly detection is as follows: Figure 1 As shown.

[0030] To address the detection of abnormal ship behavior, an improved graph attention neural network (DDGC-TGAT) is first constructed, comprising a Dynamically Dilated Graph Convolutional (DDGC) module and a Spatiotemporal Graph Attention Network (TGAT) module. This module obtains ship trajectory features incorporating spatiotemporal information, effectively detecting behavioral patterns in single ship trajectories. Building upon this, a second layer of graph attention neural network (InGAT) is constructed, employing an interactive attention mechanism to build relationship features between ship trajectories. This layer is then fused with the improved graph attention neural network, leveraging the edge relationship detection capability of the graph attention mechanism to achieve abnormal behavior detection between ships. Individual ship trajectory data is processed using the Dynamically Dilated Graph Convolutional module to expand the ship trajectory data features. Subsequently, the TGAT module is used to learn the dependencies and trajectory attribute features between trajectory points, thereby accurately determining whether a single trajectory exhibits an abnormal state. For the problem of detecting abnormal behavior between ships, the features of multiple ship trajectories within the same spatiotemporal region are used as meta-nodes in the Inter-Ship Relationship Detection Network (InGAT). An interactive attention mechanism is employed to establish relationship features between ship trajectories, enabling the learning of abnormal relationship features and completing data analysis and behavior detection of abnormal ship trajectories.

[0031] Example 1: A method for detecting abnormal ship behavior based on an improved graph attention neural network, combined with... Figure 2 As shown, the improved graph attention neural network (DDGC-TGAT) employs a multi-layer graph attention structure (three layers in this embodiment), with each layer containing a dynamic dilated graph convolutional module (DDGc) and a spatiotemporal graph attention network module (TGAT). The DDGc module integrates dynamic graph convolution and dilated graph convolution, enabling feature expansion based on ship trajectory data. It utilizes different dilation rates to reduce noise introduced by feature expansion, ensuring the expanded trajectory features accurately reflect the ship's navigation status. The TGAT module incorporates temporal information (…). Figure 2 Using time interval information as input, it consists of a spatiotemporal attention mechanism, a multi-head attention mechanism, and an information aggregation module, which can transform ship point information into ship trajectory features with spatiotemporal characteristics.

[0032] The temporal attention mechanism comprises two parts: a temporal mapping gate and a temporal decay gate. The temporal mapping gate maps the time interval variable of each adjacent ship trajectory point to a weight, and superimposes it with the trajectory features of the corresponding nodes in the graph to form the spatiotemporal feature information of the ships. The temporal decay gate generates a corresponding decay coefficient, which is applied to the node features after processing by the attention head, reducing the impact of excessive temporal information on the spatiotemporal features of the nodes. The multi-head attention mechanism uses multiple attention heads to calculate the weight of each graph node that incorporates spatiotemporal information, thereby capturing the semantic information and complex relationships between trajectory nodes. The information aggregation module can fuse the feature information processed by the spatiotemporal attention mechanism and the multi-head attention mechanism, aggregating the feature information processed by the multi-layer DDGC-TGAT structure.

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

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

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

[0036] Step C: Finally, the multi-layer graph attention structure obtains more accurate ship trajectory features through multiple information aggregations, thereby accurately determining whether a single trajectory has an abnormal state.

[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 For single ship trajectory data, where i≥1, firstly, dynamic graph convolution is used to calculate the Euclidean distance between nodes, and a temporary adjacency matrix F is generated based on the calculation results. d The calculation formula is as follows:

[0039]

[0040] Where, d ij Let τ represent the Euclidean distance between node i and node j, τ be a hyperparameter that controls similarity sensitivity, σ be the ReLU activation function, and A be the Euclidean distance between node i and node j. ijThe mapping function, Fa, represents the generated temporary adjacency matrix. The dynamic graph convolution module expands the ship trajectory data by using a dilated graph convolutional layer to increase the receptive field and change the dilation rate. Dynamic graph convolution can dynamically generate and update the graph structure, amplifying ship trajectory features according to the dynamic changes in the ship's navigation trajectory. This allows for better capture of more contextual information, improving the trajectory feature expansion effect of the module. 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. This allows for capturing information from more distant nodes and reducing noise, resulting in more accurate expanded trajectory features. The calculation formula is:

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

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

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

[0044] Assume trajectory feature data P = P1, P2, ..., P n Source feature node P s The time interval T between adjacent ship trajectory points s =△t1,△t2,...,△t n , where △t n =|t s -t n The attention layer in the graph will process the input trajectory feature data and the time interval Δt. n The spatiotemporal information of the trajectory data is fused using a time mapping gate. The time mapping gate converts the time interval between adjacent ship trajectory points into a time weight, which is then compared with node x. n Weighted fusion yields h n The calculation formula is as follows:

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

[0046]

[0047] Where, β n Represents node x n Time-mapping weights, Δt n For node x n With source node x S The time interval, W sin and W cos These are the learnable weights, h n Representative node x n The fusion spatiotemporal features. For the fusion spatiotemporal features h of the source node. S The spatiotemporal features h of fusion with arbitrary nodes n traversal with h n The attention coefficient 'a' is calculated by normalizing the intermediate learnable weight variable 'α' using the SoftMax function across all relevant directed edges. sj The calculation formula is as follows:

[0048]

[0049] Among them, W i Representative source feature h s Weight vector between nodes, W j Representative feature node h j The weight vector, || represents the concatenation operation, and LeakyReLU is a non-linear activation function. To reduce the impact of time information on trajectory data, a time decay gate is used to convert the time interval between adjacent ship trajectory points into a time decay coefficient, which is then fused with the spatiotemporal feature h of the source node. S The weighted fusion yields the output of the graph attention layer, and the calculation formula for the output result is as follows:

[0050]

[0051] Where 'a' is the attenuation rate coefficient, meaning the larger the time interval, the smaller the attenuation coefficient, and F... s This is the output of the information aggregation module.

[0052] In step C, more accurate ship trajectory features are obtained through multiple information aggregations, and the fused spatiotemporal features h of any node are obtained. i The trajectory features obtained through DDGc-TGAT are represented as follows:

[0053]

[0054] Where n represents the number of ship trajectory points, σ ​​is the ReLU activation function, and a ij This represents the attention coefficient.

[0055] Example 2 and Example 1 are for detecting abnormal behavior of a single vessel. Many abnormal behaviors and accident risks exist between vessels, requiring consideration of the relationships between them during navigation. For example, two vessels that may collide may appear to be sailing normally from their individual trajectories, but considering their interactions together, safety risks may exist. Therefore, this example, based on Example 1, proposes a method for checking abnormal behavior between vessels. After detecting abnormal behavior of a single vessel in step C, it further includes:

[0056] Step D: Based on the detection of abnormal behavior of a single ship, the relationship features between ship trajectories are constructed based on the trajectory features of each ship, and the attention mechanism of GAT is combined to realize the effective detection of abnormal behavior between ships.

[0057] Detecting abnormal behavior among ships requires joint analysis of the navigation trajectories and motion states of multiple ships within a region. This embodiment designs a two-layer graph attention neural network structure, and its detection process is as follows: Figure 3 As shown.

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

[0059] The second layer of the graph attention neural network uses the ship trajectory features within the region as nodes, and InGAT is designed to detect abnormal behavior between ships.

[0060] InGAT combines graph encoding and interactive attention mechanisms to establish edge relationships in a graph structure, representing the relationship features between ship trajectories. It then uses graph attention mechanisms to analyze these trajectory relationship features to determine the existence of joint risky behaviors. The specific implementation process is as follows:

[0061] Assuming that n ship trajectory characteristics are obtained through DDGc-TGAT calculation, denoted as H n = [F1, F2, ..., F n ], F n F is the eigenvector of the trajectory n. i and F j Let i and j be the feature vectors of node i and node j, respectively. The interaction features between nodes are calculated using the following formula:

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

[0063] Among them, e ij For the interaction features between nodes i and j, a T Learnable weight variables, where W is the weight matrix of the linear transformation of node features, and || represents the feature concatenation operation. A multilayer perceptron (MLP) is defined to compute the interaction weights between nodes. The larger the relationship weight, the stronger the interaction between surface trajectories. The interaction relationship features between trajectories can be represented as:

[0064]

[0065] in, The interaction features between node i and node j are used to determine the node attention weights e in GAT. ij With interaction attention weights The final attention weights, incorporating trajectory edge relationship features, are obtained through fusion and are expressed as follows:

[0066]

[0067] in, λ represents the interaction feature weights, and λ is an adjustable hyperparameter used to control the degree to which interaction features play a role in the final attention. The softmax function is used to adjust the fused attention weights. Normalization is performed to obtain the final attention weight α. ij , is represented as:

[0068]

[0069] Using the final attention weight α ij We perform weighted aggregation of the features of neighboring nodes to obtain a new feature representation that incorporates other trajectory information:

[0070]

[0071] Among them, T (l+1) The trajectory features after information aggregation are represented by calculating and fusing all trajectory features within the region to obtain the final interaction relationship matrix T. After processing through a linear layer, the feature vector is obtained. The SoftMax function is used to transform the discrimination result into a probability distribution to obtain the final abnormal behavior detection result.

[0072] As can be seen, this embodiment constructs a two-layer graph coding structure for detecting abnormal behavior between ships. The first layer of graph coding uses a single-ship detection coding method to obtain the trajectory features of the ships. The second layer of graph coding constructs the relationship features between ship trajectories based on the trajectory features of each ship. InGAT integrates the interactive attention mechanism with GAT, which can dynamically adjust the attention weight according to the actual interaction intensity between trajectories. By fusing the interaction information between trajectories, it can better capture the complex spatiotemporal dependencies between trajectories and improve the detection effect of ship behavior.

[0073] Experimental verification:

[0074] This embodiment uses AIS data from the watersheds of Bay A and Bay B, totaling 1000 real ship trajectories. However, actual AIS data lacks abnormal ship trajectory data. To evaluate the effectiveness of the abnormal trajectory detection model, a portion of the real data was randomly selected, and a script was used to generate 400 abnormal ship trajectories. The entire trajectory data was divided into training, validation, and test sets in an 8:1:1 ratio. The training set was used to train the model, the validation set was used to adjust parameters, and the test set was used to verify the model's performance. The ship trajectory data is shown as follows. Figure 4 As shown.

[0075] In the abnormal data generation stage, this embodiment adopts the ship abnormal trajectory generation method (Liu et al., 2022b). Based on real AIS trajectory data, it randomly generates abnormal behavior states such as abnormal speed reduction, abnormal stillness, directional deviation, and signal interruption. The constructed abnormal trajectory is shown as follows. Figure 5 As shown. Normal navigation refers to stable trajectory data without obvious abnormalities. Directional deviation refers to a significant abnormality in the trajectory and heading, with a clear difference from the expected route; abnormal speed reduction is manifested as a sharp decrease in speed within a short period of time; abnormal stationaryness is manifested as prolonged stationary status within a designated protection area; signal loss means that the ship cannot be monitored for a certain period of time, and AIS data is lost for an extended period of time; prolonged ship stationaryness means that the ship remains stationary at a certain position for an extended period of time.

[0076] To verify the effectiveness of this approach, six deep learning models were selected to evaluate the single-ship anomaly behavior detection problem: Long Short-Term Memory (LSTM), Recurrent Neural Network (RNN), Gate Regulated Recurrent Network (GRU), Bi-LSTM, Graph Neural Network (GCN), and our proposed method. Each model was trained for 100 epochs using the cross-entropy loss function, and the training and validation loss curves were smoothed using a sliding window technique to more clearly observe the model's performance trend. The model training results are shown below. Figure 6 As shown.

[0077] Experimental results show that the DDGc-TGAT model outperforms other models on both the training and validation sets. Around 20 epochs, the model's training loss reaches a low level while maintaining the highest detection accuracy. The model evaluation criteria employed four widely used machine learning metrics: accuracy, recall, precision, and F1-score. The results are shown in Table 1.

[0078] Table 1. Comparison of experimental results for various neural network models.

[0079]

[0080]

[0081] In detecting ship anomalies, DDGc-T-GAT demonstrated good accuracy and precision, indicating that the model can accurately capture the attribute features of ship trajectories. High recall and F1-score also indicate that the model is highly accurate in identifying normal ship navigation states and abnormal behavior patterns, effectively detecting behavioral patterns in ship trajectories. LSTM, RNN, and GRU models performed poorly, indicating that these models struggle to extract ship trajectory features directly from real ship trajectory data. While Transformer and Bi-LSTM models also performed well, data analysis revealed that they were ineffective in detecting certain types of abnormal behaviors and struggled to detect the features of such abnormal trajectories. In contrast, the DDGc-TGAT model demonstrated greater accuracy in detecting ship navigation states and recognizing behaviors.

[0082] This embodiment visualizes the learning effect of the normalized adjacency matrix at different positions in the dynamic hole graph convolution module. Taking the ship trajectory dataset as an example, each sample has 10 trajectory points. Figure 7 From left to right, the adjacency matrices are generated from trajectory data by the first, second, and third layers of dynamic graph convolution. In the first layer of graph convolution, the adjacency matrix only captures and represents a small amount of relationship and structural information between nodes in the graph. However, as the cascading process deepens, the adjacency information that needs to be learned and processed becomes more complex. The adjacency matrix of each layer is adjusted based on the output of the previous layer, enabling the entire network to understand the graph structure more deeply and for nodes to receive and integrate information from more distant nodes. Therefore, in the third layer of graph convolution, the adjacency matrix has learned the relationships and structural information of all landmark points.

[0083] To verify the robustness of the proposed method, a generalization experiment was conducted using real ship navigation trajectory data from another representative sea area. The experimental results are as follows: 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 prolonged immobility, and blue indicates normal trajectory. Experimental results show that the DDGc-TGAT model can effectively detect the trajectory state and behavior patterns of ships, and has excellent performance in identifying abnormal states of individual ships.

[0084] When studying anomalous behavior among ships, the anomalous behavior was detected on a test dataset, and the detection results were as follows: Figure 9 As shown, in Figure 9 In the diagram, brown trajectories indicate alternating use of AIS equipment, red trajectories indicate potential collision risks, yellow trajectories indicate joint trawling operations, and blue trajectories indicate normal navigation. Experimental results show that this method can effectively identify behavioral patterns and trajectory relationships between vessels and successfully detect joint risk behaviors among them.

[0085] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for detecting abnormal ship behavior 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 includes a dynamic deep dilated graph convolutional module (DDGC) and a spatiotemporal graph attention network module (TGAT). The dynamic deep dilated graph convolutional module (DDGC) integrates the dynamic graph convolutional module and the dilated graph convolutional module to expand features based on ship navigation trajectory data and uses different dilation rates to reduce noise information introduced by feature expansion. The spatiotemporal graph attention network module (TGAT) introduces time information as input and consists of a spatiotemporal attention mechanism, a multi-head attention mechanism, and an information aggregation module to transform ship point information into ship trajectory features with spatiotemporal characteristics. The method for detecting abnormal ship behavior includes the following steps: Step A: Obtain ship trajectory data and construct a temporary adjacency matrix using a dynamic graph convolution module. Then, expand a single ship trajectory data and process the expanded ship trajectory data using a hole graph convolution module. Step B: Input the processed ship trajectory data into the spatiotemporal graph attention network module TGAT to construct a spatiotemporal multi-head attention mechanism to enrich the spatiotemporal features of the ship trajectory data and learn the dependencies between trajectory points. Step C: Based on the multi-layer graph attention structure, the ship trajectory features are obtained through multiple information aggregations, and then it is determined whether there is an abnormal state in a single trajectory.

2. The method for detecting abnormal ship behavior based on an improved graph attention neural network according to claim 1, characterized in that: In step C, after determining the behavior of a single ship trajectory, step D, which is to detect abnormal behavior between ships, is also included. The detection of abnormal behavior between ships requires joint analysis of the navigation trajectories and motion states of multiple ships in the region. To this end, a two-layer graph attention neural network structure is designed. The first layer graph attention neural network adopts an improved graph attention neural network module to extract the navigation trajectory features of ships. The second layer of the graph attention neural network uses the ship trajectory features within the region as nodes. An inter-ship relationship detection network, InGAT, is designed to detect abnormal ship behavior. InGAT combines graph encoding and interactive attention mechanisms to establish edge relationships within the graph structure, i.e.: Step D: Based on the trajectory features of each ship, construct the relationship features between ship trajectories. Through the ship relationship detection network InGAT, combined with graph coding and interactive attention mechanism, establish the edge relationships of the graph structure to realize the detection of abnormal behavior between ships.

3. The method for detecting abnormal ship behavior based on an improved graph attention neural network according to claim 1, characterized in that: Step A is specifically implemented in the following manner: (1) Assuming the original data , For single ship trajectory data, where i≥1, firstly, a dynamic graph convolution module is used to calculate the Euclidean distance between nodes, and a temporary adjacency matrix is ​​generated based on the calculation results. Then we have: ; ; ; in, Represents a node and nodes The Euclidean distance between them Let i and j be the trajectory points of the i-th and j-th ships, respectively. To control similarity-sensitive hyperparameters, Activation function Mapping function; (2) The dilated map convolution module introduces a dilation rate during the convolution process, thereby obtaining the extended trajectory features: ; in, This represents the expanded trajectory features. This represents convolution of a holed graph. Represents the original ship data. The void ratio of dilated convolution is represented. For element-wise multiplication, The learnable weight matrix representing the dynamic convolutional layer. is the learnable weight matrix of the dilated convolutional layer.

4. The method for detecting abnormal ship behavior based on an improved graph attention neural network according to claim 1, characterized in that: Step B is implemented in the following manner: Assuming trajectory feature data Source feature nodes Time interval with adjacent ship track points ,in The input trajectory feature data and time interval The time mapping gate fuses the spatiotemporal information of trajectory data, converting the time interval between adjacent ship trajectory points into time weights, which are then compared with the node data. Weighted fusion The calculation formula is as follows: ; ; in, Represents a node Time mapping weights, For nodes With source node The time interval, and These are the learnable weights. Representative node The spatiotemporal characteristics of the fusion, for the source node The spatiotemporal characteristics of fusion Spatiotemporal features of fusion with arbitrary nodes traversal and All related directed edges, through Function with respect to intermediate learnable weight variables The attention coefficient is obtained by normalization calculation. : ; in, Representative source feature node Weight vector between, Representative feature nodes The weight vector, This represents a splicing operation. As a nonlinear activation function, to reduce the impact of time information on trajectory data, a time decay gate is used to convert the time interval between adjacent ship trajectory points into a time decay coefficient, which is then compared with the source feature nodes. The weighted fusion yields the output of the graph attention layer, and the calculation formula for the output result is as follows: ; ; in, This indicates the characteristics of fused time information. Indicates the attention coefficient. This represents the attenuation coefficient of node j. This is the decay rate coefficient; the larger the time interval, the smaller the decay rate coefficient. This is the output of the information aggregation module.

5. The method for detecting abnormal ship behavior based on an improved graph attention neural network according to claim 1, characterized in that: In step C, ship trajectory features are obtained through multiple information aggregations. For any node... As the source node, the trajectory features obtained through the improved graph attention neural network are represented as follows: ; in, Indicates the number of ship trajectory points. Indicates the attention coefficient. Represents a node Features that incorporate time information This represents the attenuation coefficient of node j. Representative feature nodes The weight vector.

6. The method for detecting abnormal ship behavior based on an improved graph attention neural network according to claim 2, characterized in that: In step D, the ship-to-ship relationship detection network InGAT combines graph encoding and interactive attention mechanisms to establish edge relationships in a graph structure, representing the relationship features between ship trajectories. The graph attention mechanism is then used to analyze these trajectory relationship features to determine whether joint risky behaviors exist. The specific implementation process is as follows: Suppose that the features of n ship trajectories are calculated using the improved graph attention neural network DDGc-TGAT, denoted as: , It is the eigenvector of trajectory n. and Given the feature vectors of node i and node j, calculate the interaction features between the nodes. : ; in, The interaction characteristics between nodes i and j Learnable weight variables, W is the weight matrix of the linear transformation of node features, || denotes the feature concatenation operation, and a multilayer perceptron is defined. Used to calculate the interaction weights between nodes, the interaction relationship features between trajectories are represented as: ; in, It is the interaction feature between nodes 𝑖 and 𝑗, which will be used to determine the node attention weights in InGAT. With interaction attention weights The fusion process is performed to obtain the final attention weights for the fused trajectory edge relationship features: ; in, Indicates the weight of interaction relationship features. It is an adjustable hyperparameter used to control the degree of influence of interactive features in the final attention, and the softmax function is used to adjust the fused attention weights. Normalization is performed to obtain the final attention weights. , represented as: ; Use the final attention weight We perform weighted aggregation of the features of neighboring nodes to obtain a new feature representation that incorporates other trajectory information: ; in, The trajectory features after information aggregation are represented by calculating and fusing all trajectory features within the region to obtain the final interaction relationship matrix T. After processing through a linear layer, the feature vector is obtained. The SoftMax function is used to transform the discrimination result into a probability distribution to obtain the final abnormal behavior detection result.

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