QT-based ship abnormal trajectory detection interface visualization system

Through the QT-based ship abnormal trajectory detection interface visualization system, combined with fuzzy neural network and Transformer algorithm, the problems of insufficient detection accuracy and real-time performance of traditional ship trajectory detection methods in complex marine environments are solved, efficient anomaly detection and personalized display are achieved, and the robustness and real-time performance of the system are improved.

CN120708439APending Publication Date: 2025-09-26HARBIN ENG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510985289.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-17
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing ship trajectory detection methods have deficiencies in detection accuracy and real-time performance, making it difficult to effectively identify abnormal situations in complex maritime environments. Traditional methods are also unable to respond in real time, making it difficult to detect safety hazards in a timely manner.

Method used

A QT-based ship abnormal trajectory detection interface visualization system is adopted, combined with fuzzy neural network and Transformer algorithm. Through information collection, feature extraction, anomaly judgment and visualization modules, multi-scale feature analysis and dynamic anomaly judgment are realized, a multi-level early warning mechanism is constructed, and deep separable convolution and fuzzy neural system are introduced to improve detection accuracy and real-time performance.

Benefits of technology

It significantly improves the real-time and accuracy of ship trajectory detection, can better adapt to complex maritime navigation scenarios, provide personalized trajectory detection services, enhance the robustness and accuracy of the system under complex weather conditions, and support actual operational needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120708439A_ABST
    Figure CN120708439A_ABST
Patent Text Reader

Abstract

The invention discloses a QT-based ship abnormal trajectory detection interface visualization system. The system comprises an information acquisition and processing module used for acquiring and preprocessing ship trajectory data; the feature extraction and fusion module is used for obtaining multi-scale comprehensive features according to the preprocessed ship trajectory data; the anomaly judgment module is used for obtaining a dynamic anomaly judgment threshold value based on historical weather data and a fuzzy neural network; obtaining abnormal information based on the dynamic abnormal threshold and the multi-scale comprehensive features; the early warning module is used for constructing a multi-level early warning mechanism and performing early warning in combination with the abnormal information; and the visualization module is used for carrying out ship abnormal track detection visualization according to the ship track data, the real-time weather data, the abnormal information and the map information. The method can better adapt to complex marine navigation scenes, the real-time performance and the accuracy of track detection are remarkably improved, the detection threshold value is dynamically adjusted according to the real-time weather data, and the robustness and the accuracy of the system under complex weather conditions are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of ship trajectory detection, and in particular relates to a QT-based ship abnormal trajectory detection interface visualization system. Background Art

[0002] In the field of ship navigation and maritime transportation, trajectory detection and anomaly warning are core technologies for ensuring navigation safety and improving operational efficiency. With the continuous increase in global maritime traffic, traditional trajectory detection methods have gradually exposed some problems, such as low detection accuracy, high false alarm rates, and inability to respond in real time, making them unable to meet the high demands of modern maritime safety. In complex maritime environments, anomalies in key indicators such as a ship's position, speed, and steering often indicate potential safety hazards. Promptly detecting and addressing these anomalies is crucial to ensuring the safety of crew and ship.

[0003] Traditional ship trajectory detection methods rely primarily on simple sensor data analysis and basic algorithms, making it difficult to effectively identify and handle complex anomalies. This limitation is particularly evident in the volatile maritime environment. With the rapid development of deep learning technology, trajectory detection methods based on neural networks have gradually become a research hotspot. However, existing deep learning models still face challenges when processing complex ship trajectory data, such as insufficient detection accuracy, suboptimal real-time performance, and limited ability to identify anomaly types. The introduction of the Transformer algorithm has revolutionized the field of anomaly detection. Through its unique self-attention mechanism, the Transformer can effectively capture global dependencies in sequence data, significantly improving its ability to recognize complex patterns. Furthermore, the Transformer's parallel computing capabilities significantly increase processing speed, enabling it to excel in real-time detection tasks. These advantages give the Transformer significant potential in time series analysis and anomaly detection. This paper proposes a ship trajectory detection system that combines a fuzzy neural network with a Transformer. Summary of the Invention

[0004] In order to solve the above technical problems, the present invention proposes a QT-based ship abnormal trajectory detection interface visualization system to solve the problems existing in the above-mentioned prior art.

[0005] To achieve the above objectives, the present invention provides a QT-based ship abnormal trajectory detection interface visualization system, comprising:

[0006] Information collection and processing module, feature extraction module, anomaly determination module, early warning module and visualization module;

[0007] The information acquisition and processing module is used to obtain ship trajectory data and perform preprocessing;

