A track recognition model construction method and abnormal ship track matching method

By constructing a track recognition model and a multi-dimensional deep learning model, the self-supervised learning method is used to deal with the problem of missing AIS data and transform it into a binary classification problem, which solves the problem of difficult ship subsequent trajectory recognition, and achieves efficient recognition effect, which is suitable for maritime traffic Security monitoring.

CN118551288BActive Publication Date: 2024-11-05NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410996536.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-05
Estimated Expiration
2044-07-24

AI Technical Summary

Technical Problem

The prior art is difficult to effectively deal with the missing situation in AIS data, which makes it difficult to identify ship subsequent trajectories, especially when unsupervised training and supervised training methods are difficult to apply.

Method used

By constructing a track recognition model, using historical AIS data for self-supervised learning, generating data sets labeled as the same ship and different ships, training a multi-dimensional deep learning model, and converting it into a binary classification problem, realizing ship trajectory in the absence of AIS data Identify.

Benefits of technology

It realizes ship subsequent trajectory recognition in the absence of AIS data, improves recognition accuracy and model learning ability, and is suitable for maritime traffic safety monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118551288B_ABST
    Figure CN118551288B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for constructing a track recognition model and a method for matching abnormal ship tracks, the former comprising: obtaining historical AIS raw data of several ships traveling within a preset time; preprocessing the historical AIS raw data of each ship to obtain corresponding preprocessed AIS data; using all preprocessed AIS data to construct a first data set and a second data set by data interception and splicing; wherein the sample labels in the first data set represent that the tracks corresponding to the samples belong to the same ship; the sample labels in the second data set represent that the tracks corresponding to the samples do not belong to the same ship; based on the first data set and the second data set, a pre-constructed multidimensional deep learning model is trained to obtain a trained track recognition model, which is used for the input AIS data sample to output the probability that the track belongs to the same ship. The present invention can identify the subsequent track of the ship after the AIS data is missing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of track recognition, and in particular relates to a track recognition model construction method and an abnormal ship track matching method. Background Art

[0002] Currently, 90% of world trade is carried out by sea, and it is still growing. With the rapid development of the global shipping industry, the increase in ship traffic has brought many safety and efficiency issues. In order to effectively manage and monitor the dynamic behavior of ships, the Automatic Identification System (AIS) has gradually become an important tool. The AIS system broadcasts the dynamic, static and navigation-related information of ships in a standard format for reception by other ships and shore systems. AIS data not only provides basic information such as the position, heading, speed, etc. of the ship, but also contains communication information between ships. It is easy to collect and provides a rich data source for analyzing ship behavior. Due to the instability of wireless transmission and some objective factors, a large number of noise points are inevitably generated in AIS data. Therefore, how to extract valuable information from massive and complex AIS data and make reasonable use of it is an important challenge currently faced.

[0003] Ship behavior analysis and identification is of great significance in ensuring maritime traffic safety and improving transportation efficiency. At present, the detection and analysis of ship behavior based on AIS data has become a hot topic. Through in-depth mining of AIS data, abnormal behavior of ships can be discovered in time, potential safety hazards can be prevented, and countermeasures can be taken. Nowadays, machine learning and deep learning play an increasingly important role in the analysis and anomaly detection of ship behavior. The current main research direction is the identification of abnormal behavior of ships. However, most of the existing analysis based on AIS data is to solve the problem of abnormal behavior detection of ships, but rarely involves subsequent treatment measures.

[0004] Since AIS data is received through satellite base stations, some sea areas may be far away from satellites, so AIS data may be missing in these sea areas, which may pose a safety hazard. For sea areas where AIS data is missing, the problem of identifying the subsequent track of ships is particularly critical. Specifically, this problem is how to detect whether AIS data over a period of time always belongs to the track of the same ship. However, since deep learning training requires a large amount of data, and AIS data itself is data without any labels, and it is difficult to find a large number of real cases in reality to support model training, supervised training methods cannot be used for the above detection problem; since the above detection problem belongs to a selective recognition problem, it cannot be achieved through unsupervised training methods, so it still needs further research and resolution. Summary of the invention

[0005] In order to solve the above problems existing in the prior art, the present invention provides a method for constructing a track recognition model and a method for matching abnormal ship tracks. The technical problem to be solved by the present invention is achieved through the following technical solutions:

[0006] In a first aspect, an embodiment of the present invention provides a method for constructing a track recognition model, the method comprising:

[0007] Obtaining historical AIS raw data of several ships traveling within a preset time period; wherein each piece of historical AIS raw data represents a track point of the ship corresponding to a historical moment;

[0008] Preprocess the historical AIS raw data of each ship to obtain the corresponding preprocessed AIS data;

[0009] Using all pre-processed AIS data, a first data set and a second data set are constructed by data interception and splicing; wherein the sample labels in the first data set indicate that the tracks corresponding to the samples belong to the same ship; and the sample labels in the second data set indicate that the tracks corresponding to the samples do not belong to the same ship;

[0010] Based on the first data set and the second data set, a pre-constructed multi-dimensional deep learning model is trained to obtain a trained track recognition model; wherein the track recognition model is used to output the probability that the tracks belong to the same ship for the input AIS data samples.

[0011] In a second aspect, an embodiment of the present invention provides an abnormal ship trajectory matching method, the abnormal ship trajectory matching method comprising:

