Method and device for predicting ship trajectory data

By using a neural network model with multi-time scale feature learning in ship trajectory prediction, the features and time dependencies of different time scales are extracted and learned, and the problem of failure to analyze ship trajectory data from a multi-time scale perspective in the prior art is solved, and higher prediction accuracy and generalization ability are achieved.

CN119598116APending Publication Date: 2025-03-11709TH RESEARCH INSTITUTE CHINA STATE SHIPBUILDING CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411563071.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The existing ship trajectory prediction methods fail to analyze ship trajectory data from multiple time scales, resulting in insufficient prediction performance.

Method used

A neural network model with multi-time scale feature learning is adopted to extract features of different time scales through convolutional neural networks, and a time dependency is learned using long and short-term memory networks to finally predict the ship trajectory.

Benefits of technology

It improves the accuracy and generalization ability of ship trajectory prediction, effectively solving problems not involved in multi-time scale analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119598116A_ABST
    Figure CN119598116A_ABST
Patent Text Reader

Abstract

The invention relates to the field of trajectory prediction, in particular to a ship trajectory data prediction method and device. The method mainly comprises the following steps: performing data cleaning on original data, and segmenting the cleaned data into time sequences by using a specified time window; using the trajectory prediction model to extract a time dependency relationship of at least one time scale in the time sequence, and using the trajectory prediction model to obtain a preliminary prediction value of the ship trajectory according to the time dependency relationship; training a trajectory prediction model according to the preliminary prediction value, evaluating the trained trajectory prediction model to determine a model with the best prediction performance, and predicting ship trajectory data according to the model with the best prediction performance. According to the method, the generalization ability of AIS ship trajectory data prediction can be effectively improved, and the accuracy of ship trajectory prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of trajectory prediction, and in particular to a method and device for predicting ship trajectory data. Background Art

[0002] The trajectory of a ship can describe the state of the ship and can also be used for navigation, collision avoidance and maritime supervision, thereby improving the safety of ship navigation. In the existing ship management system, the Automatic Identification System (AIS) data is used to provide information such as the position, speed, heading, and navigation status of ships sailing at sea. By using AIS data and deep learning prediction models, the spatiotemporal position of the ship in the future can be predicted in advance, and the risks that the ship may encounter can be avoided in advance, thus avoiding the risks that the ship may face, such as deviation, collision, and grounding.

[0003] In recent years, more and more methods and models have been applied to ship trajectory prediction. In current research, the commonly used methods or models include: traditional statistical models, machine learning methods, neural networks and deep learning methods. Among them, neural networks and deep learning methods have achieved many important research results, but most of these studies only consider the characteristics of ship trajectory data at one time scale; a few studies consider multiple characteristics of ship trajectory data, but not from a time perspective. Therefore, there is currently no research on analyzing ship trajectory data from a multi-time scale perspective.

[0004] In view of this, how to overcome the defects of the existing technology and solve the problem that the current ship trajectory prediction method does not involve multi-time scale analysis is a problem to be solved in this technical field. Summary of the invention

[0005] In view of the above defects or improvement needs of the prior art, the present invention solves the problem that the current ship trajectory prediction method does not involve multi-time scale analysis.

[0006] The embodiment of the present invention adopts the following technical solution:

[0007] In a first aspect, the present invention provides a method for predicting ship trajectory data, specifically: performing data cleaning on raw data, and using a specified time window to segment the cleaned data into a time series; using a trajectory prediction model to extract a time dependency of at least one time scale in the time series, and using the trajectory prediction model to obtain a preliminary prediction value of the ship's trajectory based on the time dependency; training the trajectory prediction model based on the preliminary prediction value, and evaluating the trained trajectory prediction model to determine a model with the best prediction performance, and predicting the ship's trajectory data based on the model with the best prediction performance.

[0008] Preferably, the data cleaning of the raw data specifically includes: recording the unique ship identifier and time feature of each data as key, and recording other features except the time feature as value, forming a corresponding<key,value> key-value pairs, and determine whether the value in each key-value pair meets the threshold range, and delete the key-value pairs whose value does not meet the threshold range; sort the retained key-value pairs according to the key value, and add the key values ​​with the same key value to the same partition; input the key-value pairs in each partition to the same thread, use at least two threads to search for key-value pairs with repeated values ​​in the corresponding partitions in parallel, and delete the key-value pairs with repeated values.