[0008] The feature extraction and fusion module is used to perform multi-scale feature analysis on the pre-processed ship trajectory data to obtain multi-scale comprehensive features;

[0009] The anomaly determination module is used to obtain historical weather data, obtain a dynamic anomaly determination threshold based on the historical weather data and a fuzzy neural network, and obtain anomaly information based on the dynamic anomaly threshold and the multi-scale comprehensive features;

[0010] The early warning module is used to build a multi-level early warning mechanism and issue an early warning based on the abnormal information and the multi-level early warning mechanism;

[0011] The visualization module is used to visualize abnormal ship trajectory detection based on ship trajectory data, real-time weather data, abnormal information, and map information.

[0012] Optionally, the information collection and processing module includes an information acquisition unit and a preprocessing unit;

[0013] The information acquisition unit is used to receive the original data of the ship automatic identification system, decode and extract the ship track data, and the ship track data includes latitude and longitude, speed and heading;

[0014] The preprocessing unit is used to preprocess the ship trajectory data through a generative adversarial network.

[0015] Optionally, the feature extraction and fusion module includes an input conversion submodule, a global feature extraction submodule, an improved residual submodule, and a feature fusion submodule;

[0016] The input conversion submodule is used to obtain a high-dimensional feature map based on the preprocessed ship trajectory data;

[0017] The global feature extraction submodule obtains a key vector and a value vector based on the MLP and the high-dimensional feature map, generates a query vector through 1x1 convolution, processes the key vector, value vector, and query vector as inputs of the content attention layer and the position attention layer, and obtains global features based on the outputs of the content attention layer and the position attention layer;

[0018] The improved residual submodule obtains local features based on the high-dimensional feature map;

[0019] The feature fusion submodule is used to fuse the global features with the local features to obtain multi-scale comprehensive features.

[0020] Optionally, the input of the position attention layer is processed in sequence by a column attention layer, a batch normalization layer, and a row attention layer.

[0021] Optionally, the input of the improved residual submodule is batch normalized, and the corresponding qkv matrix is ​​generated through the attention mechanism, and the generated v matrix is ​​used as the input of the one-dimensional depth-separable convolution layer; the output of the one-dimensional depth-separable convolution layer is normalized, processed by the SiLU activation function, and the channel feature weighting adjustment is performed using the SE channel attention mechanism. After one-dimensional convolution processing, the residual connection is performed with the original input to obtain local features.

[0022] Optionally, the feature fusion submodule consists of a dual attention mechanism, channel dimensionality reduction, residual connection and two feature fusions;

[0023] The global features are element-wise added to the local features to obtain the original input features. These features are then fed into a dual attention mechanism consisting of a local attention branch and a global attention branch. The local attention branch interacts and refines the channel information at each spatial location through several convolution operations to obtain local detail features. The global attention branch obtains a global description through an adaptive average pooling layer, and processes the global descriptor through a 1x1 convolution to obtain a global fusion feature. The local detail features and the global fusion feature are added together and activated through a sigmoid function to generate a first attention weight map. The global features and the local features are weighted summed using the first attention weight map to obtain an intermediate feature. A second attention weight map is generated based on the intermediate feature, and the global features and the local features are weighted summed using the second attention weight map to obtain a multi-scale integrated feature. Both the local and global attention branches use 1x1 convolutions for channel dimensionality reduction, and after ReLU activation, a 1x1 convolution is performed to restore the original number of channels.

[0024] Optionally, the anomaly determination module is trained by constructing a fuzzy neural network, taking historical weather data as input and anomaly detection threshold as output; obtaining real-time weather data, and obtaining a dynamic anomaly determination threshold through the trained fuzzy neural network; wherein the fuzzy neural network uses a Gaussian membership function to fuzzify the input variables, performs inference through a fuzzy rule base, and defuzzifies the inference results to obtain a dynamic anomaly determination threshold.

[0025] Optionally, the abnormal information includes abnormal category and abnormal type; the abnormal judgment module obtains an abnormal probability score based on the dynamic abnormal threshold and the multi-scale comprehensive features, and obtains the abnormal category based on the abnormal probability score; if the abnormal category is an abnormal trajectory, the abnormal type is obtained based on the source of the abnormal feature.

[0026] Optionally, the visualization module adopts a modular layout, including a trajectory display submodule, a weather influence factor display submodule, an anomaly detection control submodule, and a result display submodule;

[0027] The track display submodule is used to draw the ship track and abnormal points;

[0028] The weather impact factor display submodule is used to display real-time wind speed and direction and wave information;

[0029] The anomaly detection control submodule is used to provide options for controlling the abnormal trajectory detection target, detection progress and whether to start detection;

[0030] The result display submodule is used to display the test results, result opinions and historical test records.

