Ship trajectory classification method based on CNN-GRU combined neural network

By cleaning and pre-processing the ship trajectory data based on CNN-GRU combination neural network, the problem of feature extraction in the prior art is solved by subjective factors and low processing efficiency, and high accuracy and efficient ship trajectory classification are achieved .

CN119025987APending Publication Date: 2024-11-26DALIAN MARITIME UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411031808.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The existing ship trajectory classification methods are susceptible to subjective factors during feature extraction, and the efficiency of processing time series data is low, resulting in a low classification accuracy.

Method used

Using a method based on CNN-GRU combination neural network, the ship trajectory data is cleaned and pre-processed, including sliding window processing, interpolation and denoising processing, combined with the CNN model to capture spatial relationships and the GRU model to capture time dependence, to construct a subdivision category Model.

Benefits of technology

It improves the availability and classification accuracy of ship trajectory data, reduces processing time, and achieves high robustness and classification efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025987A_ABST
    Figure CN119025987A_ABST
Patent Text Reader

Abstract

The invention provides a ship trajectory classification method based on a CNN-GRU combined neural network, and belongs to the field of deep learning. The method comprises the following steps: step 1, acquiring ship trajectory source data, and performing corresponding cleaning and preprocessing on the source number ship trajectory data, specifically, S1, removing ship trajectories with serious ship trajectory point missing and trajectory points which do not meet requirements; s2, determining a time stamp interval of a ship track; s3, performing sliding window trajectory information processing on the ship trajectory; s4, performing interpolation processing on the ship trajectory missing information; s5, performing de-noising processing on the track outliers; 2, calculating a motion attribute sequence of a ship trajectory by using the preprocessed ship trajectory data, and carrying out standardization processing to obtain a ship trajectory data segment; 3, constructing and training a combined neural network model by using the ship trajectory data segments; and step 4, obtaining the classification of the ship trajectory. Therefore, efficient and accurate classification of ship trajectories is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of deep learning, and in particular to a ship trajectory classification method based on a CNN-GRU combined neural network. Background Art

[0002] As more and more ships are at sea and maritime monitoring becomes more and more important, relevant departments have established automatic identification system (AIS) base stations in many coastal areas. The classification and identification of ships based on AIS data is less affected by weather and can automatically identify the status of ships around the clock. In addition, this method has the advantages of not being easily exposed by enemy reconnaissance, high data collection accuracy, and the ability to collect static data such as voyages and ship attributes. Therefore, AIS base stations can generate a large amount of ship information every day, including not only static information such as ship type, tonnage, country, etc., but also dynamic information such as time, location, direction, speed, etc. Whether you want to apply the ship trajectory corresponding to AIS data to the identification of enemy and friend of maritime target ships in the military field, vigilance against maritime terrorist attacks, etc.; or to apply it to water traffic planning and port ship navigation monitoring in the civil field, it is necessary to classify and predict the ship trajectory obtained based on AIS data.

[0003] At present, the specific application scenarios of ship trajectory classification methods at home and abroad mainly include the identification of ship models and the classification of ship motion patterns. The implementation process is divided into three parts: feature extraction, ship trajectory data conversion, and classification model building. For ship trajectory classification, the models currently used mainly include KNN (nearest neighbor classification algorithm), random forest algorithm, support vector machine and decision tree combination, and LSTM (long short-term memory network) neural network. However, these methods are easily affected by subjective factors when extracting ship trajectory features, and have insufficient learning capabilities for time series data features such as ship trajectories; although LSTM neural networks can process time series data, the model structure is relatively complex and the data processing time is relatively long.

[0004] Therefore, there is a need for a ship trajectory classification method that can reduce the influence of subjective factors in the process of extracting ship trajectory data features and reduce the time for processing time series data. Summary of the invention

[0005] In view of this, in order to solve the problems of insufficient feature extraction of ship trajectory data, slow classification efficiency and low accuracy in the existing methods, the present invention provides a ship trajectory classification method based on a CNN-GRU (convolutional neural network-gated recurrent network) combined neural network.

[0006] To this end, the present invention provides the following technical solutions:

[0007] The present invention discloses a ship trajectory classification method based on a CNN-GRU combined neural network, comprising:

[0008] Step 1: Obtain the source data of ship trajectory, and perform corresponding cleaning and preprocessing on the source data of ship trajectory, including:

[0009] Eliminate the ship trajectories with serious missing ship trajectory points and the trajectory points that do not meet the requirements;

[0010] Determine the time stamp spacing of ship tracks;

[0011] Perform sliding window trajectory information processing on the ship trajectory;

[0012] Interpolate missing information of ship trajectories;

[0013] De-noising of trajectory outliers;

[0014] Step 2: Calculate the motion attribute sequence of the ship trajectory using the pre-processed ship trajectory data and obtain the ship trajectory data segment by standardization processing;

[0015] Step 3: construct and train a combined neural network model based on CNN-GRU using the ship trajectory data segment;

[0016] Step 4: Use the trained combined neural network model to obtain the classification of ship trajectories.

[0017] Furthermore, the sliding window trajectory information processing of the ship trajectory includes:

[0018] If there are many values ​​in the sliding window, the feature data of the trajectory points in the sliding window are averaged as the sliding window value;

[0019] If there is no data in the sliding window, the relevant attribute value of the trajectory point represented by the sliding window is empty.

[0020] Furthermore, the interpolation processing of the missing information of the ship trajectory includes: establishing interpolation functions according to the existing data on both sides of the missing value, and interpolating and completing the intermediate missing values; if there are multiple missing values, the interpolation weight is calculated based on the time difference from the missing value to the existing trajectory points on both sides of the missing data.

[0021] Furthermore, the denoising of trajectory outliers includes: using a Kalman filter to eliminate noise in the ship trajectory.

[0022] Furthermore, the combined neural network model is constructed and trained using the ship trajectory data segments, wherein the model structure includes:

[0023] The CNN part, which consists of input layer, convolution layer and max pooling layer, extracts spatial and local features from the time series motion attribute sequence;

[0024] Use the output of the CNN network as the input of the GRU network;

[0025] The GRU part consists of a GRU recurrent layer, a fully connected layer, and an output layer;

[0026] The GRU part captures the temporal dependencies and sequential patterns of the data and outputs the classification label of the predicted ship trajectory.

[0027] Furthermore, the combined neural network model is trained, including:

[0028] Input the trajectory motion attribute sequence and the classification label corresponding to the trajectory to start model training;

[0029] Use the cross entropy loss function to evaluate the model training results;

[0030] Adjust model parameters based on training results;

[0031] The motion attribute sequence of the test set trajectory is used to predict the trajectory category, and the overall accuracy of ship trajectory classification and the accuracy of each category are obtained through 5-fold cross validation.

[0032] Furthermore, the classification of the ship tracks has 14 categories.

[0033] Advantages and positive effects of the present invention:

[0034] The acceleration and heading rate characteristics of each ship track point are calculated using the existing data track attributes.

[0035] 1) The present invention combines the advantages of CNN model in capturing the spatial relationship of ship trajectories and GRU in capturing the temporal dependency in ship trajectory data, and constructs a ship trajectory sub-classification model based on CNN and GRU. While ensuring the overall accuracy, the model also achieves a good accuracy for each category classification task. Therefore, the model has good robustness and effectiveness.

[0036] 2) The present invention performs data cleaning and preprocessing on the original ship trajectory data, and uses the trajectory attributes of the processed data to calculate the acceleration and heading rate characteristics of each ship trajectory point; thus effectively improving the availability of ship trajectory data and the accuracy of ship trajectory classification.

[0037] 3) The method of the present invention first randomly selects a number of ships of each type to analyze the time intervals of adjacent track points of the ship's track, and selects the main time interval as the ship track interval. The ship track is processed by setting a sliding window with the track time interval. If there are multiple track points in the window, the mean of the track point features in the window is used as the feature of the sliding window. If there are no track points in the sliding window, it is set to empty and listed as a missing point. Then, the missing points are interpolated based on the improved two-sided interpolation method, which effectively reduces the influence of single interpolation on the ship track characteristics and better retains the track points with characteristics such as turning and turning.