[0009] Preferably, the use of the trajectory prediction model to extract the time dependency of at least one time scale in the time series specifically includes: using convolutional neural network layers of different time scales to extract features of the time series, each convolutional neural network layer extracts a feature map of one time scale; converting the feature map of each time scale into a feature sequence of the corresponding time scale in chronological order, and using at least one long short-term memory network to learn the time dependency in the feature sequence.

[0010] Preferably, the method uses convolutional neural network layers of different time scales to perform feature extraction on the time series, and each convolutional neural network layer extracts a feature map of a time scale, specifically including: setting corresponding parameters for each convolutional neural network layer according to the time scale to be calculated by each convolutional neural network layer; using each convolutional neural network layer to extract each feature of the corresponding time scale in the time series, and combining all the features extracted by each convolutional neural network layer into a feature map of the time scale.

[0011] Preferably, the calculation process of the time scale is described as follows:

[0012]

[0013] Among them, l k is the receptive field of the kth convolutional neural network layer, l k-1 is the receptive field of the k-1th convolutional neural network layer. For the convolutional layer in the kth convolutional neural network layer, f k is the size of the convolution kernel; for the pooling layer in the kth convolutional neural network layer, f k is the pooling size. S i is the step size corresponding to convolution or pooling.

[0014] Preferably, when the feature map extracted by the convolution kernel is a two-dimensional feature map, the process of converting the feature map of each time scale into a feature sequence of the corresponding time scale in chronological order specifically includes: obtaining all features extracted by each convolution kernel in the corresponding convolutional neural network layer, and arranging the features extracted by each convolution kernel in chronological order; organizing the features at the same time point in all convolution kernels into a feature vector of the time point, and arranging the feature vectors of all time points in chronological order as a feature sequence of the feature map.

[0015] Preferably, the method of obtaining a preliminary prediction value of the ship's trajectory using a trajectory prediction model based on the time dependency specifically includes: concatenating the time dependency learned by each long short-term memory network into a combined feature, abstracting the combined feature through a fully connected layer, and outputting a preliminary prediction value of the ship's trajectory.

[0016] Preferably, the trajectory prediction model is trained according to the preliminary prediction value, and the trained trajectory prediction model is evaluated to determine the model with the best prediction performance, specifically including: adjusting the parameters of the trajectory prediction model by using the gradient descent method, and training at least one trajectory prediction model by using the grid search method on the validation set; calculating the mean absolute error of the prediction results of each trajectory prediction model, and taking the trajectory prediction model with the smallest mean absolute error as the model with the best prediction performance.

[0017] In a second aspect, the present invention provides a device for predicting ship trajectory data, specifically comprising: at least one processor and a memory, wherein the at least one processor and the memory are connected via a data bus, and the memory stores instructions that can be executed by the at least one processor, and after the instructions are executed by the processor, they are used to complete the method for predicting ship trajectory data in the first aspect.

[0018] In a third aspect, the present invention further provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors to complete the method provided by the method described in the first aspect.

[0019] In a fourth aspect, a chip is provided, comprising: a processor and an interface, for calling and running a computer program stored in the memory from a memory, and executing the method provided in the first aspect.

[0020] According to a fifth aspect, a computer program product comprising instructions is provided. When the instructions are executed on a computer or a processor, the computer or the processor executes the method provided in the first aspect.

[0021] Compared with the prior art, the beneficial effects of the present invention are: a neural network model based on multi-time scale feature learning is proposed, which can extract features of multiple time scales from the original data obtained from AIS, and learn the time dependency of multiple time scale features. On the other hand, in the preferred embodiment of the present invention, a parallel AIS data cleaning method is proposed, thereby forming a complete data cleaning process for various types of abnormal data appearing in AIS, and improving the data cleaning accuracy and efficiency. The method provided by the present invention can effectively improve the generalization ability of AIS ship trajectory data prediction and improve the accuracy of ship trajectory prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 A flow chart of a method for predicting ship trajectory data provided by an embodiment of the present invention;

