Method and device for identifying abnormal trajectory of smuggling ship based on multi-source information fusion
By adopting a multi-source information fusion method in the detection of ship trajectory anomaly behavior, using TCN network with additive position encoding and LSTM network with attention mechanism, combined with Kan network for nonlinear feature mapping, the problem of difficulty in accurately identifying smuggling activities in the prior art is solved, and the accuracy and recognition performance of detection are improved.
Patent Information
- Application Number
- CN202411843967.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-14
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-14
AI Technical Summary
Existing deep learning-based detection methods for ship trajectory anomaly behaviors are difficult to accurately identify potential smuggling activities when dealing with complex and diverse ship trajectories, especially when considering external factors such as weather and sea conditions, which are prone to false alarms.
Using a multi-source information fusion method, the motion characteristics and weather characteristics in the ship trajectory are extracted and fused through a TCN network with additive position encoding. Then, the LSTM network with attention mechanism is used for further processing, and the nonlinear feature map is finally performed through the Kan network to output the prediction results of whether the trajectory is suspected to be an abnormal trajectory of the smuggled ship.
Improve the ability to identify complex and diverse ship trajectories, reduce false positive rates, and enable more accurate identification of concealed and flexible smuggling activities.
Smart Images

Figure CN119782987A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of text data detection and deep learning, and specifically relates to a method and device for identifying abnormal trajectories of smuggling ships based on multi-source information fusion. Background Art
[0003] Smuggling ships are a common means of sea transportation for smuggling activities around Hainan Island. They are large motorboats that have been modified with power. When it travels at high speed on the sea, it looks like flying close to the sea surface from a distance, so it is commonly called a smuggling ship. Generally, each smuggling ship is equipped with multiple engines with horsepower of 250 horsepower. Its maximum speed can exceed 90 kilometers per hour. Smugglers often use it for smuggling activities. Smuggling ships, as a smuggling tool, will bring multiple hazards: First, smuggling activities may involve contraband, and the entry of these items into the country will pose a serious threat to social security and national stability. Secondly, smuggling activities bypass normal tariffs and import procedures, resulting in the loss of national tax revenue and affecting economic order. Large-scale smuggling may also undermine fair competition in the domestic market and impact legal industries. Finally, smuggling ships travel at extremely high speeds on the sea, which is likely to cause maritime traffic accidents and endanger the lives of legally sailing ships and crew members. Therefore, it is necessary to conduct timely detection of smuggling activities.
[0004] The deep learning-based ship trajectory abnormal behavior detection method has been widely studied in recent years due to its good effect and fast calculation in practice, but these studies only introduced basic ship trajectory data sets, such as AIS data. These methods are effective for other types of anomaly detection. However, since smuggling activities are covert and evade supervision, they often occur late at night and in poor weather conditions. If the detection model does not take into account the impact of external objective factors on ship behavior, and only judges whether the ship trajectory is suspected of smuggling based on a few simple ship movement characteristics, it is easy to cause a large number of ships with similar behaviors to be mistakenly reported as smuggling ship trajectories.
[0005] Due to the influence of many factors, such as ship type, navigation purpose, sea conditions, etc., these factors are intertwined, making the real ship trajectory sequence usually present a high degree of complexity and diversity. The movement pattern of the ship not only has large fluctuations, but also changes significantly with time and environmental changes. This complex dynamic feature is difficult to fully characterize the law of trajectory changes by relying only on simple linear transformations and nonlinear activation functions. It is also difficult to fully capture the deep-level characteristics of ship behavior and its potential spatiotemporal dependencies, resulting in limited performance of the model in dealing with actual complex situations, and unable to accurately identify potential abnormal behaviors in a narrow sense, especially when dealing with smuggling activities that are highly concealed and flexible. Summary of the invention
[0006] In view of this, the main purpose of the present invention is to provide a method and device for identifying abnormal trajectories of smuggling ships based on multi-source information fusion.
[0007] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0008] The embodiment of the present invention provides a method for identifying abnormal trajectories of smuggling ships based on multi-source information fusion, the method comprising:
[0009] Acquire a ship trajectory sequence, wherein the trajectory sequence includes motion characteristics and weather characteristics;
[0010] The motion features and weather features in the ship trajectory sequence are extracted respectively through the TCN (Temporal Convolutional Network) network with additive position encoding;
[0011] The extracted motion features and weather features are fused to obtain a fused feature vector;
[0012] The fused feature vector is input into the LSTM (Long Short-Term Memory) network with attention mechanism for further processing to obtain multi-head attention output;
[0013] The multi-head attention output is input into the Kan network, which performs nonlinear feature mapping through adaptive grid points and B-spline functions, and outputs a prediction result on whether the trajectory is suspected to be an abnormal trajectory of a smuggling ship.
[0014] In the above scheme, the motion features and weather features in the ship trajectory sequence are extracted respectively by using a TCN (Temporal Convolutional Network) network with additive position coding, specifically including: using the TCN network to extract the motion features X in the trajectory sequence X M Perform encoding operation to obtain the trajectory vector X′ with position encoding M ;
[0015] The trajectory vector X′ with position encoding is encoded by the TCN network M and weather characteristics X W Perform feature extraction respectively to obtain feature mapping U M and U W .
[0016] In the above scheme, the motion feature X in the trajectory sequence X is analyzed by the TCN network. M Perform encoding operation to obtain the trajectory vector X′ with position encoding M , specifically including:
[0017] X M is projected to a higher dimension d pos ;
[0018] The mathematical expression based on position encoding is: Determine the trajectory vector X′ with position encoding M =X M +PE; where pos represents the word vector position of the trajectory data, max_len represents the maximum sequence length of all ship trajectory sequences, d pos represents the embedding dimension of the position encoding, 2i and 2i+1 represent the even and odd dimensions in the ship trajectory vector dimension, which are calculated using the sin and cos functions respectively.
[0019] In the above scheme, the extracted motion features and weather features are fused to obtain a fused feature vector, specifically including: according to u={u1,u2,…,u T}=concat(U M ,U W ) to obtain the fused feature vector U, where T is the length of the merged vector and also the length of the trajectory sequence.
[0020] In the above scheme, the fused feature vector is input into the LSTM (Long Short-Term Memory) network with attention mechanism for further processing to obtain multi-head attention output, which specifically includes: at each time step t, receiving the input u of the current time step t , combined with the hidden state h of the previous time step t-1 and cell state c t-1 , determine the hidden state h of the current time step t and cell state c t ;
[0021] Traverse the entire trajectory sequence and generate a hidden state sequence H = {h1,h2,…,h T}, where H∈ d h Represents the dimension of the LSTM hidden layer;
[0022] Performing a linear transformation on the hidden state sequence H to generate a query vector Q, a key vector K and a value vector V;
[0023] According to the query vector Q corresponding to each head i and the transpose of the key vector Determine the similarity and normalize it through the softmax function to determine the attention weight α of each head i ;
[0024] According to the attention weight β of each head i The sum value vector V determines the context vector C of each head i =α i *V i ;
[0025] The result of concatenating the context vectors of all heads is transformed into the multi-head attention output S through the linear transformation matrix, S = W O [C1; C2; …; C H ], where W O is the output linear transformation matrix used to merge information from different attention heads.
[0026] In the above scheme, at each time step t, the input u of the current time step is received t , combined with the hidden state h of the previous time step t-1 and cell state c t-1 , determine the hidden state h of the current time step t and cell state c t , including: according to h t ,c t =LSTM(u t ,h t-1 ,c t-1 ) Determine the hidden state h of the current time step t and cell state c t .
[0027] In the above scheme, the query vector Q corresponding to each head i and the transpose of the key vector Determine the similarity and normalize it through the softmax function to determine the attention weight α of each head i , including: Determine the attention weight α for each head i ; where d K is the dimension of the key vector.
[0028] In the above scheme, the multi-head attention output is input into the Kan network, and the Kan network performs nonlinear feature mapping through adaptive grid points and B-spline functions, and outputs a prediction result of whether the trajectory is suspected to be an abnormal trajectory of a smuggling ship, specifically including:
[0029] The multi-head attention output S is passed through multiple layers of Kan transformation layers to obtain the final output of whether the trajectory sequence is suspected of smuggling. The main operation of each layer of Kan linear transformation layer is expressed as where h (l+1) represents the output of the l+1th layer, represents the weight matrix of the linear transformation of layer l, represents the weight matrix of the B-spline of the lth layer, σ is the activation function, B(h (l) ) represents the interpolation function of B-spline.
[0030] In the above scheme, the calculation method of the B-spline basis function is recursive, and the recursive formula is: Among them, t i represents the i-th grid point, which determines the segmentation position of the basis spline function; k is the spline order; B i,0 (h (l) ) represents the piecewise constant, when h (l) When it is within the corresponding interval, its value is 1, otherwise it is 0;
[0031] The interpolation function of B-spline is a function generated by a linear combination of a set of control points and the corresponding B-spline basis functions. Its general form is: ; where P i Represents control points. Different control points generate B-spline interpolation functions of different shapes.
[0032] The embodiment of the present invention also provides a device for identifying abnormal trajectories of smuggling ships based on multi-source information fusion, the device comprising:
[0033] A sequence acquisition module, used to obtain a ship trajectory sequence, wherein the trajectory sequence includes motion characteristics and weather characteristics;
[0034] The TCN network module is used to extract the motion features and weather features in the ship trajectory sequence respectively; it is also used to fuse the extracted motion features and weather features to obtain a fused feature vector;
[0035] LSTM network module, used to further process the fused feature vector to obtain multi-head attention output;
[0036] The Kan network module is used to input the multi-head attention output into the Kan network. The Kan network performs nonlinear feature mapping through adaptive grid points and B-spline functions, and outputs a prediction result on whether the trajectory is suspected to be an abnormal trajectory of a smuggling ship.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] The method proposed in the present invention first uses a parallel TCN network to extract motion features and meteorological features from multi-source information respectively, and then inputs these features into LSTM for trajectory identification after decision fusion. During this period, the present invention proposes a TCN network based on additive position coding, so that the model can more accurately understand the global temporal relationship of the trajectory sequence in the feature extraction stage; at the same time, the present invention introduces the Kan module to replace the more commonly used fully connected network in traditional deep learning networks, so as to solve the problem that complex trajectory sequences are difficult to accurately characterize. The present invention fully considers the characteristics of abnormal trajectories of smuggling ships in actual scenarios, and improves the recognition performance of detection algorithms and devices when facing smuggling activities with concealment and flexibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to disclose a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0040] Figure 1 A flowchart of a method for identifying abnormal trajectories of smuggling ships based on multi-source information fusion is provided for an embodiment of the present invention;
[0041] Figure 2 An overall system block diagram corresponding to a method for identifying abnormal trajectories of smuggling ships based on multi-source information fusion is provided for an embodiment of the present invention;
[0042] Figure 3 A detection effect diagram of each model in a method for identifying abnormal trajectories of smuggling ships based on multi-source information fusion in a real scene of ship trajectories is provided for an embodiment of the present invention; DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0044] The embodiment of the present invention provides a method for identifying abnormal trajectories of smuggling ships based on multi-source information fusion. Figure 1 , 2 As shown, the method is:
[0045] Step 101: Acquire a ship trajectory sequence, where the trajectory sequence includes motion characteristics and weather characteristics;
[0046] Step 102: extracting motion features and weather features from the ship trajectory sequence respectively through a TCN (Temporal Convolutional Network) network with additive position coding;
[0047] Specifically, the motion feature C in the trajectory sequence X is analyzed by the TCN network. M Perform encoding operation to obtain the trajectory vector X′ with position encoding M ;
[0048] The trajectory vector X′ with position encoding is encoded by the TCN network M and weather characteristics X W Perform feature extraction respectively to obtain feature mapping U M and U W .
[0049] More specifically, the motion feature X in the trajectory sequence X is analyzed by the TCN network. M Perform encoding operation to obtain the trajectory vector X′ with position encoding M , including:
[0050] X M is projected to a higher dimension d pos ;
[0051] The mathematical expression based on position encoding is: Determine the trajectory vector X′ with position encoding M =X M +PE; where pos represents the word vector position of the trajectory data, max_len represents the maximum sequence length of all ship trajectory sequences, d pos represents the embedding dimension of the position encoding, 2i and 2i+1 represent the even and odd dimensions in the ship trajectory vector dimension, which are calculated using the sin and cos functions respectively.
[0052] After X' M and X W The operation is consistent with X W For example, TCN performs temporal convolution on the input trajectory sequence through multiple layers of residual convolution blocks, where the overall operation of the residual convolution block can be expressed as: Conv res,i =f(W i *f(W i-1 *…f(W1*X W +b1)…+b i-1 )+b o )+downsample(X W); where W is the convolution kernel, b is the bias, i represents the number of layers of the residual convolution block, and the model continuously adjusts and optimizes these two parameters to capture the multi-level temporal characteristics of the smuggling ship trajectory by learning the trajectory features of different labels, i represents the index of the residual convolution block, downsample represents the downsampling operation, which is used to realize the residual link, and f(·) is the activation function. This paper adopts the ELU activation function to improve the recognition sensitivity of abnormal trajectories. Dilated convolution is used in TCN, and the receptive field is expanded by setting the dilation factor, so that the dependency of the trajectory sequence between different time steps can be captured. The specific manifestation of the residual connection structure is the addition of the input and the output after multiple convolution operations. This structure ensures that information can be effectively transmitted in a deeper network, which helps the deep network model capture complex spatiotemporal trajectory patterns in the process of smuggling ship detection.
[0053] The final TCN module output is the motion feature X M and weather characteristics X W The corresponding feature map U M and U W , which is the output of the last layer of residual convolutional blocks. The feature map is the core basis for the model to identify the trajectory pattern of smuggling ships, and contains rich spatiotemporal information related to the characteristics of smuggling activities.
[0054] First, the Transformer's positional encoding calculation is performed over the entire length of the sequence, and the scale of the positional encoding depends on the sequence length and the embedding dimension. The positional encoding used in this model limits the maximum sequence length, so that the calculation range is scaled, which can better adapt to the local convolution receptive field of the TCN network, and is more suitable for local and global time information analysis of ship trajectory data. Secondly, the positional encoding used by models such as Transformer is directly encoded at a fixed frequency. This model performs additional scaling on the output of the sine and cosine functions to match the encoding scale with the numerical range of the input features, which is more suitable for models such as TCN that are based on local convolution receptive fields, so that the model can better fit the spatiotemporal characteristics in the smuggling ship trajectory detection task, and assist TCN in capturing local and global trajectory sequence characteristics.
[0055] Step 103: Fusing the extracted motion features and weather features to obtain a fused feature vector;
[0056] Specifically, according to U = {u1,u2,…,u T}=concat(U M ,U W ) to obtain the fused feature vector U, where T is the length of the merged vector and also the length of the trajectory sequence.
[0057] Step 104: Input the fused feature vector into an LSTM (Long Short-Term Memory) network with an attention mechanism for further processing to obtain a multi-head attention output;
[0058] Specifically, at each time step t, the input u of the current time step is received t , combined with the hidden state h of the previous time step t-1 and cell state c t-1 , determine the hidden state h of the current time step t and cell state c t ;
[0059] Traverse the entire trajectory sequence and generate a hidden state sequence H = {h1,h2,…,h T},in d h Represents the dimension of the LSTM hidden layer;
[0060] Performing a linear transformation on the hidden state sequence H to generate a query vector Q, a key vector K and a value vector V;
[0061] According to the query vector Q corresponding to each head i and the transpose of the key vector Determine the similarity and normalize it through the softmax function to determine the attention weight α of each head i ;
[0062] According to the attention weight α of each head i The sum value vector V determines the context vector C of each head i =α i *V i ;
[0063] The result of concatenating the context vectors of all heads is transformed into the multi-head attention output S through the linear transformation matrix, S = W O [C1; C2; …; C H ], where W O is the output linear transformation matrix used to merge information from different attention heads.
[0064] The calculation process of the context vector helps to extract key features related to potential smuggling activities so that the model can better understand and predict trajectory changes. The key to the multi-head attention mechanism is to process multiple heads in parallel. Each head will independently calculate the attention weight and context vector. This parallel calculation allows the model to analyze trajectory data from multiple angles and improve recognition accuracy. The context vectors of all heads will be spliced together to form a richer attention context representation. The spliced result is obtained through a linear transformation matrix to obtain the multi-head attention output S.
[0065] More specifically, at each time step t, the input u of the current time step is received t , combined with the hidden state h of the previous time step t-1 and cell state c t-1 , determine the hidden state h of the current time step t and cell state c t , including: according to h t ,c t =LSTM(u t ,H t-1 ,c t-1 ) Determine the hidden state h of the current time step t and cell state c t .
[0066] The hidden state sequence H is linearly transformed to generate a query vector Q, a key vector K and a value vector V, specifically including: filtering out features closely related to smuggling track identification from the hidden state sequence generated by LSTM, which is expressed by the following formula:
[0067] Q=W Q H,K=W K H,V=W V H
[0068] Where W Q ,W K ,W V Both are linear transformation matrices used to project H into the space of queries, keys, and values.
[0069] According to the query vector Q corresponding to each head i and the transpose of the key vector Determine the similarity and normalize it through the softmax function to determine the attention weight α of each head i , including: Determine the attention weight α for each head i ; where d K is the dimension of the key vector.
[0070] Step 105: The multi-head attention output is input into the Kan network, and the Kan network performs nonlinear feature mapping through adaptive grid points and B-spline functions, and outputs a prediction result on whether the trajectory is suspected to be an abnormal trajectory of a smuggling ship.
[0071] Specifically, the multi-head attention output S is passed through multiple layers of Kan transformation layers to obtain the final output of whether the trajectory sequence is suspected of smuggling. The main operation of each layer of Kan linear transformation layer can be expressed as: where h (l+1) represents the output of the l+1th layer, represents the weight matrix of the linear transformation of layer l, represents the weight matrix of the B-spline of the lth layer, σ is the activation function, B(h (l) ) represents the interpolation function of B-spline, h (0) is the multi-head attention output S. The first half of the formula is the basic linear transformation, and the second half is the B-spline transformation. Through the combination of linear and spline interpolation, the model can capture the global and local characteristics of the trajectory data, as well as the differences between normal trajectories and smuggling trajectories, thereby improving the ability to identify potential smuggling behaviors.
[0072] For the spline interpolation part, the key step is to calculate the B-spline basis functions. These basis functions define the distribution of input features at each grid point, thereby helping the model to better model complex trajectory behaviors. The calculation method of the B-spline basis function is recursive, and the recursive formula is: Among them, t i represents the i-th grid point, which determines the segmentation position of the basis spline function; k is the spline order; B i,0 (h (l) ) represents the piecewise constant, when h (l) When it is within the corresponding interval, its value is 1, otherwise it is 0;
[0073] The B-spline interpolation function is a function generated by a linear combination of a set of control points and the corresponding B-spline basis functions. This interpolation method enables the model to maintain high flexibility and accuracy when processing complex trajectory data, thereby improving the ability to identify potential smuggling behaviors. Its general form is: Where P i Represents control points. Different control points generate B-spline interpolation functions of different shapes.
[0074] Output of Kan network It is the probability representation of the output of the last Kan linear layer after passing through the softmax function, that is, the final probability prediction of whether the trajectory sequence is suspected of smuggling by the model proposed in the present invention.
[0075] For the output prediction results, the loss function formula for each batch is as follows:
[0076]
[0077] The predicted labels in each batch The average value of the cross entropy with the true label y is used as the loss function to calculate. This process only uses real number vectors for calculation, which can optimize the model efficiency without increasing the amount of calculation.
[0078] The method proposed in the present invention first uses a parallel TCN network to extract motion features and meteorological features from multi-source information respectively, and then inputs these features into LSTM for trajectory identification after decision fusion. During this period, the present invention proposes a TCN network based on additive position coding, so that the model can more accurately understand the global temporal relationship of the trajectory sequence in the feature extraction stage; at the same time, the present invention introduces the Kan module to replace the more commonly used fully connected network in traditional deep learning networks, so as to solve the problem that complex trajectory sequences are difficult to accurately characterize. The present invention fully considers the characteristics of abnormal trajectories of smuggling ships in actual scenarios, and improves the recognition performance of detection algorithms and devices when facing smuggling activities with concealment and flexibility.
[0079] The embodiment of the present invention also provides a device for identifying abnormal trajectories of smuggling ships based on multi-source information fusion, the device comprising:
[0080] The sequence acquisition module is used to obtain the ship trajectory sequence, and the trajectory sequence includes motion characteristics and weather characteristics;
[0081] The TCN network module is used to extract the motion features and weather features in the ship trajectory sequence respectively; it is also used to fuse the extracted motion features and weather features to obtain a fused feature vector;
[0082] The LSTM network module is used to further process the fused feature vector to obtain multi-head attention output;
[0083] The Kan network module is used to input the multi-head attention output into the Kan network. The Kan network performs nonlinear feature mapping through adaptive grid points and B-spline functions, and outputs a prediction result on whether the trajectory is suspected to be an abnormal trajectory of a smuggling ship.
[0084] Example
[0085] 1. Dataset scenario construction
[0086] During the dataset preparation process, a multi-level calibration method was adopted for the label division of ship data.
[0087] In the first step, a rule-based method was used to collect AIS-free, radar-only tracks with a speed higher than 16 knots and lasting for more than 10 minutes near the Qiongzhou Strait from 21:00 to 06:00 the next day. Usually, tracks with these characteristics are considered to be suspected smuggling ship tracks and are continuously monitored and tracked. A total of 5,665 tracks were collected.
[0088] In the second step, the trajectories were cleaned to remove trajectories with data anomalies and missing data, and 5337 trajectories were obtained.
[0089] The third step is to manually verify and label these tracks. Before this step, we underwent professional training and analyzed past confirmed smuggling cases. Finally, we obtained a total of 1,473 tracks of suspected smuggling ships. The other 3,864 tracks were considered normal tracks with no smuggling risk.
[0090] After that, these trajectories are preprocessed, including the following steps: grouping the sampling points of different trajectories and sorting them by timestamp to convert them into a trajectory spatiotemporal sequence; resampling each trajectory at 1-minute intervals; removing other features collected by the sensor, retaining longitude, latitude, speed, and heading features as ship motion features; and deleting null values. Compared with the original data, the preprocessed trajectory data eliminates redundant and useless information, which enables the model to better learn trajectory feature information.
[0091] Considering that external weather factors have a certain impact on the occurrence of smuggling. The present invention adds on the basis of the original motion features and constructs a data set with more weather features. The present invention selects the weather characteristics of the offshore weather forecast of the China Meteorological Center as the data source. The selected weather characteristics include weather phenomena, wind direction, wind force, wave height and visibility. The weather update frequency is 12 hours. At the same time, because in past cases, smuggling ships often enter the Qiongzhou Strait from the Beibu Gulf, the sea area where the trajectory is located is also added as a feature. The sea area division standard comes from the file "HYT 0292-2020 Offshore Forecast Sea Area Division". After that, the discrete and disordered features (weather phenomena, wind direction, sea area) are converted into One-hot encoding so that the model can better understand these objective factors.
[0092] In order to prevent the model from overfitting during training, we divided the data set in the experiment. After the order of trajectory samples was shuffled according to the random number seed, they were divided into training set: validation set: test set in a ratio of 6:2:2. At the same time, it was ensured that there was no data overlap between the training set, validation set, and test set.
[0093] 2. Experimental environment and evaluation indicators
[0094] In the embodiment of the present invention, the model training is run on a server using an Intel(R) Core(TM) I7-7800X CPU @ 3.5-GHz six-core CPU and an NVIDIA TAITAN XP graphics processor. The PyTorch deep learning framework is used to operate on a Windows 10x64 operating system.
[0095] The evaluation indicators used are Precision (P), Recall (R), and F1-Score (F1) to evaluate the performance of each model. Their calculation methods are shown below. The higher the values of the three indicators, the stronger the model performance.
[0096]
[0097] TP and FP represent truly detected anomalies and falsely detected anomalies, respectively, and FN refers to misclassified normal samples. Precision refers to the proportion of samples predicted as positive that are actually positive. Recall refers to the proportion of the number of actual positive samples predicted as positive to the total number of positive samples. F1-scroe is the weighted harmonic mean of Precision and Recall, which is used to comprehensively measure Precision and Recall.
[0098] In addition to the above evaluation indicators, Parameters and Avg Time / sample are selected as other evaluation indicators to show the complexity of the model. Among them, "Parameters" represents the number of parameters based on which the model is trained, and "Avg Time / sample" represents the average time (in seconds) spent testing each sample.
[0099] In order to avoid the randomness of the experimental results, in all experiments, we used different random seeds to train each model five times, and then tested these models separately, and took the average of the five test results for display.
[0100] 3. Performance indicator analysis
[0101] In order to verify the effectiveness of the model proposed in the present invention, the present invention is compared with several advanced methods on multivariate time series classification tasks, which are ResNet, LSTM, TCN, Dlinear, LightTS, PatchTST and TimesNet. Among them, the overall architecture of ResNet is composed of multiple residual blocks, which has far-reaching influence. The LSTM network shows good adaptability to time series data in various time series tasks through its built-in memory unit and gating mechanism, and is one of the backbone networks of this model. TCN efficiently extracts patterns in sequences through 1D convolution and extended causal convolution, and is also one of the backbone networks of this model. Dlinear decomposes the time series into a trend sequence and a residual sequence, and then applies the two decomposed sequences to two single-layer linear networks respectively, so that the network models it. LightTS converts the 1D time series into a 2D structure, and then performs continuous sampling and interval sampling on the 2D time series respectively, and then uses MLP to extract features. PatchTST is a multivariate time series model based on the Transformer structure, and its key part is to divide the time series data into patches at the subsequence level. TimesNet transforms the one-dimensional time series into two-dimensional space for analysis, and uses the Inception module to perform time series analysis. In the task of identifying the smuggling trajectory of suspected smuggling ships, the performance comparison of each network is shown in Table 1.
[0102] Table 1 Performance comparison of each network
[0103]
[0104]
[0105] From the results in Table 1, it can be seen that in the task of identifying suspected smuggling tracks, the model proposed in the present invention achieved the best evaluation index. Moreover, compared with TimesNet and ResNet, which ranked second and third in evaluation index, this model also showed a significant lead in the number of training parameters and test speed, highlighting its advantages in computing cost and efficiency. Taking all factors into consideration, compared with other models, the model proposed in the present invention performed best in the task of identifying suspected smuggling tracks.
[0106] 4. Effectiveness Analysis (Ablation Experiment)
[0107] In order to further evaluate the effectiveness of each component in the model proposed in this invention, this paper designs several sets of performance analysis experiments, and the experimental results are shown in Table 2. During the experiment, only the components are changed between the models, and all other parts remain the same.
[0108] Table 2: Effects of different components on the model proposed by the present invention
[0109]
[0110] From the experimental results, after introducing position encoding into the TCN network, not only the evaluation index is improved, but also the test speed of the model is significantly accelerated, and even the training speed is accelerated to a certain extent during the training process. This effect is beyond initial expectations. Through analysis, this may be because position encoding enhances TCN's ability to capture time series information, making it easier for TCN to understand the relationship between each time point in the trajectory sequence, thereby improving the efficiency of feature extraction.
[0111] In addition, the addition of position encoding may also reduce the computational burden of TCN when inferring the temporal relationship between the context of the trajectory, making the training converge faster and reducing the need for complex calculations.
[0112] After the Attention mechanism was introduced into the LSTM network, various evaluation indicators were significantly improved, with the largest improvement among all single modules. Although the introduction of the Attention mechanism increased the number of model parameters, its contribution to improving performance was also the most obvious, making the model perform better in the suspected smuggling identification task.
[0113] After introducing the Kan network to replace the traditional fully connected network, various evaluation indicators have also been significantly improved. Although the increase in the number of parameters is relatively small, it is noticed that the test speed of the model has decreased. In addition, during the training process, the model convergence speed is also significantly slower in the presence of the Kan network, which shows that the Kan network is more difficult to train and converge than the fully connected network. Therefore, when designing the network structure, it is necessary to weigh the relationship between performance improvement and computational overhead.
[0114] 5. Analysis of actual detection results
[0115] In order to better demonstrate the recognition ability of the model proposed in this invention for suspected smuggling trajectories, three representative abnormal trajectories and four normal trajectories are drawn from the trajectory set, as shown in Figure 3 (a) is shown. In these figures, the first three figures represent abnormal trajectories, and the last four figures represent normal trajectories. The trajectory of the fourth figure starts from the port, so it belongs to the normal trajectory. The trajectories of the fifth and sixth figures have many detours and do not conform to the behavior pattern of smuggling trajectories. The location where the trajectory of the seventh figure lands on the land does not conform to the characteristics of smuggling trajectories, so it also belongs to the normal trajectory.
[0116] Subsequently, these 7 trajectories are input into each network for detection, and the detection results are redrawn. The circle in the upper left corner is blue, indicating that the detection result is correct, and the circle in the upper left corner is red, indicating that the detection result is wrong. Figure 3As shown in (b)-(i). From the obtained detection results, it can be seen that the model proposed by the present invention accurately identifies the smuggling track of the suspected smuggling ship, while other models have different degrees of false positives and false negatives.
[0117] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention.
Claims
1. A method for identifying abnormal trajectories of smuggling ships based on multi-source information fusion, characterized in that: The method is: Acquire a ship trajectory sequence, wherein the trajectory sequence includes motion characteristics and weather characteristics; The motion features and weather features in the ship trajectory sequence are extracted respectively through the TCN (Temporal Convolutional Network) network with additive position encoding; The extracted motion features and weather features are fused to obtain a fused feature vector; The fused feature vector is input into the LSTM (Long Short-Term Memory) network with attention mechanism for further processing to obtain multi-head attention output; The multi-head attention output is input into the Kan network, which performs nonlinear feature mapping through adaptive grid points and B-spline functions, and outputs a prediction result on whether the trajectory is suspected to be an abnormal trajectory of a smuggling ship.
2. The method for identifying abnormal trajectories of smuggling ships based on multi-source information fusion according to claim 1 is characterized in that: The method of extracting motion features and weather features in the ship trajectory sequence by using a TCN (Temporal Convolutional Network) network with additive position coding specifically includes: extracting motion features X in the trajectory sequence X by using the TCN network M Perform encoding operation to obtain the trajectory vector X′ with position encoding M ; The trajectory vector X′ with position encoding is encoded by the TCN network M and weather characteristics X W Perform feature extraction respectively to obtain feature mapping U M and U W .
3. The method for identifying abnormal trajectories of smuggling ships based on multi-source information fusion according to claim 2 is characterized in that: The motion feature X in the trajectory sequence X is analyzed by the TCN network M Perform encoding operation to obtain the trajectory vector X′ with position encoding M , including: X M is projected to a higher dimension d pos ; The mathematical expression based on position encoding is: Determine the trajectory vector X′ with position encoding M =X M +PE; where pos represents the word vector position of the trajectory data, max_len represents the maximum sequence length of all ship trajectory sequences, d pos represents the embedding dimension of the position encoding, 2i and 2i+1 represent the even and odd dimensions in the ship trajectory vector dimension, which are calculated using the sin and cos functions respectively.
4. The method for identifying abnormal trajectories of smuggling ships based on multi-source information fusion according to claim 3 is characterized in that: The extracted motion features and weather features are fused to obtain a fused feature vector, specifically comprising: according to U = {u1, u2, ..., u T }=concat(U M ,U W ) to obtain the fused feature vector U, where T is the length of the merged vector and also the length of the trajectory sequence.
5. The method for identifying abnormal trajectories of smuggling ships based on multi-source information fusion according to claim 4 is characterized in that: The fused feature vector is input into the LSTM (Long Short-Term Memory) network with attention mechanism for further processing to obtain multi-head attention output, which specifically includes: at each time step t, receiving the input u of the current time step t , combined with the hidden state h of the previous time step t-1 and cell state c t-1 , determine the hidden state h of the current time step t and cell state c t ; Traverse the entire trajectory sequence and generate a hidden state sequence H = {h1,h2,…,h T },in d h Represents the dimension of the LSTM hidden layer; Performing a linear transformation on the hidden state sequence H to generate a query vector Q, a key vector K and a value vector V; According to the query vector Q corresponding to each head i and the transpose of the key vector Determine the similarity and normalize it through the softmax function to determine the attention weight α of each head i ; According to the attention weight β of each head i The sum value vector V determines the context vector C of each head i =α i *V i ; The result of concatenating the context vectors of all heads is transformed into the multi-head attention output S through the linear transformation matrix, S = W O [C1; C2; …; c H ], where W O is the output linear transformation matrix used to merge information from different attention heads.
6. The method for identifying abnormal trajectories of smuggling ships based on multi-source information fusion according to claim 5 is characterized in that: At each time step t, the input u of the current time step is received t , combined with the hidden state h of the previous time step t-1 and cell state c t-1 , determine the hidden state h of the current time step t and cell state c t , including: according to h t ,c t =LSTM(u t ,h t-1 ,c t-1 ) Determine the hidden state h of the current time step t and cell state c t .
7. The method for identifying abnormal trajectories of smuggling ships based on multi-source information fusion according to claim 6 is characterized in that: According to the query vector Q corresponding to each head i and the transpose of the key vector Determine the similarity and normalize it through the softmax function to determine the attention weight α of each head i , including: Determine the attention weight α for each head i ; where d K is the dimension of the key vector.
8. The method for identifying abnormal trajectories of smuggling ships based on multi-source information fusion according to claim 7 is characterized in that: The multi-head attention output is input into the Kan network, and the Kan network performs nonlinear feature mapping through adaptive grid points and B-spline functions, and outputs a prediction result of whether the trajectory is suspected to be an abnormal trajectory of a smuggling ship, specifically including: The multi-head attention output S is passed through multiple layers of Kan transformation layers to obtain the final output of whether the trajectory sequence is suspected of smuggling. The main operation of each layer of Kan linear transformation layer is expressed as where h (l+1) represents the output of the l+1th layer, represents the weight matrix of the linear transformation of layer l, represents the weight matrix of the B-spline of the lth layer, σ is the activation function, B(h (l) ) represents the interpolation function of B-spline.
9. The method for identifying abnormal trajectories of smuggling ships based on multi-source information fusion according to claim 8 is characterized in that: The B-spline basis function is calculated recursively, and the recursive formula is: Among them, t i Represents the i-th network Grid points determine the segmented positions of the basis spline function; k is the spline order; B i,0 (h (l) ) represents the piecewise constant, when h (l) When it is within the corresponding interval, its value is 1, otherwise it is 0; The B-spline interpolation function is a function generated by a linear combination of a set of control points and the corresponding B-spline basis functions. Its general form is: B(h (l) )=∑ i=0 P i B i,k (h (i) );where P i Represents control points. Different control points generate B-spline interpolation functions of different shapes.
10. A device for identifying abnormal trajectories of smuggling ships based on multi-source information fusion, characterized in that: The device includes: A sequence acquisition module, used to obtain a ship trajectory sequence, wherein the trajectory sequence includes motion characteristics and weather characteristics; The TCN network module is used to extract the motion features and weather features in the ship trajectory sequence respectively; it is also used to fuse the extracted motion features and weather features to obtain a fused feature vector; LSTM network module, used to further process the fused feature vector to obtain multi-head attention output; The Kan network module is used to input the multi-head attention output into the Kan network. The Kan network performs nonlinear feature mapping through adaptive grid points and B-spline functions, and outputs a prediction result on whether the trajectory is suspected to be an abnormal trajectory of a smuggling ship.
Citation Information
Patent Citations
Multi-source information fused ship trajectory prediction method
CN117391244A
New frame photovoltaic power prediction method and system, and computer readable storage medium
CN118586442A
Large model compression method and system based on KAN network
CN118673969A
Cited By
EEG signal ratchet wave detection method and system based on KAN feature fusion
CN120408385A
Fire coal dynamic migration tracking system and method for multi-source trajectory fusion analysis
CN120850796A
Ship trajectory anomaly detection method and system based on KAN network
CN121580042A