Track prediction method and system based on global geographic information coding PlusCode and Transformer

By combining the global geographic information coding PlusCode and Transformer models, dynamically adjusting the coding accuracy and adopting multi-modal fusion algorithms, the data processing and real-time problems of track prediction in the existing technology are solved, and efficient track prediction is achieved on a global scale.

CN118585961BActive Publication Date: 2024-10-11NANJING HAOLIN TECH CO LTD

Patent Information

Application Number
CN202411063035.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-10-11
Estimated Expiration
2044-08-05

Smart Images

  • Figure CN118585961B_ABST
    Figure CN118585961B_ABST
Patent Text Reader

Abstract

The present invention discloses a track prediction method and system based on global geographic information coding PlusCode and Transformer, the method comprising obtaining original AIS data, constructing an original AIS data set, preprocessing the original AIS data set to form a training data set; sequentially optimizing by dynamically adjusting the coding accuracy and multi-dimensional data enhancement method to obtain an optimized data set; constructing and training a Transformer model; using the trained Transformer model to obtain a track prediction result; based on the track prediction result, optimizing by using a multimodal fusion algorithm and an adaptive anomaly detection algorithm to obtain an optimized track prediction result. The present invention not only realizes the effective processing of large-scale track data, but also optimizes the data set, improves the data quality, and enhances the prediction performance, real-time performance and stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of large track prediction models, in particular to a track prediction method and system based on global geographic information coding PlusCode and Transformer. Background Art

[0002] In recent years, with the rapid development of machine learning and artificial intelligence technologies, data-driven track prediction methods have gradually attracted attention. These methods use large-scale track data and advanced machine learning algorithms to learn the movement laws and track patterns of ships from the data to achieve more accurate and practical predictions. In data-driven track prediction, commonly used techniques include deep learning, reinforcement learning, and spatiotemporal series prediction. Deep learning models such as recurrent neural networks (RNNs) and long short-term memory networks (LSTMs) are widely used to learn the trajectory patterns and dynamic changes of ships. In recent years, LSTM networks have been gradually replaced by Transformer networks because of their low training efficiency and easy forgetting. The existing Transformer network needs to agree on the range of longitude and latitude before the longitude and latitude coordinates can be normalized, that is, the obtained network can only be used for this area and is not effective in other areas.

[0003] In addition to technical challenges, the field of track prediction also faces challenges in data quality and real-time performance. How to effectively process large-scale track data and combine it with real-time navigation status information is one of the key issues in the development of track prediction technology. Summary of the invention

[0004] The purpose of the invention is to provide a track prediction method and system based on global geographic information coding PlusCode and Transformer to solve the above-mentioned problems existing in the prior art.

[0005] The technical solution is a track prediction method based on the global geographic information coding PlusCode and Transformer, including the following steps:

[0006] S1. Obtain original AIS data, construct an original AIS data set, and preprocess the original AIS data set to form a training data set; wherein the original AIS data includes latitude and longitude coordinates, ground speed, ground heading, timestamp, maritime mobile service identification code and ship type;

[0007] S2. Based on the training data set, a method of dynamically adjusting the encoding accuracy is used for optimization to obtain an optimized data set;

[0008] S3. Based on the optimized data set, a Transformer model is constructed and trained to obtain a trained Transformer model; the track prediction result is obtained using the trained Transformer model;

[0009] S4. Based on the track prediction results, multimodal fusion algorithm and adaptive anomaly detection algorithm are used for optimization to obtain the optimized track prediction results.

[0010] Track prediction system based on global geographic information coding PlusCode and Transformer, including:

[0011] at least one processor; and,

[0012] a memory communicatively connected to at least one of the processors; wherein,

[0013] The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the track prediction method based on global geographic information coding PlusCode and Transformer as described in any of the above technical solutions.

[0014] Beneficial effects: The present invention combines the global geocoding PlusCode with the Transformer model, which not only increases the efficiency of model training, but also allows the network to be used in any region of the world, no longer limited by the latitude and longitude range, and can better capture the spatial and temporal characteristics of large-scale track data, thereby improving prediction performance. At the same time, it also optimizes the data set, improves data quality, and improves the real-time and stability of the prediction by dynamically adjusting the coding accuracy, multi-dimensional data enhancement, and adaptive learning rate scheduling strategies. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flow chart of the present invention.

[0016] Figure 2 This is a flow chart of step S1 of the present invention.

[0017] Figure 3 This is a flow chart of step S2 of the present invention.

[0018] Figure 4 This is a flow chart of step S3 of the present invention.

[0019] Figure 5 This is a flow chart of step S4 of the present invention.

[0020] Figure 6 The figure is a flowchart of a program according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] like Figure 1 As shown, the present application proposes a track prediction method based on global geographic information coding PlusCode and Transformer, comprising the following steps:

[0022] S1. Obtain original AIS data, construct an original AIS data set, and preprocess the original AIS data set to form a training data set; wherein the original AIS data includes latitude and longitude coordinates, ground speed, ground heading, timestamp, maritime mobile service identification code and ship type;

[0023] S2. Based on the training data set, a method of dynamically adjusting the encoding accuracy is used for optimization to obtain an optimized data set;

[0024] S3. Based on the optimized data set, a Transformer model is constructed and trained to obtain a trained Transformer model; the track prediction result is obtained using the trained Transformer model;

[0025] S4. Based on the track prediction results, multimodal fusion algorithm and adaptive anomaly detection algorithm are used for optimization to obtain the optimized track prediction results.

[0026] This embodiment ensures the quality and consistency of the data by obtaining the original AIS data and performing preprocessing. AIS data includes multi-dimensional information such as latitude and longitude coordinates, ground speed, ground heading, timestamp, etc. These data can better reflect the actual navigation status of the ship after dynamically adjusting the coding accuracy and optimizing the multi-dimensional data enhancement method, and improve the representativeness and accuracy of the data. By adopting the method of dynamically adjusting the coding accuracy, the coding accuracy of PlusCode can be flexibly adjusted according to different geographical locations and navigation environments, which can reduce data redundancy and improve data processing efficiency while ensuring data accuracy. The Transformer model has advantages in processing sequence data and can capture the spatiotemporal dependencies in the navigation trajectory of the ship. By training the optimized data set, the obtained Transformer model can accurately predict the future track of the ship. Based on the track prediction results, the multimodal fusion algorithm and the adaptive anomaly detection algorithm are used for further optimization, which can comprehensively consider multiple factors and improve the reliability and accuracy of the prediction results. The multimodal fusion algorithm can combine information from different data sources, and the adaptive anomaly detection algorithm can identify and process abnormal data to ensure the stability of the prediction results.

[0027] This embodiment combines the PlusCode and Transformer models and utilizes methods such as dynamic adjustment of coding accuracy, multimodal fusion, and adaptive anomaly detection to improve the accuracy and reliability of track prediction, providing strong support for ship navigation and maritime traffic management.

[0028] like Figure 2 As shown, according to one aspect of the present application, step S1 is further:

[0029] S11, obtaining original AIS data and constructing an original AIS data set; calculating the earliest timestamp and the latest timestamp in the original AIS data set, and constructing a time window length based on the earliest timestamp and the latest timestamp; based on the time window length, performing time filtering on the original AIS data set to obtain a time-filtered data set;

[0030] S12, performing cluster analysis on the longitude and latitude coordinates in the data set after time screening to obtain a data set after geographical range screening;

[0031] S13, performing stratified ship type screening on the data set after geographical scope screening to obtain a data set after ship type screening;

[0032] S14, performing adaptive cross-validation set division on the data set after the ship type screening to obtain a training data set and a test data set;

[0033] S15, performing multi-dimensional abnormal data detection and processing on the training data set and the test data set to obtain cleaned training data set and test data set;

[0034] S16. Apply adaptive multi-scale downsampling to the cleaned training data set and test data set to generate the final training data set and test data set.

[0035] According to one aspect of the present application, step S12 is further:

[0036] S121, clustering the longitude and latitude coordinates in the time-filtered data set using an improved density clustering algorithm to obtain a clustering result;

[0037] S122, based on the clustering results, calculating the center point coordinates and data point density of each cluster; based on the center point coordinates and data point density, using the silhouette coefficient to evaluate the effects of different numbers of clusters to obtain an evaluation effect;

[0038] S123, based on the evaluation results, determining the optimal number of clusters; based on the optimal number of clusters, selecting a predetermined number of cluster centers from the clustering results;

[0039] S124, constructing a minimum bounding rectangle based on the cluster center, and using a spatial indexing technique to filter data points that fall within the minimum bounding rectangle to obtain filtered data points;

[0040] S125. Expand the boundaries of the filtered data points to obtain a data set after geographical scope filtering.

[0041] According to one aspect of the present application, step S13 is further:

[0042] S131. Based on the data set filtered by the geographical range, construct a ship type feature vector, including a ship size feature vector, a speed range feature vector, and a navigation mode feature vector;

[0043] S132, constructing a hierarchical clustering dendrogram based on the ship type feature vector, calculating a clustering stability index of each cutting point in the hierarchical clustering dendrogram, and determining an optimal number of clustering levels based on the clustering stability index;

[0044] S133, based on the optimal number of clustering levels, calculating the data distribution characteristics of each level, and constructing a multi-objective optimization function based on the data distribution characteristics;

[0045] S134, solving the multi-objective optimization function using a genetic algorithm to obtain an optimal ship type hierarchy;

[0046] S135. Based on the optimal ship type hierarchy, anomaly detection algorithm and data balancing technology are used for screening to obtain a data set after ship type screening.

[0047] In a specific embodiment, the original AIS data is obtained, an original AIS data set is constructed, and expected data is screened from the original AIS data according to the time range, geographical range and ship type to obtain a screened AIS data set; the screened AIS data set is divided to obtain a training set and a test set, abnormal data is deleted from the training set to obtain a cleaned training set; the cleaned training set is downsampled and long track segmented to obtain a final training data set. Specifically:

[0048] The original AIS data is obtained, including latitude and longitude coordinates, ground speed, ground heading, timestamp, maritime mobile service identification code and ship type; the earliest timestamp and the latest timestamp in the original AIS data set are calculated, and the time window length is constructed. The sliding window method is used to slide on the time axis with a predetermined step size to generate a predetermined number of overlapping time windows. For the data in each time window, the information entropy is calculated, and the time window with the largest information entropy is selected as the final data screening range to obtain the data set after time screening.

[0049] The longitude and latitude coordinates in the time-filtered dataset are clustered to obtain the dataset after geographical scope filtering. Specifically, the improved DBSCAN (density clustering) algorithm is used to cluster the longitude and latitude coordinates, in which: the spherical distance metric is used instead of the Euclidean distance to adapt to the curvature of the earth's surface; the adaptive neighborhood radius is introduced to dynamically adjust the clustering parameters according to the local data density. The coordinates of the center point and the density of data points of each cluster are calculated. According to the size of the dataset, the optimal number of clusters m is dynamically determined. The specific method is: the silhouette coefficient is used to evaluate the effect of different numbers of clusters; the best m value is selected in combination with the size of the dataset and the limitation of computing resources. The m cluster centers with the highest density are selected; the minimum circumscribed rectangle is constructed with the selected m cluster centers as the core as the geographical filtering range: the convex hull algorithm is used to determine the outer boundary of the m cluster centers; the minimum rectangle containing all boundary points is calculated as the geographical filtering range. Apply spatial indexing technology (such as R-tree) to quickly filter data points that fall within the geographic filtering range; expand the boundaries of the filtered data points: calculate the density gradient of data points near the boundary of the filtering range; based on the density gradient, adaptively adjust the boundary of the filtering range to include potential important transition areas, and finally obtain a dataset after the geographic range is filtered.

[0050] The dataset after geographical scope screening is subjected to hierarchical ship type screening, including: clustering ship types using an improved hierarchical clustering algorithm: constructing a ship type feature vector containing multi-dimensional features such as ship size, speed range, and navigation mode; using an adaptive distance metric to dynamically adjust the distance calculation according to the importance of different features. Determining the optimal clustering level k by the dynamic cutting dendrogram method: calculating the clustering stability index of each cutting point; combining domain knowledge to select the level k that ensures both class distinction and not over-subdivision. Calculating data distribution characteristics for each clustering level: using information entropy to measure the data uniformity within each level; calculating the overlap between each level and known cargo ship and cruise ship types. Constructing a multi-objective optimization function, taking into account both data distribution uniformity and target ship type coverage; using a genetic algorithm to solve the optimization function and select the optimal ship type level; further screening the data in the selected level: applying anomaly detection algorithms to eliminate possible misclassified data; using data balancing techniques to ensure that the number of samples of different ship types is relatively balanced; finally, obtaining a dataset after ship type screening.

[0051] Adaptive cross-validation set partitioning is implemented for the data set after ship type screening, including: time series analysis of data: using fast Fourier transform (FFT) to detect the periodicity of data; applying the differential integrated moving average autoregressive model (ARIMA) model to analyze the trend and seasonality of data. Based on the analysis results, the optimal cross-validation fold k is dynamically determined: considering the period length of the data, ensuring that each fold of data contains a complete period; weighing the stability of model performance evaluation and computing resource consumption. Constructing an improved time series k-fold cross-validation method: maintaining the time order to avoid data leakage; introducing an overlapping window mechanism to enhance the model's learning ability for continuous time periods. Implementing an adaptive sampling strategy: using a larger time window for data sparse periods; using a smaller time window for data intensive periods. Applying stratified sampling technology to ensure the distribution consistency of different ship types in each fold of data, performing data partitioning to obtain training sets and test sets: using k-1 folds of data as training sets; the remaining 1 fold as test sets, where k is a natural number greater than 1; implementing a cyclic cross-validation mechanism to ensure that each piece of data has the opportunity to be used as a test set.

[0052] Perform multi-dimensional abnormal data detection and processing on the training set, including: Construct a multi-dimensional anomaly detection framework: integrate multiple anomaly detection algorithms such as isolation forest, local anomaly factor (LOF) and one-class support vector machine (One-Class SVM); use ensemble learning methods to synthesize the detection results of multiple algorithms. Realize feature space transformation: apply principal component analysis (PCA) to reduce dimension and highlight key features; use kernel function mapping to enhance the expression of nonlinear features. Construct a dynamic threshold determination mechanism: adaptively adjust the anomaly judgment threshold based on data distribution characteristics; introduce fuzzy logic to make soft judgments on boundary conditions. Perform local context analysis: for each potential anomaly point, analyze the data characteristics in its spatiotemporal neighborhood; use conditional random field model to consider the correlation between points. Apply domain knowledge constraints: combine the physical characteristics of the ship and navigation rules to filter unreasonable anomaly judgments; use expert system to make rule-based judgments on complex situations. Implement abnormal data processing: for the determined anomaly points, decide to delete or modify them according to their impact; use local regression or interpolation technology to smooth the modified points. Perform data consistency checks to ensure that the processed data meets domain constraints, update the processed training set, and obtain the cleaned training set.

[0053] Adaptive multi-scale downsampling is applied to the cleaned training set, including: Perform multi-scale analysis: Apply discrete wavelet transform (DWT) to perform multi-scale decomposition on each track; Calculate wavelet coefficients at different scales to capture the multi-scale characteristics of the track. Identify key change points: Use the improved cumulative sum (CUSUM) algorithm to detect changes in wavelet coefficients; Combine track curvature and speed changes to comprehensively determine key change points. Construct an adaptive sampling interval decision model: Construct a sampling strategy based on reinforcement learning and model the sampling process as a Markov decision process; Construct a reward function to balance data compression rate and information retention; Use a deep Q-learning algorithm to optimize sampling decisions. Implement dynamic sampling: Use a smaller sampling interval in areas with drastic changes; Use a larger sampling interval in stable areas; Ensure that the sampling points contain all identified key change points. Perform local feature preserving interpolation: Apply a weighted average of adaptive weights to each sampling interval; Use spline interpolation technology to ensure smooth transitions between sampling points. Implement multi-objective sampling optimization: Construct an objective function that takes into account data reduction, information retention, and computational complexity; Apply a genetic algorithm to solve the optimal sampling plan. Perform sampling quality assessment: calculate the Fréchet distance between the original track and the downsampled track; analyze the degree to which downsampling preserves track features (such as turning points and speed changes). Based on the evaluation results, dynamically adjust the sampling parameters and repeat the above steps until the preset quality standards are met to generate the final multi-scale downsampled training set.

[0054] Implement dynamic track segmentation and reorganization for the training set after multi-scale downsampling, including: Applying the improved dynamic time warping (DTW) algorithm: Constructing a multi-feature DTW distance metric, taking into account factors such as position, speed and direction; Using the fast DTW algorithm to improve computational efficiency. Constructing a self-similarity matrix: Calculating the DTW distance between each pair of sampling points in the track; Applying the Gaussian kernel function to map the distance to a similarity metric. Performing multi-scale spectral clustering: Constructing a multi-level Laplacian matrix; Calculating and analyzing the eigenvectors to identify clustering structures at different scales. Identifying key turning points: Analyzing the spectral clustering results and locating the clustering boundaries; Filtering and confirming effective turning points in combination with navigation domain knowledge. Performing adaptive track segmentation: Based on the identified turning points, the track is divided into multiple sub-segments; Ensure that the duration of each sub-segment does not exceed the preset maximum value (such as 20 hours). Extracting sub-track segment features: Calculating statistical features, such as speed distribution, direction change, etc.; Extracting geometric features, such as curvature, turning angle, etc.; Analyzing timing patterns, such as acceleration changes, navigation mode conversion, etc. Apply a hierarchical clustering algorithm to cluster the sub-track segments: construct an adaptive distance metric to dynamically adjust the weights of different features; use Ward's method to minimize the intra-class variance. Implement intelligent track reconstruction: based on the clustering results, identify sub-track segments with similar behavior patterns; construct a reconstruction scoring function that takes into account spatiotemporal continuity and behavioral consistency; use a dynamic programming algorithm to solve the optimal reconstruction solution. Perform boundary smoothing: apply spline interpolation at the connection of the reorganized track segments; ensure the continuity of the speed and direction of the track at the connection point. Implement reconstruction quality assessment: calculate the similarity of the tracks before and after reconstruction; analyze the physical feasibility and navigation rationality of the reorganized track. According to the evaluation results, make local adjustments if necessary and repeat the above steps; generate the final processed training data set to ensure that the duration of each reorganized track does not exceed the preset maximum value.

[0055] In another embodiment, the original AIS data set a is downloaded from the official website of the Danish Maritime Authority (DMA), which contains latitude and longitude coordinates b, ground speed c, ground heading d, timestamp e, maritime mobile service identification code f and ship type g.

[0056] Perform dynamic time window filtering: calculate the earliest timestamp e in data set a min and the latest timestamp e max ; Define the time window length L as e max With e min 80% of the difference; use the sliding window algorithm to slide on the time axis with a step size of L / 10 to generate multiple overlapping time windows; calculate the information entropy H for the data in each time window; select the time window with the largest information entropy H as the final data screening range to obtain the data set h after time screening.

[0057] Perform cluster analysis on the longitude and latitude coordinates b in the data set h to obtain n cluster centers; calculate the density of data points around each cluster center; select the m cluster centers with the highest density, where m is dynamically determined by the size of the data set; construct a minimum circumscribed rectangle with the selected m cluster centers as the core as the geographic screening range; filter the data points that fall within the range to obtain the data set i after the geographic range screening.

[0058] Perform hierarchical clustering on the ship type g in the data set i; divide the ship types into k levels according to the clustering results; calculate the data distribution characteristics of each level; select the level with the most uniform data distribution and covering cargo ships and cruise ships; filter the data corresponding to this level to obtain the data set j after the ship type is filtered.