[0031] Compared with the prior art, the present invention has the following advantages and technical effects:

[0032] This paper uses the iAFF module to iteratively fuse multi-scale features and introduces relative position encoding (rel_pos_emb) in the position attention layer of the global attention module (GAM) to achieve precise modeling of temporal dynamics, thereby improving detection accuracy. By replacing traditional convolution with depthwise separable convolution in the iRMB module, the computational complexity and parameter count are far less than those of traditional convolution, effectively extracting local features while significantly reducing the model's computational overhead. Furthermore, a "bottleneck" architecture is widely adopted in attention modules such as iAFF. Specifically, before performing attention calculations, a 1x1 convolution is used to reduce the number of channels in the feature map. After the core calculations are completed, another 1x1 convolution is used to restore the number of channels. This design significantly reduces the computational complexity of the attention weight matrix, achieving an optimal balance between performance and efficiency while ensuring the global receptive field and channel interaction capabilities. These designs enhance the system's real-time performance, enabling better adaptation to complex maritime navigation scenarios and significantly improving the real-time and accuracy of trajectory detection, thereby more effectively supporting practical operational needs. Furthermore, the weather fuzzy neural network system introduced in this invention dynamically adjusts detection thresholds based on real-time weather data, improving the system's robustness and accuracy in complex weather conditions. The anomaly detection interface system developed in conjunction with this system provides personalized trajectory display and detection services based on the selected sea area and vessel, creating a powerful environment for human-computer interaction during actual operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:

[0034] Figure 1 A schematic diagram of a flow chart of an embodiment of the present invention;

[0035] Figure 2 Schematic diagram of the structure of the visualization module according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0037] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0038] Example 1

[0039] This embodiment provides a QT-based ship abnormal trajectory detection interface visualization system, including:

[0040] Information collection and processing module, feature extraction module, anomaly determination module, early warning module and visualization module;

[0041] The information acquisition and processing module is used to obtain ship trajectory data and perform preprocessing;

[0042] As a specific implementation method, the information collection and processing module includes an information acquisition unit and a pre-processing unit;

[0043] The information acquisition unit is used to receive the raw data of the ship automatic identification system, decode and extract the ship trajectory data, which includes latitude and longitude, speed and heading;

[0044] The preprocessing unit is used to preprocess the ship trajectory data through a generative adversarial network.

[0045] The feature extraction and fusion module is used to perform multi-scale feature analysis on the pre-processed ship trajectory data to obtain multi-scale comprehensive features;

[0046] As a specific implementation method, the feature extraction and fusion module includes a preliminary feature extraction submodule, a global feature extraction submodule, an improved residual submodule, and a feature fusion submodule;

[0047] The preliminary feature extraction submodule is used to obtain the QKV matrix and initial data features based on the preprocessed ship trajectory data;

[0048] The global feature extraction submodule is used to process the QKV matrix through the content attention layer and the position attention layer to obtain global features;

[0049] The improved residual submodule obtains local features based on the QKV matrix and initial data features;

[0050] The feature fusion submodule is used to fuse global features with local features to obtain multi-scale comprehensive features.

[0051] As a specific implementation, the preliminary feature extraction submodule includes a convolution layer and a convolution fusion layer, and the convolution operation and the maximum pooling operation are combined to obtain the convolution fusion layer.

[0052] As a specific implementation method, the input of the position attention layer is processed in sequence by the column attention layer, the batch normalization layer, and the row attention layer.

[0053] As a specific implementation method, after the input of the improved residual submodule is batch normalized, the obtained feature map is divided into local windows through the windowed multi-head attention mechanism, and self-attention is calculated in each window; based on the calculated self-attention, depthwise separable convolution is used to extract local spatial features, and the important channels are dynamically weighted in combination with the channel attention mechanism. After one-dimensional convolution processing, a residual connection is performed with the original input to obtain local features.

[0054] As a specific implementation method, the feature fusion submodule consists of a dual attention mechanism, channel dimensionality reduction, residual connection and two feature fusions.

[0055] The anomaly determination module is used to obtain historical weather data, obtain dynamic anomaly determination thresholds based on historical weather data and fuzzy neural networks, and obtain anomaly information based on dynamic anomaly thresholds and multi-scale comprehensive features;

[0056] As a specific implementation method, the anomaly determination module constructs a fuzzy neural network and trains it with historical weather data as input and anomaly detection threshold as output; obtains real-time weather data, and obtains a dynamic anomaly determination threshold through the trained fuzzy neural network; wherein, the fuzzy neural network uses a Gaussian membership function to fuzzify the input variables, performs inference through a fuzzy rule base, and defuzzifies the inference results to obtain a dynamic anomaly determination threshold.