[0012] When the duration of not receiving an AIS signal of a target ship reaches a set duration, obtaining the track of the target ship before the AIS signal vanishing point as the first track; taking the AIS signal vanishing point of the target ship as the center, recording each second track near the vanishing point within a predetermined duration;

[0013] The first track and each section of the second track are respectively spliced ​​end to end to obtain corresponding AIS data samples to be identified;

[0014] Input each AIS data sample to be identified into a pre-trained track recognition model, and obtain a probability value that the first track and the second track in the corresponding AIS data sample to be identified belong to the same ship; wherein the track recognition model is obtained according to the track recognition model construction method described in the first aspect;

[0015] The second track corresponding to the largest probability value obtained from all AIS data samples to be identified is selected as the predicted track of the target ship.

[0016] Beneficial effects of the present invention:

[0017] In the solution provided by the embodiment of the present invention, a self-supervised method is used to construct a training data set based on historical AIS raw data. By intercepting and splicing the existing real long track segments, when the sample data is a combination of track segments of different ships, it is identified as an error, and when the sample data is a combination of track segments of the same ship, it is identified as correct, thereby converting the problem of identifying the subsequent trajectory of the ship in the case of missing AIS data into a relatively simple binary classification problem, so that it can be implemented through deep learning methods. The data set is then used to train the pre-constructed multi-dimensional deep learning model to obtain a trained track recognition model, which is used to output the probability that the track belongs to the same ship for the input AIS data sample, and can realize the function of identifying the subsequent trajectory of the ship through AIS data. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A schematic diagram of a flow chart of a method for constructing a track recognition model provided by an embodiment of the present invention;

[0019] Figure 2 Schematic diagram of the input data preprocessing process and model learning process of the multidimensional deep learning model in an embodiment of the present invention;

[0020] FIG3( a ) is the results of training and verifying the accuracy of the model of the present invention;

[0021] FIG3( b ) shows the results of the training and validation losses of the model of the present invention;

[0022] Figure 4(a) shows the results of training and validation accuracy of the common convolutional model;

[0023] Figure 4(b) shows the results of training and validation loss of the ordinary convolutional model;

[0024] Figure 5 The accuracy comparison results of the common convolution model and the model of the present invention are shown when the data sets are of different sizes;

[0025] Figure 6 A schematic flow chart of an abnormal ship trajectory matching method provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.

[0027] In order to facilitate understanding of the embodiments of the present invention, firstly, a brief description of the relevant research background and the concept of the present invention is given.

[0028] In the field of maritime safety research, analyzing the behavior of ships has always been a core component, and the analysis of ship behavior based on AIS data has gradually become the mainstream of research. In recent years, with the development of machine learning, using deep learning to solve the problem of AIS data analysis seems to have become a more effective method. Many predecessors have made their own contributions and attempts in this direction, but they also found that using deep learning methods to analyze and identify abnormal ship behavior is a very complex problem, involving multiple links such as data preprocessing, feature extraction, and behavior modeling.

[0029] At present, various algorithms have been proposed for different purposes to detect and identify various abnormal behaviors and risks of ships at sea. For example, FANG and YIN et al. analyzed the behavioral characteristics of ships berthing based on AIS data and established an evaluation model. Their focus is to design evaluation indicators based on the behavior of ships when docking and conduct objective evaluation. Duong and Rodolphe et al. proposed a multi-task general deep learning framework based on VRNN (variational recurrent neural network) that can handle trajectory reconstruction, abnormal behavior detection, and track type recognition, and trained it based on AIS data, with good results and stability. Pierre and Arnaud et al. designed a deep learning model for training AIS data using the transformer model as the main body, which can well identify illegal ships that deliberately turn off AIS signals at sea, and has a certain degree of immediacy. However, this is based on huge AIS data as support, and the training cost is huge. Gao and Zhu et al. designed a model to predict the risk of regional collision of ships. First, they clustered by DBSCAN (Density-Based Spatial Clustering of Applications with Noise, a density-based clustering algorithm) to preliminarily screen ships that may be at risk, greatly reducing the amount of AIS data. Then they used the deep learning framework for training and used their own evaluation method to compare the risks in actual waters. Kumar and Ramanarayanan et al. proposed a machine learning solution based on HDBSCAN+, which identified abnormal behavior of ships by clustering and successfully detected maritime accidents reported by the Information Fusion Center of the Indian Ocean Region (IFC-IOR). Some people have also proposed probabilistic models of ship behavior based on historical AIS data, such as Gaussian mixture model (GMM), Markov model, hierarchical neural network, etc., which have good results in ship behavior analysis based on AIS data. There are also solutions that combine radar visual images with AIS data from the perspective of multimodal data fusion to achieve more accurate results.

[0030] At present, many scholars have designed a large number of models, using machine learning methods to analyze real-time AIS data and detect abnormal behavior of ships, especially for the case of ships deliberately silencing AIS signals during navigation, the use of deep learning has achieved good detection results. However, most of the existing analysis based on AIS data is to solve the problem of abnormal behavior detection of ships, but rarely involves subsequent treatment measures.