[0059] Sort the dataset j in chronological order; calculate the time series characteristics of the data, such as periodicity and trend; dynamically determine the optimal cross-validation fold k based on the characteristics; apply the improved time series k-fold cross-validation method to divide the dataset j into a training set l and a test set k, ensuring that each fold contains a complete time period.

[0060] The isolation forest algorithm is applied to the training set l to detect anomalies in the multidimensional space; based on the domain knowledge, a dynamic threshold τ is set to mark the data points with anomaly exceeding τ as potential anomalies; local linear regression analysis is performed on the potential anomalies to evaluate their impact on the overall trend; based on the degree of impact, it is decided to delete or correct the abnormal data points; the corrected data points are smoothed to ensure consistency with the surrounding data; the processed training set is updated to obtain the cleaned training set m.

[0061] Perform wavelet transform on each track in the cleaned training set m; analyze wavelet coefficients to identify key change points in the track; dynamically adjust the sampling interval according to the distribution of key change points; use a smaller sampling interval in areas with drastic changes and a larger sampling interval in stable areas; apply weighted averaging to the data points in each sampling interval to generate new representative points; reconstruct the downsampled track to obtain the multi-scale downsampled training set q.

[0062] A dynamic time warping (DTW) algorithm is applied to each track in the downsampled training set q; the self-similarity matrix of the track is calculated based on the DTW distance; the self-similarity matrix is ​​analyzed using the spectral clustering method to identify the key turning points in the track; the track is segmented at the key turning points; features are extracted from the segmented sub-track segments, including but not limited to speed distribution, direction change and navigation mode; based on the extracted features, the sub-track segments are clustered using a hierarchical clustering algorithm; based on the clustering results, similar sub-track segments are recombined to generate new tracks with consistent behavior patterns; it is ensured that the duration of each reorganized track does not exceed 20 hours; the processed data is updated to obtain the final processed training data set r.

[0063] This embodiment obtains the original AIS data and constructs the original data set, calculates the earliest and latest timestamps, and performs time screening based on the length of the time window, thereby ensuring the time consistency and integrity of the data and facilitating the accuracy of subsequent analysis. Through time screening, irrelevant or noise data can be effectively removed to improve the quality of the data set. The longitude and latitude coordinates of the time-screened data set are clustered to obtain a data set after geographical scope screening. By adopting an improved density clustering algorithm, the hotspot areas of ship activities can be more accurately identified. By calculating the center point coordinates and data point density of each cluster, and using the silhouette coefficient to evaluate the effect of different numbers of clusters, the optimal number of clusters can be determined, thereby improving the accuracy and stability of the clustering results. Constructing the minimum circumscribed rectangle based on the cluster center and using spatial indexing technology to screen data points can effectively reduce the amount of data and improve computing efficiency. The comprehensiveness of geographical scope screening is further ensured by boundary extension.

[0064] By constructing the ship type feature vector, including the ship size, speed range and navigation mode feature vector, the characteristics of the ship can be described more comprehensively. Based on these feature vectors, a hierarchical clustering dendrogram is constructed, and the clustering stability index of each cutting point is calculated to determine the optimal number of clustering levels, thereby improving the accuracy of ship type classification. The optimal ship type hierarchy can be obtained by solving the multi-objective optimization function using a genetic algorithm, further improving the classification effect. By screening through anomaly detection algorithms and data balancing techniques, abnormal data can be removed, the data set can be balanced, and the robustness and generalization ability of the model can be improved. The adaptive cross-validation set partitioning is implemented on the data set after the ship type screening to obtain the training data set and the test data set, which ensures the reasonable allocation of model training and test data, and helps to evaluate and optimize the model performance. Through multi-dimensional anomaly detection, outliers in the data can be identified and processed to improve the quality of the data set and the accuracy of the model. Multi-scale downsampling can effectively reduce the amount of data and improve computational efficiency, while retaining the key features of the data and ensuring the training effect of the model.

[0065] This embodiment constructs high-quality training and test data sets through a series of data preprocessing, cluster analysis, screening and optimization steps, providing a solid foundation for the training and testing of the ship trajectory prediction model. Through improved density clustering algorithms, hierarchical clustering dendrograms, genetic algorithms, multidimensional anomaly detection and multi-scale downsampling, the accuracy, stability and efficiency of data processing are ensured, which helps to improve the accuracy and robustness of the ship trajectory prediction model.

[0066] like Figure 3 As shown, according to one aspect of the present application, step S2 is further:

[0067] S21, based on the training data set, perform dynamic precision PlusCode encoding to generate an initial PlusCode encoding sequence for each track point;

[0068] S22, based on the initial PlusCode coding sequence, calculating the information entropy and redundancy of the local coding, dynamically adjusting the coding length of each track point based on the information entropy and redundancy, and generating an optimized PlusCode coding sequence;

[0069] S23, constructing an adaptive PlusCode character mapping dictionary based on the optimized PlusCode encoding sequence, and using the adaptive PlusCode character mapping dictionary to convert the optimized PlusCode encoding sequence into an integer sequence;

[0070] S24. Based on the integer sequence, an optimized data set is formed.

[0071] According to one aspect of the present application, step S2 further includes:

[0072] S25. Based on the optimized data set, the sequence length distribution and the spatiotemporal correlation are calculated; based on the sequence length distribution and the spatiotemporal correlation, a tensor shape parameter search space is constructed;

[0073] S26, based on the optimized data set and tensor shape parameter search space, using a Bayesian optimization method to obtain tensor shape parameters;

[0074] S27. Based on the tensor shape parameters, the optimized data set is converted into a four-dimensional tensor representation.

[0075] According to another aspect of the present application, step S2 further includes:

[0076] S28. Based on each integer identifier in the four-dimensional tensor representation, calculate its occurrence frequency in the current batch to obtain a frequency distribution;

[0077] S29, constructing a coding space, and dynamically adjusting the coding space of each integer identifier using a logarithmic scaling function based on the frequency distribution to obtain a dynamically adjusted coding space;

[0078] S210, constructing a variable-length coding scheme based on the dynamically adjusted coding space; assigning a one-hot vector to each integer identifier based on the variable-length coding scheme, and constructing an adaptive one-hot coding space;

[0079] S211. Based on an adaptive one-hot encoding space, convert the four-dimensional tensor representation into a five-dimensional tensor representation.

[0080] In a specific embodiment, the dynamic precision PlusCode encoding is performed specifically as follows: analyzing the distribution characteristics of the longitude and latitude coordinates in the training data set: calculating the statistical moments of the coordinates, including the mean, variance, skewness, and kurtosis; using the kernel density estimation (KDE) method to generate a probability density function of the coordinate distribution. Constructing an adaptive precision decision model: constructing a precision level set, including PlusCode codes of different lengths (such as 8 bits, 10 bits, 11 bits, etc.); constructing a precision mapping function based on data density to map the coordinate density to the appropriate precision level. Perform dynamic precision encoding on each track point: obtain the longitude and latitude coordinates of the track point; calculate the data density at the coordinates. Use the precision mapping function to determine the appropriate PlusCode precision level; call the PlusCode library to generate PlusCode codes of the specified precision to obtain the initial PlusCode code sequence.

[0081] PlusCode is a global geographic location code that is no longer limited to a fixed latitude and longitude range and has a wide range of applicability. PlusCode's coding efficiency is also far higher than that of longitude and latitude numbers. It no longer distinguishes longitude and latitude as two fields. PlusCode divides the world into fixed-size squares, each with its own unique code, and there is a connection between adjacent square codes, making it easier for the model to learn the coding relationship. Secondly, the 10-bit PlusCode code specifies a 3.5m square. To achieve the same accuracy, longitude and latitude need to occupy 17 bits of characters, which is much less efficient than PlusCode.

[0082] Construct a sliding window size n, usually an odd number to ensure that the current point is at the center; analyze the PlusCode code of each track point and the codes of the n points before and after it: extract the common prefix of each code; calculate the conditional entropy of the code sequence. Construct an entropy threshold dynamic adjustment mechanism: initialize the global entropy threshold; update the threshold using the exponential moving average method based on the local entropy value distribution. Perform code length optimization: if the local entropy value is lower than the threshold, try to shorten the code length; if the local entropy value is higher than the threshold, consider increasing the code length. Apply differential coding technology: calculate the difference between adjacent codes; only store the difference information, reduce redundancy, and generate an optimized PlusCode code sequence.

[0083] Count the frequency of occurrence of each character in the optimized PlusCode encoding sequence; build a Huffman tree: create a node set containing characters and their frequencies; iteratively merge the nodes with the lowest frequency until a complete Huffman tree is formed. Generate Huffman codes: traverse the Huffman tree and assign binary codes to each character; ensure that the codes satisfy the prefix property to avoid ambiguity. Build a character-to-integer mapping dictionary: convert the Huffman code to an integer representation; establish a bidirectional mapping from character to integer. Apply the mapping dictionary to convert the PlusCode encoding sequence to an integer sequence.

[0084] Construct sliding window parameters, including window size and step size; apply sliding window technique to integer sequence to generate overlapping subsequences: traverse the integer sequence to move the window with the specified step size; extract the subsequences within each window. Perform data augmentation operations on each subsequence: apply random rotation transformation to simulate different headings; perform random translation to simulate changes in starting position; implement random scaling to simulate changes in speed. Add controlled noise: generate random noise that conforms to Gaussian distribution; add noise to subsequences to simulate environmental interference; perform physical constraint checks to ensure that the augmented data conforms to actual navigation rules; generate augmented datasets.

[0085] Analyze the statistical characteristics of the augmented dataset: calculate the sequence length distribution; analyze the spatiotemporal correlation of the data. Construct the tensor shape parameter search space: construct the possible batch size range; determine the candidate value of the sequence length; set the possible options for the encoding length. Implement the shape optimization algorithm based on reinforcement learning: construct the state space, including the current tensor shape and data characteristics; construct the action space, including the adjustment operation of the shape parameters; construct the reward function to balance data utilization and computational efficiency. Train the reinforcement learning agent: use the deep Q network (DQN) to learn the optimal shape selection strategy; improve learning efficiency through experience replay; apply the learned strategy to dynamically determine the optimal tensor shape; reshape the data into a four-dimensional tensor representation based on the determined shape parameters.