[0038] 4) The present invention calculates the distribution of experimental ship trajectory length, observes the distribution of the number of shorter trajectory points, selects the appropriate trajectory cutting sliding window size, cuts the ship trajectory into equal lengths, and uses the model input data length. The ship trajectory data txt file name is used as the ship trajectory identifier, and Len trajectory points are used as the ship trajectory cutting threshold. The ship trajectory segment with a motion state and a continuous number of trajectory points of Len is extracted, and the motion attribute characteristics of the ship trajectory segment are extracted, providing continuous and reliable data for the subsequent model to classify the ship trajectory.

[0039] 5) The present invention uses the Kalman filtering method to reduce the noise of the ship trajectory, thereby reducing the fluctuation of the ship trajectory caused by wind and waves; through comparative experiments, it is found that the processed trajectory has achieved a significant stabilization effect compared with the unprocessed trajectory.

[0040] 6) The present invention uses the processed ship trajectory segment data in a ratio of 8:2 to train and test the ship trajectory. The hyperparameters such as learning rate, loss function, eopch, batch_size, etc. in the CNN-GRU combined neural network model parameters are set and adjusted. The overall accuracy of ship trajectory classification and the accuracy of each category are obtained through 5-fold cross validation. A classification model with high accuracy is obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0042] Figure 1 This is a flow chart of ship trajectory classification of the present invention;

[0043] Figure 2 This is a structural diagram of the ship trajectory classification model based on CNN-GRU of the present invention;

[0044] Figure 3 This is a time interval distribution diagram of ship trajectory data in an embodiment of the present invention;

[0045] Figure 4 This is a visualization diagram of the original trajectory data of the ship numbered 829559 in an embodiment of the present invention;

[0046] Figure 5 This is a visualization diagram of the original trajectory data of the ship numbered 829559 after interpolation in an embodiment of the present invention;

[0047] Figure 6 This is a visualization diagram of the ship trajectory data numbered 829559 before Kalman filtering processing in an embodiment of the present invention;

[0048] Figure 7 This is a visualization diagram of the ship trajectory data numbered 829559 after being processed by Kalman filtering in an embodiment of the present invention;

[0049] Figure 8 A bar graph showing the accuracy of classification of each category of ship trajectories of different models in an embodiment of the present invention;

[0050] Fig. 9 This is a data preprocessing flow chart of the present invention;

[0051] Fig.10 This is a ship trajectory classification framework diagram of the present invention. DETAILED DESCRIPTION

[0052] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0053] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0054] The present invention provides a ship trajectory classification method based on a CNN-GRU combined neural network. The inventive concept is: obtaining the ship trajectory source data and performing corresponding cleaning and preprocessing on the data; obtaining the motion sequence of the ship trajectory based on the calculated and processed data; standardizing the motion sequence; using the data to construct a CNN-GRU model and train it, and output the predicted classification result. The method of the present invention is applied to the classification of ship trajectories, and the input data of the model is a segment of trajectory data, and then the potential spatial and temporal series relationship of the trajectory points in the entire trajectory is analyzed by the model, and then the trajectory is classified according to this relationship. More specifically, the input of the model of the present invention is after interpolation and cutting processing, the features of each trajectory point in the trajectory are input into the model according to the time-constructed sequence features, and then the spatial and temporal relationship between the trajectory points is calculated by the model, and the output classification types of the model are richer.

[0055] like Figure 1 The ship trajectory flow chart shown in the figure, the method of the present invention specifically includes:

[0056] Step 1: Fig. 9 The data preprocessing process shown in the figure is as follows:

[0057] S1: Eliminate the ship trajectories with serious missing track points and the track points that do not meet the requirements.

[0058] S2: Calculate the time interval between adjacent track points of each ship track and visualize them.

[0059] In a specific implementation, the time interval of each track is different. Due to sea waves or signal reception deviation, a large number of AIS data with time intervals of 1 second and 2 seconds will appear in the ship track, but this is not the AIS time interval of the normal ship. In the embodiment of the present invention, the main time intervals of the ship track time interval greater than 2 seconds are counted as the time interval of the ship track.