[0031] The present invention takes into account that in the actual marine driving process, sometimes there will be a situation where the AIS signal is completely missing within a certain area. It may be due to environmental objective factors such as the influence of weather, or it may be that some illegal ships use high-power jamming equipment, and the illegal ship is very likely to maliciously change its AIS signal to a normal ship during this period of interference to avoid supervision, thereby committing illegal acts. Illegal ships may also directly close and change AIS data. At this time, in order for relevant departments to respond in time and conduct corresponding monitoring and interception, how to use computers to identify illegal ships based on real-time data is particularly important. However, the huge amount of data, the complexity of marine behavior, the unpredictability and irregularity of data have brought great challenges to this work. However, in a certain specific sea area, the navigation of ships cannot be completely random. Affected by factors such as the geographical environment, the navigation trajectories of ships with the same purpose are always roughly similar, which can save fuel for ships and increase the safety of navigation. Therefore, there is a theoretical basis for using historical ship navigation data to judge the subsequent trajectory of illegal ships that illegally tamper with AIS signals.

[0032] In order to fill the above-mentioned gaps, aiming at the problem of identifying the subsequent trajectory of ships with missing AIS signals, the present invention is based on the basic characteristics of AIS data. On the basis of studying the feature extraction, modeling and training methods of abnormal ship behavior, a multi-dimensional deep learning model (Multi-1D-CNN) adapted to AIS data training is designed, and a new data set is constructed by self-supervised method using historical real data to train the model. Self-supervised learning mainly uses auxiliary tasks to mine its own supervisory information from large-scale unsupervised data. The model is trained by this constructed supervisory information, so that valuable representations for downstream tasks can be learned. By comparing the results, the model of the present invention has excellent recognition effect, and its learning ability is significantly stronger than that of ordinary models. It can achieve good training effect with less training data, which just meets the characteristics of fewer special cases of ships at sea. Therefore, the model has high practical significance, especially for behavior detection with few occurrences, and has good real-time performance. The following is a specific description.

[0033] In a first aspect, an embodiment of the present invention provides a method for constructing a track recognition model, such as Figure 1 As shown, the method may include the following steps:

[0034] S1, obtaining the historical AIS raw data of several ships traveling within a preset time period;

[0035] A ship will send AIS signals at intervals during navigation, for example, the interval may usually be 3 to 10 seconds. AIS data can be obtained from the AIS signals, which contain the status information of the ship at the time of sending.

[0036] The embodiment of the present invention can select a longer preset time, such as 24 hours, 48 ​​hours, etc., to obtain the real historical AIS raw data of several ships within the preset time, wherein each piece of historical AIS raw data represents a track point of the ship corresponding to a historical moment; therefore, for any ship, each piece of historical AIS raw data within the preset time actually forms the real historical track of the ship, which contains multiple track points.

[0037] S2, preprocessing the historical AIS raw data of each ship to obtain the corresponding preprocessed AIS data;

[0038] Since AIS data is transmitted via a network of satellites and ground stations, the information may be repeatedly processed and forwarded during transmission, resulting in a large amount of duplicate information in the received data. This redundancy not only wastes communication resources, but also increases the burden of data processing and storage.

[0039] Moreover, AIS data is complex in many aspects. First, AIS data contains a large amount of ship information, such as ship name, course, speed, position, etc., all of which need to be integrated and processed to obtain useful information. Secondly, AIS data also contains a large amount of dynamic and static information about ships, which requires complex analysis and processing to obtain accurate ship positions and navigation tracks. In addition, since AIS data is transmitted through a satellite and ground station network, the data transmission and processing process is also relatively complex, and a large system needs to be established and maintained to achieve accurate data transmission and processing. Therefore, it is inevitable that there will be a large number of outliers in AIS data.

[0040] Therefore, if the historical AIS raw data is directly used to train the deep learning model, a large number of noise points will have a great impact on the model training, and the AIS data itself has a very large amount of data, which will bring a heavy burden to the model training and greatly prolong the training time. Therefore, it is particularly necessary to process the historical AIS raw data before model training.

[0041] In an optional implementation manner, preprocessing the historical AIS raw data of each ship to obtain corresponding preprocessed AIS data includes:

[0042] 1) Delete the duplicate points in the historical AIS raw data of each ship to obtain the corresponding deduplicated AIS raw data;

[0043] Please understand the processing process of this step in conjunction with the existing technology, and will not be described in detail here.

[0044] 2) The deduplicated AIS raw data of each ship is sampled at equal intervals and feature set to obtain the corresponding preprocessed AIS data.

[0045] Since the interval of the original AIS signal is generally between 3 and 10 seconds, and the speed of the ship is relatively slow, it does not require such dense AIS data to describe the ship's behavior. Therefore, after deleting the repeated points in the historical AIS original data, the ship's trajectory can be sampled into a set every ten minutes, and then the shorter incomplete track can be deleted. This can not only well reflect the behavior of the ship, but also greatly reduce the amount of data, so that the length of the AIS data sequence of each ship retained is basically the same, which can significantly reduce the training time of the subsequent model, and more regular training data is more conducive to the deep learning model to learn the features, so that the model can achieve better training results.

[0046] The time interval of the equally spaced sampling is 10 minutes. Of course, it can also be set to other values ​​as needed.

