Ship trajectory prediction method and system based on multi-scale decomposition and cross-scale mixing

CN122903801APending Publication Date: 2026-10-13GUANGDONG POLICE COLLEGE (GUANGDONG PROVINCIAL PUBLIC SECURITY JUDICIAL MANAGEMENT CADRE COLLEGE)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611106345.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

现有的基于深度学习或传统 Transformer 的船舶轨迹预测方法仍存在两个亟待解决的关键问题:首先,大多出现于单一直观的时间尺度上进行序列建模,未能有效解耦和区分微观波动与宏观全局,导致模型对多尺度时序特征的表征能力较为薄弱;其次,在长时间多步预测任务中,由于缺乏对全局宏观全局的有效把握和微观局部特征的指导,误差累积现象严重,预测精度仍有较大提升空间

Benefits of technology

[0122](1)本发明提出了一种基于多尺度分解与跨尺度混合的船舶轨迹预测方法,从时序数据的多分辨率特性角度出发,通过特征分解模块将船舶复杂的运动轨迹解耦为表征“局部微观波动(局部项)”和“全局宏观走向(全局项)”两个独立分量。有效克服了传统深度学习模型在单一时间尺度下难以区分复杂干扰信息的缺陷,显著提升了模型对复杂航行环境下轨迹特征的表征能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903801A_ABST
    Figure CN122903801A_ABST
Patent Text Reader

Abstract

The application discloses a ship trajectory prediction method and system based on multi-scale decomposition and cross-scale mixing, and the method comprises the following steps: inputting original ship trajectory data from a data set into a preprocessing module to obtain normalized continuous value data of ship space-motion characteristics, obtaining a multi-scale trajectory sequence set covering four different time resolutions through a multi-scale input processing module, obtaining a high-dimensional local item hidden layer feature list with stronger representation ability through a feature decomposition and feature embedding module, obtaining a multi-scale fusion feature vector through a history decomposable mixing module, obtaining predicted trajectory data of the model through a future multi-scale prediction module; training the model and saving the model; testing the model, loading the model, and outputting trajectory prediction results. The application utilizes multi-resolution time series decomposition and cross-scale bidirectional mixing mechanism, effectively captures fine-grained periodicity and macro global characteristics of ship motion, effectively solves the information decay and gradient disappearance problems in long sequence modeling while maintaining the calculation efficiency, and significantly improves the accuracy of the model in long-time prediction tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ship trajectory prediction, and specifically to a ship trajectory prediction method and system based on multi-scale decomposition and cross-scale hybridization. Background Technology

[0002] With the flourishing of maritime trade and the deepening of marine development, how to strengthen the monitoring of ship behavior and traffic flow management through high-precision, low-error ship trajectory prediction technology, thereby effectively ensuring maritime navigation safety and combating smuggling and other illegal activities, has become a focus of attention for many sectors of society. Achieving accurate prediction of ship trajectories has significant strategic value and practical implications for optimizing port scheduling, curbing illegal activities, and maintaining maritime and economic security.

[0003] In recent years, ship trajectory prediction methods have undergone significant technological evolution, progressing from traditional mathematical models to machine learning methods, and then to deep learning models. Deep learning technology, in particular, has become the mainstream research direction in the field of ship trajectory prediction due to its ability to automatically extract complex spatiotemporal features and motion patterns from massive trajectory data. Among various deep learning architectures, Long Short-Term Memory (LSTM) networks and their bidirectional extension (BI-LSTM), Convolutional Neural Networks (CNNs), and Transformer models are widely used. Among these, the Transformer, with its self-attention mechanism, demonstrates a significant advantage in capturing long-sequence dependencies and has been gradually introduced into ship trajectory prediction tasks. However, real ship trajectories are usually influenced by a combination of complex factors, and their time-series data often contains extremely complex multi-scale characteristics: including microscopic "fluctuations and oscillations" in a short period (such as yaw and correction caused by wind and waves), and macroscopic "overall global" characteristics over a long period (such as the overall direction of a predetermined route). Existing ship trajectory prediction methods based on deep learning or traditional Transformers still face two critical issues: First, most methods model sequences on a single, intuitive time scale, failing to effectively decouple and distinguish between micro-level fluctuations and the macro-level global picture, resulting in weak representation capabilities for multi-scale temporal features. Second, in long-term, multi-step prediction tasks, the lack of effective understanding of both the global and macro-level global picture and guidance from micro-level local features leads to severe error accumulation, leaving significant room for improvement in prediction accuracy. Therefore, how to effectively decouple the complex multi-scale features of ship trajectories while maintaining the advantages of long-sequence modeling, overcoming the limitations of a single time scale, and improving the accuracy of long-term predictions has become a critical scientific problem that urgently needs to be solved in current ship trajectory prediction research. Summary of the Invention

[0004] To overcome the shortcomings and deficiencies of existing technologies, this invention provides a ship trajectory prediction method and system based on multi-scale decomposition and cross-scale hybridization. This invention aims to improve the prediction accuracy of long-term prediction tasks by addressing the multi-scale characteristics of time series data and decoupling features at multiple resolutions. Specifically, it includes the following steps: reading raw ship trajectory data from a dataset and inputting it into a preprocessing module to obtain normalized continuous values ​​of ship spatial-motion features (longitude, latitude, heading, speed, and time-encoded values); sending the raw continuous values ​​of ship spatial-motion features into a multi-scale input processing module to obtain a set of multi-scale trajectory sequences covering four different time resolutions; and sending the multi-scale trajectory sequence set into a feature decomposition and feature embedding module to obtain a list of high-dimensional local term hidden features with stronger representational capabilities using local-global separation and high-dimensional feature projection. ; The resulting list of hidden layer features for high-dimensional local terms The data is fed into a historically decomposable mixing module, where cross-scale features are aggregated bidirectionally through bottom-up multi-scale local mixing and top-down multi-scale global mixing, resulting in a more powerful multi-scale fused feature vector. This fused feature vector is then fed into a future multi-scale prediction module to predict the trajectory data for different time resolutions. The mean squared error loss between the predicted and actual data is used for model supervision. The model is then trained and saved. Finally, the model is tested, and the trajectory prediction results are output. The resulting long-term ship prediction trajectory demonstrates high accuracy and effectively improves the prediction capability of the algorithm.

[0005] To achieve the above objectives, the present invention adopts the following technical solution:

[0006] A ship trajectory prediction method based on multi-scale decomposition and cross-scale hybridization includes the following steps:

[0007] A data preprocessing module is constructed to read the original AIS trajectory data in the dataset and send the trajectory data into the data preprocessing module to achieve the purpose of filtering out invalid data such as trajectory sequences containing NaN values ​​and insufficient length, so as to obtain normalized continuous value data.

[0008] A multi-scale input processing module is constructed to input continuous value data of ship spatial-motion characteristics into the module, perform average pooling and stepwise downsampling, and obtain a set of multi-scale trajectory sequences containing four temporal resolutions. ;

[0009] A feature decomposition and embedding module is constructed. A multi-scale trajectory sequence set is fed into this module, and a moving average algorithm is used to decompose the sequence set into "local fluctuation" sequences. With "global fluctuation" sequence The "local fluctuation" sequence is then mapped to the hidden layer dimension via a position-free embedding layer to obtain a high-dimensional list of local term hidden layer features. ;

[0010] Construct a historically decomposable hybrid module to list the hidden features of high-dimensional local terms. The data is fed into the multi-level eigenvalue decomposition submodule to process the hidden layer feature list of high-dimensional local terms. The moving average is then applied sequentially for further decomposition. The decomposed feature sequences are then fed into a bottom-up multi-scale local mixing submodule and a top-down multi-scale global mixing submodule to achieve bidirectional aggregation of cross-scale features, resulting in a multi-scale fused feature sequence set that integrates multi-resolution information. ;

[0011] Construct a future multi-scale prediction module to fuse multi-scale feature sequence sets. The data is fed into the future multi-scale prediction module, aligned to the prediction time step using a time-domain linear mapping, and added to the original global sequence residuals at the corresponding scales. The prediction results at each scale are then output, and the model's predicted trajectory data is obtained through multi-scale summation.

[0012] Model training involves updating network parameters with the goal of minimizing the mean squared error loss function. After training is complete, the network model and parameters are saved.

[0013] Model testing involves loading the trained prediction model, inputting historical ship trajectory data, and outputting predicted ship trajectory data.