[0060] S3: Use the time interval as the sliding window size to slide the ship trajectory. If there are multiple trajectory points in the window, the attribute features of the multiple trajectory points are averaged as the attribute features of the window; if there are no trajectory points in the window, the relevant attribute features of the window are set to empty and marked as missing values.

[0061] In the embodiment of the present invention, the interval determination part of the track is determined according to the track interval distribution, which is more accurate and more in line with the difference analysis between the data compared with the conventional unified determination.

[0062] S4: Improve the interpolation method on both sides; establish interpolation functions based on the existing data on both sides of the missing value, and interpolate the missing values ​​in the middle; if there are multiple missing values, calculate the time difference from the missing value to the existing track points on both sides of the missing data, and use the interpolation weight accordingly. Interpolating the missing points effectively reduces the impact of single interpolation on the characteristics of the ship's track, and better retains the characteristic track points such as turning and turning.

[0063] Common interpolation methods all construct interpolation functions based on the data on both sides of the missing value, and interpolate the missing values ​​in the middle. However, if the missing value belongs to characteristic data such as inflection points, then the traditional interpolation method (such as the cubic spline interpolation method) cannot interpolate the missing points well. In this regard, the two-side interpolation method is improved in the embodiment of the present invention. Since the missing points may be multiple continuous points, based on the two-side interpolation method, the interpolation function L1 is established according to the existing data on the left side of the missing point, and then the interpolation function L2 is established according to the existing data on the right side of the missing point. The L1 function calculates the interpolation value a1 according to the distance (number of time intervals) from the existing data points on the left to the missing value a, and the L2 function calculates the interpolation value a2 according to the distance (number of time intervals) from the existing data points on the right to the missing point a. However, the distance (number of time intervals) from the missing point to the existing data points on the left and to the existing data points on the right are different. The closer (smaller) the distance (number of time intervals), the greater the impact of the value obtained according to the interpolation function. The distance (number of time intervals) influence weight is formula (2).

[0064] Assume that the left trajectory point of the missing value is and B(t B ,lon B ,lat B ,v B ,vr B ), the trajectory point on the right side of the missing value is C(t C ,lon C ,lat C ,v C ,vr C ) and D(t D ,lon D ,lat D ,v D ,vr D ). Where t represents the time of the trajectory point, lon represents the longitude of the trajectory point, lat represents the latitude of the trajectory point, v represents the speed of the trajectory point, and vr represents the heading of the trajectory point. Taking the calculation of speed as an example, the formulas are shown in (1) and (2).

[0065]

[0066] v i =w L v L +w R vR (3)

[0067] The i point represents a missing trajectory point between trajectory point B and trajectory point C, and the weight w L Determined by the time difference between the missing trajectory point and the existing trajectory point on the left, the weight w R It is determined by the time difference between the missing trajectory point and the existing trajectory point on the right. The smaller the time difference, the greater the impact of the trajectory point value interpolated from the existing trajectory point on that side. Finally, the formula is used to calculate the speed of point i by formula (3). Then, the folium visualization method (a visualization tool of Python) is used to visualize the comparison before and after interpolation.

[0068] S5: Use the Kalman filter method to perform overall noise reduction on the ship trajectory, and use the folium visualization method to perform a visual comparison before and after noise reduction.

[0069] S6: Standardize the trajectory data.

[0070] Step 2: Calculate the motion attribute characteristics of the ship trajectory points, as follows:

[0071] The motion attribute characteristics of the ship's trajectory points include: speed, acceleration, heading, heading rate, longitude and latitude.

[0072] The heading rate calculation formula is shown in (4), where vr is the heading of the certain point.

[0073]

[0074] The number of all experimental ship trajectory points is counted, and the appropriate sliding window length is selected without losing too many ship trajectories. The ship trajectories are cut by sliding, and then each ship trajectory sequence of equal length is labeled.

[0075] The trajectory point features used by the method of the present invention include speed, acceleration, heading, heading rate, and longitude and latitude, that is, the trajectory point features used by the method of the present invention are richer and the features of the trajectory points are analyzed more comprehensively.