[0047] AIS data contains many aspects of information, including longitude and latitude, ship speed, direction of travel, mmsi (Maritime Mobile Service Identity), dynamic information, static information and other information related to behavior status. The purpose of the present invention is to identify the subsequent trajectory of the ship after the loss of AIS, such as the subsequent trajectory identification of the ship deliberately changing the AIS data. Therefore, only the attributes related to the navigation status of the ship in the AIS data, such as longitude and latitude, speed, navigation direction and time, need to be considered, and there is no need to consider the information related to the identity and behavior of the ship. Therefore, on the basis of the existing AIS data, in order to enable the model to better learn the characteristics of the data, the present invention expands the information contained in the AIS data. Any pre-processed AIS data is expressed as:

[0048] ;

[0049] in, Represents a pre-processed AIS data of a ship at a corresponding time; Indicates the longitude of the track point corresponding to the pre-processed AIS data; Indicates the latitude of the track point corresponding to the pre-processed AIS data; Indicates the speed of the ship; Indicates the direction of the ship, that is, the bow direction; Indicates the time when the ship sends AIS data, in seconds; Indicates the longitude difference between this track point and the previous track point; Indicates the latitude difference between this track point and the previous track point; Indicates the time difference between this track point and the previous track point.

[0050] S3, using all the pre-processed AIS data to construct a first data set and a second data set by data interception and splicing;

[0051] The sample labels in the first data set indicate that the tracks corresponding to the samples belong to the same ship; the sample labels in the second data set indicate that the tracks corresponding to the samples do not belong to the same ship;

[0052] In an optional implementation manner, in S3, all pre-processed AIS data are used to construct a first data set by data interception and splicing, including:

[0053] Step a1, randomly select a ship and use all pre-processed AIS data of the ship to obtain a complete track;

[0054] Specifically, a ship is randomly selected, and a complete trajectory can be obtained by using the obtained AIS signal, that is, all the pre-processed AIS data of the ship, which is called A complete random trajectory.

[0055] Step a2: randomly select two tracks with a time interval not exceeding a preset time interval and equal in length from the complete track, connect them head to tail, generate a first AIS data sample and set the label to 1, thereby completing a first AIS data sample generation process;

[0056] Optionally, the preset time interval may be 1 hour. The time lengths of the two selected trajectories are the same, which may be 1 hour.

[0057] The one-hour interval between the two tracks takes into account the time it takes for a ship to modify its AIS data, or even the possibility that the ship turns off its AIS data and continues sailing behind other ships.

[0058] Specifically, a one-hour trajectory A is randomly selected; a one-hour trajectory is randomly selected within two hours after trajectory A as trajectory B. This is because a one-hour trajectory selected within the next two hours will not be more than one hour away from the previous trajectory; trajectories A and B are stitched to generate data with label 1.

[0059] Step a3: repeat the first AIS data sample generation process multiple times, and all the obtained first AIS data samples constitute a first data set.

[0060] In the embodiment of the present invention, in order to obtain abundant samples to meet the model training requirements, two million first AIS data samples with a label of 1 may be obtained to form a first data set.

[0061] In an optional implementation manner, in S3, all pre-processed AIS data are used to construct a second data set by data interception and splicing, including:

[0062] Step b1, randomly selecting two different ships, and for each selected ship, using all pre-processed AIS data of the ship to obtain a complete track of the ship;

[0063] Step b2, randomly selecting a segment of each of the two selected complete trajectories to satisfy the following conditions: the two segments are of equal length and are separated by no more than a preset time interval, and the distance between the last track point of the previous segment and the first track point of the next segment is less than a preset maximum distance;

[0064] The preset time interval can be 1 hour; the time length of the two selected tracks is the same, which can be 1 hour. The preset maximum distance can be express, This can be obtained by pre-traversing all historical tracks and finding the maximum distance between points one hour apart.

[0065] Specifically, randomly select a one-hour track of any ship as track AA; randomly select a one-hour track of a ship other than AA as track BB; determine whether the starting point of track BB is within one hour of the end point of track AA, and whether the distance between the last track point of the previous track and the first track point of the next track is less than the preset maximum distance. If the above conditions are met, execute step b3.

[0066] Step b3, concatenating the two selected trajectories in chronological order, generating a second AIS data sample and setting the label to 0, thereby completing a second AIS data sample generation process;

[0067] Specifically, trajectories AA and BB are stitched together to generate data with label 0.

[0068] Step b4, repeating the second AIS data sample generation process multiple times, and forming a second data set from all the obtained second AIS data samples.

[0069] In the embodiment of the present invention, in order to obtain abundant samples to meet the model training requirements, two million second AIS data samples with a label of 0 may be obtained to form a second data set.

[0070] S4, training a pre-built multi-dimensional deep learning model based on the first data set and the second data set to obtain a trained track recognition model;

[0071] The track recognition model is used to output the probability that the tracks belong to the same ship for the input AIS data samples.

[0072] Since the ship's track points are time-series data, and the features that need to be learned are not independent of each track point, but more about the relationship between a series of track points, the deep learning model needs to have the ability to learn sequence time series features. The qualified basic models are convolutional neural network CNN, recurrent neural network RNN, long short-term memory recursive neural network LSTM, and Transformer model. They are all models that have good learning effects on time series data. However, considering that these deep learning models are relatively complex, have many calculation parameters, and take a long time to train, they are also more prone to overfitting. Therefore, after analyzing the data set type and purpose of the experiment of the present invention, we chose to design a new model based on one-dimensional convolution for deep learning training, without using complex recursive neural networks. This can not only learn the required time series features, but also the fewer parameters can effectively suppress the occurrence of overfitting problems. Figure 2 As shown, in order for the model to better learn the temporal features in AIS data, the present invention designs a multi-branch parallel one-dimensional convolutional neural network, named multi-dimensional deep learning model (Multi-1D-CNN), which is used to train the data set.