[0057] As a specific implementation method, the abnormal information includes abnormal category and abnormal type; the abnormality judgment module obtains an abnormality probability score based on the dynamic abnormality threshold and multi-scale comprehensive features, and obtains the abnormality category based on the abnormality probability score; if the abnormality category is an abnormal trajectory, the abnormality type is obtained based on the source of the abnormal feature.

[0058] The early warning module is used to build a multi-level early warning mechanism and issue early warnings based on abnormal information and the multi-level early warning mechanism;

[0059] The visualization module is used to visualize abnormal ship trajectory detection based on ship trajectory data, real-time weather data, anomaly information, and map information.

[0060] As a specific implementation method, the visualization module adopts a modular layout, including a trajectory display submodule, a weather influence factor display submodule, an anomaly detection control submodule, and a result display submodule;

[0061] The track display submodule is used to draw the ship track and abnormal points;

[0062] The weather impact factor display submodule is used to display real-time wind speed, wind direction and wave information;

[0063] The anomaly detection control submodule is used to provide options for controlling the abnormal trajectory detection target, detection progress, and whether to start detection;

[0064] The result display submodule is used to display the test results, result opinions and historical test records.

[0065] Example 2

[0066] like Figure 1-2 As shown, this embodiment provides a QT-based ship abnormal trajectory detection interface visualization system, including:

[0067] First, the device consists of a ship trajectory anomaly monitoring system, a weather influencing factor identification system, and a trajectory visualization interface system. It acquires ship trajectory information through the Automatic Identification System (AIS) and performs feature processing. AIS, a crucial means of communication between ships and shore stations, and between ships, provides critical information such as a ship's position, speed, heading, and type. AIS data is highly timely and accurate, making it ideal for the real-time monitoring needs of a ship trajectory detection system. An LSTM (Long Short-Term Memory) network is used to model time series data, capturing temporal dependencies within the data for data completion. Furthermore, data enhancement is performed to add noise to the trajectory data, increasing the proportion of anomalous data and improving the quality of subsequent system training.

[0068] Secondly, after preprocessing, the trajectory data enters the Transformer-GIRA (Global Inverted Residual Attention) algorithm for trajectory anomaly detection. The Transformer-GIRA algorithm uses a multi-head self-attention mechanism (Multi-Head Self-Attention) to replace the traditional sequence processing method. This effectively enhances the accuracy and efficiency of anomaly detection, especially in complex environments, and can better identify abnormal trajectory patterns. The core idea of ​​the self-attention mechanism is to capture long-distance dependencies by calculating the correlation between each position in the sequence. The system can simultaneously pay attention to different time steps and different feature dimensions of the trajectory, so as to fully understand the dynamic changes of the trajectory. The Transformer-GIRA algorithm adopts a positional encoding structure (such as Figure 1 The positional attention layer (shown as a position attention layer) introduces sine and cosine functions to encode the positional information of the sequence, effectively preserving the temporal order of the trajectory while avoiding information loss during information transmission in traditional recurrent neural networks. While maintaining low time complexity, positional encoding preserves the temporal relationship between trajectories as much as possible, enabling the model to more sensitively detect abnormal patterns when processing trajectory data in complex environments. The Transformer-GIRA algorithm uses an improved residual module (iRMB).

[0069] The iRMB module is specially designed to process one-dimensional sequence data. Its input x is a three-dimensional tensor (Tensor), and its dimension format is (B, C, L), where B (Batch Size): is the batch size, that is, the number of sequences processed simultaneously. C (Channels): is the number of channels or feature dimensions, representing how many features are used to describe it at each time point in the sequence. L (Length) is the length of the sequence, that is, the number of time points contained in a trajectory. At the beginning of the module, a shortcut (only used to save the input variable to prevent the loss of original information and facilitate subsequent calls) is used to convert the original input F iSave it. This shortcut will be used for the residual connection at the end to ensure that the gradient can be smoothly back-propagated and avoid the gradient vanishing problem in deep networks. After that, the one-dimensional batch normalization (BatchNorm1d) operation is used to normalize the input features to make their mean 0 and variance 1, which helps to accelerate model convergence and improve training stability. After that, the attention mechanism is used to generate the corresponding qkv matrix, and the generated v matrix is ​​used as the input for local feature extraction. A one-dimensional depthwise separable convolution with a convolution kernel size of 3 (Conv1d and groups = dim_mid, groups is the grouping method of the control convolution, and dim_mid is the group into which the input channels are divided) is used for v, followed by BatchNorm1d (for normalization) and SiLU activation function, and SE (Squeeze-and-Excitation, a channel attention mechanism) is used to adjust the channel feature weights. Depthwise separable convolutions efficiently perform convolution operations independently on each channel, specifically designed to capture local patterns in time series (such as acceleration or steering patterns within a short period of time), with computational cost far lower than standard convolutions. The module's final processed output is added to the original input shortcut saved in step 1 via a residual connection. This output serves as an input feature map in the iAFF module, and the drop_path regularization method randomly "drops" the entire residual connection during training to enhance the robustness of the model.

[0070] This module has the following features: 1) It uses a windowed attention mechanism to divide the input feature map into multiple windows and computes self-attention within each window, effectively reducing computational complexity. 2) It introduces a multi-head attention mechanism to group feature channels, enhancing the model's ability to perceive different feature patterns. 3) It combines a squeeze-and-excitation operation to adjust the importance of different channels through adaptive weighting, improving feature extraction accuracy. 4) It uses a residual connection structure to ensure effective gradient propagation while preserving the original feature information. The iRMB module performs batch normalization, attention processing, local feature extraction, feature projection, and residual connection processing on the input [batch_size, channels, sequence_length] to obtain a processed feature representation that is consistent with the input shape. Where batch_size is the batch size, channels is the number of feature channels containing features such as latitude and longitude, heading, and speed, and sequence_length is the trajectory sequence length. This structural design enables the iRMB module to efficiently extract local and global features of trajectories, providing a richer feature representation for anomaly detection.