[0086] For each integer identifier in the four-dimensional tensor, calculate its frequency of occurrence in the current batch; build a dynamic encoding space size determination mechanism: set the basic encoding space size (such as 20); use the logarithmic scale function to dynamically adjust the encoding space of each identifier based on the frequency distribution. Implement variable-length coding technology: use shorter codes for high-frequency identifiers; use longer codes for low-frequency identifiers; build an adaptive one-hot encoding space: assign a dynamically sized one-hot vector to each identifier; ensure that the sum of the encoding space remains consistent. Convert the four-dimensional tensor to a five-dimensional tensor using an adaptive encoding space: traverse each element in the four-dimensional tensor; replace each integer identifier with its corresponding adaptive one-hot encoding; generate the final five-dimensional tensor representation.

[0087] In another embodiment, when dynamic precision PlusCode encoding is performed, the distribution characteristics of the longitude and latitude coordinates in the training data set r are analyzed; based on the distribution characteristics, the PlusCode encoding accuracy is dynamically adjusted, and higher precision encoding is used in data-intensive areas; the adjusted PlusCode encoding algorithm is applied to the longitude and latitude coordinates of each track point to obtain an initial PlusCode code w.

[0088] Analyze the PlusCode code w of each track point and the codes of the n points before and after it; calculate the information entropy and redundancy of the local code; dynamically adjust the code length of each point according to the information entropy and redundancy to reduce redundancy while maintaining accuracy; generate the optimized PlusCode code sequence x.

[0089] Analyze the occurrence frequency of characters in the optimized PlusCode encoding sequence x; use the Huffman coding principle to build a frequency-based adaptive character-to-integer mapping dictionary y; apply the mapping dictionary y to convert the PlusCode encoding sequence x into an integer sequence aa.

[0090] Apply sliding window technology to the integer sequence aa to generate multiple overlapping subsequences; perform random rotation, translation and scaling operations on each subsequence to simulate different navigation conditions; add controlled noise to simulate interference factors in the actual environment; generate the enhanced dataset ab.

[0091] Analyze the statistical characteristics of the enhanced data set ab; use the reinforcement learning algorithm to dynamically determine the optimal tensor shape parameters; and reshape the data into a four-dimensional tensor ac based on the learned parameters.

[0092] For each integer identifier in the four-dimensional tensor ac, calculate its frequency of occurrence in the current batch; dynamically adjust the encoding space size of each identifier according to the frequency; use variable-length coding technology to generate an adaptive one-hot encoding space ad; convert the four-dimensional tensor ac into a five-dimensional tensor ae using an adaptive encoding space.