[0073] See also Figure 2 The following figure shows the model structure of the embodiment of the present invention. The pre-built multi-dimensional deep learning model includes:

[0074] The convolutional neural network structure connected in sequence, the Concatenate layer, the Flatten layer, two fully connected layers and the output layer; among them:

[0075] The convolutional neural network structure includes four parallel convolutional neural network branches, each of which includes a first convolutional layer, a second convolutional layer and a maximum pooling layer connected in sequence; the first convolutional layer is used to extract the temporal relationship between sequence data, the second convolutional layer is used to extract feature information of sequence data, and the maximum pooling layer is used to perform feature screening; the convolution kernel of the first convolutional layer is set to 3×3×32; the convolution kernel of the second convolutional layer is set to 3×3×64; the step size of the maximum pooling layer is 2;

[0076] The Concatenate layer is used to concatenate the features output by the four convolutional neural network branches;

[0077] The Flatten layer is used to reconstruct the output of the Concatenate layer into one dimension, and the obtained one-dimensional tensor represents the learned feature data;

[0078] The two fully connected layers contain 128 and 64 neurons respectively, which are used to analyze the input features;

[0079] The output layer uses one neuron and selects sigmoid as the activation function, which is used to map the output result to the interval [0, 1] according to the input characteristics.

[0080] Specifically, Figure 2 Taking the first branch in the figure below as an example, (32,3) after the first convolution layer indicates that the convolution kernel size is 3×3 and the number is 32, and (10,32) indicates the size of the tensor after the operation; (64,3) after the second convolution layer indicates that the convolution kernel size is 3×3 and the number is 64, and (8,64) indicates the size of the tensor after the operation; (4,64) after the maximum pooling layer indicates the size of the tensor after the operation; Figure 2 In the figure below, (4,256) after the Concatenate layer indicates the size of the tensor after the operation; (1024,) after the Flatten layer indicates the size of the tensor after the operation; 128 after the first fully connected layer indicates 128 neurons, using the sigmoid activation function, and the node drop probability, that is, the node drop rate dropout is 0.5; 64 after the second fully connected layer indicates 64 neurons; 1 after the output layer indicates 1 neuron.

[0081] Specifically, after the input data enters the pre-built multidimensional deep learning model, the processed input data is firstly subjected to one-dimensional convolution with a convolution kernel of 3×3×32. Since the sequence data is short, in order to better extract the temporal relationship between the sequence data, the alternating mode of convolution layer and pooling layer in the traditional convolutional neural network is not adopted. Instead, the convolution operation is performed again with a convolution kernel of 3×3×64 to fully extract the feature information of the sequence data. Then, a 2×2 maximum pooling layer is used to further screen the features, which effectively reduces the number of parameters and suppresses the overfitting problem. At the same time, redundant information is removed, features are compressed, the influence of noise points and outliers on model training is reduced, the robustness of the model is enhanced, and the generalization ability of the model is improved.

[0082] Then, the four parallel convolutional neural network branches are spliced ​​together using the Concatenate layer, and the output of the Concatenate layer is reconstructed into one dimension using the Flatten layer. The one-dimensional tensor obtained at this time is all the feature data learned from the data. These features are analyzed using two fully connected layers containing 128 and 64 neurons respectively. Finally, one neuron is used and sigmoid is selected as the activation function to map the output result to the interval [0, 1]. Since the detection and recognition problem of the present invention has been converted into a binary classification problem, the output of the Multi-1D-CNN model can be interpreted as the probability of whether the track is generated by the same ship. The higher the probability, the more likely it is that the two tracks in the input data are tracks generated by the same ship.

[0083] On the basis of the above model structure, based on the first data set and the second data set, the pre-built multi-dimensional deep learning model is trained to obtain a trained track recognition model, including:

[0084] (1) processing each AIS data sample in the first data set and the second data set into a 4×12 tensor, separating the data by column, and performing data normalization processing to obtain a processed first data set and a processed second data set;

[0085] In combination with the foregoing, it can be understood that the trajectory durations corresponding to the samples in the first data set and the second data set are equal. In order to facilitate model training, the embodiment of the present invention selects the AIS information contained in the samples in the first data set and the second data set, and only selects the first four items to input the model for training, that is, In , , and . In addition, the number of trajectory points contained in the samples in the first data set and the second data set is 12, so each piece of training data obtained is a 4×12 tensor. Then each column is separated for model training input, that is, it is separated into 4 1×12 tensors, which correspond to the four convolutional neural network branches in the subsequent part.

[0086] Considering that different features may have different measurement scales, and when the training data of deep learning models differ too much, it will lead to many problems such as overfitting, gradient explosion or disappearance, and difficulty in convergence, which will lead to low model training efficiency and deviation in results, so the input data needs to be normalized.

[0087] By normalizing the data, features of different scales can be adjusted to a unified scale, making the data comparable at different feature scales, allowing the model to better learn the features of the sequence, thereby improving the training effect of the model. When optimizing the parameters of a deep learning model, if the scales of the input data vary greatly, different parameters may require different learning rates to converge when updating the model parameters. By normalizing the data, all features can be adjusted to a similar scale, allowing the model to be optimized using a unified learning rate. At the same time, it also reduces the model's sensitivity to the input data, thereby reducing the risk of overfitting. Therefore, normalization can also accelerate the convergence speed of the model and improve the generalization ability of the model.