[0014] As a preferred technical solution, a data preprocessing module is constructed to read the original AIS trajectory data from the dataset and send the trajectory data into the data preprocessing module. This achieves the purpose of filtering out invalid data such as trajectory sequences containing NaN values ​​and insufficient length, thereby obtaining normalized continuous value data. The specific steps include:

[0015] Read the original trajectory dataset, remove trajectory sequences containing NaN values ​​and those with insufficient length, filter invalid data that meet the above conditions, output a list of trajectory dictionaries, and unify time series trajectories of different lengths to a fixed length (input historical length), construct the standard format required for model training (i.e., input with fixed trajectory historical length), and obtain normalized continuous value data.

[0016] As a preferred technical solution, a multi-scale input processing module is constructed. Continuous data of ship spatial-motion characteristics are fed into the multi-scale input processing module, where average pooling and stepwise downsampling are performed to obtain a set of multi-scale trajectory sequences containing four temporal resolutions. The specific steps include:

[0017] The continuous value data of ship spatial-motion characteristics are transformed from the original input sequence. Transpose along the time dimension to obtain a three-dimensional tensor Then, apply a downsampling window of size 2 to the transposed tensor and perform continuous operations. Secondary downsampling integrates the uncompressed original sequence with... The new sequence generated by the next downsampling yields a sequence containing... +1 A collection of multi-scale trajectory sequences with varying time resolution ,in .

[0018] The transposed tensor is continuously processed using a downsampling window of size 2. The first downsampling step involves compressing the time axis using the average pooling algorithm, averaging the five different features of two consecutive trajectory points, and merging them into one trajectory point to obtain the first downsampling scale sequence; this process is then repeated. -1 Once, a total of Sequences at different scales ,in Indicates the first Secondary downsampling. .

[0019] The scale The specific formula is as follows:

[0020]

[0021] As a preferred technical solution, the feature decomposition and embedding module is used to input a multi-scale trajectory sequence set into the feature decomposition and embedding module, and the moving average algorithm is used to decompose the sequence set into "local fluctuation" sequences. With "global fluctuation" sequence The "local fluctuation" sequence is then mapped to the hidden layer dimension via a position-free embedding layer to obtain a high-dimensional list of local term hidden layer features. The specific steps include:

[0022] Will Each scale sequence is instantiated by a learnable affine normalization layer to obtain a normalized sequence set. Then, by calling the pre-decomposition of the moving average algorithm, each sequence is... Decomposed into "local fluctuation" sequences With "global fluctuation" sequence The two parts are: the "global fluctuation" sequence will be bypassed and retained as the residual baseline for the prediction stage, and the "local fluctuation" sequence will be mapped to the hidden dimension through a feature embedding layer without location information, ultimately outputting a high-dimensional list of hidden features of local terms. .

[0023] The normalized sequence set is obtained by performing instance normalization on the sequences at each scale through a learnable affine normalization layer. First, input a set of multi-scale trajectory sequences containing four time resolutions. Then calculate its mean along the time dimension. With variance Then, affine transformation is used to perform instance normalization on the sequences with different time resolutions, resulting in a normalized set of sequences. .

[0024] The calculation of multi-scale trajectory sequence set mean With variance The specific formula is as follows:

[0025]

[0026]

[0027] in Indicates the time dimension.

[0028] The pre-decomposition of each sequence by calling the moving average algorithm... Decomposed into "local fluctuation" sequences With "global fluctuation" sequence The two parts first extract the instance-normalized sequence through a sliding window of size 25 time steps. The low-frequency smoothed baseline is denoted as the "global fluctuation" sequence. Then, the high-frequency fluctuation information is calculated by subtracting the "global fluctuation" sequence from the original sequence, and is denoted as the "local fluctuation" sequence. .

[0029] The moving average algorithm first processes the normalized sequence set. Each sequence A padding operation is performed, using edge values ​​to pad the beginning and end of the sequence with values ​​from 12 time steps, resulting in the padded sequence. Then, mean pooling is applied to the padded sequence, and the arithmetic mean is calculated within a sliding window to obtain... "Global fluctuation" value at any given moment Ultimately, a "global fluctuation" sequence was obtained. .

[0030] The copy edge value copies the value from the beginning of the sequence and fills it at the very beginning of the sequence, and copies the value from the end of the sequence and fills it at the very end of the sequence.

[0031] The specific formula for calculating the arithmetic mean is as follows:

[0032]

[0033] in express After time instance normalization, the first The value of the downsampled sequence.

[0034] The specific formula for subtracting the "global fluctuation" sequence from the original sequence is as follows:

[0035]

[0036] The process involves inputting the "local fluctuation" sequence into a feature embedding layer without location information and mapping it to the hidden dimension. First, the low-dimensional "local fluctuation" sequence... The data is embedded into a predefined high-dimensional hidden layer using a location-free encoding layer. Then, the time-frequency encoding is mapped to the high-dimensional hidden layer dimension and added to the numerical mapping features to obtain a list of high-dimensional local term hidden features.

[0037] The mapping to the preset high-dimensional hidden layer dimension transforms the pure local fluctuations into high-dimensional hidden variables with stronger representation capabilities. The high-dimensional hidden layer dimension has 16 dimensions.

[0038] As a preferred technical solution, the construction of the history decomposable hybrid module includes a list of hidden features of high-dimensional local terms. The data is fed into the multi-level eigenvalue decomposition submodule to process the hidden layer feature list of high-dimensional local terms. The moving average is then applied sequentially for further decomposition. The decomposed feature sequences are then fed into a bottom-up multi-scale local mixing submodule and a top-down multi-scale global mixing submodule to achieve bidirectional aggregation of cross-scale features, resulting in a multi-scale fused feature sequence set that integrates multi-resolution information. The specific steps include:

[0039] List the hidden features of high-dimensional local terms The data is fed into a multi-level feature decomposition submodule to obtain various local feature sequences. With each global feature sequence The feature sequences are then fed into a bottom-up multi-scale local mixing submodule and a top-down multi-scale global mixing submodule, and feature reconstruction and residual aggregation are used to obtain a multi-scale fused feature sequence set of multi-resolution information. .

[0040] The multi-layer feature decomposition submodule first establishes a multi-layer sequence decomposition stacked structure, with a total of 2 layers, and then each layer processes the same multi-scale feature list serially and updates it layer by layer.

[0041] The sequence decomposition stacked structure first processes the hidden layer feature list of high-dimensional local terms. Feature sequences at various scales The sequence is further decomposed using a moving average algorithm with a window size of 25 to separate the current-scale features into local feature sequences. With global feature sequences .

[0042] The moving average algorithm first processes the high-dimensional local term hidden layer feature list. Each sequence A padding operation is performed, using edge values ​​to pad the beginning and end of the sequence with values ​​from 12 time steps, resulting in the padded sequence. Then, mean pooling is applied to the padded sequence, and the arithmetic mean is calculated within a sliding window to obtain... Values ​​of the global feature sequence at time step Finally, a global feature sequence is obtained. .

[0043] The copy edge value copies the value from the beginning of the sequence and fills it at the very beginning of the sequence, and copies the value from the end of the sequence and fills it at the very end of the sequence.

[0044] The specific formula for calculating the arithmetic mean is as follows:

[0045]

[0046] in express List of hidden layer features of high-dimensional local terms at time step No. The value of the downsampled sequence.

[0047] The separation is into local feature sequences. With global feature sequences The specific formula is as follows:

[0048]

[0049] The bottom-up multi-scale local mixing submodule first propagates from high resolution to low resolution step by step. After mapping the high-resolution local feature sequence to the low-resolution temporal domain through a linear downsampling layer, the tensor is added element-wise to the corresponding low-resolution local feature sequence. It updates step by step until the lowest resolution scale is reached.

[0050] The propagation from high resolution to low resolution, for the first... Level feature scale, When the highest resolution scale When the initial decomposition yields a local feature sequence, it is directly used as the output of the current level; when... At that time, first extract the first level from the previous level. The updated local feature sequence is used as high-frequency injection information, and then the local feature sequence is input into the first... The nth linear downsampling layer reduces the sequence length dimension of the feature sequence from the nth linear downsampling layer. Dimensionality reduction to the 1st level Level, then the dimensionality-reduced and compressed level The first-order feature sequence and the first-order feature sequence obtained from the initial decomposition Performing element-wise tensor addition on the low-resolution local feature sequence of level 1 yields the 6th... The output feature sequence is updated at each level, and finally the 1st level is updated. The updated output feature sequence is added to the updated feature storage list and processed iteratively downwards layer by layer until the lowest resolution scale is reached.

