Track identification method based on TCN-axis attention
By combining TCN and axis attention mechanisms, the track recognition method solves the problems of insufficient long-term dependency capture and low computational efficiency in traditional methods, achieving efficient and accurate track recognition. It is suitable for large-scale data processing, reduces the risk of overfitting, and improves the model's generalization ability and economic benefits.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI RONGHUI INTELLIGENT TECH CO LTD
- Filing Date
- 2025-12-24
- Publication Date
- 2026-05-12
AI Technical Summary
Traditional track identification methods suffer from insufficient capture of long-term time-series dependencies and low computational efficiency. Transformer-based models have high computational complexity in large-scale track data processing and are difficult to apply.
A TCN-axis attention-based track recognition method is adopted, which combines temporal convolutional networks and axis attention mechanisms. It is trained through a multi-task learning framework, uses causal convolution and dilated convolution to capture long temporal dependencies, and reduces computational complexity through axis attention mechanism to generate efficient track recognition results.
It improves the efficiency and accuracy of track recognition, can process large-scale data in real time, reduces the risk of overfitting, enhances the model's generalization ability on different datasets, reduces the risk of collisions, and improves economic benefits.
Smart Images

Figure CN122020111A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of track recognition technology, and in particular to a track recognition method based on TCN-axis attention. Background Technology
[0002] Track recognition is a core technology for behavior analysis and security monitoring in the maritime domain. Traditional methods (such as LSTM and CNN) suffer from bottlenecks such as insufficient capture of long-term dependencies and low computational efficiency. While Transformer-based models can model global dependencies, their computational complexity increases quadratically with the sequence length, making them unsuitable for large-scale track data. Therefore, there is an urgent need for an integrated solution that balances long-term modeling capabilities, computational efficiency, and recognition accuracy. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a track recognition method based on TCN-axis attention, which can improve the efficiency and accuracy of track recognition.
[0004] The technical solution adopted by this invention to solve its technical problem is: to provide a track recognition method based on TCN-axis attention, comprising:
[0005] Collect the trajectory feature sequence of the target vessel;
[0006] A trajectory recognition model is constructed to generate trajectory recognition results based on the trajectory feature sequence;
[0007] The trajectory recognition model includes:
[0008] A temporal convolutional network is used to extract a first temporal feature from the trajectory feature sequence;
[0009] The axis attention mechanism module is connected to the output of the temporal convolutional network and is used to calculate attention along the time axis and feature axis respectively based on the first temporal features, thereby generating a second temporal feature containing global information.
[0010] The prediction module, connected to the output of the axis attention mechanism module, is used to generate track recognition results based on the second temporal features.
[0011] Furthermore, the prediction module includes a fully connected layer, which is used to predict the trajectory based on the second temporal features.
[0012] Furthermore, the prediction module also includes a LogSoftmax layer, which is used to perform behavior classification based on the trajectory prediction results output by the fully connected layer.
[0013] Furthermore, the track characteristics include speed, heading, longitude, and latitude.
[0014] Furthermore, the temporal convolutional network comprises multiple sequentially stacked temporal blocks, each temporal block comprising two convolutional layers, each convolutional layer comprising a causal convolution and a dilated convolution.
[0015] Furthermore, the trajectory recognition model is jointly trained using a multi-task learning framework that combines trajectory prediction and behavior recognition tasks.
[0016] Furthermore, during training, the trajectory recognition model adaptively optimizes the model parameters based on loss weights with homoscedastic uncertainty.
[0017] Furthermore, the track feature sequence is extracted from AIS data.
[0018] Beneficial effects
[0019] By adopting the above-mentioned technical solution, this invention has the following advantages and positive effects compared with the prior art: This invention improves the efficiency and accuracy of track recognition by combining the long-term dependency capture capability of TCN with the efficient global modeling advantage of axis attention. On the one hand, the parallel processing capability of TCN and the efficient feature capture of the axis attention mechanism reduce the training and prediction time of the model, enabling the model to process large-scale datasets in real time, thus improving the system's response speed and real-time performance. On the other hand, the constructed model has a simple structure and few parameters, reducing the risk of overfitting and improving the generalization ability on new datasets, allowing the model to better adapt to different dataset conditions and have broader application prospects. Furthermore, the sea and air target recognition technology based on AIS data in this invention can provide the industry with reference technical standards and solutions, promoting cooperation and information sharing. Real-time track recognition can improve the navigation efficiency of sea surface targets, reduce delays caused by collision risks, and improve economic benefits. Attached Figure Description
[0020] Figure 1 This is a flowchart of an embodiment of the present invention;
[0021] Figure 2 This is a schematic diagram of the trajectory recognition model structure according to an embodiment of the present invention. Detailed Implementation
[0022] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.
[0023] Embodiments of the present invention relate to a track recognition method based on TCN-axis attention, such as... Figure 1 As shown, it includes the following steps:
[0024] Collect the trajectory feature sequence of the target vessel;
[0025] A trajectory recognition model is constructed to generate trajectory recognition results based on trajectory feature sequences.
[0026] The track feature sequences can be extracted from AIS data. The extracted data can be stored as a CSV file, containing features such as speedoverground, courseoverground, longitude, and latitude. The data is then organized into folders by category, specifically training, validation, and test sets.
[0027] The trajectory recognition model is built upon a Temporal Convolutional Network (TCN) and incorporates an axis attention mechanism. Specifically, as follows... Figure 2 As shown, the TCN-AxialAttention model includes a TCN, followed by row and column attention mechanisms, and finally outputs the class probability through a fully connected layer. (GPU acceleration is supported.)
[0028] During model training, metrics such as loss, accuracy, precision, and recall are recorded. After each training round, the model is evaluated on the validation set, and the optimal model weights are saved. Multi-round iterative optimization is supported, adjusting the learning rate. Subsequently, the optimal model weights are loaded, and the metrics are evaluated on the test set. A confusion matrix and learning curves (loss, precision, recall, accuracy) are automatically generated and saved, along with the results including the optimal model weights, confusion matrix, and learning curves.
[0029] The TCN is composed of multiple stacked temporal blocks, each containing two layers of one-dimensional convolutions, ReLU activation, Dropout, and residual connections. The convolutions employ dilation to capture long-range temporal dependencies. The number of channels and kernel size in each layer are adjustable, supporting multi-level feature extraction.
[0030] After the TCN output, an axis attention mechanism including row and column attention is introduced. After processing by the attention module, the features from the last time step are taken and input into the fully connected layer, outputting the class probabilities. Finally, LogSoftmax normalization is applied, making it suitable for multi-class classification tasks.
[0031] TemporalBlock mainly consists of two parts: causal convolution and dilated convolution.
[0032] Causal convolution, for the value of the previous layer at time t, depends only on the values of the next layer at time t and before. Unlike traditional convolutional neural networks, causal convolution cannot see future data; it is a unidirectional structure, not bidirectional. That is, the effect only occurs after the preceding cause, making it a strictly time-constrained model, hence the name causal convolution.
[0033] Dilated convolution captures dependencies over longer time spans by increasing the coverage of the convolution kernel.
[0034] Axis attention, a variant of attention mechanisms, is primarily used to process multi-dimensional data. Its basic principle is to break down standard multi-head self-attention into calculations along different axes (such as rows and columns), thereby reducing computational complexity while preserving the ability to model global information. Specifically, standard self-attention requires calculating the correlation between all pairs of elements, with the computational cost increasing quadratically with the input dimension. Axis attention processes only one axis at a time, significantly reducing computation. After multiple axial attention stacks, the model can effectively capture global information, making it suitable for feature extraction from large-scale time-series or image data. Axis attention, on the other hand, is performed in two steps: row attention, which calculates attention only within the same row (such as the time step in a time series) to capture time-series dependencies, and column attention, which calculates attention only within the same column (such as the feature dimension) to enhance interactions between features.
[0035] In the model construction process, the TCN module efficiently captures long-term dependencies and local features of time series data through causal convolution, dilated convolution, and residual connections. The axis attention module models the data in both the temporal and spatial dimensions, improving trajectory prediction accuracy and behavior recognition accuracy. A multi-task learning framework is adopted to jointly train trajectory prediction and behavior recognition tasks, and the model performance is optimized through an adaptive update strategy for loss weights based on homoscedasticity uncertainty. The model is trained using real AIS data, with an optimizer accelerating convergence, and hyperparameters are tuned using a validation set. Finally, the trajectory prediction effect is evaluated using distance error, and the behavior recognition performance is evaluated using metrics such as accuracy, precision, and recall. This solution addresses the efficiency, performance, data processing, and generalization capabilities issues of existing technologies, providing an efficient and accurate technical means for the field of recognition and classification.
[0036] Used to extract a first temporal feature from the track feature sequence;
[0037] The module is connected to the output of the temporal convolutional network and is used to calculate attention along the time axis and feature axis respectively based on the first temporal features to generate a second temporal feature containing global information.
[0038] The prediction module, connected to the output of the axis attention mechanism module, is used to generate track recognition results based on the second temporal features.
Claims
1. A track recognition method based on TCN-axis attention, characterized in that, include: Collect the trajectory feature sequence of the target vessel; A trajectory recognition model is constructed to generate trajectory recognition results based on the trajectory feature sequence; The trajectory recognition model includes: A temporal convolutional network is used to extract a first temporal feature from the trajectory feature sequence; The axis attention mechanism module is connected to the output of the temporal convolutional network and is used to calculate attention along the time axis and feature axis respectively based on the first temporal features, thereby generating a second temporal feature containing global information. The prediction module, connected to the output of the axis attention mechanism module, is used to generate track recognition results based on the second temporal features.
2. The method according to claim 1, characterized in that, The prediction module includes a fully connected layer, which is used to predict the trajectory based on the second temporal features.
3. The method according to claim 2, characterized in that, The prediction module also includes a LogSoftmax layer, which is used to classify behavior based on the trajectory prediction results output by the fully connected layer.
4. The method according to claim 1, characterized in that, The track characteristics include speed, heading, longitude, and latitude.
5. The method according to claim 1, characterized in that, The temporal convolutional network comprises multiple sequentially stacked temporal blocks, each temporal block comprising two convolutional layers, each convolutional layer comprising a causal convolution and a dilated convolution.
6. The method according to claim 1, characterized in that, The trajectory recognition model is jointly trained using a multi-task learning framework that combines trajectory prediction and behavior recognition tasks.
7. The method according to claim 1, characterized in that, During training, the trajectory recognition model adaptively optimizes its parameters based on loss weights with homoscedastic uncertainty.
8. The method according to claim 1, characterized in that, The trajectory feature sequence was extracted from AIS data.