[0024] Figure 2 A flow chart of another method for predicting ship trajectory data provided by an embodiment of the present invention;

[0025] Figure 3 A schematic diagram of the data cleaning process in the method provided in an embodiment of the present invention;

[0026] Figure 4 A schematic diagram of a neural network structure used in the method provided in an embodiment of the present invention;

[0027] Figure 5 A flow chart of another method for predicting ship trajectory data provided by an embodiment of the present invention;

[0028] Figure 6 A schematic diagram of a process for acquiring a feature sequence in a method provided in an embodiment of the present invention;

[0029] Figure 7 A schematic diagram of a feature acquisition process at different scales in a method provided in an embodiment of the present invention;

[0030] Figure 8 A flow chart of another method for predicting ship trajectory data provided by an embodiment of the present invention;

[0031] Fig. 9 A flow chart of another method for predicting ship trajectory data provided by an embodiment of the present invention;

[0032] Fig.10A schematic diagram of the structure of a device for predicting ship trajectory data provided by an embodiment of the present invention;

[0033] The reference numerals are as follows:

[0034] 11: processor; 12: memory. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0036] The present invention is an architecture of a specific functional system, so the specific embodiments mainly illustrate the functional logical relationship between the various structural modules, and do not limit the specific software and hardware implementation methods.

[0037] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other. The present invention will be described in detail below with reference to the accompanying drawings and embodiments.

[0038] Embodiment 1:

[0039] In the method provided in this embodiment, a trajectory prediction model for multi-time scale feature learning is established, AIS is used to obtain raw data, and time dependency learning is performed on the time series in the raw data, and trajectory prediction is performed based on the learned time dependency features.

[0040] like Figure 1 As shown, the specific steps of the method for predicting ship trajectory data provided by the embodiment of the present invention are as follows:

[0041] Step 101: Clean the original data and segment the cleaned data into time series using a specified time window.

[0042] In order to achieve multi-time scale prediction, the raw data obtained by AIS must first be cleaned and the cleaned raw data set converted into a sample data set with time information. t-H+1 ,…,x t ] is a time series obtained by segmenting a sliding time window of length H, where: t is the ship position at time t, and the sample label is the predicted value of the ship position at the future Kth time Its corresponding true value is x t+K In actual implementation, the ship positions in the sample can be represented by longitude and latitude, or other multi-dimensional data that can represent the ship positions or other attributes of the ship can be used as needed.

[0043] In actual implementation, in order to train and evaluate the trajectory prediction model, the sample data set can be divided into a training set, a validation set, and a test set in chronological order, which are used for the training, selection, and performance evaluation of the trajectory prediction model, respectively. In general scenarios, the ratio of the number of samples in the training set, validation set, and test set is 6:2:2.

[0044] Step 102: extracting a time dependency of at least one time scale in the time series using a trajectory prediction model, and obtaining a preliminary prediction result of the ship trajectory using the trajectory prediction model according to the time dependency.

[0045] After obtaining samples in the form of time series, a neural network based on multi-time scale feature learning is constructed as a trajectory prediction model, and the trajectory prediction model is applied to the training set. The features in the time series are extracted through the neural network, and the temporal dependencies in the features are learned. In actual implementation, convolutional neural networks (CNN) can be used to extract multi-time scale features in the time series, and the temporal dependencies in the multi-time scale features can be learned through long short-term memory networks (LSTM).

[0046] After the trajectory prediction model learns the time dependency of features at different time scales, it can obtain the preliminary prediction results of the ship trajectory based on the time dependency.

[0047] Step 103: Train the trajectory prediction model according to the preliminary prediction results, evaluate the trained trajectory prediction model to determine the model with the best prediction performance, and predict the ship trajectory data according to the model with the best prediction performance.

[0048] In order to obtain more accurate prediction results, it is also necessary to train the trajectory prediction model based on the preliminary prediction results, and optimize the parameters of the trajectory prediction model through training to obtain a trajectory prediction model with better performance.

[0049] After training, multiple trajectory prediction models can be obtained, and each trajectory training model will obtain different prediction results for the same set of samples. Therefore, it is also necessary to use methods such as Mean Absolute Error (MAE) or Root Mean Square Error (RMSE) to evaluate the performance of the trajectory prediction model based on multi-time scale feature learning, select the trajectory prediction model with the best performance using the validation set data, and use the trajectory prediction model with the best performance as the final trajectory prediction model to actually predict the ship trajectory data.