[0051] The linear downsampling layer first... High-resolution local feature sequences A global linear compression mapping is performed in the time dimension, followed by nonlinear feature activation, to obtain the th... Low-resolution sequence .

[0052] The global linear compression mapping in the time dimension utilizes a preset linear mapping matrix. and bias vector For the High-resolution local feature sequences Perform matrix multiplication to obtain the intermediate vector. .

[0053] The preset linear mapping matrix and bias vector as follows:

[0054]

[0055]

[0056] in Indicates the sequence length of a long time series. Indicates the sequence length of a short time series.

[0057] The matrix multiplication operation is specifically formulated as follows:

[0058]

[0059] The intermediate vector as follows:

[0060]

[0061] The nonlinear feature activation will activate the intermediate vector Inputting into the GELU activation function yields the first... Low-resolution sequence

[0062] The GELU activation function has the following specific formula:

[0063]

[0064]

[0065] in, This represents the error function.

[0066] The specific formula for the element-wise addition operation of the tensor is as follows:

[0067]

[0068] in Indicates the first Level feature scale, .

[0069] The top-down multi-scale global mixing submodule first propagates from low resolution to high resolution step by step. After mapping the low-resolution global feature sequence to the high-resolution time domain through a linear upsampling layer, the tensor is added element-wise to the corresponding high-resolution global feature sequence. It updates step by step until the highest resolution scale.

[0070] The propagation from low resolution to high resolution, for the first... Level feature scale, When the lowest resolution scale When the initial decomposition yields a global feature sequence, it is directly used as the output of the current level; when... At that time, first extract the first level from the previous level. The updated global feature sequence is used as low-frequency injection information, and then the global feature sequence is input into the first... The nth linear upsampling layer reduces the sequence length dimension of the feature sequence from the nth linear upsampling layer. Upgraded to the dimensional expansion level Level, then the expanded level after the upgrade The first-order feature sequence and the first-order feature sequence obtained from the initial decomposition Perform element-wise tensor addition on the high-resolution global feature sequence to obtain the first-order high-resolution global feature sequence. The output feature sequence is updated at each level, and finally the 1st level is updated. The updated output feature sequence is added to the updated feature storage list and processed iteratively upwards layer by layer until the highest resolution scale is reached.

[0071] The linear upsampling layer first... Low-resolution global feature sequences A global linear augmentation mapping is performed in the time dimension, followed by nonlinear feature activation, to obtain the th... High-resolution sequence .

[0072] The global linear expansion mapping in the time dimension utilizes a preset linear mapping matrix. and bias vector For the Low-resolution global feature sequences Perform matrix multiplication to obtain the intermediate vector. .

[0073] The preset linear mapping matrix and bias vector as follows:

[0074]

[0075]

[0076] in Indicates the sequence length of a long time series. Indicates the sequence length of a short time series.

[0077] The matrix multiplication operation is specifically formulated as follows:

[0078]

[0079] The intermediate vector as follows:

[0080]

[0081] The nonlinear feature activation will activate the intermediate vector Inputting into the GELU activation function yields the first... Low-resolution sequence

[0082] The GELU activation function has the following specific formula:

[0083]

[0084]

[0085] in, This represents the error function.

[0086] The specific formula for the element-wise addition operation of the tensor is as follows:

[0087]

[0088] in Indicates the first Level feature scale, .

[0089] The method employing feature reconstruction and residual aggregation first adds the local feature sequences after mixing at various scales to the global feature sequences using an element-wise, position-by-position summation, resulting in an intermediate feature sequence. After nonlinear mapping, it is then compared with the original input sequence. Perform residual connections, and generate fused feature sequences for each layer through the output cross-connect layer. Finally, a multi-scale fused feature sequence set integrating multi-resolution information is obtained. .

[0090] The specific formula for the element-by-element summation is as follows:

[0091]

[0092] The specific formula for the nonlinear mapping is as follows:

[0093] The residual connection is specifically formulated as follows:

[0094]

[0095] As a preferred technical solution, the construction of the future multi-scale prediction module integrates a multi-scale fusion feature sequence set. The data is fed into the future multi-scale prediction module, aligned to the prediction time step using a time-domain linear mapping, and added to the corresponding scale's original global sequence residuals to output the prediction results at each scale. Then, through multi-scale summation, the model's predicted trajectory data is obtained. Specific steps include:

[0096] A multi-scale fusion feature sequence set that integrates multi-resolution information The data is fed into the future multi-scale prediction module and aligned to the prediction time step using a temporal linear mapping to obtain a set of feature sequences for each prediction time step at each resolution. Then, each element is added to the original global sequence at the corresponding scale to obtain the predicted trajectory data at each resolution. Finally, the predicted trajectory data of the model is obtained through multi-scale aggregation. .

[0097] The time-domain linear mapping first constructs a weight matrix. Then, the feature sequences are fused with those from each layer. Perform matrix multiplication to align the historical time steps of the fused feature sequences from each layer with the prediction duration, thus obtaining the feature sequence set for each prediction time step at each resolution. .

[0098] The construction of the weight matrix The specific formula is as follows:

[0099]

[0100] in Indicates the length of the prediction period.

[0101] The matrix multiplication is specifically formulated as follows:

[0102]

[0103] The element-by-element addition to the original global sequence at the corresponding scale is calculated using the following formula:

[0104]

[0105] in This represents the original global sequence.

[0106] The multi-scale aggregation yields the model's predicted trajectory data. The specific formula is as follows:

[0107]

[0108] in Indicates total Secondary downsampling.

[0109] As a preferred technical solution, the model training is based on updating network parameters with the goal of minimizing the mean squared error loss function, and the network model and parameters are saved after training is completed.

[0110] The formula for minimizing the mean squared error loss function is as follows:

[0111]

[0112] in Indicates the first The true value of a future point in time. Indicates the first The predicted values ​​of the model at each time point.

[0113] The present invention also provides a ship trajectory prediction system based on multi-scale decomposition and cross-scale hybridization, comprising: a data preprocessing module, a multi-scale input processing module, a feature decomposition and embedding module, a historical decomposable hybridization module, a future multi-scale prediction module, a training module, and a testing module;

[0114] The data preprocessing module is used to read the original AIS trajectory data in the dataset, send the trajectory data into the data preprocessing module, and achieve the purpose of filtering out invalid data such as trajectory sequences containing NaN values ​​and insufficient length, so as to obtain normalized continuous value data.

[0115] The multi-scale input processing module is used to input continuous value data of ship spatial-motion characteristics into the multi-scale input processing module, perform average pooling and stepwise downsampling, and obtain a set of multi-scale trajectory sequences containing four time resolutions. ;

[0116] The feature decomposition and embedding module is used to feed the multi-scale trajectory sequence set into the feature decomposition and embedding module, and use the moving average algorithm to decompose the sequence set into "local fluctuation" sequences. With "global fluctuation" sequence The "local fluctuation" sequence is then mapped to the hidden layer dimension via a position-free embedding layer to obtain a high-dimensional list of local term hidden layer features. ;

[0117] The historical decomposable hybrid module is used to process the high-dimensional local term hidden layer feature list. The data is fed into the multi-level eigenvalue decomposition submodule to process the hidden layer feature list of high-dimensional local terms. The moving average is then applied sequentially for further decomposition. The decomposed feature sequences are then fed into a bottom-up multi-scale local mixing submodule and a top-down multi-scale global mixing submodule to achieve bidirectional aggregation of cross-scale features, resulting in a multi-scale fused feature sequence set that integrates multi-resolution information. ;

[0118] The future multi-scale prediction module is used to fuse multi-scale feature sequence sets. The data is fed into the future multi-scale prediction module, aligned to the prediction time step using a time-domain linear mapping, and added to the original global sequence residuals at the corresponding scales. The prediction results at each scale are then output, and the model's predicted trajectory data is obtained through multi-scale summation.

[0119] The training module is used for model training, updating network parameters with the goal of minimizing the mean squared error loss function, and saving the network model and parameters after training is completed.

[0120] The testing module is used for model testing. It loads the trained prediction model, inputs historical ship trajectory data, and outputs predicted ship trajectory data.