[0088] The normalization formulas used include:

[0089] ;

[0090] ;

[0091] in, is the value to be normalized, For all The minimum value in For all Because longitude and latitude are values ​​distributed in a fixed area, and use Normalization is performed; the ship's speed and direction are greatly affected by the different track segments and have their own uniqueness, so and use Normalize.

[0092] For the normalization process, see Figure 2 The normalized (12, 1) represents a 12×1 tensor.

[0093] (2) selecting a preset number of data from the processed first data set and the processed second data set to form a training set, and selecting the remaining data to form a test set;

[0094] The training set and the test set in the processed first data set and the processed second data set can be divided according to a preset ratio. For example, the sample data in the processed first data set and the processed second data set each have one million pieces. In order to ensure the generalization of the model, 750,000 pieces of data can be taken from each of them, totaling 1.5 million pieces of data, as the training set, and the remaining 500,000 pieces of data can be used as the test set. The specific setting can be made as needed.

[0095] (3) Setting training parameters, using the training set to train the pre-built multi-dimensional deep learning model, and after reaching the convergence condition, using the test set to verify, and obtaining the trained track recognition model after the verification is passed.

[0096] In an optional implementation manner, the setting of training parameters includes:

[0097] The batch size is set to 256 to get good training speed and the highest possible accuracy.

[0098] The optimizer selects the Adam algorithm, which has excellent stability, computational efficiency, and flexibility. It combines the advantages of the Momentum and AdaGrad methods while avoiding their disadvantages. It can effectively control the learning speed of parameters, avoid the problem of gradient explosion or gradient disappearance, and speed up the training of the model.

[0099] The loss function is binary-cross-entropy, which is suitable for binary classification problems and compatible with the sigmoid function.

[0100] Three callbacks functions are selected, including ModelCheckpoint, ReduceLROnPlateau and EarlyStopping; ModelCheckpoint is used to save the optimal model parameters, ReduceLROnPlateau is used to automatically adjust the learning rate according to the optimization situation during the optimization process to obtain the optimal model, and EarlyStopping is used to stop training in advance when the model converges.

[0101] The above parameters are used to train several parameters in the model. For example, in a specific experiment, the number of trained parameters is set to 164865, and the upper limit of the training times is set to 500 times.

[0102] The experiment can be run on NVIDIA GeForce RTX 4070 Ti and 13th Gen Intel(R) Core(TM) i7-13700KF's 3.40 GHz 24-core CPU. Each round of iteration takes about one minute, and the changes in the loss function and accuracy are continuously monitored. The specific training process can be understood by referring to the training process of existing neural networks. When the loss function reaches convergence, the training can be stopped and the model performance can be verified using the test set. If the verification passes, the training is terminated and the current model is used as the trained track recognition model. If the verification fails, the training is repeated until the trained track recognition model is finally obtained.

[0103] In the solution provided by the embodiment of the present invention, a self-supervised method is used to construct a training data set based on historical AIS raw data. By intercepting and splicing the existing real long track segments, when the sample data is a combination of track segments of different ships, it is identified as an error, and when the sample data is a combination of track segments of the same ship, it is identified as correct, thereby converting the problem of identifying the subsequent trajectory of the ship in the case of missing AIS data into a relatively simple binary classification problem, so that it can be implemented through deep learning methods. The data set is then used to train the pre-constructed multi-dimensional deep learning model to obtain a trained track recognition model, which is used to output the probability that the track belongs to the same ship for the input AIS data sample, and can realize the function of identifying the subsequent trajectory of the ship through AIS data.

[0104] The experimental results of the embodiments of the present invention are evaluated below to verify the effect of the model of the present invention.

[0105] The training of the model of the present invention is shown in FIG3(a) and FIG3(b). FIG3(a) shows the accuracy of training and verification. FIG3(b) shows the loss of training and verification. Please understand the results in conjunction with Table 1.

[0106] Table 1 Experimental results

[0107]

[0108] Among them, True represents the example whose true label is 1; False represents the example whose true label is 0; Pred.True represents the example predicted to be 1, Pred.False represents the example predicted to be 0, and Accuracy represents the accuracy.

[0109] The training status of the ordinary convolution model is shown in Figure 4(a) and Figure 4(b).

[0110] In the experiment, there are two errors in the recognition of the data set. One is that the trajectory of the same ship is recognized as generated by two ships, and the other is that the trajectory generated by two ships is recognized as generated by one ship.

[0111] From the analysis of Figure 3(a), Figure 3(b), Table 1, Figure 4(a), and Figure 4(b), it can be seen that the accuracy of the test set can reach 99% when the model converges, and there is no obvious overfitting. First, the effectiveness of the model is proved, and there is no overfitting. It can be proved that the model trained under this data set has excellent generalization and has universal value for trajectory recognition in the target sea area. The reason why the curve is stepped during the training process is that the callbacks function ReduceLROnPlateau is selected. It will automatically reduce the learning rate to learn better model parameters when the model does not obtain a better Validation loss for 5 consecutive iterations. At the same time, the lower limit of the learning rate is set to allow the model to converge.