[0050] Furthermore, in the process of using the selected trajectory prediction model for actual prediction, the trajectory prediction model can be further trained and evaluated based on the raw data and prediction results newly obtained from the AIS to further optimize and select the trajectory prediction model.

[0051] After steps 101 to 103 provided in this embodiment, the ship trajectory prediction including multi-time scale features can be completed.

[0052] In practical applications, there are a large number of abnormal data in the raw data directly obtained from AIS, which greatly reduces the prediction performance of the commonly used ship trajectory prediction method. By using various data cleaning techniques, erroneous records can be effectively identified and corrected, thereby improving the quality of data mining. However, the traditional traversal-based abnormal data search method is highly complex. At present, there is a lack of research on ship data cleaning, and the problem solved is single. Especially for the cleaning of massive AIS data, it is a big challenge. In this embodiment, the massive data is sorted and partitioned, and then the data cleaning is performed in parallel to improve the quality and efficiency of data cleaning. .

[0053] In a real scenario, the features used in the prediction of the raw data collected by AIS include: collection time, Maritime Mobile Service Identity (MMSI), longitude (Lon), latitude (Lat), speed over ground (SOG), course over ground (COG), and heading. In this scenario, for the ship position x at time t, t , the corresponding feature can be expressed as D t ={Time, MMSI, Lon, Lat, SOG, COG, Heading}. In this embodiment, this group of features is used to illustrate the data processing and prediction process. In actual implementation, the required feature combination can be selected according to actual prediction needs.

[0054] like Figure 2 As shown, the original data can be cleaned based on MapReduce in the following ways.

[0055] Step 201: Record the unique ship identifier and time feature of each data as key, and other features except time feature as value, to form the corresponding<key,value> Key-value pairs, and determine whether the value in each key-value pair meets the threshold range, and delete the key-value pairs whose value does not meet the threshold range.

[0056] In this embodiment, MMSI is used as the unique identifier of the ship, and the time feature is expressed in the form of "year-month-day". The original data is divided according to MMSI and time sequence, and it is determined whether the features in the data exceed the threshold interval, so as to clean the abnormal data. In the specific implementation, the Map function can be executed on the data in the sample set, and MMSI and "year-month-day" are selected as keys, and the corresponding other features are recorded as values ​​to ensure that when Map reads data, it is divided into blocks in the form of the same ship on the same day, so as to improve the accuracy of data cleaning.

[0057] In actual implementation, the raw data in each block can be read, and it can be determined whether the speed, heading, longitude and latitude and other characteristics in each data exceed the specified threshold interval. If the threshold interval is exceeded, the data is deleted, thereby completing the preliminary cleaning of the data and outputting the preliminary cleaned data. In this embodiment, the maximum value of the speed threshold interval is selected as 16 knots, the maximum value of the heading threshold interval is selected as 360°, and the longitude and latitude threshold interval is the longitude and latitude interval of the ocean range of the collected data.

[0058] Step 202: Sort the retained key-value pairs according to the key value, and add key values ​​with the same key value to the same partition.

[0059] In order to facilitate parallel processing, it is also necessary to sort, repartition and transfer the key-value pair data generated in step 201. In a specific implementation, the key-value pairs can be sorted and partitioned according to the key value to ensure that the values ​​with the same key value are assigned to the same thread for processing, that is, the data of the same ship on the same day will be arranged in time sequence and assigned to the same thread for processing to avoid conflicts between data of different ships or different time periods.

[0060] Step 203: input the key-value pairs in each partition to the same thread, use at least two threads to search for key-value pairs with duplicate values ​​in the corresponding partition in parallel, and delete the key-value pairs with duplicate values.

[0061] After the partitioning is completed, the key-value pairs in each partition will be sent to the corresponding data cleaning thread as input, and multi-threaded parallel execution will improve the performance of the entire data cleaning operation. Parallel processing can be used to quickly find dynamic duplicate data to complete data cleaning for the same ship in the same time period. Multiple threads can perform parallel cleaning on different ships in different time periods, thereby further improving the cleaning of massive AIS raw data.