[0121] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0122] (1) This invention proposes a ship trajectory prediction method based on multi-scale decomposition and cross-scale hybridization. From the perspective of the multi-resolution characteristics of time series data, the complex motion trajectory of the ship is decoupled into two independent components representing "local micro-fluctuations (local term)" and "global macro-direction (global term)" through the feature decomposition module. This effectively overcomes the defect of traditional deep learning models in distinguishing complex interference information under a single time scale, and significantly improves the model's ability to represent trajectory features in complex navigation environments.

[0123] (2) This invention designs a history-decomposable hybrid coding module, which achieves deep bidirectional interaction between fine-scale and coarse-scale features by mixing bottom-up local fluctuation features and top-down macroscopic global features. This mechanism uses macroscopic low-frequency features to guide local prediction and microscopic high-frequency features to enrich macroscopic details, effectively suppressing the transmission of invalid noise in long sequence modeling, greatly alleviating the error accumulation problem that is very easy to occur in long-term prediction tasks, and improving the accuracy of long-term and long-distance ship trajectory prediction.

[0124] (3) This invention designs a future multi-scale prediction decoding and aggregation module, which independently decodes the fusion features and the original global residuals at different time resolutions, and comprehensively aggregates the multi-scale prediction results in the final output stage. This prediction method that integrates multiple perspectives fully integrates the motion features of various dimensions, enhances the model's ability to capture sudden trajectory changes and its cross-scene generalization ability. Attached Figure Description

[0125] Figure 1 This is a flowchart illustrating the ship trajectory prediction method based on multi-scale decomposition and cross-scale hybridization in this embodiment.

[0126] Figure 2 This is a comparison chart of the error distances of the ship trajectory prediction method based on multi-scale decomposition and cross-scale hybridization in this embodiment;

[0127] Figure 3 This is a schematic diagram of the model training process in the ship trajectory prediction method based on multi-scale decomposition and cross-scale hybridization in this embodiment.

[0128] Figure 4 This is a schematic diagram of the process steps in the model testing part of the ship trajectory prediction method based on multi-scale decomposition and cross-scale hybridization in this embodiment. Detailed Implementation

[0129] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0130] Example

[0131] This embodiment uses the publicly available AIS dataset provided by the Danish Maritime Authority (DMA) for model training, validation, and testing. As one of the most authoritative maritime data sources in the Nordic region, the DMA AIS dataset, with its high spatiotemporal resolution, low noise level, and wide applicability to various scenarios, has become a benchmark data source for ship trajectory prediction research. The DMA dataset effectively ensures data continuity through a standardized time sampling strategy: after downsampling the original AIS data at fixed intervals of 10 minutes, the time deviation between adjacent trajectory points is controlled within ±30 seconds; in the preprocessing stage, a trajectory segmentation algorithm is used to further eliminate fragmented segments with time intervals exceeding 2 hours. After the above processing, the effective trajectory proportion of more than 64 consecutive time points (a total of 640 minutes) in the dataset reaches 56.7%, providing sufficient and stable input for long-cycle trajectory prediction tasks. At the same time, the DMA dataset significantly reduces noise interference through a multi-stage preprocessing process. The proportion of stationary ship trajectories in the processed data is less than 8%, far lower than the static data proportion of more than 40% typically found in commercial datasets such as MarineTraffic. This advantage greatly reduces the burden on the model to learn invalid information.

[0132] Furthermore, the DMA dataset excels in long-course coverage: its 2025 data includes 890 complete voyage segments exceeding 180 time points (i.e., 30 hours) in length, and uses MMSI numbers to track the correlation of a single vessel's multi-voyage behavior. This long-range completeness enables the model to effectively learn the long-term navigation patterns of vessels. Therefore, in models trained using DMA data, the 10-hour prediction error can be controlled within 10 nautical miles, significantly outperforming models trained on short-course data (whose errors typically exceed 25 nautical miles).

[0133] This embodiment uses the ship AIS dataset provided by DMA for training and validation. Taking the testing within the ship AIS dataset provided by DMA as an example, the implementation process of this embodiment is described in detail. The database is divided into training set, validation set, and test set in a 7:2:1 ratio. This embodiment is simulated on a Windows system, version Windows 11, based on the deep learning framework PyTorch 2.3.1 and implemented using Python 3.9.23, with an RTX 4070 graphics card and CUDA version 11.8.

[0134] like Figure 1-4 As shown, this embodiment provides a ship trajectory prediction method based on multi-scale decomposition and cross-scale hybridization, including the following steps:

[0135] S1: Construct a data preprocessing module to read the original AIS trajectory data in the dataset, send the trajectory data into the data preprocessing module, achieve the purpose of filtering out invalid data such as trajectory sequences containing NaN values ​​and insufficient length, and obtain normalized continuous value data. The specific steps are as follows.

[0136] In this embodiment, the original trajectory dataset is read, trajectory sequences containing NaN values ​​and less than 25 time steps (125 minutes) are removed, invalid data containing the above conditions is filtered out, a trajectory dictionary list is output, and time series trajectories of different lengths are unified to a fixed input history length of 24 time steps (120 minutes) to construct the standard format required for model training (i.e., fixed trajectory history length input) and obtain normalized continuous value data.

[0137] S2: Construct a multi-scale input processing module to input continuous value data of ship spatial-motion characteristics into the multi-scale input processing module, perform average pooling and stepwise downsampling to obtain a set of multi-scale trajectory sequences containing four time resolutions. The specific steps are as follows.

[0138] In this embodiment, the continuous value data of ship spatial-motion characteristics are transformed from the original input sequence. Transpose along the time dimension to obtain a three-dimensional tensor Then, the transposed tensor is downsampled three times consecutively using a downsampling window of size 2, integrating the uncompressed original sequence with... The new sequence generated by the next downsampling yields a multi-scale trajectory sequence set containing four temporal resolutions. ,in .

[0139] The transposed tensor is downsampled three times consecutively using a downsampling window of size 2. First, average pooling is used to compress the time axis for downsampling. Then, the average of five different features from two consecutive trajectory points is calculated and merged into one trajectory point, resulting in the first downsampling scale sequence. This process is repeated twice more to obtain a total of three different scale sequences. .

[0140] The scale The specific formula is as follows:

[0141]

[0142] S3: The feature decomposition and embedding module is constructed by feeding the multi-scale trajectory sequence set into the feature decomposition and embedding module, and using the moving average algorithm to decompose the sequence set into "local fluctuation" sequences. With "global fluctuation" sequence The local components are then mapped to the hidden layer dimension via a position-free embedding layer to obtain a high-dimensional list of local term hidden layer features. The specific steps are as follows.

[0143] In this embodiment, Each scale sequence is instantiated by a learnable affine normalization layer to obtain a normalized sequence set. Then, by calling the pre-decomposition of the moving average algorithm, each sequence is... Decomposed into "local fluctuation" sequences With "global fluctuation" sequence The two parts are: the "global fluctuation" sequence will be bypassed and retained as the residual baseline for the prediction stage, and the "local fluctuation" sequence will be mapped to the hidden dimension through a feature embedding layer without location information, ultimately outputting a high-dimensional list of hidden features of local terms. .

[0144] The normalized sequence set is obtained by performing instance normalization on the sequences at each scale through a learnable affine normalization layer. First, input a set of multi-scale trajectory sequences containing four time resolutions. Then calculate its mean along the time dimension. With variance Then, affine transformation is used to perform instance normalization on the sequences with different time resolutions, resulting in a normalized set of sequences. .

[0145] The calculation of multi-scale trajectory sequence set mean With variance The specific formula is as follows:

[0146]

[0147]

[0148] in Indicates the time dimension.

[0149] The pre-decomposition of each sequence by calling the moving average algorithm... Decomposed into "local fluctuation" sequences With "global fluctuation" sequence The two parts first extract the instance-normalized sequence through a sliding window of size 25 time steps. The low-frequency smoothed baseline is denoted as the "global fluctuation" sequence. Then, the high-frequency fluctuation information is calculated by subtracting the "global fluctuation" sequence from the original sequence, and is denoted as the "local fluctuation" sequence. .

[0150] The moving average algorithm first processes the normalized sequence set. Each sequence A padding operation is performed, using edge values ​​to pad the beginning and end of the sequence with values ​​from 12 time steps, resulting in the padded sequence. Then, mean pooling is applied to the padded sequence, and the arithmetic mean is calculated within a sliding window to obtain... "Global fluctuation" value at any given moment Ultimately, a "global fluctuation" sequence was obtained. .