[0112] The following is an experimental explanation of the effect of dataset size on model stability.

[0113] While keeping the size of the test set the same, we only changed the size of the training set to observe the effect of the change in the size of the training set on the stability of the model. When the data set is 1 million, the results of the model training and validation accuracy, as well as the results of the model training and validation loss, are Accuracy = 99.2%; when the data set is 500,000, the results of the model training and validation accuracy, as well as the results of the model training and validation loss, are Accuracy = 98%; when the data set is 100,000, the results of the model training and validation accuracy, as well as the results of the model training and validation loss, are Accuracy = 97.7%; when the data set is 50,000, the results of the model training and validation accuracy, as well as the results of the model training and validation loss, are Accuracy = 96.4%;

[0114] Figure 5 The figure shows the accuracy comparison between the common convolutional model CNN and the model of the present invention when the data sets are of different sizes.

[0115] From the above results, it can be seen that with the continuous reduction of the training set, the accuracy of the ordinary convolution model has dropped significantly, while the Multi-1D-CNN model designed in the present invention can maintain a good training effect even when the training set is small, and has excellent learning ability. The stability and generalization of the model have obvious advantages. Even when the training set is much smaller than the test set, the Multi-1D-CNN model of the present invention can still learn the required time series features well, which illustrates the effectiveness of the model in processing multi-dimensional data such as AIS data.

[0116] In a second aspect, corresponding to the embodiment of the first aspect, the embodiment of the present invention further provides a method for matching abnormal ship trajectories, such as Figure 6 As shown, the method includes:

[0117] S100, when the duration of not receiving an AIS signal of a target ship reaches a set duration, obtaining the track of the target ship before the AIS signal vanishing point as a first track; taking the AIS signal vanishing point of the target ship as the center, recording each second track segment near the vanishing point within a predetermined duration;

[0118] At sea, ships sailing normally and legally will continuously broadcast their AIS signals. When a ship suddenly stops broadcasting AIS signals, it becomes a suspicious target. Taking into account various emergencies or objective influences, the present invention stipulates that when a ship does not broadcast AIS signals for a set time (e.g., ten minutes) in a non-berthing area, it will be listed as a suspicious target.

[0119] Then, a track of the target ship for a period of time before the AIS signal disappears, such as 1 hour, can be obtained as the first track;

[0120] Furthermore, taking the vanishing point of the AIS signal of the target ship as the center, each second track section near the vanishing point within a predetermined time period is recorded, wherein the predetermined time period may also be 1 hour.

[0121] S200, splicing the first track and each section of the second track head to tail respectively to obtain corresponding AIS data samples to be identified;

[0122] It can be understood that, through splicing, multiple AIS data samples to be identified can be obtained.

[0123] S300, inputting each AIS data sample to be identified into a pre-trained track recognition model, and obtaining a probability value of the first track and the second track in the corresponding AIS data sample to be identified belonging to the same ship;

[0124] Among them, the track recognition model is obtained according to the track recognition model construction method described in the first aspect; the track recognition model is specifically referred to the content of the first aspect, and will not be described in detail here.

[0125] It should be noted that the time lengths of the two tracks spliced ​​in S200 of the present invention are the same, and the time length is consistent with the strategy adopted by the sample data when training the track recognition model.

[0126] S400, selecting a second track corresponding to the largest probability value obtained from all AIS data samples to be identified as the predicted track of the target ship.

[0127] It can be understood that the second track in the AIS data sample to be identified with the highest probability value is most likely to be the new track of the target ship after the AIS signal disappears. Through the above processing, the subsequent track of the ship can be predicted after the abnormal behavior of the ship is detected.

[0128] It can be seen that the present invention records all tracks near the vanishing point within one hour with the vanishing point as the center for the suspected object, splices the front and back tracks and inputs them into the pre-trained track recognition model to obtain the probability value that the two tracks at both ends are from the same ship, and selects the track with the highest probability as the most likely new track of the ship.

[0129] In the abnormal ship trajectory matching method provided in the embodiment of the present invention, for the subsequent track prediction problem of illegal ships at sea that deliberately change identification information during navigation, such as the missing AIS data, based on AIS data, the problem is first converted into a binary classification problem using a self-supervised learning method, and a Multi-1D-CNN model is designed. The model is trained based on a data set processed from historical real AIS data to obtain a trained track recognition model. In practical applications, the subsequent track of suspicious targets can be effectively predicted after the AIS signal disappears and abnormal ship behavior occurs.

