Unmanned aerial vehicle path prediction method and system based on meta-mode echo converter
By using a meta-pattern echo converter-based method, the robustness and interpretability issues of UAV path prediction in complex dynamic environments are solved, achieving high-precision and rapidly adaptable path prediction that meets the safety certification requirements of regulatory agencies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-03-10
AI Technical Summary
Existing drone path prediction technologies are not robust in complex dynamic environments, are difficult to adapt to new drone models, new airspaces and sudden changes, and lack interpretability, failing to meet the safety certification requirements of regulatory agencies.
A method based on meta-pattern echo transformers is adopted, which combines path prediction with a Transformer decoder through sequence decomposition, meta-pattern pool construction and online update, echo layer deconstruction-reconstruction operations, to achieve accurate prediction of UAV trajectory.
It significantly improves prediction accuracy and robustness in complex and dynamic environments, can quickly adapt to new scenarios, requires no offline training, provides interpretable prediction results, and meets the interpretability requirements of regulatory agencies.
Smart Images

Figure CN121635409A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent control and trajectory prediction of unmanned aerial vehicles, and in particular to an unmanned aerial vehicle path prediction method and system based on a meta-pattern echo transformer. BACKGROUND
[0002] Unmanned aerial vehicle path (trajectory) prediction is a core basic technology in the fields of intelligent flight, cluster collaboration, urban air traffic (UAM), logistics distribution, power inspection, emergency rescue, etc. of modern unmanned aerial vehicle systems, which can provide key prior information for flight path planning, conflict detection, anomaly warning, supervision and audit, and is directly related to flight safety, operational efficiency and compliance. With the rapid development of low-altitude economy, the flight environment of unmanned aerial vehicles is becoming increasingly complex and dynamic, and accurate and interpretable trajectory prediction has become an industry demand.
[0003] However, the real unmanned aerial vehicle flight environment has extremely high complexity and dynamics: factors such as urban canyon turbulence, multi-unmanned aerial vehicle formation air flow disturbance, sudden crosswind / gust, temporary no-fly zone, and task type switching can cause trajectory patterns to change dramatically within seconds to tens of seconds; when new models are rapidly iterated, new airspaces are opened, and new task scenarios appear, there are often only a small amount of historical trajectory data available; at the same time, as a typical multivariate, strongly non-stationary, high-noise time series, unmanned aerial vehicle trajectories simultaneously contain seasonal patterns such as periodic circling, trend patterns such as climbing / descending, sudden changes such as obstacle avoidance, and noise patterns such as sensor jitter, and existing prediction methods are difficult to effectively capture and reconstruct.
[0004] Existing unmanned aerial vehicle path prediction techniques mainly rely on Transformer-based models, recurrent networks such as LSTM / GRU, Kalman filtering and its extensions, and graph neural networks (GNN). Although these methods can achieve good results in laboratory or ideal scenarios with fixed wind fields, single tasks, and sufficient historical data, they have serious shortcomings in real complex and dynamic environments: poor robustness to concept drift, rapid failure of the model once the environment or task is switched; weak generalization ability with few samples, requiring a large amount of labeled trajectory data for convergence when deploying new models or new airspaces; most models are black box structures, lack of interpretability, and cannot explain to regulatory authorities or users which basic flight behavior patterns the prediction is based on, making it difficult to meet the interpretability requirements of safety certification by regulatory agencies such as the Civil Aviation Administration. SUMMARY
[0005] The purpose of the present application is to provide an unmanned aerial vehicle path prediction method and system based on a meta-pattern echo transformer, which solves the problems of the prior art.
[0006] To achieve the above purpose, the present application provides an unmanned aerial vehicle path prediction method based on a meta-pattern echo transformer, comprising the following steps: Step 100, the original trajectory sequence of the collected unmanned aerial vehicle is decomposed into a trend component and a periodic component by a moving average technique; Step 200, a slicing operation is performed on the periodic component to generate a first waveform matrix, a waveform similarity calculation method with alignment enhancement is used to calculate the waveform similarity between the first waveforms, a dynamic threshold purification mechanism is used to weight and fuse similar first waveforms, and a meta-pattern pool is constructed; Step 300, in each unmanned aerial vehicle path prediction process, the meta-pattern pool is dynamically updated online according to the waveform similarity between the new input second waveform and the existing meta-patterns in the meta-pattern pool; Step 400, after the original trajectory sequence is processed by static injection embedding and position coding addition, the encoder output is obtained by deconstruction-reconstruction operation of the attention output and the meta-pattern pool through the echo layer after multi-head self-attention calculation; Step 500, the echo padding mechanism is used to generate the decoder input, the starting token and the echo padding sequence are spliced to input the decoder, and the encoder output is input into the Transformer decoder stack together to output the future multi-step unmanned aerial vehicle path prediction result; The Transformer decoder stack is stacked by multiple identical decoder layers, and each decoder layer includes the following three sublayers: the first layer is a masked multi-head self-attention sublayer; the second layer is a multi-head encoder-decoder attention sublayer; and the third layer is a position full connection feedforward network.
[0007] Further, the sequence decomposition uses a moving average method, and the calculation formula is as follows: ; ; Wherein, represents the input original trajectory sequence, represents the trend component, represents the periodic component, represents the moving average pooling operation, represents the boundary padding operation.
[0008] Further, the calculation formula of the waveform similarity calculation method with alignment enhancement is as follows: ; Wherein, represents the waveform similarity of and , and represent the first waveform in the first waveform matrix and the first waveform , and They represent and The One element, Indicates the waveform length.
[0009] Furthermore, the formula for calculating the dynamic threshold is: ; in, Indicates the purification threshold. Represents the waveform similarity matrix. This represents the mean of the non-zero elements in the waveform similarity matrix. This represents the standard deviation of the non-zero elements in the waveform similarity matrix. This indicates the preset capacity of the meta-pattern pool. This indicates the number of non-zero elements in the waveform similarity matrix. Indicates a constant factor; The formula for constructing the waveform similarity matrix is: ; in This represents the value of the element in the i-th row and j-th column of the waveform similarity matrix.
[0010] Furthermore, the construction process of the meta-pattern pool specifically includes: Step 201, traverse the first waveform matrix Each of the first waveforms in the text; Step 202: Find the i-th first waveform in the first waveform matrix. In waveform similarity matrix Maximum waveform similarity between the waveform and the first waveform ; Step 203, if Then find all the largest waveform similarities. Exceeding the purification threshold The first waveform constitutes a set For sets The first waveform in the image is purified by weighted average to obtain the meta-mode. Meta-pattern Push into the meta-pattern pool ; The formula for calculating the weighted average purification is as follows: ; in This represents the meta-mode after weighted average purification. express Waveform similarity with all first waveforms in set K Indicates to summing up the waveform similarity between all first waveforms in the set K, denotes the transpose of the first waveform matrix consisting of all first waveforms in the set K; Step 204, if , then directly as a new meta-pattern into the meta-pattern pool ; Step 205, repeat steps 201 to 204 until all first waveforms are processed.
[0011] Further, the static injection embedding calculation process is: ; ; ; ; wherein, denotes the static context information, denotes the input trajectory sequence, and denote the first and second linear transformation layers, respectively, denotes the token embedding, denotes the time embedding, denotes the position embedding, denotes the static information embedding, denotes the fusion embedding, denotes function, denotes layer normalization, denotes regularization, denotes the final input of the encoder stack.
[0012] Further, the deconstruction-reconstruction operation of the echo layer includes: Deconstruction operation: slice the second half of the features of the output of the attention layer to obtain the second waveform matrix , and perform waveform similarity calculation on each second waveform in the second waveform matrix after dimension reduction linear transformation and alignment with the enhanced waveform similarity calculation of the meta-pattern pool, and select the Top-K most similar meta-patterns , the calculation formula is as follows: ; ; ; wherein denotes the multi-head attention mechanism of the attention layer, denotes the output of the attention layer, This indicates a slice operation. Indicates the model dimension. , This represents the second waveform matrix. , and These represent the 1st, i-th, and nth second waveforms in the second waveform matrix, respectively. , The sequence number represents the number of splits, and L represents the sequence length. Indicates the slice length. Represents the meta-pattern pool. This represents a dimension reduction linear transformation. This indicates an alignment-enhanced waveform similarity calculation operation. This indicates that the top K patterns with the highest waveform similarity to the second waveform are selected. This represents the top K meta-patterns that have the highest waveform similarity to the i-th second waveform in the second waveform matrix. The calculation formula for the reconstruction operation is as follows: ; ; ; in, This indicates a linear reduction in dimensionality. This indicates that the dimension increases linearly. Indicates transpose. Indicates the first One reconstructed output, This indicates a splicing operation. Represents the reconstructed feature sequence. This indicates the encoder output.
[0013] Furthermore, the online update process for the meta-pattern pool is as follows: For new input Calculate its relationship with the meta-pattern pool The waveform similarity of all meta-patterns is used to obtain the waveform with the highest similarity. and its corresponding meta-schema index ; like Then, the corresponding meta-pattern is weighted and fused for update, and the calculation formula is as follows: ; in, This indicates that the learning rate is being updated. The first in the meta-pattern pool Individual pattern, Indicates the first element in the updated meta-pattern pool Individual pattern; like And if the meta-pattern pool is not full, then It has been added to the meta-pattern pool as a new meta-pattern; like And if the meta-pattern pool is full, then The updated meta-pattern is merged using weighted fusion to the most similar existing meta-pattern.
[0014] Furthermore, the calculation formula for generating the decoder input using the echo-fill mechanism is as follows: ; ; in, Indicates an echo-filled sequence. Represents matrix multiplication. Indicates the token length. Indicates decoder input A UAV path prediction system based on a meta-mode echo converter, used to execute any of the above-described UAV path prediction methods based on a meta-mode echo converter, comprising: Data preprocessing module: Through sequence decomposition and moving average techniques, the original trajectory sequence of the UAV is decomposed into trend components and periodic components; The knowledge base storage and update module: slices the periodic components to generate the first waveform matrix, constructs the meta-pattern pool using an alignment-enhanced waveform similarity calculation method and a dynamic threshold purification mechanism, and dynamically updates the meta-pattern pool online during UAV path prediction. Transformer module: includes encoder and decoder. The encoder is used to process the historical trajectory sequence through static injection embedding and position encoding, and then perform multi-head self-attention calculation. The decoder is used to combine the encoder output with the Transformer decoder stack for processing and output the prediction result. Echo layer module: The echo layer is embedded in the encoder and is used to perform deconstruction-reconstruction operations on the attention output and the meta-pattern pool; echo fill is used to generate decoder input and provide strongly correlated pattern priors for future sequences.
[0015] Therefore, the present invention employs the above-mentioned UAV path prediction method and system based on meta-mode echo converter, which has the following beneficial effects: 1. This invention fully mines and memorizes highly repetitive short-term maneuvering units in UAV trajectories by constructing an online-updable meta-pattern pool and an alignment-enhanced waveform similarity calculation mechanism, which significantly improves the prediction accuracy of the model compared to traditional Transformer-type methods when facing known patterns and slightly mutated patterns.
[0016] 2. This invention fully considers the diversity and unpredictability of UAV maneuvering behavior in real battlefield / urban environments, and introduces a fully end-to-end meta-pattern pool dynamic expansion and forced fusion strategy, which enables the model to quickly absorb new maneuvering behaviors during real-time flight and achieve effective prediction of unknown paths without offline retraining, greatly improving the robustness and generalization ability of the model in new scenarios and new entities.
[0017] 3. Based on the deconstruction-reconstruction design and echo padding mechanism of the Echo Layer, the attention calculation of the Transformer is shifted from the original numerical level to the level of "internal connection and difference of the mode". At the same time, it provides strong prior guidance for the decoder and completely avoids the information vacuum and error accumulation problems caused by traditional zero-filling or autoregressive iterative prediction. It performs well in long-term direct multi-step prediction tasks in the range of 30-120 seconds.
[0018] 4. Strong pattern generalization and rapid adaptation to new behaviors: Thanks to the online updated meta-pattern pool, the model can absorb new maneuvering behaviors in real time during flight, and can effectively predict unknown patterns within a few steps without retraining, which is significantly better than traditional fixed parameter models.
[0019] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating the UAV path prediction method and system based on a meta-mode echo converter according to the present invention. Detailed Implementation
[0021] The following detailed description of embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0022] Please see Figure 1 A method for UAV path prediction based on a meta-mode echo converter includes the following steps: Step 100: Perform sequence decomposition on the collected original trajectory sequence of the UAV. Use moving average technology to decompose the original trajectory sequence into trend components and periodic components, and extract highly repetitive short waveform units.
[0023] The original trajectory sequence of the drone It consists of a series of trajectory points sampled continuously over time, including features such as position coordinates, velocity, and heading angle; data points are usually collected at fixed time intervals.
[0024] When drones perform missions, their trajectory data exhibits clear periodicity and trends. For example, when hovering above a target, they form sine or cosine waveforms, while performing inspection missions, they generate rectangular or sawtooth waveforms. To extract these highly repetitive short waveform units, a moving average method is used for sequence decomposition. ; ; in, This represents the original trajectory sequence as input; This indicates a boundary padding operation used to handle sequence boundaries; This represents a moving average pooling operation, which uses a sliding window to calculate a local mean to smooth input fluctuations. It represents the trend component, reflecting the overall trend of the trajectory; It represents periodic components, containing highly repetitive short waveform units, and forms the basis for subsequent meta-pattern extraction.
[0025] Step 200: Slice the periodic components to generate the first waveform matrix, calculate the waveform similarity between waveforms using an alignment-enhanced waveform similarity calculation method, and perform weighted fusion of similar waveforms based on a dynamic threshold purification mechanism to construct a meta-pattern pool.
[0026] (1) Generation of the first waveform matrix: The process of slicing the periodic components to generate the first waveform matrix includes: Slicing along the time dimension generates a fine-grained first waveform matrix. : (2) Waveform similarity calculation: To calculate the similarity between waveforms, an alignment-enhanced waveform similarity calculation method is designed. This method is based on vector dot product, which is computationally efficient and fully differentiable. Taking the first waveform in the first waveform matrix as an example, it is defined as follows: ; in, express and Waveform similarity; and Represents the first waveform matrix The first in The and the first The first waveform; and They represent and The One element; Indicates the waveform length.
[0027] This similarity measurement method has the following advantages: computational complexity is O(log n). Far lower than Dynamic Time Warping (DTW) After standardization, similarity measurement focuses on waveform shape rather than absolute amplitude; the effect of phase shift is preserved as part of the metamode features, and waveforms with significant phase shifts are considered different metamodes.
[0028] For the first waveform matrix For all the first waveforms, perform pairwise waveform similarity calculations to construct a waveform similarity matrix. The formula for the construction process is as follows: ; in, Construct it as an upper triangular matrix to avoid redundant calculations; Represents the first element in the waveform similarity matrix. Line number The element values of the column.
[0029] (3) Dynamic threshold calculation: To determine which waveforms should be merged into the same meta-mode, a threshold-based purification method is introduced. Waveforms with a similarity greater than a threshold are considered to belong to the same meta-mode, while other waveforms remain independent. Dynamic threshold (purification threshold) The calculation formula is: ; in, Indicates the purification threshold; Represents the waveform similarity matrix; This represents the mean of the non-zero elements in the waveform similarity matrix; This represents the standard deviation of the non-zero elements in the waveform similarity matrix; Indicates the preset capacity of the meta-pattern pool; This indicates the number of non-zero elements in the waveform similarity matrix; This represents a constant factor used to adjust the degree of influence of the standard deviation on the threshold. In this embodiment... The value is 0.5.
[0030] Dynamic threshold Size of the meta-pattern pool Adaptive adjustment: More complex application scenarios require greater... This will generate higher This ensures that more different patterns are identified as separate meta-patterns, preventing excessive merging.
[0031] (4) Initialization and construction of the meta-pattern pool: The construction process of the meta-pattern pool specifically includes: Step 201, traverse the first waveform matrix Each waveform in the text; Step 202: Find the i-th first waveform in the first waveform matrix. In waveform similarity matrix Maximum waveform similarity between the waveform and the first waveform ; Step 203, if Then find all the largest waveform similarities. Exceeding the purification threshold The first waveform constitutes a set For sets The meta-mode is obtained by weighted averaging and purifying similar first waveforms. Meta-pattern Push into the meta-pattern pool ; The formula for calculating the weighted average purification is as follows: ; in, This represents the meta-mode after weighted average purification; express With sets Waveform similarity among all first waveforms; Indicates to With sets Sum the waveform similarity among all the first waveforms in the dataset; Represents a set The transpose of the first waveform matrix formed by all the first waveforms in the matrix; Step 204, if Then Push it directly into the meta-pattern pool as a new meta-pattern ; Step 205: Repeat steps 201 to 204 until all first waveforms have been processed.
[0032] Step 300: During each UAV path prediction process, the meta-pattern pool is dynamically updated online based on the waveform similarity between the newly input second waveform and the existing meta-patterns in the meta-pattern pool.
[0033] The second waveform matrix is obtained by using the output of the attention layer. The second waveform matrix is obtained by slicing the latter half of the features. The calculation formula is as follows: ; ; in This represents the multi-head attention mechanism of the attention layer. This represents the final input to the encoder stack. This represents the output of the attention layer. This indicates a slice operation. Indicates the model dimension. , This represents the second waveform matrix. , and These represent the 1st, i-th, and nth second waveforms in the second waveform matrix, respectively. , The sequence number represents the number of splits, and L represents the sequence length. Indicates the slice length. Indicates the model dimension.
[0034] It should be noted that the online dynamic update of the meta-pattern pool is also automatically triggered during each training iteration of the model.
[0035] An end-to-end online update mechanism for the meta-pattern pool was designed, which is automatically triggered in each prediction iteration to enable rapid inclusion of new maneuver behaviors.
[0036] For the i-th second waveform in the newly input second waveform matrix Calculate its relationship with the meta-pattern pool The waveform similarity of all meta-patterns is used to obtain the waveform with the highest similarity. and its corresponding meta-schema index .
[0037] Scenario 1: If If the waveform is highly similar to an existing meta-pattern, then the corresponding meta-pattern is weighted and fused for update. The calculation formula is as follows: ; in, This represents the learning rate update, with a value ranging from 0.1 to 0.3, ensuring both fast and stable updates. The first in the meta-pattern pool Individual pattern; Indicates the first element in the updated meta-pattern pool Individual pattern.
[0038] Scenario 2: If And if the meta-pattern pool is not full (there are free slots), then... Adding it as a new meta-pattern to the meta-pattern pool enables the natural expansion of the meta-pattern pool.
[0039] Scenario 3: If And if the meta-pattern pool is full (capacity has reached the preset limit), then... Forced to use the same learning rate By using weighted fusion to update and merge to the most similar existing meta-pattern, the pool size is kept constant while accommodating new behaviors.
[0040] Step 400: The original trajectory sequence is processed by adding static injection embedding and position encoding, and then input into the encoder. After multi-head self-attention calculation, the attention output is deconstructed and reconstructed with the meta-pattern pool through the echo layer to obtain the encoder output.
[0041] (1) Static injection embedding: Static injection embedding is used to adaptively fuse time series information and static context information. Its calculation process is as follows: ; ; ; ; in, This indicates static context information, such as drone model and payload. This represents the original trajectory sequence as input; and These represent the first and second linear transformation layers, respectively. Mapping static information to a high-dimensional space Generate adaptive weights; This indicates token embedding, which converts the original numerical value into a vector representation; This indicates time embedding and encodes timestamp information; Indicates positional embedding; This indicates the embedding of static information; Represents sequence embedding; Indicates fusion embedding; , express function, Representation layer normalization, This indicates regularization.
[0042] (2) Calculation of multi-head self-attention: The core computational unit of Transformer is the scaled dot product attention: ; in, Represents the query matrix; Represents the key matrix; Represents a value matrix; Represents the dimension of the key vector, typically ; Indicates the number of heads of attention; This is a scaling factor to prevent the softmax gradient from disappearing due to excessively large dot product values.
[0043] To enhance expressiveness, Transformer employs a multi-head attention mechanism, separating the query, key, and value through... Attention calculations are performed in parallel after creating different linear projection mappings, and then the results are concatenated. ; ; in, , , For learnable projection matrix; To output the projection matrix; in this embodiment , .
[0044] (3) Deconstruction-reconstruction operation of the echo layer: The echo layer is embedded in the encoder, and attention computation is guided to the intrinsic connections and differences of the pattern through deconstruction-reconstruction operations.
[0045] Deconstruction operation: converting the output of the attention layer... The second waveform matrix is obtained by slicing the latter half of the features. For each second waveform in the second waveform matrix, after dimensionality reduction and linear transformation, waveform similarity is calculated with the meta-pattern pool. The Top-K most similar meta-patterns are selected, and the calculation formula is as follows: ; in Represents the meta-pattern pool. This represents a dimension reduction linear transformation. This indicates an alignment-enhanced waveform similarity calculation operation. This indicates that the top K patterns with the highest waveform similarity to the second waveform are selected. This represents the top K meta-patterns that have the highest waveform similarity to the i-th second waveform in the second waveform matrix.
[0046] Refactoring operation: ; ; ; in, This represents a linear transformation that reduces the dimension. This represents a linear transformation that increases the dimension. Indicates transpose; Indicates the first One reconstructed output; Indicates a splicing operation; This represents the reconstructed feature sequence; This indicates the encoder output.
[0047] Step 500: The echo-filling mechanism is used to generate decoder input. The start token and the echo-filling sequence are concatenated and input into the decoder. Together with the encoder output, they enter the Transformer decoder stack for processing and output the UAV path prediction results for the next multiple steps.
[0048] (1) Echo filling: Traditional methods use zero-padding or mean-padding as the future part of the decoder input, which lacks interpretability and fails to provide effective information. We propose an echo-padding mechanism that utilizes a meta-pattern pool to generate decoder input with strong prior guidance. ; ; in, Indicates an echo-filled sequence; Represents matrix multiplication; Indicates the token length; This represents the decoder input.
[0049] The echo-filling mechanism is based on meta-pattern reconstruction of the prediction sequence, providing strongly correlated pattern priors for direct multi-step prediction and completely eliminating the information vacuum problem of traditional filling methods.
[0050] (2) Transformer decoder stack processing: The Transformer decoder stack consists of multiple identical decoder layers stacked together. This embodiment uses... Layers. Each layer mainly contains the following three sub-layers: The first layer is the masked multi-head self-attention sublayer, which processes... Similar to an encoder, it is used to capture dependencies within the input sequence, including start tokens and echo padding. In particular, it employs a masking mechanism to ensure that when predicting the current time step, it can only "see" the current and previous positions in the sequence to maintain causality.
[0051] The second layer is the multi-head encoder-decoder attention sublayer, also known as cross-attention. This sublayer uses the output of the decoder's self-attention sublayer as a query, while simultaneously receiving the final output of the encoder. This serves as both key and value. This allows the decoder to extract relevant features from the trajectory patterns and static context information captured by the encoder, aiding in future predictions.
[0052] The third layer is a positionally fully connected feedforward network, similar to the positionally fully connected feedforward network in the encoder, used to independently enhance the nonlinear expressive power of the model at each location. The fully connected feedforward network contains two linear transformations and ReLU activation; Finally, after layers of processing by the decoder stack, the output features at the end are directly mapped back to the desired future trajectory sequence dimension via a linear projection head, outputting the future trajectory prediction result. .
[0053] The direct multi-step prediction strategy avoids the error accumulation problem of iterative prediction and performs well in medium- and long-term prediction tasks of 30 to 120 seconds.
[0054] A UAV path prediction system based on a meta-mode echo converter, used to execute the aforementioned UAV path prediction method based on a meta-mode echo converter, includes: Data preprocessing module: Through sequence decomposition and moving average techniques, the original trajectory sequence of the UAV is decomposed into trend components and periodic components, providing a clean and interpretable waveform basis for subsequent meta-pattern extraction.
[0055] The knowledge base storage and update module performs slicing operations on periodic components to generate a first waveform matrix. It then constructs a meta-pattern pool using an alignment-enhanced waveform similarity calculation method and a dynamic threshold purification mechanism, and dynamically updates the meta-pattern pool online during UAV path prediction. This module enables the memorization and updating of typical UAV maneuvers.
[0056] The Transformer module includes an encoder and a decoder. The encoder is used to process historical trajectory sequences through static injection embedding and positional encoding, followed by multi-head self-attention computation. The decoder is used to combine the encoder output with the Transformer decoder stack for processing and output the prediction result.
[0057] The Transformer model is derived from Layer encoder and The layer decoder is configured as follows, in this embodiment Each encoder layer contains two sub-layers: a multi-head self-attention sub-layer and a position feedforward network sub-layer. Each sub-layer is followed by residual connections and layer normalization, formally expressed as: ; in, Indicates sublayer input; Indicates sub-level functions; Presentation layer normalization operation.
[0058] The output dimension of all sub-layers and embedded layers is unified as follows: This is to ensure the effectiveness of residual connections.
[0059] Since the attention mechanism lacks the ability to perceive sequence order, this embodiment uses sine / cosine position encoding: ; ; in, Indicates the position index of the token or trajectory point in the sequence; Indicates a dimension index; and Representing positions respectively In the and the The encoded value of the dimension.
[0060] Echo layer module: By deeply integrating the meta-pattern pool with the Transformer, it achieves pattern memory-echo matching capabilities. The echo layer is embedded in the encoder and is used to perform deconstruction-reconstruction operations on the attention output and the meta-pattern pool; echo filling is used to generate decoder input, providing strongly correlated pattern priors for future sequences.
[0061] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for predicting the path of a UAV based on a meta-mode echo transformer, characterized by, The method comprises the following steps: Step 100, the original trajectory sequence of the collected unmanned aerial vehicle is decomposed into a trend component and a periodic component through a moving average technique; Step 200, a first waveform matrix is generated by slicing the periodic component, the waveform similarity between the first waveforms is calculated by using an alignment-enhanced waveform similarity calculation method, similar first waveforms are fused by using a dynamic threshold purification mechanism, and a meta-pattern pool is constructed; Step 300, in each unmanned aerial vehicle path prediction process, the meta-pattern pool is dynamically updated online according to the waveform similarity between a new input second waveform and the existing meta-patterns in the meta-pattern pool; Step 400, after the original trajectory sequence is input into an encoder after being processed by static injection embedding and position coding addition, the attention output is deconstructed and reconstructed with the meta-pattern pool through an echo layer to obtain an encoder output after multi-head self-attention calculation; Step 500, a decoder input is generated by using an echo padding mechanism, the starting token and the echo padding sequence are spliced to input the decoder, and the encoder output is input into a Transformer decoder stack together to obtain a future multi-step unmanned aerial vehicle path prediction result; The Transformer decoder stack is stacked by a plurality of identical decoder layers, and each decoder layer comprises the following three sub-layers: the first layer is a mask multi-head self-attention sub-layer; The second layer is a multi-head encoder-decoder attention sub-layer; The third layer is a position full-connection feedforward network.
2. The unmanned aerial vehicle path prediction method based on the meta-pattern echo transformer according to claim 1, characterized in that, The sequence decomposition adopts a moving average method, and the calculation formula is as follows: ; ; wherein, denotes the input raw trajectory sequence, denotes the trend component, denotes the periodic component, denotes the moving average pooling operation, denotes the boundary padding operation.
3. The unmanned aerial vehicle path prediction method based on meta-pattern echo transformer according to claim 2, characterized in that, The calculation formula of the alignment-enhanced waveform similarity calculation method is as follows: ; wherein, denotes and the waveform similarity, and denotes the th and the th first waveform in the first waveform matrix, and denote the th element of and respectively, denotes the waveform length.
4. The unmanned aerial vehicle path prediction method based on meta-pattern echo transformer according to claim 3, characterized in that, The calculation formula of the dynamic threshold is as follows: ; wherein, represents a purification threshold, represents a waveform similarity matrix, represents a mean of non-zero elements in the waveform similarity matrix, represents a standard deviation of non-zero elements in the waveform similarity matrix, represents a preset capacity of the meta pattern pool, represents a number of non-zero elements in the waveform similarity matrix, represents a constant factor; The construction formula of the waveform similarity matrix is as follows: ; wherein represents the value of the element in the i-th row and j-th column of the waveform similarity matrix.
5. The unmanned aerial vehicle path prediction method based on meta-pattern echo transformer according to claim 4, characterized in that, The construction process of the meta-pattern pool specifically comprises: Step 201, traversing each first waveform in the first waveform matrix Step 202, find the i-th first waveform in the first waveform matrix In the waveform similarity matrix The maximum waveform similarity with other first waveforms ; Step 203, if , find all the maximum waveform similarity , the first waveform of the set , which exceeds the purification threshold , the first waveform in the set , weighted average purification, get the element mode , the element mode , press into the element mode pool ; The calculation formula of the weighted average purification is as follows: ; wherein represents a weighted average of the purifying meta-patterns, represents a waveform similarity between the first waveform and all first waveforms in the set K, represents a sum of the waveform similarities between the first waveform and all first waveforms in the set K, a waveform similarity between the first waveform and all first waveforms in the set K, represents a transpose of a first waveform matrix of all first waveforms in the set K; Step 204, if then push directly as new metamodel into metamodel pool ; Step 205, repeat steps 201 to 204 until all first waveforms are processed.
6. The unmanned aerial vehicle path prediction method based on meta-pattern echo transformer according to claim 5, characterized in that, The calculation process of the static injection embedding is as follows: ; ; ; wherein, denotes static context information, denotes an input trajectory sequence, and denote first and second linear transformation layers, respectively, denotes a token embedding, denotes a temporal embedding, denotes a positional embedding, denotes a static information embedding, denotes a fusion embedding, denotes a function, denotes layer normalization, denotes regularization, denotes the final input to the encoder stack.
7. The unmanned aerial vehicle path prediction method based on meta-pattern echo transformer according to claim 6, characterized in that, The deconstruction-reconstruction operation of the echo layer comprises: deconstruction operation: slicing the latter half of the output of the attention layer to obtain a second waveform matrix , and performing a waveform similarity calculation on each second waveform in the second waveform matrix through a dimension reduction linear transformation and alignment with the meta-pattern pool to select the top-K most similar meta-patterns The calculation formula is as follows: ; ; ; wherein denotes a multi-head attention mechanism of an attention layer, denotes an output of the attention layer, denotes a slicing operation, denotes a model dimension, , denotes a second waveform matrix, , and denote a 1st, i-th and n-th second waveform in the second waveform matrix, respectively, , denotes a number of splits, L denotes a sequence length, denotes a slice length, denotes a meta-pattern pool, denotes a dimension reduction linear transformation, denotes a waveform similarity computation operation with alignment enhancement, denotes selecting a top K meta-patterns with the largest waveform similarity to the second waveform, denotes selecting a top K meta-patterns with the largest waveform similarity to the i-th second waveform in the second waveform matrix. The calculation formula of the reconstruction operation is as follows: ; ; ; wherein, denotes a dimensionality reducing linear, denotes a dimensionality increasing linear, denotes a transpose, denotes the th reconstructed output, denotes a concatenation operation, denotes a reconstructed feature sequence, denotes an encoder output.
8. The unmanned aerial vehicle path prediction method based on meta-pattern echo transformer according to claim 7, characterized in that, The online updating process of the meta-pattern pool is as follows: For new input , calculate its waveform similarity with all meta-patterns in meta-pattern pool , get the maximum waveform similarity and its corresponding meta-pattern index ; If then the corresponding meta-pattern is updated by weighted fusion, and the calculation formula is as follows: ; in, This indicates that the learning rate is being updated. The first in the meta-pattern pool Individual pattern, Indicates the first element in the updated meta-pattern pool Individual pattern; If and the pool of meta-patterns is not full, then the new meta-pattern is added to the pool of meta-patterns; If and the meta-pattern pool is full, then Update the fused to the most similar existing meta-pattern by weighted fusion.
9. The unmanned aerial vehicle path prediction method based on meta-pattern echo transformer according to claim 8, characterized in that, The calculation formula of the decoder input generated by using the echo padding mechanism is as follows: ; ; wherein, represents an echo padding sequence, represents a matrix multiplication, represents a token length, represents a decoder input.
10. An unmanned aerial vehicle path prediction system based on meta-mode echo transducer, characterized by, The method comprises the following steps: A data preprocessing module: the original trajectory sequence of the unmanned aerial vehicle is decomposed into a trend component and a periodic component through sequence decomposition and a moving average technique; A knowledge base storage and updating module: the periodic component is sliced to generate a first waveform matrix, an alignment-enhanced waveform similarity calculation method and a dynamic threshold purification mechanism are used to construct a meta-pattern pool, and the meta-pattern pool is dynamically updated online during the unmanned aerial vehicle path prediction process; A Transformer module: comprising an encoder and a decoder, the encoder is used for performing multi-head self-attention calculation on the historical trajectory sequence after being processed by static injection embedding and position coding, the decoder is used for entering a Transformer decoder stack together with the encoder output for processing and outputting a prediction result; Echo layer module: echo layer embedded in the encoder, used to de-construct and reconstruct the attention output with the meta-pattern pool; echo padding is used to generate the decoder input, providing strong correlation pattern prior for future sequences.