[0151] The copy edge value copies the value from the beginning of the sequence and fills it at the very beginning of the sequence, and copies the value from the end of the sequence and fills it at the very end of the sequence.

[0152] The specific formula for calculating the arithmetic mean is as follows:

[0153]

[0154] in express After time instance normalization, the first The value of the downsampled sequence.

[0155] The specific formula for subtracting the "global fluctuation" sequence from the original sequence is as follows:

[0156]

[0157] The process involves inputting the "local fluctuation" sequence into a feature embedding layer without location information and mapping it to the hidden dimension. First, the low-dimensional "local fluctuation" sequence... The data is embedded into a predefined high-dimensional hidden layer using a location-free encoding layer. Then, the time-frequency encoding is mapped to the high-dimensional hidden layer dimension and added to the numerical mapping features to obtain a list of high-dimensional local term hidden features.

[0158] The mapping to the preset high-dimensional hidden layer dimension transforms the pure local fluctuations into high-dimensional hidden variables with stronger representation capabilities. The high-dimensional hidden layer dimension has 16 dimensions.

[0159] S4: The constructed history decomposable hybrid module will include the high-dimensional local term hidden layer feature list. The data is fed into the multi-level eigenvalue decomposition submodule to process the hidden layer feature list of high-dimensional local terms. The moving average is then applied sequentially for further decomposition. The decomposed feature sequences are then fed into a bottom-up multi-scale local mixing submodule and a top-down multi-scale global mixing submodule to achieve bidirectional aggregation of cross-scale features, resulting in a multi-scale fused feature sequence set that integrates multi-resolution information. The specific steps are as follows.

[0160] In this embodiment, the hidden layer feature list of high-dimensional local terms is used. The data is fed into a multi-level feature decomposition submodule to obtain various local feature sequences. With each global feature sequence The feature sequences are then fed into a bottom-up multi-scale local mixing submodule and a top-down multi-scale global mixing submodule, and feature reconstruction and residual aggregation are used to obtain a multi-scale fused feature sequence set of multi-resolution information. .

[0161] The multi-layer feature decomposition submodule first establishes a multi-layer sequence decomposition stacked structure, with a total of 2 layers, and then each layer processes the same multi-scale feature list serially and updates it layer by layer.

[0162] The sequence decomposition stacked structure first processes the hidden layer feature list of high-dimensional local terms. Feature sequences at various scales The sequence is further decomposed using a moving average algorithm with a window size of 25 to separate the current-scale features into local feature sequences. With global feature sequences .

[0163] The moving average algorithm first processes the high-dimensional local term hidden layer feature list. Each sequence A padding operation is performed, using edge values ​​to pad the beginning and end of the sequence with values ​​from 12 time steps, resulting in the padded sequence. Then, mean pooling is applied to the padded sequence, and the arithmetic mean is calculated within a sliding window to obtain... Values ​​of the global feature sequence at time step Finally, a global feature sequence is obtained. .

[0164] The copy edge value copies the value from the beginning of the sequence and fills it at the very beginning of the sequence, and copies the value from the end of the sequence and fills it at the very end of the sequence.

[0165] The specific formula for calculating the arithmetic mean is as follows:

[0166]

[0167] in express List of hidden layer features of high-dimensional local terms at time step No. The value of the downsampled sequence.

[0168] The separation is into local feature sequences. With global feature sequences The specific formula is as follows:

[0169]

[0170] The bottom-up multi-scale local mixing submodule first propagates from high resolution to low resolution step by step. After mapping the high-resolution local feature sequence to the low-resolution temporal domain through a linear downsampling layer, the tensor is added element-wise to the corresponding low-resolution local feature sequence. It updates step by step until the lowest resolution scale is reached.

[0171] The propagation from high resolution to low resolution, for the first... Level feature scale, When the highest resolution scale When the initial decomposition yields a local feature sequence, it is directly used as the output of the current level; when... At that time, first extract the first level from the previous level. The updated local feature sequence is used as high-frequency injection information, and then the local feature sequence is input into the first... The nth linear downsampling layer reduces the sequence length dimension of the feature sequence from the nth linear downsampling layer. Dimensionality reduction to the 1st level Level, then the dimensionality-reduced and compressed level The first-order feature sequence and the first-order feature sequence obtained from the initial decomposition Performing element-wise tensor addition on the low-resolution local feature sequence of level 1 yields the 6th... The output feature sequence is updated at each level, and finally the 1st level is updated. The updated output feature sequence is added to the updated feature storage list and processed iteratively downwards layer by layer until the lowest resolution scale is reached.

[0172] The linear downsampling layer first... High-resolution local feature sequences A global linear compression mapping is performed in the time dimension, followed by nonlinear feature activation, to obtain the th... Low-resolution sequence .

[0173] The global linear compression mapping in the time dimension utilizes a preset linear mapping matrix. and bias vector For the High-resolution local feature sequences Perform matrix multiplication to obtain the intermediate vector. .

[0174] The preset linear mapping matrix and bias vector as follows:

[0175]

[0176]

[0177] in Indicates the sequence length of a long time series. Indicates the sequence length of a short time series.

[0178] The matrix multiplication operation is specifically formulated as follows:

[0179]

[0180] The intermediate vector as follows:

[0181]

[0182] The nonlinear feature activation will activate the intermediate vector Inputting into the GELU activation function yields the first... Low-resolution sequence

[0183] The GELU activation function has the following specific formula:

[0184]

[0185]

[0186] in, This represents the error function.

[0187] The specific formula for the element-wise addition operation of the tensor is as follows:

[0188]

[0189] in Indicates the first Level feature scale, .

[0190] The top-down multi-scale global mixing submodule first propagates from low resolution to high resolution step by step. After mapping the low-resolution global feature sequence to the high-resolution time domain through a linear upsampling layer, the tensor is added element-wise to the corresponding high-resolution global feature sequence. It updates step by step until the highest resolution scale.

[0191] The propagation from low resolution to high resolution, for the first... Level feature scale, When the lowest resolution scale When the initial decomposition yields a global feature sequence, it is directly used as the output of the current level; when... At that time, first extract the first level from the previous level. The updated global feature sequence is used as low-frequency injection information, and then the global feature sequence is input into the first... The nth linear upsampling layer reduces the sequence length dimension of the feature sequence from the nth linear upsampling layer. Upgraded to the dimensional expansion level Level, then the expanded level after the upgrade The first-order feature sequence and the first-order feature sequence obtained from the initial decomposition Perform element-wise tensor addition on the high-resolution global feature sequence to obtain the first-order high-resolution global feature sequence. The output feature sequence is updated at each level, and finally the 1st level is updated. The updated output feature sequence is added to the updated feature storage list and processed iteratively upwards layer by layer until the highest resolution scale is reached.

[0192] The linear upsampling layer first... Low-resolution global feature sequences A global linear augmentation mapping is performed in the time dimension, followed by nonlinear feature activation, to obtain the th... High-resolution sequence .

[0193] The global linear expansion mapping in the time dimension utilizes a preset linear mapping matrix. and bias vector For the Low-resolution global feature sequences Perform matrix multiplication to obtain the intermediate vector. .

[0194] The preset linear mapping matrix and bias vector as follows:

[0195]

[0196]

[0197] in Indicates the sequence length of a long time series. Indicates the sequence length of a short time series.

[0198] The matrix multiplication operation is specifically formulated as follows:

[0199]

[0200] The intermediate vector as follows:

[0201]

[0202] The nonlinear feature activation will activate the intermediate vector Inputting into the GELU activation function yields the first... Low-resolution sequence

[0203] The GELU activation function has the following specific formula:

[0204]

[0205]

[0206] in, This represents the error function.

[0207] The specific formula for the element-wise addition operation of the tensor is as follows:

[0208]

[0209] in Indicates the first Level feature scale, .

[0210] The method employing feature reconstruction and residual aggregation first adds the local feature sequences after mixing at various scales to the global feature sequences using an element-wise, position-by-position summation, resulting in an intermediate feature sequence. After nonlinear mapping, it is then compared with the original input sequence. Perform residual connections, and generate fused feature sequences for each layer through the output cross-connect layer. Finally, a multi-scale fused feature sequence set integrating multi-resolution information is obtained. .

[0211] The specific formula for the element-by-element summation is as follows:

[0212]

[0213] The specific formula for the nonlinear mapping is as follows:

[0214] The residual connection is specifically formulated as follows:

[0215]