[0076] Step 3: Combining the advantages of CNN model in capturing the spatial relationship of ship trajectories and GRU in capturing the temporal dependency in ship trajectory data, a ship trajectory sub-classification model based on CNN and GRU was constructed. At the same time, LSTM, RNN and GRU were selected as baselines. The overall classification accuracy of these baseline methods was low, and even the performance in individual classification tasks was lower than normal. On the basis of ensuring the overall accuracy, the method of the present invention also achieved a good accuracy in each category classification task, which further verified the robustness and effectiveness of the method of the present invention.

[0077] In order to have the advantages of faster computational efficiency and shorter training time compared to LSTM, the GRU model is used to extract time series features. The reset gate and update gate are obtained by combining the local position input and the upper layer output with the sigmoid activation function.

[0078] The process includes:

[0079] 1) Reset gate r t , reset gate r t The calculation formula is as follows:

[0080] r t =σ(W r x t +U r h t-1 +b r )(5)

[0081] Enter x from the current position t and the output h of the previous hidden layer t-1 After linear transformation and addition, it is connected to sigmoid. Due to the existence of sigmoid, its output value is between 0 and 1, which is used to select how much information to keep.

[0082] 2) Update gate z t , update gate z t The calculation formula is as follows:

[0083] Z t =σ(W z x t +U z h t-1 +b z )(6)

[0084] Calculation process and r t similar.

[0085] 3) is the updated value, reset by the gate r t 、Previous position output h t-1 , input x at this position t Joint decision:

[0086]

[0087] 4)h t , the final output of the current position is h t , by the updated value Update gate z t , enter h in the previous position t-1 , have jointly decided:

[0088]

[0089] For ease of understanding, the following examples are used for further explanation, and the specific steps are as follows:

[0090] Step 1: Obtain the source data of the ship trajectory, and perform corresponding cleaning and preprocessing on the original ship trajectory data. Due to differences in the collection method of AIS ship trajectory data, data transmission and receiving equipment, personnel measurement and processing, etc., the original ship trajectory data often has data quality problems, including over-reporting or under-reporting of AIS trajectory data, long-term absence of trajectory data, abnormal trajectory geometry, etc. The AIS data time interval is usually between a few seconds and tens of seconds, while in areas with less shipping activities, the time interval may be longer, which may be several minutes or even longer. The present invention first randomly selects and calculates the time interval size of 5 ship trajectory data under each category, and performs a visual analysis, and concludes that the distribution of the time interval of AIS ship trajectory data is mainly concentrated between 1 second and 10 seconds. The unstable AIS data time interval of the ship causes data uncertainty and also interferes with trajectory classification. First, based on the above situation and data spacing statistical analysis, the trajectory time interval threshold T of a certain category of the present invention is set. seg is 5 seconds, according to T seg Set the sliding window size and perform sliding processing on the ship trajectory. If there are many values ​​in the sliding window, the latitude and longitude, speed, heading and other characteristic data of the trajectory points in the sliding window are averaged as the sliding window value; if there is no data in the sliding window, the relevant attributes of the trajectory points represented by the sliding window are set to empty.

[0091] The data in the sliding window is empty or the data in multiple consecutive sliding windows is empty, which causes the continuous missing of trajectory points or even the missing of a section of trajectory. In view of this situation, the present invention uses an improved bilateral interpolation method to establish interpolation functions according to the existing data on both sides of the missing value, and interpolate the missing values ​​in the middle. If there are multiple missing values, the time difference from the missing value to the existing trajectory points on both sides of the missing data is calculated, and the interpolation weight is calculated accordingly. Assume that the trajectory point on the left side of the missing value is A(t A ,lon A ,lat A ,v A ,vr A ) and B(t B ,lon B ,lat B ,v B ,vr B ), the trajectory point on the right side of the missing value is C(t C ,lon C ,lat C ,v C ,vr C ) and D(tD ,lon D ,lat D ,v D ,vr D ). Where t represents the time of the trajectory point, lon represents the longitude of the trajectory point, lat represents the latitude of the trajectory point, v represents the speed of the trajectory point, and vr represents the heading of the trajectory point. Taking the calculation of speed as an example, the formulas are shown in (9) and (10).