[0062] After steps 201 to 203 provided in this embodiment, rapid cleaning of the original data can be completed to obtain high-quality data.

[0063] In a specific implementation, the original data can be imported into a database, and the database's massive data processing mechanism can be used to parallelize the data cleaning. Figure 3 As shown in the figure, data cleaning is performed using a MapReduce-based data processing framework.

[0064] In actual implementation, due to factors such as inconsistent transmission frequency of ship trajectory data, the time interval of received data is not uniform in most cases. Therefore, it is necessary to repair the cleaned data through interpolation. At the same time, in order to facilitate the use of neural networks for data processing, the repaired data also needs to be normalized to convert each feature in the data into a floating point number in a specified time unit. In specific implementation, appropriate interpolation methods and normalization methods can be selected according to actual needs. For example, the cubic spline interpolation method is used to fit the cleaned data to complete data repair; the softmax function is used to normalize the repaired data, and the heading, longitude, and latitude are converted into floating point numbers in seconds.

[0065] In this embodiment, the specific structure of the trajectory prediction model can be constructed according to actual needs, and it only needs to be able to complete the corresponding functions described in this embodiment. Figure 4 Taking the neural network prediction model based on multi-time scale feature learning as an example, the specific data processing process of the trajectory prediction model is explained. The trajectory prediction model includes: a multi-time scale feature learning module, a time dependency learning module, and a feature fusion and output module.