[0216] S5: The construction of the future multi-scale prediction module will fuse the multi-scale feature sequence set. The data is fed into the future multi-scale prediction module, aligned to the prediction time step using a time-domain linear mapping, and added to the original global sequence residuals at the corresponding scales. The prediction results at each scale are then output, and the predicted trajectory data of the model is obtained by multi-scale summation. The specific steps are as follows.

[0217] In this embodiment, a multi-scale fusion feature sequence set that integrates multi-resolution information is used. The data is fed into the future multi-scale prediction module and aligned to the prediction time step using a temporal linear mapping to obtain a set of feature sequences for each prediction time step at each resolution. Then, each element is added to the original global sequence at the corresponding scale to obtain the predicted trajectory data at each resolution. Finally, the predicted trajectory data of the model is obtained through multi-scale aggregation. .

[0218] The time-domain linear mapping first constructs a weight matrix. Then, the feature sequences are fused with those from each layer. Perform matrix multiplication to align the historical time steps of the fused feature sequences from each layer with the prediction duration, thus obtaining the feature sequence set for each prediction time step at each resolution. .

[0219] The construction of the weight matrix The specific formula is as follows:

[0220]

[0221] in Indicates the length of the prediction period.

[0222] The matrix multiplication is specifically formulated as follows:

[0223]

[0224] The element-by-element addition to the original global sequence at the corresponding scale is calculated using the following formula:

[0225]

[0226] in This represents the original global sequence.

[0227] The multi-scale aggregation yields the model's predicted trajectory data. The specific formula is as follows:

[0228]

[0229] in Indicates total Secondary downsampling.

[0230] S6: Model training involves updating network parameters with the objective of minimizing the mean squared error loss function. After training, the network model and parameters are saved. The training process is as follows: Figure 4 As shown.

[0231] The formula for minimizing the mean squared error loss function is as follows:

[0232]

[0233] in Indicates the first The true value of a future point in time. Indicates the first The predicted values ​​of the model at each time point.

[0234] S6: Model testing. Load the trained prediction model, input historical ship trajectory data, and output predicted ship trajectory data. This embodiment uses the Adam algorithm for parameter optimization, with a batch size of 32 and an initial learning rate of [missing information]. The total number of training epochs is set to 50. Then, the network parameters are updated with the goal of minimizing the mean squared error loss function. After training is completed, the network model and parameters are saved.

[0235] The testing process is as follows Figure 4 As shown. In this embodiment, the error between the actual trajectory and the predicted trajectory is calculated using the Haversine distance, with the specific formula as follows:

[0236]

[0237]

[0238]

[0239]

[0240]

[0241] in It represents the difference between two latitudes. In this embodiment, the difference between two longitudes is represented. .

[0242] The smaller the Haversine distance calculation result, the smaller the distance error between the historical trajectory and the true trajectory, and the better the model performance.

[0243] To demonstrate the effectiveness of this invention and test the generalization performance of the method, this embodiment follows the testing conditions of existing detection algorithms, trains and tests on the DMA AIS dataset, and selects the classic ship trajectory prediction algorithm TrAISformer (published in 2024 in a top IEEE journal) for comparison. The experimental results are shown in Table 1:

[0244] Table 1. Comparison of Model Prediction Duration and Error Distance (Unit: km)

[0245] TrAISformer 6.52 7.75 9.00 11.89 This method 4.80 6.75 8.36 9.32

[0246] As shown in Table 1, compared with the TrAISformer method, the prediction error distance of this invention decreased by 1.72 km, 1.00 km, 0.64 km, and 2.57 km under the conditions of 4h, 6h, 8h, and 10h, respectively. This invention effectively improves the prediction performance of the prediction model, verifying the effectiveness and advancement of the method.

[0247] This invention addresses the challenge of existing prediction methods for long-term accuracy. It aims to improve prediction accuracy by leveraging the multi-scale characteristics of time series data and employing feature decoupling at multiple resolutions. First, raw ship trajectory data is read from the dataset and input into a preprocessing module to obtain normalized continuous values ​​of ship spatial-motion features, including longitude, latitude, heading, speed, and timestamp. Then, this raw continuous value data is fed into a multi-scale input processing module to obtain a set of multi-scale trajectory sequences covering four different time resolutions. Next, this set of multi-scale trajectory sequences is fed into a feature decomposition and feature embedding module, which utilizes local-global separation and high-dimensional feature projection to obtain a list of high-dimensional local term hidden features with stronger representational capabilities. Then, the obtained high-dimensional local term hidden layer feature list The data is fed into a historically decomposable mixing module, where cross-scale features are aggregated bidirectionally through bottom-up multi-scale local mixing and top-down multi-scale global mixing. This yields a multi-scale fused feature vector with stronger representational capabilities. Finally, the fused feature vector is fed into a future multi-scale prediction module to predict the fused feature vectors at different time resolutions. This process minimizes the mean square error between the model's predicted trajectory data and the actual data, and yields the predicted future trajectory map.

[0248] The above experimental results demonstrate that this embodiment exhibits excellent performance on existing public databases, fully verifying the effectiveness of the method of the present invention.

[0249] This embodiment also provides a ship trajectory prediction method based on multi-scale decomposition and cross-scale hybridization, including: a data preprocessing module, a multi-scale input processing module, a feature decomposition and embedding module, a historical decomposable hybridization module, a future multi-scale prediction module, a training module, and a testing module;

[0250] In this embodiment, the data preprocessing module reads the original AIS trajectory data from the dataset and sends the trajectory data to the data preprocessing module to filter out invalid data such as trajectory sequences containing NaN values ​​and insufficient length, thereby obtaining normalized continuous value data. The multi-scale input processing module sends the ship's spatial-motion characteristic continuous value data to the multi-scale input processing module, performs average pooling and stepwise downsampling, and obtains a set of multi-scale trajectory sequences containing four time resolutions. The feature decomposition and embedding module is used to feed a multi-scale trajectory sequence set into the feature decomposition and embedding module, and uses the moving average algorithm to decompose the sequence set into "local fluctuation" sequences. With "global fluctuation" sequence The "local fluctuation" sequence is then mapped to the hidden layer dimension via a position-free embedding layer to obtain a high-dimensional list of local term hidden layer features. The history-decomposable hybrid module is used to extract the hidden feature list of high-dimensional local terms. The data is fed into the multi-level eigenvalue decomposition submodule to process the hidden layer feature list of high-dimensional local terms. The moving average is then applied sequentially for further decomposition. The decomposed feature sequences are then fed into a bottom-up multi-scale local mixing submodule and a top-down multi-scale global mixing submodule to achieve bidirectional aggregation of cross-scale features, resulting in a multi-scale fused feature sequence set that integrates multi-resolution information. The future multi-scale prediction module is used to fuse multi-scale feature sequence sets. The data is fed into the future multi-scale prediction module, where it is aligned to the prediction time step using a time-domain linear mapping and added to the original global sequence residuals at the corresponding scale. The prediction results for each scale are then output, and the predicted trajectory data of the model is obtained through multi-scale summation. Model training updates the network parameters with the goal of minimizing the mean squared error loss function. After training is completed, the network model and parameters are saved. The testing module is used for model testing. It loads the trained prediction model, inputs historical ship trajectory data, and outputs ship predicted trajectory data.

[0251] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A ship trajectory prediction method based on multi-scale decomposition and cross-scale hybridization, characterized in that, Includes the following steps: A data preprocessing module is constructed to read the original AIS trajectory data in the dataset and send the trajectory data into the data preprocessing module to achieve the purpose of filtering out invalid data such as trajectory sequences containing NaN values ​​and insufficient length, so as to obtain normalized continuous value data. A multi-scale input processing module is constructed to input continuous value data of ship spatial-motion characteristics into the module, perform average pooling and stepwise downsampling, and obtain a set of multi-scale trajectory sequences containing four temporal resolutions. ; A feature decomposition and embedding module is constructed. A multi-scale trajectory sequence set is fed into this module, and a moving average algorithm is used to decompose the sequence set into "local fluctuation" sequences. With "global fluctuation" sequence The "local fluctuation" sequence is then mapped to the hidden layer dimension via a position-free embedding layer to obtain a high-dimensional list of local term hidden layer features. ; Construct a historically decomposable hybrid module to list the hidden features of high-dimensional local terms. The data is fed into the multi-level eigenvalue decomposition submodule to process the hidden layer feature list of high-dimensional local terms. The moving average is then applied sequentially for further decomposition. The decomposed feature sequences are then fed into a bottom-up multi-scale local mixing submodule and a top-down multi-scale global mixing submodule to achieve bidirectional aggregation of cross-scale features, resulting in a multi-scale fused feature sequence set that integrates multi-resolution information. ; Construct a future multi-scale prediction module to fuse multi-scale feature sequence sets. The data is fed into the future multi-scale prediction module, aligned to the prediction time step using a time-domain linear mapping, and added to the original global sequence residuals at the corresponding scales. The prediction results at each scale are then output, and the model's predicted trajectory data is obtained through multi-scale summation. Model training involves updating network parameters with the goal of minimizing the mean squared error loss function. After training is complete, the network model and parameters are saved. Model testing involves loading the trained prediction model, inputting historical ship trajectory data, and outputting predicted ship trajectory data.