[0130] It should be noted that, in the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0131] 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. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for constructing a track recognition model, characterized in that: include: Obtaining historical AIS raw data of several ships traveling within a preset time period; wherein each piece of historical AIS raw data represents a track point of the ship corresponding to a historical moment; Preprocess the historical AIS raw data of each ship to obtain the corresponding preprocessed AIS data; Using all pre-processed AIS data, a first data set and a second data set are constructed by data interception and splicing; wherein the sample labels in the first data set indicate that the tracks corresponding to the samples belong to the same ship; and the sample labels in the second data set indicate that the tracks corresponding to the samples do not belong to the same ship; Based on the first data set and the second data set, a pre-built multi-dimensional deep learning model is trained to obtain a trained track recognition model; wherein the track recognition model is used to output the probability that the tracks belong to the same ship for the input AIS data samples; The method of constructing a first data set by using all pre-processed AIS data through data interception and splicing includes: A ship is randomly selected and a complete track is obtained using all pre-processed AIS data of the ship; In the complete track, two tracks with a time interval not exceeding a preset time interval and equal in length are randomly selected for head-to-tail splicing to generate a first AIS data sample and set the label to 1, thereby completing a first AIS data sample generation process; Repeat the first AIS data sample generation process multiple times, and form a first data set with all the obtained first AIS data samples; The method of constructing a second data set by using all pre-processed AIS data through data interception and splicing includes: Two different ships are randomly selected, and for each selected ship, a complete track of the ship is obtained using all pre-processed AIS data of the ship; In the two selected complete trajectories, a segment of each trajectory is randomly selected to satisfy: the two segments are of equal length and are separated by no more than a preset time interval, and the distance between the last track point of the previous segment and the first track point of the next segment is less than a preset maximum distance; The two selected trajectories are concatenated head to tail in chronological order to generate a second AIS data sample and the label is set to 0, thereby completing a second AIS data sample generation process; Repeat the second AIS data sample generation process multiple times, and form a second data set with all the obtained second AIS data samples; The pre-built multi-dimensional deep learning model includes: A sequentially connected convolutional neural network structure, a concatenate layer, a flatten layer, two fully connected layers and an output layer; wherein: the convolutional neural network structure includes four parallel convolutional neural network branches, and each convolutional neural network branch includes a first convolutional layer, a second convolutional layer and a maximum pooling layer connected sequentially.

2. The method for constructing a track recognition model according to claim 1, characterized in that: The preprocessing of the historical AIS raw data of each ship to obtain the corresponding preprocessed AIS data includes: Delete the duplicate points in the historical AIS raw data of each ship to obtain the corresponding deduplicated AIS raw data; The deduplicated AIS raw data of each ship are sampled at equal intervals and feature set to obtain the corresponding preprocessed AIS data.

3. The method for constructing a track recognition model according to claim 2, characterized in that: The time interval of the equally spaced sampling is 10 minutes.

4. The method for constructing a track recognition model according to claim 3, characterized in that: Any pre-processed AIS data is expressed as: ; in, Represents a pre-processed AIS data of a ship at a corresponding time; Indicates the longitude of the track point corresponding to the pre-processed AIS data; Indicates the latitude of the track point corresponding to the pre-processed AIS data; Indicates the speed of the ship; Indicates the direction of travel of the ship; Indicates the time when the ship sends AIS data, in seconds; Indicates the longitude difference between this track point and the previous track point; Indicates the latitude difference between this track point and the previous track point; Indicates the time difference between this track point and the previous track point.

5. The method for constructing a track recognition model according to claim 1, characterized in that: The first convolution layer is used to extract the temporal relationship between sequence data, the second convolution layer is used to extract feature information of sequence data, and the maximum pooling layer is used to perform feature screening; the convolution kernel of the first convolution layer is set to 3×3×32; the convolution kernel of the second convolution layer is set to 3×3×64; the step size of the maximum pooling layer is 2; The Concatenate layer is used to concatenate the features output by the four convolutional neural network branches; The Flatten layer is used to reconstruct the output of the Concatenate layer into one dimension, and the obtained one-dimensional tensor represents the learned feature data; The two fully connected layers contain 128 and 64 neurons respectively, which are used to analyze the input features; The output layer uses one neuron and selects sigmoid as the activation function, which is used to map the output result to the interval [0, 1] according to the input characteristics.

6. The method for constructing a track recognition model according to claim 5, characterized in that: Based on the first data set and the second data set, a pre-built multi-dimensional deep learning model is trained to obtain a trained track recognition model, including: Processing each AIS data sample in the first data set and the second data set into a 4×12 tensor, separating the data by columns, and performing data normalization processing to obtain a processed first data set and a processed second data set; Selecting a preset number of data from the processed first data set and the processed second data set to form a training set, and selecting the remaining data to form a test set; The training parameters are set, and the pre-built multi-dimensional deep learning model is trained using the training set. After reaching the convergence condition, the test set is used for verification, and after passing the verification, a trained track recognition model is obtained.

7. The method for constructing a track recognition model according to claim 6, characterized in that: The setting of training parameters includes: The batch size is set to 256; the Adam algorithm is selected as the optimizer; the binary cross entropy suitable for binary classification problems and compatible with the sigmoid function is selected as the loss function; three callbacks functions are selected, including ModelCheckpoint, ReduceLROnPlateau and EarlyStopping; the upper limit of the number of training times is set to 500.

8. A method for matching abnormal ship trajectories, characterized in that: include: When the duration of not receiving an AIS signal of a target ship reaches a set duration, obtaining the track of the target ship before the AIS signal disappears as the first track; Taking the vanishing point of the AIS signal of the target ship as the center, recording each second track segment near the vanishing point within a predetermined time period; The first track and each section of the second track are respectively spliced ​​end to end to obtain corresponding AIS data samples to be identified; Input each AIS data sample to be identified into a pre-trained track recognition model, and obtain a probability value that the first track and the second track in the corresponding AIS data sample to be identified belong to the same ship; wherein the track recognition model is obtained according to the method for constructing a track recognition model based on AIS data according to any one of claims 1 to 7; The second track corresponding to the largest probability value obtained from all AIS data samples to be identified is selected as the predicted track of the target ship.