[0066] The multi-time scale feature learning module contains two convolutional neural network layers ( Figure 4 Each convolutional neural network layer has convolution, activation and pooling operations. Figure 4 There are 10 convolution kernels in the conv1 layer of the second convolutional neural network layer ( Figure 4 The conv2 in conv2 has 20 convolution kernels, the stride of both convolution layers is 1, and the convolution operation uses the SAME mode, which can keep the size of the feature map output by each convolution layer consistent during the forward propagation process. Both pooling layers use the maximum pooling ( Figure 4 MaxPooling in ), size is 2, step size is 2. The activation function is LeakyReLU, ( Figure 4 not marked in the figure).

[0067] The temporal dependency learning module consists of three LSTMs ( Figure 4In LSTM1, LSTM2 and LSTM3), the number of neural nodes in each LSTM is 10.

[0068] The feature fusion and output module consists of two fully connected layers. The number of neuron nodes in the first layer is 10, and the number of neuron nodes in the second layer is 1. The activation function is the sigmoid function ( Figure 4 not marked in the figure).

[0069] After the above neural network model is built, the cleaned data is input into the multi-time scale feature learning module, and the features of multiple time scales in the time series can be learned through CNN. The output of each convolutional neural network layer is called a feature map. Figure 5 As shown, the trajectory prediction model can be used to extract the time dependency of at least one time scale in the time series in the following way.

[0070] Step 301: Use convolutional neural network layers of different time scales to extract features of the time series, and each convolutional neural network layer extracts a feature map of a time scale.

[0071] The multi-time-scale feature learning module uses CNN to learn the features of multiple time scales in the time series. In this embodiment, the time series [x t-H+1 ,…,x t ] is regarded as the feature map F1 with the smallest time scale, which is used to reflect the regularity of the time series with the day as the time scale. On the other hand, different convolutional neural network layers in the multi-time scale feature learning module have different time scales on the input sequence, and the outputs of the two convolutional neural network layers are regarded as feature maps F with the month and year as the time scale respectively. v and feature map F3.

[0072] Step 302: Train the trajectory prediction model based on the preliminary prediction value, using at least one long short-term memory network to learn the time dependency in the feature sequence.

[0073] After obtaining the feature graph of each time scale, the time dependency learning module is used to convert the feature graph into a feature sequence arranged in chronological order at each time scale, and the time dependency in the converted feature sequences of different time scales is learned. Figure 4 In FIG, the time dependencies learned according to the feature graph F1, the feature graph F2, and the feature graph F3 are respectively the time dependency D1, the time dependency D2, and the time dependency D3.

[0074] In the specific implementation, when CNN is used for feature extraction, the feature maps F2 and F3 obtained are two-dimensional feature maps. Each row in the two-dimensional feature map is a feature extracted by a convolution kernel, and each column is a set of features at the same time point. In order to facilitate the processing of the extracted features according to time, each feature map needs to be converted into a corresponding feature sequence. Figure 6 As shown, all features extracted by each convolution kernel in the corresponding convolutional neural network layer are obtained, and the features extracted by each convolution kernel are arranged in chronological order. The features at the same time point in all convolution kernels are organized into a feature vector at that time point, and the feature vectors at all time points are arranged in chronological order as a feature sequence of the feature graph.

[0075] After step 301 and step 302 provided in this embodiment, the trajectory prediction network can learn the time dependency between features in different time scales.

[0076] In step 301, if Figure 7 As shown in the figure, the feature map of the output of each convolutional neural network layer is composed of a set of feature points. Each feature point is an abstraction of the features of an area in the input data. As a description of the overall map features of the area, this area is called the receptive field. In actual implementation, the receptive field can be used to represent the time scale of the convolutional neural network. The receptive field of the output of each layer on the same input is different, thus obtaining feature maps of different time scales.

[0077] like Figure 8 As shown in the figure, the time series can be feature extracted using convolutional neural networks of different time scales in the following way, where each convolutional neural network extracts a feature map of a time scale.

[0078] Step 401: According to the time scale that each convolutional neural network layer needs to calculate, corresponding parameters are set for each convolutional neural network layer.

[0079] In specific implementation, the receptive field of each layer can be calculated using formula (1):

[0080]

[0081] Among them, l k is the receptive field of the kth convolutional neural network layer, l k-1 is the receptive field of the k-1th convolutional neural network layer. For the convolutional layer in the kth convolutional neural network layer, f k is the size of the convolution kernel; for the pooling layer in the kth convolutional neural network layer, f k is the pooling size. S i is the step size corresponding to convolution or pooling.

[0082] From the above formula, we can see that the size of the receptive field is determined by the number of layers, convolution kernel size, pooling size and step size. The larger the values ​​of these parameters, the larger the receptive field. Figure 7 In the neural network structure, the convolution kernel size is 3, the convolution step is 1, the pooling size is 2, and the step is 2. At this time, the first convolutional neural network layer ( Figure 7 The receptive field of CNN1 in the figure is 4, that is, a point on the feature map F2 describes the input on a time scale of 4 days; the second convolutional neural network layer ( Figure 7 The receptive field of CNN2) is 10, that is, a point on the feature map F3 describes the input on a time scale of 10 days.

[0083] Step 402: Use each convolutional neural network layer to extract each feature of the corresponding time scale in the time series, and combine all the features extracted by each convolutional neural network layer into a feature map of the time scale.

[0084] After adjusting the parameters, the time series is input into the multi-time scale feature learning module, and the feature points of different time scales required for prediction can be obtained through multiple convolution kernels in each convolutional neural network layer. The extracted features are organized according to the two dimensions of convolution kernel and time feature to obtain the feature map of the corresponding time scale.

[0085] After step 401 and step 402 provided in this embodiment, the feature graphs of different time scales required in step 301 can be obtained.

[0086] After learning the time dependency in step 302, the time dependency in different time scale features is input into the feature fusion and output module to obtain the preliminary prediction result of trajectory prediction. In the specific implementation, since the feature fusion and output module is composed of a fully connected layer, in order to meet the requirements of the fully connected layer for the input value, the time dependency learned by each long short-term memory network needs to be connected in series into a combined feature. Figure 4 In the above example, the time dependency D1 and time dependency D learned by the three LSTM are v and the time dependency D3 are concatenated to form a combined feature.

[0087] After obtaining the combined features, the combined features are abstracted through the fully connected layer (i.e., Fully Connected), and the preliminary prediction value of the ship trajectory is output. The combined features are abstracted through the fully connected layer in the feature fusion and output module, and the final prediction result is output. The prediction formula is as follows:

[0088]

[0089] in, It is the prediction result output by the feature fusion and output module. D1, D2 and D3 are the time dependencies learned by the three LSTMs respectively.

[0090] After obtaining the preliminary prediction results, the trajectory prediction model can be trained and evaluated based on the preliminary prediction results to obtain the trajectory prediction model used in the end.

[0091] like Fig. 9 As shown, the trajectory prediction model can be trained according to the preliminary prediction results and the trained trajectory prediction model can be evaluated in the following manner.

[0092] Step 501: Use the gradient descent method to adjust the parameters of the trajectory prediction model, and use the grid search method to train at least one trajectory prediction model on the validation set.

[0093] The training process of the model is as follows: traverse all the data in the training set and use the gradient descent method to update the model parameters. Then, use the grid search method to find parameters on the validation set to select the prediction model with better prediction performance.

[0094] Step 502: Calculate the mean absolute error of the prediction results of each trajectory prediction model, and take the trajectory prediction model with the smallest mean absolute error as the model with the best prediction performance.

[0095] The data of the validation set is input into the trajectory prediction model trained on the training set, and the prediction results are compared with the data in the validation set to evaluate the prediction performance of the trajectory prediction model. In this embodiment, the mean absolute error is used as the performance evaluation indicator to ensure that the obtained model can effectively solve the multi-time scale problem in ship trajectory prediction and has good generalization performance.

[0096] After step 501 to step 502 provided in this embodiment, the training and evaluation of the trajectory prediction model can be completed.

[0097] The method for predicting ship trajectory data provided in this embodiment has the following beneficial effects:

[0098] (1) A neural network prediction model based on multi-time scale feature learning was constructed to extract features of multiple time scales in the data and learn the temporal dependencies in the features, thereby solving the multi-time scale feature problem in AIS data and improving the prediction accuracy of the model. This is of great significance to the research on AIS data prediction and is a direction worthy of research.

[0099] (2) Aiming at the problem of low efficiency in cleaning massive AIS data, a parallel AIS data cleaning model based on MapReduce is proposed. Abnormal data is cleaned in the Map phase, and duplicate data is cleaned in the Reduce phase, thus forming a complete data cleaning process and improving the accuracy and efficiency of data cleaning.

[0100] Embodiment 2:

[0101] Based on the method for predicting ship trajectory data provided in the above embodiment 1, the present invention also provides a device for predicting ship trajectory data that can be used to implement the above method, such as Fig.10 , which is a schematic diagram of the device architecture of an embodiment of the present invention. The device for predicting ship trajectory data in this embodiment includes one or more processors 11 and a memory 12. Fig.10 A processor 11 is taken as an example.

[0102] The processor 11 and the memory 12 may be connected via a bus or other means. Fig.10 The example of connecting through bus is taken in the following.

[0103] The memory 12 is a non-volatile computer-readable storage medium for a method for predicting ship trajectory data, and can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the method for predicting ship trajectory data in Example 1. The processor 11 executes various functional applications and data processing of the device for predicting ship trajectory data by running the non-volatile software programs, instructions and modules stored in the memory 12, that is, the method for predicting ship trajectory data in Example 1 is implemented.

[0104] The memory 12 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 12 may optionally include a memory remotely arranged relative to the processor 11, and these remote memories may be connected to the processor 11 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0105] The program instructions / modules are stored in the memory 12, and when executed by one or more processors 11, the method for predicting ship trajectory data in the above embodiment 1 is executed, for example, the above described Figure 1 , Figure 1 , Figure 3 , Figure 5 , Figure 8 and Fig. 9 The steps shown.

[0106] An embodiment of the present invention further provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors, such as Fig.10 A processor 11 in the embodiment may enable the one or more processors to execute the method for predicting ship trajectory data in embodiment 1, for example, executing the above described Figure 1 , Figure 3 The steps shown can also be implemented Figure 2 , Figure 4 The various modules and units described.

[0107] It is worth noting that the information interaction, execution process, etc. between the modules and units within the above-mentioned devices and systems are based on the same concept as the processing method embodiment of the present invention. The specific contents can be found in the description of the method embodiment of the present invention and will not be repeated here.

[0108] A person skilled in the art may understand that all or part of the steps in the various methods of the embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0109] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for predicting ship trajectory data, characterized in that: include: Perform data cleaning on the original data and split the cleaned data into time series using the specified time window; A trajectory prediction model is used to extract a time dependency of at least one time scale in the time series, and a preliminary prediction value of the ship trajectory is obtained using the trajectory prediction model according to the time dependency; The trajectory prediction model is trained according to the preliminary prediction value, and the trained trajectory prediction model is evaluated to determine the model with the best prediction performance, and the ship trajectory data is predicted according to the model with the best prediction performance.

2. The method for predicting ship trajectory data according to claim 1, characterized in that: The data cleaning of the original data specifically includes: The unique ship identifier and time feature of each data are recorded as key, and other features except time feature are recorded as value, forming the corresponding<key,value> Key-value pairs, and determine whether the value in each key-value pair meets the threshold range, and delete the key-value pairs whose value does not meet the threshold range; Sort the retained key-value pairs by key value, and add key values ​​with the same key value to the same partition; Input the key-value pairs in each partition to the same thread, use at least two threads to search for key-value pairs with duplicate values ​​in the corresponding partition in parallel, and delete the key-value pairs with duplicate values.

3. The method for predicting ship trajectory data according to claim 1, characterized in that: The step of extracting the time dependency of at least one time scale in the time series using the trajectory prediction model specifically includes: Use convolutional neural network layers of different time scales to extract features from time series, and each convolutional neural network layer extracts a feature map of a time scale; The feature maps of each time scale are converted into feature sequences of the corresponding time scale in chronological order, and the temporal dependencies in the feature sequences are learned through at least one long short-term memory network.

4. The method for predicting ship trajectory data according to claim 3, characterized in that: The convolutional neural network layers of different time scales are used to extract features from the time series, and each convolutional neural network layer extracts a feature map of a time scale, specifically including: According to the time scale that each convolutional neural network layer needs to calculate, set corresponding parameters for each convolutional neural network layer; Each convolutional neural network layer is used to extract each feature of the corresponding time scale in the time series, and all the features extracted by each convolutional neural network layer are combined into a feature map of the time scale.

5. The method for predicting ship trajectory data according to claim 4, characterized in that: The time scale is described as follows: Among them, l k is the receptive field of the kth convolutional neural network layer, l k-1 is the receptive field of the k-1th convolutional neural network layer. For the convolutional layer in the kth convolutional neural network layer, f k is the size of the convolution kernel; for the pooling layer in the kth convolutional neural network layer, f k is the pooling size. S i is the step size corresponding to convolution or pooling.

6. The method for predicting ship trajectory data according to claim 4, characterized in that: When the feature map extracted by the convolution kernel is a two-dimensional feature map, converting the feature map of each time scale into a feature sequence of the corresponding time scale in chronological order specifically includes: Obtain all features extracted by each convolution kernel in the corresponding convolutional neural network layer, and arrange the features extracted by each convolution kernel in chronological order; The features of all convolution kernels at the same time point are organized into the feature vector of that time point, and the feature vectors of all time points are arranged in chronological order as the feature sequence of the feature map.

7. The method for predicting ship trajectory data according to claim 1, characterized in that: The method of obtaining a preliminary prediction value of the ship's trajectory using a trajectory prediction model according to the time dependency relationship specifically includes: The temporal dependencies learned by each LSTM network are concatenated into a combined feature, which is abstracted through a fully connected layer and output as a preliminary prediction value of the ship’s trajectory.

8. The method for predicting ship trajectory data according to claim 1, characterized in that: The step of training the trajectory prediction model according to the preliminary prediction value and evaluating the trained trajectory prediction model to determine the model with the best prediction performance specifically includes: The parameters of the trajectory prediction model are adjusted using the gradient descent method, and at least one trajectory prediction model is trained using the grid search method on the validation set; The mean absolute error of the prediction results of each trajectory prediction model is calculated, and the trajectory prediction model with the smallest mean absolute error is taken as the model with the best prediction performance.

9. A device for predicting ship trajectory data, characterized in that: The method comprises at least one processor and a memory, wherein the at least one processor and the memory are connected via a data bus, and the memory stores instructions executable by the at least one processor, and after the instructions are executed by the processor, they are used to complete the method for predicting ship trajectory data according to any one of claims 1 to 8.

10. A non-volatile computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, which are executed by one or more processors to complete the method for predicting ship trajectory data as described in any one of claims 1-8.