2. The ship trajectory prediction method based on multi-scale decomposition and cross-scale hybridization according to claim 1, characterized in that, The data preprocessing module reads the original AIS trajectory data from the dataset and sends the trajectory data into the preprocessing module to filter out invalid data such as trajectory sequences containing NaN values ​​and insufficient length, thereby obtaining normalized continuous value data. Specific steps include: Read the original trajectory dataset, remove trajectory sequences containing NaN values ​​and those with insufficient length, filter invalid data that meet the above conditions, output a list of trajectory dictionaries, and unify time series trajectories of different lengths to a fixed length (input historical length), construct the standard format required for model training (i.e., input with fixed trajectory historical length), and obtain normalized continuous value data.

3. The ship trajectory prediction method based on multi-scale decomposition and cross-scale hybridization according to claim 1, characterized in that, The multi-scale input processing module is constructed by feeding continuous value data of ship spatial-motion characteristics into the module, performing average pooling and stepwise downsampling to obtain a set of multi-scale trajectory sequences containing four temporal resolutions. The specific steps include: The continuous value data of ship spatial-motion characteristics are transformed from the original input sequence. Transpose along the time dimension to obtain a three-dimensional tensor Then, apply a downsampling window of size 2 to the transposed tensor and perform continuous operations. Secondary downsampling integrates the uncompressed original sequence with... The new sequence generated by the next downsampling yields a sequence containing... +1 A collection of multi-scale trajectory sequences with varying time resolution ,in ; The transposed tensor is continuously processed using a downsampling window of size 2. The first downsampling step involves compressing the time axis using the average pooling algorithm, averaging the five different features of two consecutive trajectory points, and merging them into one trajectory point to obtain the first downsampling scale sequence; this process is then repeated. -1 Once, a total of Sequences at different scales ,in Indicates the first Secondary downsampling. ; The scale The specific formula is as follows: 。 4. The ship trajectory prediction method based on multi-scale decomposition and cross-scale hybridization according to claim 1, characterized in that, The feature decomposition and embedding module takes a multi-scale trajectory sequence set and feeds it into the feature decomposition and embedding module. It then uses a moving average algorithm to decompose the sequence set into "local fluctuation" sequences. With "global fluctuation" sequence The local components are then mapped to the hidden layer dimension via a position-free embedding layer to obtain a high-dimensional list of local term hidden layer features. The specific steps include: Will Each scale sequence is instantiated by a learnable affine normalization layer to obtain a normalized sequence set. Then, by calling the pre-decomposition of the moving average algorithm, each sequence is... Decomposed into "local fluctuation" sequences With "global fluctuation" sequence The process consists of two parts: the "global fluctuation" sequence is bypassed and retained as the residual baseline for the prediction stage, while the "local fluctuation" sequence is mapped to the hidden dimension through a feature embedding layer without location information, ultimately outputting a high-dimensional list of hidden features for local terms. ; The normalized sequence set is obtained by performing instance normalization on the sequences at each scale through a learnable affine normalization layer. First, input a set of multi-scale trajectory sequences containing four time resolutions. Then calculate its mean along the time dimension. With variance Then, affine transformation is used to perform instance normalization on the sequences with different time resolutions, resulting in a normalized set of sequences. ; The calculation of multi-scale trajectory sequence set mean With variance The specific formula is as follows: ; ; in Indicates the time dimension; The pre-decomposition of each sequence by calling the moving average algorithm... Decomposed into "local fluctuation" sequences With "global fluctuation" sequence The two parts first extract the instance-normalized sequence through a sliding window of size 25 time steps. The low-frequency smoothed baseline is denoted as the "global fluctuation" sequence. Then, the high-frequency fluctuation information is calculated by subtracting the "global fluctuation" sequence from the original sequence, and is denoted as the "local fluctuation" sequence. ; The moving average algorithm first processes the normalized sequence set. Each sequence A padding operation is performed, using edge values ​​to pad the beginning and end of the sequence with values ​​from 12 time steps, resulting in the padded sequence. Then, mean pooling is applied to the padded sequence, and the arithmetic mean is calculated within a sliding window to obtain... "Global fluctuation" value at any given moment Ultimately, a "global fluctuation" sequence was obtained. ; The copied edge value copies the value from the beginning of the sequence and fills it at the very beginning of the sequence, and copies the value from the end of the sequence and fills it at the very end of the sequence; The specific formula for calculating the arithmetic mean is as follows: ; in express After time instance normalization, the first The values ​​of the downsampled sequence; The specific formula for subtracting the "global fluctuation" sequence from the original sequence is as follows: ; The process involves inputting the "local fluctuation" sequence into a feature embedding layer without location information and mapping it to the hidden dimension. First, the low-dimensional "local fluctuation" sequence... The data is embedded through a positionless encoding layer and mapped to a preset high-dimensional hidden layer dimension. Then, the time-frequency encoding is mapped to the high-dimensional hidden layer dimension and added to the numerical mapping features to obtain the final list of high-dimensional local term hidden layer features. ; The mapping to the preset high-dimensional hidden layer dimension transforms the pure local fluctuations into high-dimensional hidden variables with stronger representation capabilities. The high-dimensional hidden layer dimension has 16 dimensions.