[0093] In another embodiment, based on the optimized data set and tensor shape parameter search space, the Bayesian optimization method is used to obtain the tensor shape parameters. Specifically, the key features are extracted from the optimized data set to form a feature matrix; a grid search or random search method is used to generate an initial set of tensor shape parameters; Bayesian optimization is performed: a proxy model is constructed, and a Gaussian Process Regression model is used as a proxy model to model the objective function; a suitable acquisition function (such as an expected improvement function Expected Improvement, which is used to evaluate the pros and cons of each parameter combination; randomly select several parameter combinations in the search space, calculate their objective function values, and update the proxy model; use the proxy model to predict the objective function value and its uncertainty of each parameter combination in the search space; select the next sampling point (parameter combination) according to the acquisition function, calculate its objective function value, and update the proxy model; repeat the above steps until the stopping condition is met (such as the number of iterations, time limit or convergence of the objective function value); in the Bayesian optimization process, record the optimal parameter combination of each iteration, and finally select the parameter combination with the best objective function value as the optimal tensor shape parameter; use the optimal tensor shape parameter to transform the optimized data set to generate a four-dimensional tensor representation, and verify its performance.

[0094] In another embodiment, when predicting each future track position, it is necessary to sample the code value of each bit of the pluscode. According to the characteristics of the pluscode itself, the position offset corresponding to the code at the front position is larger, and the position offset corresponding to the code at the back position is smaller. In addition, the model is more accurate when predicting a large interval, and the accuracy fluctuates greatly when predicting a small interval. Therefore, a greedy search is used for the code at the front position to ensure that a large range of position offsets will not be caused, and polynomial sampling is used for the code at the back position to increase the diversity of sampling.

[0095] Track data can also be enhanced by three methods: time warping, spatial perturbation, and angle perturbation. Time warping is to generate new time series by scaling, stretching, or compressing the time interval on the time axis. Different scaling factors can simulate different movement speeds and durations; spatial perturbation is to simulate the noise of GPS signals by randomly perturbing the track position information, such as adding small random offsets to longitude and latitude; angle perturbation is to add random noise to the heading angle to simulate different navigation angles. Data enhancement can increase the diversity and quantity of original data through various methods, thereby improving the performance and generalization ability of the model.

[0096] By dynamically adjusting the code length, the present embodiment can adjust the accuracy of the code according to specific needs, thereby providing a more accurate position representation in different application scenarios. Dynamic precision coding allows the same coding method to be used under different accuracy requirements, increasing the scope of application of the coding. By calculating information entropy and redundancy, redundant information can be identified and reduced, thereby optimizing the code length and improving the coding efficiency. Dynamic adjustment of the code length helps to compress the amount of data and reduce the overhead of storage and transmission. The adaptive character mapping dictionary can dynamically adjust the mapping relationship according to the actual data distribution, improve the efficiency and accuracy of the code conversion, convert the character code into an integer sequence, and simplify the subsequent data processing steps. By random transformation and noise addition, a diverse data set is generated, which helps to improve the generalization ability of the model. Data enhancement technology can simulate different actual situations and improve the robustness and adaptability of the model in different environments. By analyzing the sequence length distribution and spatiotemporal correlation, the input parameters of the model can be optimized and the training effect of the model can be improved. The search space is constructed based on actual data to improve the efficiency and accuracy of parameter search. The optimal parameters can be automatically searched through the reinforcement learning model, reducing the workload of manual parameter adjustment, and the performance and accuracy of the model can be improved through the selection of the optimal parameters. Dynamically adjusting the coding space and variable-length coding scheme can optimize the coding according to the data distribution and improve the coding efficiency. By converting the four-dimensional tensor into a five-dimensional tensor, the data representation capability is enhanced to adapt to more complex application scenarios.

[0097] This embodiment improves the accuracy, efficiency and applicability of PlusCode encoding. By dynamically adjusting the encoding length, building an adaptive mapping dictionary, data enhancement, and strengthening learning model training, it achieves efficient data processing and representation, and has broad application prospects.

[0098] like Figure 4 As shown, according to one aspect of the present application, step S3 is further:

[0099] S31. Based on the optimized data set, build a basic Transformer architecture, use the neural architecture search algorithm to dynamically optimize the number of layers, number of heads, and hidden layer size in the Transformer architecture, and obtain the optimized Transformer architecture.

[0100] S32. Add a multi-scale feature extraction module to each layer of the optimized Transformer architecture to obtain a Transformer model with a multi-scale feature fusion mechanism;

[0101] S33. In the Transformer model with multi-scale feature fusion mechanism, a temporal attention module and a spatial attention module are constructed to obtain a Transformer model with a spatiotemporal attention mechanism.

[0102] S34. Based on the optimized data set, an adaptive learning rate scheduling strategy is adopted to dynamically adjust the learning rate of each parameter in the Transformer model with spatiotemporal attention mechanism to obtain a Transformer model with optimized learning rate.

[0103] S35. Based on the optimized data set, a progressive training strategy is adopted to train the Transformer model after the optimized learning rate to obtain a trained Transformer model; based on the test data set, the trained Transformer model is tested to obtain a tested Transformer model;

[0104] S36. Input the optimized data set into the tested Transformer model to obtain the track prediction result.

[0105] In a specific embodiment, a dynamic adaptive Transformer architecture is constructed, specifically: initialize the neural architecture search (NAS) space, construct the range of Transformer layers, such as [4, 16]; set the candidate set of attention heads, such as {4, 8, 16, 32}; determine the hidden layer size options, such as {512, 1024, 2048, 4096}. Implement a search algorithm based on Efficient Neural Architecture Search (ENAS), construct a controller recurrent neural network (RNN) for generating an architecture description; construct a reward function, taking into account model performance and computational complexity. Perform architecture search, iteratively generate candidate architectures; quickly evaluate each candidate architecture on a small-scale data set; update controller parameters, optimize search strategies, select the optimal architecture, and determine the final Transformer structure parameters.

[0106] A multi-scale feature extraction module is added after each Transformer layer to construct convolution kernels of different sizes, such as 1x1, 3x3, and 5x5. For each convolution kernel size, the corresponding 2D convolution operation is applied. The importance weight of each scale feature is calculated using the self-attention mechanism. Based on the calculated weights, multi-scale features are weightedly fused. Residual connections are applied to add the fused features to the original features to obtain a Transformer model with a multi-scale feature fusion mechanism.

[0107] Construct a temporal attention module. Construct long short-term memory units to capture dependencies at different time scales; implement multi-head temporal attention to allow the model to focus on different temporal patterns; construct a spatial attention module: construct a spatial correlation matrix to calculate the mutual influence between different positions; apply an adaptive Gaussian kernel to adjust the scope of spatial attention; fuse temporal and spatial attention, and use a gating mechanism to dynamically adjust the weights of temporal and spatial attention; apply the fused attention to the input features; and obtain a Transformer model with a temporal and spatial attention mechanism.

[0108] An adaptive learning rate scheduling strategy is applied, specifically: initializing the Adam optimizer and setting the basic learning rate; implementing a learning rate adjustment algorithm based on training dynamics, monitoring the validation set performance and gradient statistics; using the cyclical learning rate method to periodically adjust the learning rate; implementing parameter-specific learning rates, assigning independent learning rates to parameters of different layers and different types, and dynamically adjusting the learning rate of each parameter based on gradient statistics to obtain a Transformer model with optimized learning rate.

[0109] The specific implementation of the progressive training strategy is as follows: construct a training plan with increasing task difficulty, starting from short sequence prediction and gradually increasing the sequence length; use a simplified loss function in the initial stage and gradually introduce complex multi-objective losses. Implement a course learning mechanism to sort the training data according to the difficulty of the samples; gradually introduce more difficult samples during the training process. Dynamically adjust the weight of the loss function and construct a weight adjustment function based on the training progress; smoothly transition different learning goals during the training process to obtain a trained Transformer model.

[0110] For the Transformer model, a multi-task learning framework can also be implemented, specifically: construct auxiliary tasks and add speed prediction tasks; introduce direction prediction tasks; construct task-specific decoder heads and build independent output layers for each task, keeping encoder parameters shared to promote feature migration; implement a dynamic task weight balancing algorithm, initialize the weight of each task, and dynamically adjust the task weights based on the learning curve of each task; calculate the multi-task joint loss, summarize the weighted losses of each task, apply gradient normalization, and balance the gradient scales of different tasks.

[0111] An adversarial training mechanism can also be introduced, specifically: building a discriminator network, building a multi-layer convolutional network to distinguish between real and generated tracks, adding a spectral normalization layer to improve the stability of the discriminator; implementing an adversarial training cycle, alternately training the generator (Transformer) and the discriminator, and using the Wasserstein distance as the adversarial loss; applying gradient penalties to ensure that the discriminator meets the Lipschitz condition; dynamically adjusting the intensity of adversarial training to balance generation quality and diversity.

[0112] In another embodiment, the number of layers, heads, and hidden layer sizes of the Transformer are dynamically optimized using the neural architecture search (NAS) technique; based on the NAS results, the basic Transformer architecture ak is constructed. A multi-scale feature extraction module is added after each layer of the Transformer; feature maps are processed in parallel using convolution kernels of different sizes; features of different scales are dynamically fused through the attention mechanism. A temporal attention module is constructed to capture long-term and short-term temporal dependencies; a spatial attention module is constructed to model the correlation between geographic locations; and temporal and spatial attention results are dynamically fused. A learning rate adjustment algorithm based on training dynamics is implemented; the learning rate of each parameter is dynamically adjusted based on the validation set performance and gradient statistics. Starting from a simple short sequence prediction task, the sequence length and task complexity are gradually increased; the loss function weights are dynamically adjusted during the training process to balance the learning objectives at different stages. In addition to the main track prediction task, auxiliary tasks such as speed prediction and direction prediction are added; task-specific decoder heads are designed to share encoder parameters; a dynamic weight balancing algorithm is used to adaptively adjust the loss weights of each task. You can also build a discriminator network to distinguish between real tracks and generated tracks; alternately optimize the generator (Transformer) and the discriminator during training; and improve the authenticity and diversity of the generated tracks through adversarial training.

[0113] In another embodiment, the training set can be further optimized using the data sample difficulty sampling technology, and then the Transformer model is trained for the second round using the further optimized training set to obtain the final Transformer model. Data sample difficulty sampling is to improve the effect of the model training process by adjusting the selection or weighting of samples. First, a basic model is trained by difficulty sampling, and then the loss is calculated for all samples in the training set. A high sampling probability is set for samples with high loss, and a low sampling probability is set for samples with low loss. The training set used in the second round is obtained, and the final model is obtained by training.

[0114] This embodiment uses the neural architecture search algorithm (NAS) to automatically explore and optimize the hyperparameters of the Transformer architecture (such as the number of layers, the number of heads, and the size of the hidden layer) to find the architecture that best suits the data set for a specific task. The optimized architecture can better adapt to the characteristics of the data set and improve the expressiveness and prediction accuracy of the model. The multi-scale feature extraction module can capture feature information of different scales, so that the model can more comprehensively understand the multi-level structure of the input data; by fusing multi-scale features, the model is more stable and robust when facing input data of different scales; the fusion of multi-scale features helps to improve the prediction accuracy of the model, especially in complex track prediction tasks. The time attention module and the space attention module can capture important information in the time and space dimensions respectively, so that the model can better understand the spatiotemporal dynamic changes of the data; by introducing the spatiotemporal attention mechanism, the model can more accurately capture the spatiotemporal dependencies in the track data and improve the accuracy and reliability of the prediction; the spatiotemporal attention mechanism enables the model to highlight key time and space features in the prediction process and improve the interpretability of the model. By dynamically adjusting the learning rate, the model can converge faster during training while avoiding overfitting and underfitting problems; the adaptive learning rate scheduling strategy can dynamically adjust the learning rate according to the feedback during training to improve training efficiency and model performance; by adaptively adjusting the learning rate of each parameter, the model parameters can be optimized more finely to improve the overall performance of the model. Progressive training can gradually increase the complexity of the model, so that the model gradually adapts to the complexity of the data during training, improves the generalization ability of the model, and also helps to improve the stability of the model, reduce fluctuations during training, and make the model more robust. Testing the trained model with a test data set can verify the performance of the model and ensure the effectiveness of the model in practical applications. The resulting Transformer model can provide high-precision prediction results in the track prediction task.

[0115] This embodiment improves the performance and efficiency of the Transformer model in the track prediction task, optimizes different aspects of the model, from architecture design to feature extraction, to training strategy and learning rate scheduling, and finally obtains an efficient, accurate and practical Transformer model.

[0116] like Figure 5 As shown, according to one aspect of the present application, step S4 is further:

[0117] S41, based on the track prediction result, adopt an adaptive decoding strategy to obtain a decoded track prediction result;

[0118] S42, based on the decoded track prediction result, using the Monte Carlo tree search algorithm and the particle filter algorithm to generate a predetermined potential track; using the multi-modal fusion algorithm to perform weighted fusion on the potential tracks to obtain a fused track prediction result;

[0119] S43, obtaining context information of the track, and based on the context information, using a smoothing algorithm to eliminate noise and anomalies in the fused track prediction result to obtain a smoothed track prediction result;

[0120] S44. Based on the smoothed track prediction result, a multi-scale analysis is performed to obtain a multi-scale analysis result; based on the multi-scale analysis result, an adaptive anomaly detection algorithm is used to identify anomalies in the prediction result, and based on the anomalies, the smoothed track prediction result is optimized to obtain an optimized track prediction result.

[0121] In a specific embodiment, the adaptive decoding strategy is implemented as follows: constructing a confidence-based dynamic decoding algorithm, calculating the entropy value of the predicted distribution for each time step, and dynamically adjusting the sampling temperature according to the entropy value; implementing nucleus sampling, calculating the cumulative probability for the predicted distribution of each time step, dynamically determining the truncation threshold p, and sampling only from the top-p tags; performing integrated decoding, running multiple decoders in parallel, each using a different sampling strategy, and using a voting mechanism or an averaging method to fuse multiple decoding results.

[0122] The application of multimodal fusion technology is specifically as follows: using Monte Carlo tree search to generate multiple potential tracks, applying particle filtering to simulate different navigation scenarios, and generating multiple possible track prediction results; assigning a priori probability to each prediction result, updating the posterior probability of each model according to the historical accuracy, and weighted averaging multiple prediction results based on the posterior probability to achieve Bayesian model averaging; using the bootstrap method to estimate the confidence interval of the prediction, generate a probability ellipse to represent the uncertainty range of the predicted position, and calculate the uncertainty estimate of the fused prediction.

[0123] The implementation of context-aware trajectory smoothing is as follows: construct a conditional random field model, construct node features, including position, speed and direction, construct edge features, and capture the relationship between adjacent points; introduce geographical constraints, integrate electronic nautical chart data, identify navigable areas, and encode navigation rules as soft constraints; perform trajectory optimization, use variational inference methods, estimate the optimal trajectory, apply Lagrangian relaxation, and deal with hard constraints; implement iterative refinement, gradually increase the constraint strength, gradually optimize the trajectory, evaluate the rationality of the trajectory after each iteration, and back off when necessary.

[0124] The specific steps of performing multi-scale trajectory analysis are as follows: applying wavelet transform, decomposing the predicted trajectory, selecting appropriate wavelet basis functions, such as Daubechies wavelet, performing multi-level wavelet decomposition, and obtaining trajectory representations of different scales; calculating multi-scale features, extracting geometric features at each scale, such as curvature and torsion, and analyzing the changes in speed and acceleration at different time scales; identifying key navigation events, building rule-based event detectors, such as sharp turns or sudden deceleration, and using anomaly detection algorithms to discover unusual navigation patterns; combining analysis results at different scales to generate a hierarchical trajectory description, marking important navigation stages and key decision points, and generating a multi-scale trajectory summary.

[0125] The application of adaptive anomaly detection is specifically as follows: constructing a probabilistic model of normal navigation patterns, using a Gaussian mixture model to fit the distribution of multi-dimensional navigation features, applying variational inference, and dynamically updating model parameters; implementing online anomaly detection, calculating the Mahalanobis distance of each new prediction point, and using a sliding window method to detect local abnormal patterns; performing context-aware anomaly analysis, integrating external factors such as weather conditions and sea state information, and using knowledge graphs to infer possible causes of abnormal behavior; classifying anomalies according to the degree of anomaly and potential risks, generating an explanatory report for each anomaly, including possible causes and recommended actions, and generating graded anomaly alerts.

[0126] Furthermore, interactive visualizations and reports can be generated, specifically: building a WebGL-based 3D map engine that supports large-scale trajectory rendering; implementing a multi-resolution tile system to optimize data loading and rendering performance; implementing timeline control to support trajectory playback and fast forward; adding spatial filters to allow users to focus on specific areas; using color coding to represent prediction confidence; drawing dynamic probability ellipses to display location uncertainty; building a template-based natural language generation (NLG) engine to generate basic descriptions, using deep learning models to enhance the naturalness and diversity of text; generating comprehensive analysis reports that summarize key statistical information, abnormal events, and prediction results, and automatically generate visual charts to support decision analysis.

[0127] It is also possible to perform continuous evaluation and optimization of prediction results, specifically: construct an incremental learning algorithm, update model parameters in real time, use a sliding window method, balance new and old data, and implement an online learning mechanism; perform continuous evaluation and optimization of prediction results, construct an incremental learning algorithm, update model parameters in real time; use a sliding window method to balance the impact of new and old data; apply elastic weight decay to prevent the model from over-adapting to short-term patterns; build a prediction strategy optimization system based on reinforcement learning, construct a state space, including factors such as current prediction accuracy and model complexity; construct an action space, including operations such as adjusting the model structure and updating training data; implement a policy gradient-based reinforcement learning algorithm, such as DDPG or SAC; use an experience replay buffer to improve learning efficiency and stability. It is also possible to establish a long-term tracking mechanism for prediction performance, construct multi-dimensional evaluation indicators, including accuracy, timeliness, and computational efficiency; implement an automated A / B testing system to continuously evaluate model improvements; and build a time series analysis process (pipeline) to detect performance trends and periodic changes. Develop an adaptive model integration framework, maintain multiple model versions with different characteristics, implement a dynamic weight assignment algorithm, adjust model weights according to real-time performance, and use meta-learning methods to automatically select the model combination that best suits the current scenario.

[0128] In another embodiment, when executing an adaptive decoding strategy, a confidence-based dynamic decoding algorithm is constructed, and the sampling temperature is dynamically adjusted at each time step according to the entropy value of the predicted distribution; integrated decoding is implemented, and the results of top-k sampling and kernel sampling are comprehensively considered. Generate multiple possible track prediction results; use the Bayesian model averaging method to fuse multiple prediction results; calculate the uncertainty estimate of the fused prediction. Construct a trajectory smoothing algorithm based on conditional random fields; consider local geographic constraints and navigation rules to optimize the predicted trajectory; use a dynamic programming algorithm to find the optimal smooth trajectory that meets the constraints. Perform wavelet decomposition on the predicted trajectory to obtain trajectory representations at different scales; calculate trajectory features such as curvature, speed change, etc. at each scale; identify key navigation events and patterns based on multi-scale features. Use an online learning algorithm to dynamically update the probability distribution of normal navigation patterns; design a multidimensional anomaly detection method based on Mahalanobis distance; and perform rule-based and data-driven comprehensive analysis on detected anomalies. Design a multi-level, multi-perspective trajectory visualization interface; implement dynamic trajectory exploration based on user interaction; use natural language generation technology to automatically generate track prediction analysis reports; design an online learning mechanism to continuously update the model's adaptability to the latest data; implement reinforcement learning-based prediction strategy optimization, and adjust the prediction model based on actual navigation feedback; establish a long-term tracking mechanism for prediction performance and analyze the model's performance under different circumstances.

[0129] This embodiment can dynamically adjust the decoding process according to different prediction results through the adaptive decoding strategy, thereby improving the accuracy of the track prediction results after decoding. Through adaptive decoding, it can better capture the subtle changes in the track prediction results, improve the overall prediction accuracy, and enable the model to flexibly respond to different types of track data, thereby improving the adaptability and robustness of the model. Through the Monte Carlo tree search algorithm and the particle filter algorithm, multiple potential tracks can be generated, providing diversified prediction results and increasing the comprehensiveness of the prediction. The multimodal fusion algorithm performs weighted fusion on the potential tracks, which can combine the advantages of different algorithms to obtain more accurate and stable track prediction results; it also helps to reduce the deviations and errors that may be caused by a single algorithm, and improve the robustness and reliability of the prediction results. By obtaining the contextual information of the track, the background and environment of the track data can be better understood, thereby improving the accuracy of the prediction results. The smoothing algorithm can effectively eliminate the noise and abnormal points in the prediction results, making the prediction results smoother and continuous. By eliminating noise and abnormalities, the smoothed track prediction results are more stable and reliable, and suitable for practical applications. Multi-scale analysis can conduct in-depth analysis of track prediction results at different scales, capture information at different levels, and improve the comprehensiveness of prediction results. The adaptive anomaly detection algorithm can dynamically identify anomalies in the prediction results, improve the accuracy and efficiency of anomaly detection, and optimize the prediction results based on anomalies. This can further improve the accuracy and reliability of the prediction results and reduce errors and deviations.

[0130] This embodiment improves the accuracy, robustness and practicality of the track prediction results, and optimizes different aspects, from decoding to fusion, to anomaly detection and optimization, and finally obtains an efficient, accurate and practical track prediction model.

[0131] like Figure 6 As shown, in another embodiment of the present application, the track prediction method based on the global geographic information coding PlusCode and Transformer is specifically:

[0132] Step 1: Obtain open source AIS data, which comes from ship AIS data provided by the Danish Maritime Authority (DMA);

[0133] Step 2: Preprocess the data, including time, longitude and latitude screening, abnormal data filtering, track separation, and track point downsampling to obtain a DMA data set;

[0134] Step 3: Encode the longitude and latitude coordinates in the dataset using PlusCode to obtain the encoded coordinate representation;

[0135] Step 4: Discretize the encoded coordinate representation, and encode each bit into a digit between 0 and 19;

[0136] Step 5: Input the processed coded numbers from T0 to Tn into the Transformer network. After the attention structure, each bit of the code can interact and perceive information with the codes at other positions.

[0137] Step 6: The output of the Transformer network is connected to a classifier network. The classifier network has 20 outputs, corresponding to 20 coded numbers. The probability corresponding to each coded number is obtained through Softmax.

[0138] Step 7: After obtaining the probability, take the result with the highest probability as the predicted result;

[0139] Step 8: Convert the predicted code number back into PlusCode code, and then convert it into common latitude and longitude coordinates;

[0140] Step 9. Add the predicted coded number to the previous trajectory data, return to step 5, get the input from T0 to Tn+1, input it into the network, and get the result of Tn+2.

[0141] The traditional method will output longitude and latitude numbers or numerical numbers expressed in natural language. This method places requirements on the learning ability of the model and requires alignment of track information and natural language. It is easy to underfit in the case of small data samples, and numerical numbers will make the model focus on learning subtle changes in numerical values ​​and ignore the overall trajectory changes, which is prone to overfitting. Using a discrete encoding method, a classifier is used at the end of the network, and the output is the probability of each encoded number. Sampling the number with the highest probability can reduce the difficulty of network learning and improve the network effect.

[0142] In another embodiment of the present application, AIS data is downloaded from the official website of the Danish Maritime Authority (DMA), and the original data includes latitude and longitude coordinates, ground speed, ground heading, timestamp, maritime mobile service identification code, and ship type.

[0143] The acquired AIS data was preprocessed, which included the following aspects: filtering data from January 1, 2019 to March 31, 2019; filtering data within the longitude range of (55.5°, 58°) and the latitude range of (10.3°, 13°); filtering data of cargo ships and cruise ships, with type codes of 70 to 89; dividing the data set into a test set, and taking the data from March 21, 2019 to March 31, 2019 as the test set; removing abnormal data, including data with too fast sailing speed, stationary tracks, and data with track duration of less than 4 hours; downsampling the track data, dividing the time at intervals of 10 minutes, averaging the longitude and latitude coordinates, ground speed, and ground heading of the AIS track points in each time period, and obtaining evenly separated track points at intervals of 10 minutes; separating tracks with too long duration, with a maximum duration of 20 hours.

[0144] The longitude and latitude coordinates in the dataset are encoded through PlusCode. The specific operations are as follows: Install the pluscodes library in Python; Use the longitude and latitude coordinates as the initialization parameters of the PlusCode object in pluscode to construct an object; Take out the value of the code attribute in the PlusCode object, which is the code we need; Encode each track point of each track in the dataset.

[0145] Discretize the encoded coordinates into numbers. Specifically, construct a character dictionary for PlusCode. The number of characters used in the encoding is very small, only 20, so we use numbers 0-19 to represent the characters; translate the code of each track point into numbers, and convert it from string type to List[int] type for storage.

[0146] The encoded numbers processed from T0 to Tn are input into the Transformer network. The specific operations are as follows: the shape of the encoded numbers is (parallel computing package size, sequence length, encoding length, encoding space size), where the parallel computing package size is set to 32, the maximum sequence length is 120, the encoding length is 10, and the encoding space size is 20, which is input into the embedding layer of the Transformer; after the embedding layer, the numerical values ​​are converted into vectors. At this time, the vector shape is (parallel computing package size, sequence length, encoding length, embedding vector size), and the vector size is set to 256. Here, all the codes are flattened to obtain a vector of the shape of (parallel computing package size, sequence length, encoding length × embedding vector size). Here, the encoding length × embedding vector size needs to be aligned with the hidden variable size of the model and is set to 2560; after passing through multiple layers of decoder networks, the network layer output (parallel computing package size, sequence length, hidden vector size) is obtained.

[0147] The classifier network obtains the output probability, specifically: the output of the network layer is input into the classifier network to obtain the output (parallel calculation of packet size, encoding length, encoding space size); and then a Softmax function is used to obtain the probability of each bit of encoding.

[0148] After obtaining the probabilities, take the result with the highest probability as the predicted result.

[0149] Convert the predicted coded number back into PlusCode code, and then convert it into ordinary longitude and latitude coordinates. The specific operations are as follows: construct the object using the PlusCode code as the initialization parameter of the PlusCode object; obtain the area parameter of the object and get the longitude and latitude range from it; because the obtained area is a square interval, the center point of the square is used as the predicted coordinate.

[0150] Add the predicted coded number to the previous trajectory data, return to step 5, get the input from T0 to Tn+1, input it into the network, and get the result of Tn+2.

[0151] The Transformer network architecture natively supports multi-card joint training, which can better improve the efficiency of GPU usage during training. The decoder-only structure has good support for generation tasks. During training, only the entire track is used as input and the shifted track output is used to calculate the loss, which is equivalent to training multiple samples in one gradient descent, improving training efficiency. During inference, the loop iteration adds each output to the end of the previous input, constructs the self-loop generation result, and can obtain the prediction of the track point up to 15 hours later.

[0152] In another embodiment, the track prediction method based on the global geographic information code PlusCode and Transformer is specifically as follows:

[0153] S1, data acquisition and preprocessing;

[0154] S1.1. Obtain original Automatic Identification System (AIS) data. Download the original AIS dataset a from the official website of the Danish Maritime Authority (DMA), which contains latitude and longitude coordinates b, ground speed c, ground heading d, timestamp e, maritime mobile service identifier f, and ship type g.

[0155] S1.2. Filter the time range. Use the time filtering algorithm to filter out data with timestamp e between January 1, 2019 and March 31, 2019 from the original data set a to obtain the time-filtered data set h.

[0156] S1.3. Filter the geographic range. Apply the geographic coordinate filter to filter out the data with longitudes between 55.5° and 58° and latitudes between 10.3° and 13° from dataset h, and obtain the dataset i after geographic range filtering.

[0157] S1.4. Filter ship types. Use the ship type filtering algorithm to filter out data with ship type g coded as 70 to 89 (corresponding to cargo ships and cruise ships) from data set i, and obtain data set j after ship type filtering.

[0158] S1.5. Divide the test set. Using the time segmentation method, separate the data from March 21, 2019 to March 31, 2019 from the dataset j as the test set k, and the remaining data as the training set l.

[0159] S1.6. Delete abnormal data. Use the speed threshold filtering algorithm to delete data points with abnormal ground speed c from the training set l; apply the stationary detection algorithm to identify and delete stationary tracks in the training set l; use the duration filter to delete track data with a duration of less than 4 hours in the training set l; after performing the above steps, the cleaned training set m is obtained.

[0160] S1.7. Downsample the data. Divide the cleaned training set m into 10-minute time intervals; average the AIS data points in each time period to obtain the average latitude and longitude coordinates n, average ground speed o, and average ground heading p for that time period; use the average values ​​n, o, and p to construct new track points to form the downsampled training set q.

[0161] S1.8. Segmentation of long tracks. Apply the track segmentation algorithm to segment the tracks with a duration of more than 20 hours in the downsampled training set q to obtain the final processed training data set r.

[0162] S2, PlusCode encoding and discretization processing;

[0163] S2.1. Install the PlusCode library. Use the Python package manager to install the pluscodes library; import the pluscodes module in the Python environment.

[0164] S2.2, perform PlusCode encoding. Traverse each track point in the training data set r; for each track point, extract its longitude and latitude coordinates u; use the PlusCode object constructor of the pluscodes library, with the longitude and latitude coordinates u as parameters, to create a PlusCode object v; extract the code attribute value from the PlusCode object v to obtain the corresponding PlusCode encoding string w; replace the original longitude and latitude coordinates u with the corresponding PlusCode encoding string w to obtain the PlusCode encoded data set x.

[0165] S2.3. Construct a PlusCode character dictionary. Create an empty dictionary y to store the mapping of PlusCode characters to numbers; define the 20 character set z used by PlusCode, including numbers 0-9 and some letters in the alphabet AZ; assign a unique integer identifier (0-19) to each character in the character set z and store it in the dictionary y.

[0166] S2.4, perform PlusCode discretization. Traverse each track point in the PlusCode-encoded data set x; for each track point's PlusCode-encoded string w: create an empty list aa to store the discretized numbers; traverse each character in the encoded string w; use the dictionary y to find the integer identifier corresponding to each character; add the integer identifier found to the list aa; replace the original PlusCode-encoded string w with the corresponding integer identifier list aa, and obtain the discretized data set ab.

[0167] S2.5. Adjust the data format. Reshape the discretized data set ab into a four-dimensional tensor ac, whose shape is (batch size, sequence length, encoding length, 1); the batch size is set to 32; the sequence length is set to 120 (corresponding to a maximum of 20 hours of track, one point every 10 minutes); the encoding length is set to 10 (standard PlusCode length); for sequences with a length of less than 120, use a filling value (such as -1) to fill them to ensure that all sequences have the same length.

[0168] S2.6. Perform encoding space representation. Create a one-hot encoding space ad of size 20, corresponding to 20 possible discrete values; convert each integer identifier in the four-dimensional tensor ac into a corresponding one-hot vector to obtain a five-dimensional tensor ae, whose shape is (batch size, sequence length, encoding length, encoding space size).

[0169] S3, Transformer network construction and training.

[0170] S3.1. Build the Transformer network architecture. Define the hyperparameters of the Transformer network: set the hidden layer size af to 2560; set the number of attention heads ag to 32; set the number of Transformer layers ah to 12; set the dropout rate ai to 0.1; create the Transformer embedding layer aj, with the input dimension being the encoding space size (20) and the output dimension being the hidden layer size af; build a multi-layer Transformer encoder (Decoder) ak, including the ah layer, each layer including a multi-head self-attention mechanism and a feedforward neural network; create the output layer al, mapping the output of the Transformer to the encoding space (20 categories).

[0171] S3.2. Extract the input sequence am and the target sequence an from the five-dimensional tensor ae; perform position encoding on the input sequence am to obtain the position-encoded input sequence ao.

[0172] S3.3, in the forward propagation process, the position-encoded input sequence ao is passed to the Embedding layer aj to obtain the embedded representation ap; the shape of the embedded representation ap is adjusted and flattened to the shape of (batch size, sequence length, hidden layer size); the adjusted embedded representation is passed to the Transformer Decoder ak to obtain the decoder output aq; the decoder output aq is passed to the output layer al to obtain the predicted distribution ar for each time step.

[0173] S3.4. Construct a loss function and use the cross entropy loss function as to calculate the difference between the predicted distribution ar and the target sequence an; apply the mask at to ignore the loss of the padding position.

[0174] S3.5. Set the optimizer, select the Adam optimizer au, set the learning rate av to 0.0001; implement the learning rate scheduling strategy aw, such as cosine annealing or linear decay.

[0175] S3.6. Divide the training data set ae into multiple batches ax; for each training cycle (epoch): for each batch ax, perform the forward propagation process, calculate the loss, back propagate, calculate the gradient, and use the optimizer au to update the model parameters; evaluate the model performance on the validation set; adjust the learning rate av according to the validation set performance; save the trained model parameters ay.

[0176] S3.7, Evaluate the model. Load the saved model parameters ay; run the model on the test set k to generate the prediction sequence az; calculate the evaluation indicators, such as the mean absolute error ba and the root mean square error bb.

[0177] S3.8, prediction process. For a given input sequence bc, repeat the forward propagation process; apply the maximum independent variable point set (argmax) operation to the result of the output layer al to obtain the most likely next code bd; add the predicted code bd to the end of the input sequence bc; repeat the above steps until the predicted sequence of the required length is generated or the maximum prediction time (such as 15 hours) is reached.

[0178] S4, post-processing and output of prediction results;

[0179] S4.1. Decode the prediction results. Get the code sequence bd predicted by the model; create a reverse mapping dictionary be to map the integer identifier back to the PlusCode character; traverse each code in the predicted code sequence bd: use the reverse mapping dictionary be to convert the integer identifier back to the character; connect the converted characters into a complete PlusCode string bf.

[0180] S4.2, Conversion from PlusCode to geographic coordinates. For each PlusCode string bf: use the pluscodes library to create a PlusCode object bg; extract the area attribute from the PlusCode object bg to obtain the corresponding geographic area information bh; calculate the coordinates of the center point of the geographic area bh to obtain the predicted longitude and latitude bi.

[0181] S4.3. Generate predicted trajectory. Create an empty list bj to store predicted track points; for each predicted longitude and latitude coordinate bi: create a track point object bk containing longitude, latitude and predicted timestamp; add the track point object bk to the predicted trajectory list bj.

[0182] S4.4, interpolation and smoothing. If the time interval between the predicted track points is greater than 10 minutes: use the spline interpolation algorithm bl to generate additional intermediate points between adjacent track points; apply the Kalman filter bm to smooth the predicted trajectory to reduce the impact of noise and outliers.

[0183] S4.5, calculate navigation parameters. For the smoothed predicted trajectory bn: calculate the speed bo between adjacent track points, calculate the heading angle bp; estimate the turning rate bq and acceleration br.

[0184] S4.6, evaluate the prediction accuracy. If actual observation data bs is available: calculate the average distance error bt between the predicted trajectory bn and the actual trajectory bs; calculate the direction error bu between the predicted trajectory bn and the actual trajectory bs; generate a prediction accuracy report bv, including distance error, direction error and time error statistics.

[0185] S4.7. Output visualization map. Use a map visualization library (such as Folium) to create an interactive map bw; draw the original trajectory and predicted trajectory bn on the map bw; use different colors or styles to distinguish the original trajectory from the predicted trajectory; add annotations such as timestamp, speed, and heading.

[0186] S4.8. Export data. Export the predicted trajectory bn and its related parameters (speed, heading, etc.) as a CSV file bx; generate a comprehensive report by containing the predicted trajectory, accuracy evaluation, and visualization results.

[0187] S4.9, Anomaly detection and alarm. Define navigation safety parameter thresholds bz, such as maximum speed, maximum turning rate, etc.; analyze the predicted trajectory bn: if any predicted parameter exceeds the safety threshold bz: generate an alarm message ca, and mark the potential danger area in the visual output.

[0188] S4.10. Store and manage forecast results. Save forecast results, evaluation reports and visualization outputs to a predefined storage location cb; update the forecast history database cc to record the key information and performance indicators of this forecast.

[0189] This implementation completes the conversion of the original longitude and latitude coordinates to PlusCode, and performs discretization and data format adjustment. The resulting five-dimensional tensor (ae) contains the encoded track information. Each track point is represented as a series of one-hot vectors. The processed data set is ready for the subsequent Transformer model training. By building and training a Transformer-based track prediction model, it is able to process PlusCode-encoded track data, learn complex spatiotemporal patterns, and generate predictions of future track points. The model training process takes into account key links such as batch processing, loss calculation, and gradient update, and also includes the process of model evaluation and actual prediction. Through post-processing steps, the model's original predictions are converted into meaningful geographic information, and comprehensive analysis, visualization, and reporting functions are provided. This process not only outputs the predicted track, but also includes accuracy assessment, safety checks, and data management, providing a complete solution for the track prediction system.

[0190] In another embodiment, multi-path prediction can also be performed. In the reasoning process of predicting future tracks through historical tracks, a multi-path + verification method is adopted, and the topk paths with the highest probability are retained to predict the track position at the next moment. At the same time, the speed and position of these topk paths are verified. If the speed is too different from the average speed of the historical track or the position is more than 5 coding distances different from the latest historical track, this path is abandoned. The number of paths finally obtained is <= topk. In the experiment, the best effect is achieved when topk is set to 15.

[0191] A track prediction system based on global geographic information coding PlusCode and Transformer, comprising:

[0192] at least one processor; and,

[0193] a memory communicatively connected to at least one of the processors; wherein,

[0194] The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the track prediction method based on global geographic information coding PlusCode and Transformer as described in any of the above embodiments.

[0195] The present invention optimizes the data set and improves the data quality and the generalization ability of the model by dynamically adjusting the coding accuracy and multi-dimensional data enhancement; by adopting the adaptive PlusCode coding and multi-scale feature fusion mechanism, not only the flexibility and accuracy of the coding are improved, which is suitable for track prediction in different regions, but also the geographical features of different scales can be captured, so that the model can work effectively in different regions; by adopting the adaptive learning rate scheduling strategy and the progressive training strategy, the learning rate of the model parameters is dynamically adjusted, the training process is optimized, and the convergence speed of the model is improved, thereby improving the real-time and stability of the prediction.

[0196] The preferred embodiments of the present invention are described in detail above; however, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all belong to the protection scope of the present invention.

Claims

1. A track prediction method based on global geographic information coding PlusCode and Transformer, characterized in that: The steps include: S1. Obtain original AIS data, construct an original AIS data set, and preprocess the original AIS data set to form a training data set; wherein the original AIS data includes latitude and longitude coordinates, ground speed, ground heading, timestamp, maritime mobile service identification code and ship type; S2. Based on the training data set, a method of dynamically adjusting the encoding accuracy is used for optimization to obtain an optimized data set; S3. Based on the optimized data set, a Transformer model is constructed and trained to obtain a trained Transformer model; the track prediction result is obtained using the trained Transformer model; S4. Based on the track prediction result, a multimodal fusion algorithm and an adaptive anomaly detection algorithm are used for optimization to obtain an optimized track prediction result; Step S2 is further as follows: S21, based on the training data set, perform dynamic precision PlusCode encoding to generate an initial PlusCode encoding sequence for each track point; S22, based on the initial PlusCode coding sequence, calculating the information entropy and redundancy of the local coding, dynamically adjusting the coding length of each track point based on the information entropy and redundancy, and generating an optimized PlusCode coding sequence; S23, constructing an adaptive PlusCode character mapping dictionary based on the optimized PlusCode encoding sequence, and using the adaptive PlusCode character mapping dictionary to convert the optimized PlusCode encoding sequence into an integer sequence; S24, forming an optimized data set based on the integer sequence; Step S2 also includes: S25. Based on the optimized data set, the sequence length distribution and the spatiotemporal correlation are calculated; based on the sequence length distribution and the spatiotemporal correlation, a tensor shape parameter search space is constructed; S26, based on the optimized data set and tensor shape parameter search space, using a Bayesian optimization method to obtain tensor shape parameters; S27, based on the tensor shape parameter, converting the optimized data set into a four-dimensional tensor representation; S28. Based on each integer identifier in the four-dimensional tensor representation, calculate its occurrence frequency in the current batch to obtain a frequency distribution; S29, constructing a coding space, and dynamically adjusting the coding space of each integer identifier using a logarithmic scaling function based on the frequency distribution to obtain a dynamically adjusted coding space; S210, constructing a variable-length coding scheme based on the dynamically adjusted coding space; assigning a one-hot vector to each integer identifier based on the variable-length coding scheme, and constructing an adaptive one-hot coding space; S211. Based on an adaptive one-hot encoding space, convert the four-dimensional tensor representation into a five-dimensional tensor representation.

2. The track prediction method based on global geographic information coding PlusCode and Transformer according to claim 1, characterized in that: Step S1 is further as follows: S11, obtaining original AIS data and constructing an original AIS data set; calculating the earliest timestamp and the latest timestamp in the original AIS data set, and constructing a time window length based on the earliest timestamp and the latest timestamp; Based on the time window length, the original AIS data set is time-filtered to obtain a time-filtered data set; S12, performing cluster analysis on the longitude and latitude coordinates in the data set after time screening to obtain a data set after geographical range screening; S13, performing stratified ship type screening on the data set after geographical scope screening to obtain a data set after ship type screening; S14, performing adaptive cross-validation set division on the data set after the ship type screening to obtain a training data set and a test data set; S15, performing multi-dimensional abnormal data detection and processing on the training data set and the test data set to obtain cleaned training data set and test data set; S16. Apply adaptive multi-scale downsampling to the cleaned training data set and test data set to generate the final training data set and test data set.

3. The track prediction method based on global geographic information coding PlusCode and Transformer according to claim 2 is characterized in that: Step S3 is further as follows: S31. Based on the optimized data set, build a basic Transformer architecture, use the neural architecture search algorithm to dynamically optimize the number of layers, number of heads, and hidden layer size in the Transformer architecture, and obtain the optimized Transformer architecture. S32. Add a multi-scale feature extraction module to each layer of the optimized Transformer architecture to obtain a Transformer model with a multi-scale feature fusion mechanism; S33. In the Transformer model with multi-scale feature fusion mechanism, a temporal attention module and a spatial attention module are constructed to obtain a Transformer model with a spatiotemporal attention mechanism. S34. Based on the optimized data set, an adaptive learning rate scheduling strategy is adopted to dynamically adjust the learning rate of each parameter in the Transformer model with spatiotemporal attention mechanism to obtain a Transformer model with optimized learning rate. S35. Based on the optimized data set, a progressive training strategy is adopted to train the Transformer model after the optimized learning rate to obtain a trained Transformer model; based on the test data set, the trained Transformer model is tested to obtain a tested Transformer model; S36. Input the optimized data set into the tested Transformer model to obtain the track prediction result.

4. The track prediction method based on global geographic information coding PlusCode and Transformer according to claim 3 is characterized in that: Step S4 is further as follows: S41, based on the track prediction result, adopt an adaptive decoding strategy to obtain a decoded track prediction result; S42, based on the decoded track prediction result, using the Monte Carlo tree search algorithm and the particle filter algorithm to generate a predetermined potential track; using the multi-modal fusion algorithm to perform weighted fusion on the potential track to obtain a fused track prediction result; S43, obtaining context information of the track, and based on the context information, using a smoothing algorithm to eliminate noise and anomalies in the fused track prediction result to obtain a smoothed track prediction result; S44. Based on the smoothed track prediction result, a multi-scale analysis is performed to obtain a multi-scale analysis result; based on the multi-scale analysis result, an adaptive anomaly detection algorithm is used to identify anomalies in the prediction result, and based on the anomalies, the smoothed track prediction result is optimized to obtain an optimized track prediction result.

5. The track prediction method based on global geographic information coding PlusCode and Transformer according to claim 4 is characterized in that: Step S13 is further as follows: S131. Based on the data set filtered by the geographical range, construct a ship type feature vector, including a ship size feature vector, a speed range feature vector, and a navigation mode feature vector; S132, constructing a hierarchical clustering dendrogram based on the ship type feature vector, calculating a clustering stability index of each cutting point in the hierarchical clustering dendrogram, and determining an optimal number of clustering levels based on the clustering stability index; S133, based on the optimal number of clustering levels, calculating the data distribution characteristics of each level, and constructing a multi-objective optimization function based on the data distribution characteristics; S134, solving the multi-objective optimization function using a genetic algorithm to obtain an optimal ship type hierarchy; S135. Based on the optimal ship type hierarchy, anomaly detection algorithm and data balancing technology are used for screening to obtain a data set after ship type screening.

6. The track prediction method based on global geographic information coding PlusCode and Transformer according to claim 4 is characterized in that: Step S12 is further as follows: S121, clustering the longitude and latitude coordinates in the time-filtered data set using an improved density clustering algorithm to obtain a clustering result; S122. Based on the clustering results, the center point coordinates and data point density of each cluster are calculated; Based on the coordinates of the center point and the density of the data points, the silhouette coefficient is used to evaluate the effect of different numbers of clusters and obtain the evaluation effect; S123, based on the evaluation results, determining the optimal number of clusters; based on the optimal number of clusters, selecting a predetermined number of cluster centers from the clustering results; S124, constructing a minimum bounding rectangle based on the cluster center, and using a spatial indexing technique to filter data points that fall within the minimum bounding rectangle to obtain filtered data points; S125. Expand the boundaries of the filtered data points to obtain a data set after geographical scope filtering.

7. The track prediction system based on the global geographic information coding PlusCode and Transformer is characterized by: include: at least one processor; as well as, a memory communicatively connected to at least one of the processors; wherein, The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the track prediction method based on global geographic information coding PlusCode and Transformer as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Transform-based four-dimensional track long-time prediction method and device

    CN116502777A

  • Ship track prediction method and system fusing data quality control and Transform network

    CN116541708A

  • Method for predicting sailing trajectory of automatic ship identification system

    CN117131371A

  • Transportation demand prediction method and system based on multi-modal data

    CN118114821A

  • Short temporary rainfall prediction method based on multi-scale attention and convolution fusion

    CN118298222A

Cited By

  • Trajectory prediction

    EP4787243A1