[0071] This algorithm adopts an improved feature fusion module (iAFF) and realizes the fusion of multi-scale features by introducing local attention and global attention mechanisms (such as Figure 1 The global attention and iRMB are comprehensively considered to obtain F 0 As shown, it serves as a bridge to connect modules, thereby achieving the connection of feature representations at different levels).

[0072] The iAFF module consists of a dual attention mechanism, channel dimensionality reduction, residual connection and two feature fusions. The core of this module is the two-iteration weighted fusion of attention. The whole process can be understood as a two-stage process. The first stage is the preliminary feature fusion stage. At this time, the module receives two feature maps as input, which we call the basic feature x and the residual feature residual (where x is the local feature output by the iRMB module and residual is the global feature output by the GAM). First, they are merged by simple element-by-element addition: x a =x+residual. This step can be regarded as a preliminary residual connection, which provides the initial context containing two feature information for the subsequent attention mechanism. a The information is fed in parallel into a dual attention mechanism consisting of local attention (local_att) and global attention (global_att). The local attention branch interacts and refines the channel information at each spatial location through a series of 1x1 convolutions without changing the spatial dimensions. This enables the model to focus on local, fine-grained features. The global attention branch first compresses the information across all spatial dimensions into a single feature vector through an adaptive average pooling layer (AdaptiveAvgPool2d), thereby obtaining a global receptive field. This global descriptor is then processed through a 1x1 convolution. Both branches utilize channel dimensionality reduction: a 1x1 convolution is used to reduce the number of channels from channels to channels / / r (where r is the reduction factor). After a ReLU activation, another 1x1 convolution is performed to restore the original number of channels. This "bottleneck" structure reduces computational effort and enhances the model's nonlinear capabilities. Finally, the results of the local and global attention branches are summed and then activated through a sigmoid function to generate the first attention weight map wei. This weight map wei contains both local and global context information. After that, the first feature fusion begins, and the generated weight wei is used to perform a weighted summation of the original input feature x and the residual: x i =x*wei+residual*(1-wei). Between wei and 1, it dynamically decides whether to retain more information of x or residual at each position, thereby completing the first fusion and obtaining the intermediate feature xi Then enter the second stage of optimization iterative fusion, and the intermediate feature x obtained by the first fusion i As input, repeat the above dual attention process (through local_att2 and global_att2) to generate a second, more refined attention weight map wei2. With this new weight wei2, the original input feature x and residual are weighted summed again: x o =x*wei2+residual*(1-wei2). This step is to optimize and correct the first fusion result, and finally output the fused feature x o .