[0092]

[0093] v i =w L v L +w R v R (11)

[0094] The i point represents a missing trajectory point between trajectory point B and trajectory point C, and the weight w L Determined by the time difference between the missing trajectory point and the existing trajectory point on the left, the weight w R It is determined by the time difference between the missing trajectory point and the existing trajectory point on the right. The smaller the time difference, the greater the influence of the trajectory point value interpolated by the existing trajectory point on this side. The final formula is calculated by formula (11) at point i.

[0095] When ships sailing in different sea areas take fixed routes, many factors such as wind and waves, operational errors, etc. affect the stability of the navigation trajectory, and the ship trajectory is prone to fluctuations and noise. The Kalman filter is a recursive filter used to estimate the state of the system. It can be used to process noisy measurement data and provide the best estimate of the system state. In the denoising optimization of ship trajectories, the Kalman filter can be used to eliminate noise and instability in the trajectory to obtain a smoother and more accurate trajectory. Kalman filtering is essentially a recursive estimation. It uses the statistical characteristics of observation noise and measurement noise, takes the system observation as input, and the system state as output. The required signal is estimated based on the measurement update and time update. Kalman filtering can be divided into two parts: state prediction and filter update.

[0096] The status prediction is:

[0097]

[0098] P t - =FP t-1 F T +Q(13)

[0099] (12) In the formula, is the prior state estimate at time t, is the intermediate calculation result of filtering, that is, the result at time t predicted based on the optimal estimate at the previous time (time t-1), is the result of the prediction equation, F is the state transfer matrix, And the following formula (15) Represent the posterior state estimates at time t-1 and time t, respectively, P t - is the prior estimated covariance at time t, P t-1 and P of the following formula (16) t They represent the posterior estimated covariance at time t-1 and time t respectively, and Q is the process excitation noise covariance.

[0100] The filter is updated as:

[0101] K t =P t - H T (HP t - H T +R) -1 (14)

[0102]

[0103] P t =(IK t H)P t - (16)

[0104] In formula (14), K t is the filter gain matrix, and R is the measurement noise covariance. In equation (15), H is the transformation matrix from state variables to test (observation), which represents the relationship connecting the state and observation, z t is the observed value (measured value) at time t, which is the input of the filter. I in formula (16) is the unit matrix.

[0105] Step 2: After completing the cleaning, interpolation, and noise reduction of the ship trajectory data, the trajectory point features are calculated. The feature of each trajectory point is (lon, lat, v, vr, a, str), where a represents the acceleration of the point and str represents the turning rate of the point.

[0106] The acceleration a of the point is calculated as shown in equation (17). temp is the time interval T of the AIS data points of the track seg .

[0107]

[0108] The heading rate str is calculated as shown in formula (18), where vr is the heading of the certain point.

[0109]

[0110] After calculating the acceleration and heading rate of each point, the motion attribute sequence of the ship trajectory points is obtained. Each trajectory contains different trajectory points, and the calculated trajectory point feature sequence is also different. Considering that the ship trajectory classification model requires the input sequence to have the same length, it is necessary to set the trajectory segmentation sliding window length to Len according to the overall length distribution of the trajectory, and segment the long trajectory.

[0111] The ship trajectory data txt file name is used as the ship trajectory identifier, and Len trajectory points are used as the ship trajectory cutting threshold to extract the ship trajectory segments with motion state and Len continuous trajectory points.

[0112] The motion attribute features of the ship trajectory segments are extracted to provide continuous and reliable data for subsequent models to classify ship trajectories.