5. The ship trajectory prediction method based on multi-scale decomposition and cross-scale hybridization according to claim 1, characterized in that, The constructed history decomposable hybrid module will compile a list of hidden features of high-dimensional local terms. The data is fed into the multi-level eigenvalue decomposition submodule to process the hidden layer feature list of high-dimensional local terms. The moving average is then applied sequentially for further decomposition. The decomposed feature sequences are then fed into a bottom-up multi-scale local mixing submodule and a top-down multi-scale global mixing submodule to achieve bidirectional aggregation of cross-scale features, resulting in a multi-scale fused feature sequence set that integrates multi-resolution information. The specific steps include: List the hidden features of high-dimensional local terms The data is fed into a multi-level feature decomposition submodule to obtain various local feature sequences. With each global feature sequence The feature sequences are then fed into a bottom-up multi-scale local mixing submodule and a top-down multi-scale global mixing submodule, and feature reconstruction and residual aggregation are used to obtain a multi-scale fused feature sequence set of multi-resolution information. ; The multi-layer feature decomposition submodule first establishes a multi-layer sequence decomposition stacked structure, with a total of 2 layers, and then each layer processes the same multi-scale feature list serially and updates it layer by layer. The sequence decomposition stacked structure first processes the hidden layer feature list of high-dimensional local terms. Feature sequences at various scales The sequence is further decomposed using a moving average algorithm with a window size of 25 to separate the current-scale features into local feature sequences. With global feature sequences ; The moving average algorithm first processes the high-dimensional local term hidden layer feature list. Each sequence A padding operation is performed, using edge values ​​to pad the beginning and end of the sequence with values ​​from 12 time steps, resulting in the padded sequence. Then, mean pooling is applied to the padded sequence, and the arithmetic mean is calculated within a sliding window to obtain... Values ​​of the global feature sequence at time step Finally, a global feature sequence is obtained. ; The copied edge value copies the value from the beginning of the sequence and fills it at the very beginning of the sequence, and copies the value from the end of the sequence and fills it at the very end of the sequence; The specific formula for calculating the arithmetic mean is as follows: ; in express List of hidden layer features of high-dimensional local terms at time step No. The values ​​of the downsampled sequence; The separation is into local feature sequences. With global feature sequences The specific formula is as follows: ; The bottom-up multi-scale local mixing submodule first propagates from high resolution to low resolution step by step. After mapping the high-resolution local feature sequence to the low-resolution temporal domain through a linear downsampling layer, the tensor is added element-wise to the corresponding low-resolution local feature sequence. Update step by step until the lowest resolution scale is reached; The propagation from high resolution to low resolution, for the first... Level feature scale, When the highest resolution scale When the initial decomposition yields a local feature sequence, it is directly used as the output of the current level; when... At that time, first extract the first level from the previous level. The updated local feature sequence is used as high-frequency injection information, and then the local feature sequence is input into the first... The nth linear downsampling layer reduces the sequence length dimension of the feature sequence from the nth linear downsampling layer. Dimensionality reduction to the 1st level Level, then the dimensionality-reduced and compressed level The first-order feature sequence and the first-order feature sequence obtained from the initial decomposition Performing element-wise tensor addition on the low-resolution local feature sequence of level 1 yields the 6th... The output feature sequence is updated at each level, and finally the 1st level is updated. The updated output feature sequence is added to the updated feature storage list and processed iteratively downwards layer by layer until the lowest resolution scale is reached; The linear downsampling layer first... High-resolution local feature sequences A global linear compression mapping is performed in the time dimension, followed by nonlinear feature activation, to obtain the th... Low-resolution sequence ; The global linear compression mapping in the time dimension utilizes a preset linear mapping matrix. and bias vector For the High-resolution local feature sequences Perform matrix multiplication to obtain the intermediate vector. ; The preset linear mapping matrix and bias vector as follows: ; ; in Indicates the sequence length of a long time series. Indicates the length of a short time sequence; The matrix multiplication operation is specifically formulated as follows: ; The intermediate vector as follows: ; The nonlinear feature activation will activate the intermediate vector Inputting into the GELU activation function yields the first... Low-resolution sequence ; The GELU activation function has the following formula: ; ; in, Represents the error function; The specific formula for the element-wise addition operation of the tensor is as follows: ; in Indicates the first Level feature scale, ; The top-down multi-scale global mixing submodule first propagates from low resolution to high resolution step by step. After mapping the low-resolution global feature sequence to the high-resolution time domain through a linear upsampling layer, the tensor is added element-wise to the corresponding high-resolution global feature sequence. Update step by step until the highest resolution scale is reached; The propagation from low resolution to high resolution, for the first... Level feature scale, When the lowest resolution scale When the initial decomposition yields a global feature sequence, it is directly used as the output of the current level; when... At that time, first extract the first level from the previous level. The updated global feature sequence is used as low-frequency injection information, and then the global feature sequence is input into the first... The nth linear upsampling layer reduces the sequence length dimension of the feature sequence from the nth linear upsampling layer. Upgraded to the 1st dimensional expansion Level, then the expanded level after the upgrade The first-order feature sequence and the first-order feature sequence obtained from the initial decomposition Perform element-wise tensor addition on the high-resolution global feature sequence to obtain the first-order high-resolution global feature sequence. The output feature sequence is updated at each level, and finally the 1st level is updated. The updated output feature sequence is added to the updated feature storage list, and the process is iterated upwards layer by layer until the highest resolution scale is reached; The linear upsampling layer first... Low-resolution global feature sequences A global linear augmentation mapping is performed in the time dimension, followed by nonlinear feature activation, to obtain the th... High-resolution sequence ; The global linear expansion mapping in the time dimension utilizes a preset linear mapping matrix. and bias vector For the Low-resolution global feature sequences Perform matrix multiplication to obtain the intermediate vector. ; The preset linear mapping matrix and bias vector as follows: ; ; in Indicates the sequence length of a long time series. Indicates the length of a short time sequence; The matrix multiplication operation is specifically formulated as follows: ; The intermediate vector as follows: ; The nonlinear feature activation will activate the intermediate vector Inputting into the GELU activation function yields the first... Low-resolution sequence ; The GELU activation function has the following formula: ; ; in, Represents the error function; The specific formula for the element-wise addition operation of the tensor is as follows: ; in Indicates the first Level feature scale, ; The method employing feature reconstruction and residual aggregation first adds the local feature sequences after mixing at various scales to the global feature sequences using an element-wise, position-by-position summation, resulting in an intermediate feature sequence. After nonlinear mapping, it is then compared with the original input sequence. Perform residual connections, and generate fused feature sequences for each layer through the output cross-connect layer. Finally, a multi-scale fused feature sequence set integrating multi-resolution information is obtained. ; The specific formula for the element-by-element summation is as follows: ; The specific formula for the nonlinear mapping is as follows: ; The residual connection is specifically formulated as follows: 。 6. The ship trajectory prediction method based on multi-scale decomposition and cross-scale hybridization according to claim 1, characterized in that, Construct a future multi-scale prediction module to fuse multi-scale feature sequence sets. The data is fed into the future multi-scale prediction module, aligned to the prediction time step using a time-domain linear mapping, and added to the corresponding scale's original global sequence residuals to output the prediction results at each scale. Then, through multi-scale summation, the model's predicted trajectory data is obtained. Specific steps include: A multi-scale fusion feature sequence set that integrates multi-resolution information The data is fed into the future multi-scale prediction module and aligned to the prediction time step using a temporal linear mapping to obtain a set of feature sequences for each prediction time step at each resolution. Then, each element is added to the original global sequence at the corresponding scale to obtain the predicted trajectory data at each resolution. Finally, the predicted trajectory data of the model is obtained through multi-scale aggregation. ; The time-domain linear mapping first constructs a weight matrix. Then, the feature sequences are fused with those from each layer. Perform matrix multiplication to align the historical time steps of the fused feature sequences from each layer with the prediction duration, thus obtaining the feature sequence set for each prediction time step at each resolution. ; The construction of the weight matrix The specific formula is as follows: ; in Indicates the length of the prediction period; The matrix multiplication formula is as follows: ; The element-by-element addition to the original global sequence at the corresponding scale is calculated using the following formula: ; in Represents the original global sequence; The multi-scale aggregation yields the model's predicted trajectory data. The specific formula is as follows: ; in Indicates total Secondary downsampling.

7. The ship trajectory prediction method based on multi-scale decomposition and cross-scale hybridization according to claim 1, characterized in that, The formula for minimizing the mean squared error loss function is as follows: ; in Indicates the first The true value of a future point in time. Indicates the first The predicted values ​​of the model at each time point.

8. A ship trajectory prediction system based on multi-scale decomposition and cross-scale hybridization, based on the prediction method according to any one of claims 1-7, characterized in that, include: The module includes a data preprocessing module, a multi-scale input processing module, a feature decomposition and embedding module, a historical decomposable hybrid module, a future multi-scale prediction module, a training module, and a testing module. The data preprocessing module is used to read the original AIS trajectory data in the dataset, send the trajectory data into the data preprocessing module, and achieve the purpose of filtering out invalid data such as trajectory sequences containing NaN values ​​and insufficient length, so as to obtain normalized continuous value data. The multi-scale input processing module is used to input continuous value data of ship spatial-motion characteristics into the multi-scale input processing module, perform average pooling and stepwise downsampling, and obtain a set of multi-scale trajectory sequences containing four time resolutions. ; The feature decomposition and embedding module is used to feed the multi-scale trajectory sequence set into the feature decomposition and embedding module, and use the moving average algorithm to decompose the sequence set into "local fluctuation" sequences. With "global fluctuation" sequence The "local fluctuation" sequence is then mapped to the hidden layer dimension via a position-free embedding layer to obtain a high-dimensional list of local term hidden layer features. ; The historical decomposable hybrid module is used to process the high-dimensional local term hidden layer feature list. The data is fed into the multi-level eigenvalue decomposition submodule to process the hidden layer feature list of high-dimensional local terms. The moving average is then applied sequentially for further decomposition. The decomposed feature sequences are then fed into a bottom-up multi-scale local mixing submodule and a top-down multi-scale global mixing submodule to achieve bidirectional aggregation of cross-scale features, resulting in a multi-scale fused feature sequence set that integrates multi-resolution information. ; The future multi-scale prediction module is used to fuse multi-scale feature sequence sets. The data is fed into the future multi-scale prediction module, aligned to the prediction time step using a time-domain linear mapping, and added to the original global sequence residuals at the corresponding scales. The prediction results at each scale are then output, and the model's predicted trajectory data is obtained through multi-scale summation. The training module is used for model training, updating network parameters with the goal of minimizing the mean squared error loss function, and saving the network model and parameters after training is completed. The testing module is used for model testing. It loads the trained prediction model, inputs historical ship trajectory data, and outputs predicted ship trajectory data.