[0073] After the trajectory data passes through the content position attention layer and iRMB attention respectively, the features of the trajectory data at different angles are obtained by different attention mechanisms. At this time, the iAFF module will perform two feature fusion processes in succession. Through the first feature fusion, the features of different levels obtained by different modules are preliminarily integrated, and the subsequent second feature fusion completes the refinement of the features. Local attention focuses on the short-term changes in the trajectory, while global attention focuses on the overall trend. The combination of the two enables the system to grasp the local details and global features of the trajectory at the same time. Through this structure, the network can efficiently process trajectory features and generate multi-scale feature representations (F 0 ), providing a more accurate foundation for subsequent anomaly detection. By adopting this optimized structure, the system can significantly improve detection accuracy and speed in dynamic environments, especially for anomaly detection on complex trajectories. This algorithm also introduces an innovative weather data-driven fuzzy neural network module to dynamically adjust the anomaly detection threshold. This module first constructs a fuzzy neural network using historical weather data collected, including key meteorological indicators such as wave velocity, direction, wind speed, direction, and wave height at corresponding latitude and longitude, as well as the corresponding trajectory anomaly detection results. The module uses weather data as input and anomaly detection thresholds as output. A multi-layer fuzzy inference network learns the nonlinear relationship between weather conditions and anomaly thresholds. The fuzzy neural network then fuzzifies the input variables using a Gaussian membership function, performs inference using a fuzzy rule base, and finally defuzzifies the input variables to obtain the specific threshold adjustment value. The system receives current weather data in real time and dynamically adjusts the anomaly detection threshold using the trained fuzzy neural network, enabling the system to adaptively adjust detection sensitivity based on varying weather conditions. This weather data-based threshold adaptation mechanism significantly improves the system's robustness and accuracy under diverse environmental conditions.

[0074] Finally, after receiving the anomaly detection results, the data analysis and decision-making module uses an algorithm to analyze the trajectory's degree of anomaly, type, and other features. A deep learning-based classification model is then used to accurately determine the anomaly's type and severity. The overall algorithm proceeds through three stages. In the first stage, the location content encoding structure extracts global features, the iRMB module extracts local features, and the iAFF module performs feature fusion to obtain a comprehensive trajectory feature. In the second stage, a fuzzy neural network outputs a dynamic anomaly threshold based on input weather information such as wave speed, direction, height, wind speed, and direction. In the third stage, the trajectory features are compared with the dynamic threshold to generate an anomaly probability score, which is then classified into category 0 (normal trajectory), category 1 (minor anomaly), category 2 (moderate anomaly), or category 3 (severe anomaly). If an anomaly is detected, the source of the anomaly features is determined to determine the anomaly type (speed anomaly, heading anomaly, position deviation). Next, based on these analysis results, the module generates appropriate warning outputs, such as whether to issue a warning, adjust the warning level, or ignore the anomaly. These decisions are received and executed by the early warning system module. The early warning system uses pre-set warning strategies to control the triggering conditions and level of warnings. Based on real-time comparisons of the severity of anomalies against warning thresholds, the system adjusts its warning strategy and precisely executes its warning tasks. In the warning execution module, the system employs a multi-level warning control algorithm. This utilizes different levels of warning mechanisms and uses sensors to provide feedback on trajectory anomaly information and the degree of danger. This ensures timely and accurate warnings, thereby improving warning efficiency and success rates. The communication and feedback module uses wireless communication protocols to exchange data with other systems or a central control system in real time, transmitting processing results and anomaly location information. The system not only receives data streams from other modules but also transmits analysis results back to the central system, enabling information sharing and collaborative operations. The anomaly location and warning planning module combines trajectory analysis algorithms with the anomaly location system to calculate the precise location of anomalies in space and time in real time and generate a warning planning model. This model dynamically plans the optimal warning strategy based on the system's current state and environmental changes, ensuring that the system issues warnings in the most appropriate manner.

[0075] like Figure 1As shown, the MLP (a composite structure consisting of 1x1 convolutions, BatchNorm, and ReLU) and independent 1x1 convolutions work together. After processing the input features, they obtain intermediate computational results required by the attention mechanism, not model parameters. Specifically, the MLP generates the key (K) and value (V) matrices. The 1x1 convolutions generate the query (Q) matrix. This asymmetric design allows the model to perform more complex nonlinear transformations on K and V to extract richer contextual information, while maintaining Q as a more direct query vector. This algorithm employs a parallel dual-branch architecture to simultaneously capture different aspects of trajectory data. The system initially receives raw ship navigation data, a four-dimensional feature sequence consisting of longitude, latitude, ship speed, and heading angle. Its shape is (B, 4, L), where B is the batch size, 4 is the number of features, and L is the trajectory length. This raw input first passes through an input embedding layer, which maps the low-dimensional raw features (4D) into the high-dimensional feature space (128D) required for model operation. After that, the output generates a high-dimensional feature map x_embedded with a shape of (B, C, L), where C is the model dimension. This x_embedded is the common input of the two parallel modules iRMB and GAM (full attention) before generating their corresponding QKV, i.e. F i. In the iRMB module, 1x1 convolution is used on the input x_embedded to generate Q, K, and V. Then, local features (through depthwise separable convolution) and global features (through self-attention) are calculated in parallel, and the local and global features are added and fused. Then, the SE module is used for channel refinement, and finally, the residual connection is used to stabilize the training. The output is irmb_features, a feature map that contains both fine local dynamics and long-range dependencies. In the GAM module, MLP (convolution + BN + ReLU) is used on the input x_embedded to generate K and V, and an independent 1x1 convolution is used to generate Q. Then, content attention and position attention are calculated in parallel. After obtaining the results, the two attention results are added and fused, and projected through the final 1x1 convolution to output gam_features, a feature map that deeply integrates global temporal structure and content relevance. The two feature maps are concatenated along the channel dimension fused_features = torch.cat([gam_features,irmb_features], dim=1). This can most completely preserve all the information extracted by the two branches. The concatenated fused_features serve as the input to the iAFF feature fusion layer. The GAM module consists of a content attention layer and a position attention layer. The content attention layer captures the global correlation based on feature content through the interaction of Q and K, that is, it obtains "what information is similar". The position attention layer captures the global pattern based on the temporal structure through the interaction of Q and relative position encoding, that is, it obtains "what position relationship is normal". When the outputs of these two attention mechanisms, content_out and rel_out, are added together, the model obtains a feature expression that is enhanced by both "content" and "structure" global information, thereby having a deeper and more comprehensive understanding of the overall dynamics of the trajectory.