[0113] Step three, ship trajectory classification model. In view of the problems that the single classification model (decision tree, RNN, CNN) in the existing ship trajectory classification model has low accuracy and the hybrid prediction model (CNN-LSTM) has a long running time, the present invention combines the advantages of CNN model in capturing the spatial relationship of ship trajectories and GRU in capturing the temporal dependencies in ship trajectory data, and constructs a ship trajectory sub-classification model method based on the combined neural network of CNN and GRU. The model mainly includes two parts, CNN and GRU. The CNN part consists of an input layer, a convolutional layer and a maximum pooling layer, which extracts spatial and local features from the time series motion attribute sequence. The output of the CNN network is used as the input of the GRU network. The GRU part consists of a GRU recurrent layer, a fully connected layer and an output layer, which captures the temporal dependencies and sequence patterns of the data. Finally, the output layer outputs the classification label of the predicted ship trajectory.

[0114] Set and adjust the hyperparameters such as learning rate, loss function, eopch, batch_size, etc. in the CNN-GRU combined neural network model parameters.

[0115] The processed ship trajectory segment data were used for training and testing ship trajectories in a ratio of 8:2. The overall accuracy of ship trajectory classification and the accuracy of each category were obtained through 5-fold cross validation.

[0116] The ship trajectory classification includes 14 categories, including “0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “10”, “11”, “12” and “13”.

[0117] To facilitate illustrating the effectiveness and feasibility of the method of the present invention, the present invention provides the following application examples.

[0118] This application example uses the data of Subject 2 (Intelligent Classification and Identification of Sea and Air Target Tracks) of the Second Navy "Golden Dolphin" Cup Algorithm Challenge as source data to perform ship track classification prediction. The specific process is as follows:

[0119] The overall data situation and data format are shown in Table 1 (data related to intelligent classification of sea and air target tracks) and Table 2 (illustrative diagram of AIS data information of ship No. 829559 (partial)) respectively (due to data confidentiality reasons, the number in the data file is not specified as MMSI).

[0120] Table 1

[0121]

[0122] Table 2

[0123]

[0124]

[0125] Data preprocessing and analysis. According to the ship trajectory interpolation method proposed above, the ship trajectory data of No. 829559 in the "0" category under the classification label is visually compared before and after interpolation. The results are as follows: Figure 4 and Figure 5 As shown in the figure, according to the visual comparison, the interpolation method can better complete the missing trajectory points based on the existing trajectory points.

[0126] The Kalman rate filter is used to optimize the ship trajectory for denoising. The trajectory before and after processing is visualized and compared. The results are as follows: Figure 6 and Figure 7 As shown in the figure, Kalman filtering effectively improves the stability of the ship's trajectory points.

[0127] In order to scale the range of input data to a reasonable range for better training and optimization of the ship trajectory classification model, it is necessary to standardize the input data. The mathematical expression of standardization is (19).

[0128] x i =(x j -mean(x)) / std(x)(19)

[0129] In the formula, x i is the standardized result; x j is the input feature value, mean(x) is the mean of all data of this data feature, and std(x) is the standard deviation of all data of this data feature.

[0130] The existing sub-classification labels of the second Golden Dolphin Cup subject 2 data are used as the labels of the ship trajectories after cutting.

[0131] The ship trajectory classification method based on the combined neural network of CNN and GRU is proposed. According to the overall ship trajectory length distribution, there are fewer trajectories with less than 100 trajectory points. The trajectory segmentation sliding window size Len is set to 100 trajectory points, and the long trajectory is segmented to make the sequence length the same. The five features of longitude and latitude, speed, acceleration, heading and heading rate of each trajectory point are calculated.

[0132] In the training and prediction part of the CNN-GRU model, the trajectory data segmented by the sliding window is divided into a training set and a test set in a ratio of 8:2.

[0133] First, the trajectory motion attribute sequence and the classification label corresponding to the trajectory are input into the model for training, and the loss function sparse_categorical_crossentropy (cross entropy loss function) is used to evaluate the model training results.

[0134] Adjust hyperparameters such as epoch, batch size, activation function, etc. according to the training results.

[0135] Finally, the trajectory category is predicted for the motion attribute sequence of the test set trajectory, and the predicted category and the real category are calculated to obtain the prediction accuracy of the model. The overall classification accuracy of the CNN-GRU model is about 89.17%.