[0076] The interface layout was then designed using Qt Designer and implemented in a modular manner. The system uses QMainWindow as the main window frame, with a left-right column layout implemented using QHBoxLayout. The left side houses the trajectory display area (70%), while the right side houses the control panel area (30%). To accommodate the complex needs of marine environmental monitoring, the interface design adopts a modular layout, with each functional module encapsulated in a separate QGroupBox for ease of maintenance and expansion. The trajectory display module is implemented using the TrajectoryCanvas class, which inherits from FigureCanvas and is used to plot ship trajectories and anomalies. The module uses the matplotlib library to visualize trajectories, supporting real-time trajectory drawing, anomaly marking, trajectory playback, zooming and panning, legend display, and the ability to specify the number of trajectories to display. Furthermore, to account for weather influencing factors, QGroupBox is used to implement the weather influence panel, anomaly detection control panel, and result display panel. The weather influence panel allows for the input and display of real-time wind speed and direction, as well as wave information. The anomaly detection control panel controls the detection target, detection progress, and whether to start detection. The result display panel displays detection results, result comments, and historical detection records.

[0077] This paper uses the iAFF module to iteratively fuse multi-scale features and introduces relative position encoding (rel_pos_emb) in the position attention layer of the global attention module (GAM) to achieve precise modeling of temporal dynamics, thereby improving detection accuracy. By replacing traditional convolution with depthwise separable convolution in the iRMB module, the computational complexity and parameter count are far less than those of traditional convolution, effectively extracting local features while significantly reducing the model's computational overhead. Furthermore, a "bottleneck" architecture is widely adopted in attention modules such as iAFF. Specifically, before performing attention calculations, a 1x1 convolution is used to reduce the number of channels in the feature map. After the core calculations are completed, another 1x1 convolution is used to restore the number of channels. This design significantly reduces the computational complexity of the attention weight matrix, achieving an optimal balance between performance and efficiency while ensuring the global receptive field and channel interaction capabilities. These designs enhance the system's real-time performance, enabling better adaptation to complex maritime navigation scenarios and significantly improving the real-time and accuracy of trajectory detection, thereby more effectively supporting practical operational needs. Furthermore, the weather fuzzy neural network system introduced in this invention dynamically adjusts detection thresholds based on real-time weather data, improving the system's robustness and accuracy in complex weather conditions. The anomaly detection interface system developed in conjunction with this system provides personalized trajectory display and detection services based on the selected sea area and vessel, creating a powerful environment for human-computer interaction during actual operations.

[0078] The above are merely preferred embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A QT-based ship abnormal trajectory detection interface visualization system, characterized by: include: Information collection and processing module, feature extraction module, anomaly determination module, early warning module and visualization module; The information acquisition and processing module is used to obtain ship trajectory data and perform preprocessing; The feature extraction and fusion module is used to perform multi-scale feature analysis on the pre-processed ship trajectory data to obtain multi-scale comprehensive features; The abnormality determination module is used to obtain historical weather data and obtain a dynamic abnormality determination threshold based on the historical weather data and a fuzzy neural network; Obtaining abnormal information based on the dynamic abnormal threshold and the multi-scale comprehensive features; The early warning module is used to build a multi-level early warning mechanism and issue an early warning based on the abnormal information and the multi-level early warning mechanism; The visualization module is used to visualize abnormal ship trajectory detection based on ship trajectory data, real-time weather data, abnormal information, and map information.

2. The QT-based ship abnormal trajectory detection interface visualization system according to claim 1 is characterized in that: The information collection and processing module includes an information acquisition unit and a pre-processing unit; The information acquisition unit is used to receive the original data of the ship automatic identification system, decode and extract the ship track data, and the ship track data includes latitude and longitude, speed and heading; The preprocessing unit is used to preprocess the ship trajectory data through a generative adversarial network.

3. The QT-based ship abnormal trajectory detection interface visualization system according to claim 1 is characterized in that: The feature extraction and fusion module includes an input conversion submodule, a global feature extraction submodule, an improved residual submodule, and a feature fusion submodule; The input conversion submodule is used to obtain a high-dimensional feature map based on the preprocessed ship trajectory data; The global feature extraction submodule obtains a key vector and a value vector based on the MLP and the high-dimensional feature map, generates a query vector through 1x1 convolution, processes the key vector, value vector, and query vector as inputs of the content attention layer and the position attention layer, and obtains global features based on the outputs of the content attention layer and the position attention layer; The improved residual submodule obtains local features based on the high-dimensional feature map; The feature fusion submodule is used to fuse the global features with the local features to obtain multi-scale comprehensive features.

4. The QT-based ship abnormal trajectory detection interface visualization system according to claim 3 is characterized in that: The input of the position attention layer is processed in sequence by the column attention layer, the batch normalization layer, and the row attention layer.

5. The QT-based ship abnormal trajectory detection interface visualization system according to claim 3 is characterized in that: The input of the improved residual submodule is batch normalized and the corresponding qkv matrix is ​​generated through the attention mechanism. The generated v matrix is ​​used as the input of the one-dimensional depth-separable convolutional layer; The output of the one-dimensional depth-separable convolutional layer is normalized and processed by the SiLU activation function. The SE channel attention mechanism is used to adjust the channel feature weights. After one-dimensional convolution processing, a residual connection is performed with the original input to obtain local features.

6. The QT-based ship abnormal trajectory detection interface visualization system according to claim 3 is characterized in that: The feature fusion submodule consists of a dual attention mechanism, channel dimension reduction, residual connection and two feature fusions; Adding the global feature and the local feature element by element to obtain the original input feature; The input is fed into a dual attention mechanism consisting of a local attention branch and a global attention branch. The local attention branch interacts and refines the channel information of each spatial position through several convolution operations to obtain local detail features. The global attention branch obtains a global description through an adaptive average pooling layer, processes the global descriptor through 1x1 convolution, and obtains a global fusion feature. After adding the local detail features to the global fusion feature, a Sigmoid activation function is used to generate the first attention weight map. The first attention weight map is used to perform a weighted summation of the global features and the local features to obtain the intermediate features. A second attention weight map is obtained based on the intermediate features, and the global features and the local features are weightedly summed through the second attention weight map to obtain multi-scale comprehensive features; wherein, both the local attention branch and the global attention branch use 1x1 convolution for channel dimensionality reduction, and after ReLU activation, they are restored to the original number of channels through 1x1 convolution.

7. The QT-based ship abnormal trajectory detection interface visualization system according to claim 1 is characterized in that: The anomaly determination module constructs a fuzzy neural network and trains it with historical weather data as input and anomaly detection threshold as output; obtains real-time weather data and obtains a dynamic anomaly determination threshold through the trained fuzzy neural network; wherein the fuzzy neural network uses a Gaussian membership function to fuzzify the input variables, performs inference through a fuzzy rule base, and defuzzifies the inference results to obtain the dynamic anomaly determination threshold.

8. The QT-based ship abnormal trajectory detection interface visualization system according to claim 1 is characterized in that: The abnormal information includes an abnormal category and an abnormal type; the abnormality judgment module obtains an abnormal probability score based on the dynamic abnormality threshold and the multi-scale comprehensive features, and obtains the abnormal category based on the abnormal probability score; if the abnormal category is an abnormal trajectory, the abnormal type is obtained based on the source of the abnormal feature.

9. The QT-based ship abnormal trajectory detection interface visualization system according to claim 1 is characterized in that: The visualization module adopts a modular layout, including a trajectory display submodule, a weather influence factor display submodule, an anomaly detection control submodule, and a result display submodule; The track display submodule is used to draw the ship track and abnormal points; The weather impact factor display submodule is used to display real-time wind speed and direction and wave information; The anomaly detection control submodule is used to provide options for controlling the abnormal trajectory detection target, detection progress and whether to start detection; The result display submodule is used to display the test results, result opinions and historical test records.