[0136] In order to verify the effectiveness and superiority of the proposed ship trajectory classification method, the processed ship trajectory data is also classified using the classic LSTM model, GRU model and RNN model, with accuracy rates of 85.02%, 77.02% and 53.27% respectively. The classification accuracy of each category is as follows: Figure 8 As shown. Figure 8 It can be seen that the classification accuracy of CNN-GRU and LSTM in each category is similar, while the classification accuracy of GRU and RNN models is low, and even the classification accuracy of RNN in category "4" and category "10" is 0. In terms of running time, by introducing the ship trajectory classification model constructed by the convolutional neural network layer combined with the GRU layer, the training and testing time of the CNN-GRU model is reduced by 44.12% compared with the LSTM ship trajectory classification model on the basis of ensuring accuracy, which significantly improves the training speed of the model, further verifying that the model proposed in this paper can complete the training and prediction of the model in a shorter time under the condition that the accuracy of trajectory classification in each category is high and stable.

[0137] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A ship trajectory classification method based on CNN-GRU combined neural network, characterized in that: include: Step 1: Obtain the source data of ship trajectory, and perform corresponding cleaning and preprocessing on the source data of ship trajectory, including: Eliminate the ship trajectories with serious missing ship trajectory points and the trajectory points that do not meet the requirements; Determine the time stamp spacing of ship tracks; Perform sliding window trajectory information processing on the ship trajectory; Interpolate missing information of ship trajectories; De-noising of trajectory outliers; Step 2: Calculate the motion attribute sequence of the ship trajectory using the pre-processed ship trajectory data and obtain the ship trajectory data segment by standardization processing; Step 3: construct and train a combined neural network model based on CNN-GRU using the ship trajectory data segment; Step 4: Use the trained combined neural network model to obtain the classification of ship trajectories.

2. A ship trajectory classification method based on CNN-GRU combined neural network according to claim 1, characterized in that: The sliding window trajectory information processing of the ship trajectory includes: If there are many values ​​in the sliding window, the feature data of the trajectory points in the sliding window are averaged as the sliding window value; If there is no data in the sliding window, the relevant attribute value of the trajectory point represented by the sliding window is empty.

3. A ship trajectory classification method based on CNN-GRU combined neural network according to claim 1, characterized in that: The interpolation processing of the missing information of the ship track includes: establishing interpolation functions according to the existing data on both sides of the missing value, and interpolating and completing the intermediate missing values; if multiple missing values ​​appear, the interpolation weight is calculated according to the time difference from the missing value to the existing track points on both sides of the missing data.

4. The ship trajectory classification method based on the CNN-GRU combined neural network according to claim 1 is characterized in that: The denoising of the trajectory outliers includes: using a Kalman filter to eliminate the noise of the ship trajectory.

5. The ship trajectory classification method based on CNN-GRU combined neural network according to claim 1 is characterized in that: The combined neural network model is constructed and trained by using the ship trajectory data segment, wherein the model structure includes: The CNN part, which consists of input layer, convolution layer and max pooling layer, extracts spatial and local features from the time series motion attribute sequence; Use the output of the CNN network as the input of the GRU network; The GRU part consists of a GRU recurrent layer, a fully connected layer, and an output layer; The GRU part captures the temporal dependencies and sequential patterns of the data and outputs the classification label of the predicted ship trajectory.

6. A ship trajectory classification method based on CNN-GRU combined neural network according to claim 5, characterized in that: Train a combined neural network model, including: Input the trajectory motion attribute sequence and the classification label corresponding to the trajectory to start model training; Use the cross entropy loss function to evaluate the model training results; Adjust model parameters based on training results; The motion attribute sequence of the test set trajectory is used to predict the trajectory category, and the overall accuracy of ship trajectory classification and the accuracy of each category are obtained through 5-fold cross validation.

7. The ship trajectory classification method based on CNN-GRU combined neural network according to claim 1 is characterized in that: The classification of the ship tracks has 14 categories.

Citation Information

Patent Citations

  • Ship target classification method based on AIS data

    CN115063676A

  • CNN and LSTM neural network combined ship trajectory classification method and system

    CN115512152A

  • Offshore ship trajectory real-time prediction method, system and equipment based on CNN-GRU and attention mechanism and medium

    CN116306790A