A robust time series forecasting method based on automated patch augmentation and replacement
Patent Information
- Application Number
- CN202511986228.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-10-23
AI Technical Summary
[0003]然而,现有基于补丁的方法普遍存在一个共同的局限性:它们通常假设所有补丁都包含高质量的、对预测有用的信息,因此不加区分地将所有补丁用于模型训练和预测
[0018]本发明实施例提供的一种基于自动化补丁增强和替换的鲁棒时间序列预测方法的上述技术方案的有益效果至少包括:
Smart Images

Figure CN122964447A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of time series forecasting technology, and more specifically to a robust time series forecasting method based on automated patching enhancement and replacement. Background Technology
[0002] In the field of time series forecasting, patch-based techniques are currently the mainstream approach, with representative models including PatchTST, Crossformer, and xPatch. The core idea of these methods is to segment long-sequence data into multiple semantically independent subsequence segments (i.e., "patches"), and then feed these patches as input tokens into deep learning models such as Transformer for processing. Compared to traditional pointwise modeling, this approach can more effectively capture long-term dependencies in time series data.
[0003] However, existing patch-based methods generally share a common limitation: they typically assume that all patches contain high-quality, prediction-useful information, thus indiscriminately using all patches for model training and prediction. But in real-world applications, time-series data inevitably contains low-quality issues such as missing values, distribution shifts, outliers, and white noise due to factors like sensor malfunctions, network transmission errors, system anomalies, or environmental noise. Therefore, existing patch-based methods suffer from the following technical shortcomings: Firstly, there is a lack of dynamic evaluation and screening mechanisms for patch quality: existing technologies cannot automatically identify and filter out low-quality patches containing noise, outliers, or missing values within the model. Some data patches contain invalid or even harmful interference information. They treat all patches equally, making the model's prediction results highly susceptible to negative interference from low-quality information, thereby reducing the robustness and accuracy of the predictions.
[0004] Secondly, the patch representation capabilities are limited and simplistic: Existing methods typically use a single linear embedding layer to generate patch tokens. This approach produces semantically simplistic representations, making it difficult to effectively distinguish and model patches with different temporal patterns (such as normal, abnormal, and drift patterns), thus limiting the model's ability to understand complex real-world data with fine-grained precision.
[0005] Third, it cannot effectively handle the semantic gap caused by filtering: Even if low-quality patches can be identified and removed, existing technologies lack an effective mechanism to fill the information gaps left by these removed patches. Simply discarding or masking these patches will disrupt the continuity and integrity of the time series, introducing a "semantic gap," which in turn affects the final prediction accuracy.
[0006] Therefore, how to provide a time series forecasting method that can improve the robustness and accuracy of forecasting low-quality data is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0007] In view of the above problems, the present invention is proposed to provide a robust time series forecasting method based on automated patching enhancement and replacement that overcomes or at least partially solves the above problems.
[0008] To achieve the above objectives, the present invention adopts the following technical solution: This invention provides a robust time series prediction method based on automated patching enhancement and replacement, comprising the following steps: S1: Obtain the original multi-channel time series data to be predicted and perform standardization processing; S2: Divide the standardized multi-channel time series raw data into multiple time series patches. Based on the enhanced embedding mechanism, generate semantic enhancement patch tokens corresponding to each time series patch, obtain a set of semantic enhancement patch tokens, and generate sequence-level tokens for global information representation corresponding to the multi-channel time series raw data. S3: Dynamically evaluate the quality score of each semantic enhancement patch token using a learnable token quality evaluation mechanism, and filter out semantic enhancement patch tokens in the semantic enhancement patch token set whose quality scores do not meet the requirements to obtain a retained token set; use a mask attention mechanism to enable the retained token set to interact with the sequence-level tokens to obtain refined sequence-level tokens, and use the refined sequence-level tokens to replace the positions corresponding to the filtered semantic enhancement patch tokens in the semantic enhancement patch token set to reconstruct the complete token sequence; S4: Based on the reconstructed complete token sequence, output the final time series prediction result through the prediction header.
[0009] Preferably, the enhanced embedding mechanism in step S2 includes the following steps: The time series patch is embedded using an expert hybrid model consisting of a shared expert and multiple specialized experts; wherein, The shared expert obtains a general semantic representation of all time series patches, while the multiple specialized experts each learn different time series pattern features. The gating weights of the multiple specialized experts are dynamically allocated based on the content of the current time series patch using a gating network; The linear embedding outputs of the shared expert and multiple specialized experts are weighted and fused according to gating weights to generate the semantic enhancement patch token.
[0010] Preferably, the enhanced embedding mechanism in step S2 includes the following steps: The initial embedding representation of the original time series data of each channel is obtained, and a global representation including common features of all channels is extracted based on the initial embedding representation. The global representation is then fused with the initial embedding representation of each channel to generate the sequence-level token.
[0011] Preferably, the step of generating a sequence-level token in step S2 includes: The first linear layer processes each channel of the input time series raw data to obtain the initial embedding representation of each channel; An aggregation operation is used to process the initial embedding representations of all channels to generate a global representation that includes the common features of all channels. The global representation is copied and expanded to a number of copies equal to the number of channels, and each copy is then concatenated with the initial embedded representation of the corresponding channel. The initial embedded representation after splicing is nonlinearly transformed and fused using a second multilayer perceptron to generate a sequence-level token for each channel.
[0012] Preferably, in step S3, the learnable token quality assessment mechanism performs the following steps: A quality score is calculated for each patch token using a linear layer and an activation function. The quality score is binarized and compared with a preset threshold to generate a binary indicator that indicates whether the patch token should be retained or filtered out. A gradient propagation mechanism is employed, in which the reciprocal of the quality fraction after gradient separation is multiplied by the quality fraction, and used as a selection signal in the forward propagation, allowing the gradient to propagate backward through the quality fraction.
[0013] Preferably, in step S3, the mask attention mechanism performs the following steps: An attention mask is constructed based on the binary indicator. In the mask multi-head self-attention mechanism, attention calculation is only allowed between the retained patch tokens and between the retained patch tokens and the sequence token to obtain the refined sequence-level token.
[0014] Preferably, the process includes linear dimensionality reduction of the reconstructed token sequence before the prediction head.
[0015] Preferably, the original multi-channel time series data to be predicted includes original multi-channel time series data of traffic flow and original multi-channel time series data of power transformers.
[0016] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the robust time series prediction method based on automated patching enhancement and replacement.
[0017] This invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the program, implements the robust time series prediction method based on automated patch enhancement and replacement.
[0018] The beneficial effects of the above-described technical solution of the robust time series prediction method based on automated patch enhancement and replacement provided by the embodiments of the present invention include at least the following: The SEER framework of this invention can proactively identify and repair low-quality components in data. Experimental results on multiple public benchmark datasets show that, compared with state-of-the-art baseline models, SEER reduces both mean squared error and mean absolute error, demonstrating superior predictive ability in the vast majority of test scenarios.
[0019] Unlike existing technologies that treat all patches equally, this invention's automated token filter empowers the model to dynamically evaluate the quality of each patch and adaptively filter out negative information. The innovative patch replacement mechanism utilizes globally optimized, high-quality tokens to fill information gaps, ensuring the integrity and reliability of the time-series information flow.
[0020] This invention introduces an expert hybrid model architecture to generate richer and more diverse semantic representations for patches, enabling the model to better capture complex temporal patterns. Ablation experiments demonstrate that removing the expert hybrid model module leads to a significant performance drop on datasets with complex patterns (such as ETTh2), thus validating the effectiveness of this design.
[0021] The feature dimensionality reduction step introduced in this invention to replace the flat head can effectively reduce the computational complexity of the model while maintaining or even improving performance.
[0022] In robustness tests for various low-quality data scenarios such as missing values, anomalies, and distribution drift, SEER consistently performed best, demonstrating its strong generalization ability and huge application potential in real-world complex environments. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0024] Figure 1 This is a flowchart of the robust time series prediction method based on automated patch enhancement and replacement according to the present invention; Figure 2 This is an architecture diagram of the robust time series forecasting method based on automated patching enhancement and replacement according to the present invention. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] This invention provides a robust time series forecasting method based on automated patching enhancement and replacement, such as... Figure 1 As shown, it includes: S1: Obtain the original multi-channel time series data to be predicted and perform standardization processing; S2: Divide the standardized multi-channel time series raw data into multiple time series patches. Based on the enhanced embedding mechanism, generate semantic enhancement patch tokens corresponding to each time series patch, obtain a set of semantic enhancement patch tokens, and generate sequence-level tokens for global information representation corresponding to the multi-channel time series raw data. S3: Dynamically evaluate the quality score of each semantic enhancement patch token using a learnable token quality evaluation mechanism, and filter out semantic enhancement patch tokens in the semantic enhancement patch token set whose quality scores do not meet the requirements to obtain a retained token set; use a mask attention mechanism to enable the retained token set to interact with the sequence-level tokens to obtain refined sequence-level tokens, and use the refined sequence-level tokens to replace the positions corresponding to the filtered semantic enhancement patch tokens in the semantic enhancement patch token set to reconstruct the complete token sequence; S4: Based on the reconstructed complete token sequence, output the final time series prediction result through the prediction header.
[0027] like Figure 2 As shown, the framework upon which the method of this invention is based includes an enhanced embedding module and a learnable patch replacement module. The enhanced embedding module includes an enhanced patch embedding component (a) and an enhanced sequence embedding component (b); the learnable patch replacement module includes an automated token filter (c), a masked multi-head self-attention mechanism (d), and a replacement flat head (e).
[0028] The input time series data is first standardized by instance normalization to stabilize the data distribution.
[0029] The data is then fed into the enhanced embedding module, which is responsible for generating two key outputs: Tokens with semantically rich patches generated using an expert hybrid model; Tokens generated through a high-quality sequence via a channel adaptive sensing mechanism, which serve as both a carrier of global information and a replacement token.
[0030] Next, the learnable patch replacement module performs a three-stage processing flow on the aforementioned token: Automated token filter: Dynamically scores each patch token and identifies and filters out low-quality negative patches based on the score.
[0031] Masked attention mechanism: It establishes a dependency between the high-quality patch tokens that are retained and the tokens in the sequence, while refining the tokens in the sequence by isolating the interference of the filtered tokens through a mask.
[0032] Replacement and Prediction: The tokens of a refined, globally optimized sequence are used to precisely fill the information gaps left by the filtered patches, and the final prediction results are output through a linear prediction head.
[0033] In one embodiment, to address the insufficient capabilities of traditional single embedding representations, this embodiment employs an expert hybrid model architecture to construct a heterogeneous embedding space, significantly enriching the semantics of patch representations. Therefore, the enhanced embedding mechanism in step S2 includes the following steps: The time series patch is embedded using an expert hybrid model consisting of a shared expert and multiple specialized experts; whereby... A common semantic representation of all time series patches is obtained by sharing experts, while multiple specialized experts learn different time series pattern features. The gating network is used to dynamically assign gating weights to multiple specialized experts based on the content of the current time series patch; The linear embedding outputs of a shared expert and multiple specialized experts are weighted and fused according to gating weights to generate a semantically enhanced patch token.
[0034] The specific execution process of this embodiment is as follows: Given a time series divided into patches (N channels, n patches, patch length p), define a set of experts, each expert being a standard linear embedding layer:
[0035] Adaptively select each patch token using a noisy gating network. The most suitable expert is activated. Random noise is added to the gating network. To improve training stability and expert diversity:
[0036]
[0037] Final enhancement patch embedded It is obtained by weighted summation of the outputs of a set of shared experts used to extract general patterns and experts used for routing in gated networks:
[0038] This approach allows the model to learn to route patches with similar temporal patterns to the same experts, thereby generating more discriminative and semantically informative representations.
[0039] It should be noted that, in addition to the expert hybrid model architecture, this embodiment can also employ other schemes that can enhance representation capabilities, such as: Use multiple parallel MLP branches with different nonlinear activation functions (such as ReLU, GeLU, SiLU, etc.), and then concatenate or weightedly fuse their outputs, or... Design a deeper or wider MLP network to replace the single linear embedding in order to increase its nonlinear modeling capabilities.
[0040] In one embodiment, an enhanced sequence embedding component is set up to generate tokens for high-quality sequences that can be used to replace low-quality patches. This component functions to generate a representation for each time series channel that includes both its own characteristics and global information. Therefore, the enhanced embedding mechanism in step S2 includes the following steps: The initial embedding representation of the original time series data of each channel is obtained, and a global representation including the common features of all channels is extracted based on the initial embedding representation. The global representation is then fused with the initial embedding representation of each channel to generate a sequence-level token.
[0041] In one embodiment, the step of generating a sequence-level token in step S2 includes: The first linear layer processes each channel of the input time series raw data to obtain the initial embedding representation of each channel; An aggregation operation is used to process the initial embedding representations of all channels to generate a global representation that includes the common features of all channels. The global representation is copied and expanded to a number of copies equal to the number of channels, and then each copy is concatenated with the initial embedded representation of the corresponding channel. The initial embedded representation after splicing is nonlinearly transformed and fused using a second multilayer perceptron to generate a sequence-level token for each channel.
[0042] The specific execution process of this embodiment is as follows: First, the input sequence is processed through a first linear layer to obtain the initial embedding representation of each channel. .
[0043] Secondly, in order to extract global information that can summarize the common features of all channels, an aggregation operation is performed on the initial embedding representations of all channels to generate a single, condensed global core representation. This aggregation operation aims to merge the representations of multiple channels into a single representation, which can be achieved, for example, through techniques such as random pooling, average pooling, or max pooling.
[0044] Then, this global core representation Duplicate and expand to a number of copies equal to the number of channels, and then embed each copy with the initial embedding representation of the corresponding channel. Perform the splicing operation. This step aims to inject global information into the local information of each channel.
[0045] Finally, a second multilayer perceptron (MLP) is used to perform a nonlinear transformation and fusion on the concatenated representations, ultimately generating a channel-specific token for the globally enhanced sequence. This token will be used as a prototype for subsequent replacement operations:
[0046] Tokens of these sequences The global temporal pattern of the sequence was captured and will be used in subsequent modules to replace the identified low-quality patches.
[0047] It should be noted that the generation method described in this embodiment of the invention generates a global core representation by aggregating the representations of all channels, and then broadcasting this core representation and merging it with the representations of each channel itself. Other sequence-level token generation methods can also be used, for example: Global self-attention mechanism: Apply global self-attention once to all patch tokens and output its value. The token or the result of pooling is used as the token of the sequence.
[0048] Recurrent Neural Networks: RNNs such as LSTM or GRU scan the entire sequence and use its final hidden state as a token representing the sequence's global information.
[0049] In one embodiment, in step S3, the learnable token quality assessment mechanism performs the following steps: A quality score is calculated for each patch token using a linear layer and an activation function. The quality score is binarized and compared with a preset threshold to generate a binary indicator that indicates whether the patch token should be retained or filtered out. The gradient propagation mechanism employs a method where the reciprocal of the quality fraction after gradient separation is multiplied by the quality fraction, which serves as a selection signal during forward propagation, allowing the gradient to propagate backward through the quality fraction.
[0050] The specific execution process of this embodiment is as follows: An automated token filter is used to dynamically and learnably evaluate the quality of each patch token.
[0051] First, each enhanced patch token is generated through a linear layer and a sigmoid activation function. Calculate a mass fraction in the range [0,1]. :
[0052] Then, the score is compared with a preset threshold. Compare and generate a binary indicator. ,in This indicates that the token will be retained. This indicates that the token is a low-quality token and needs to be filtered out.
[0053] To ensure proper backpropagation of gradients during discrete operations like filtering, a gradient propagation mechanism is employed. This mechanism multiplies the score value by the reciprocal of a fraction whose gradient has been separated. This ensures that the gradient can propagate back through the original score value while simultaneously performing discretization selection. .
[0054] It should be noted that this embodiment currently uses hard filtering based on a fixed threshold, but other filtering methods can also be used. For example: Soft filtering: Instead of directly discarding tokens, the calculated quality score is used as the weight of the token in subsequent calculations, thus achieving a smooth adjustment of the contribution of tokens of different quality.
[0055] Learnable threshold: The filtering threshold Designed as a learnable parameter, allowing the model to automatically determine the optimal filtering criteria based on data characteristics.
[0056] In one embodiment, in step S3, the masked attention mechanism aims to isolate the influence of low-quality tokens while allowing high-quality information to interact and be refined effectively. Specifically, it performs the following steps: An attention mask is constructed based on binary indicators. In the mask multi-head self-attention mechanism, attention calculation is only allowed between the retained patch tokens and between the retained patch tokens and the sequence tokens to obtain refined sequence-level tokens.
[0057] The specific execution process of this embodiment is as follows: First, based on the indicator generated in the previous step and gradient carrier Generate an attention mask matrix for each channel. This mask ensures that any attention calculations related to the filtered tokens are hidden.
[0058]
[0059] Then, the token of the sequence and patch tokens The concatenated images serve as input to the attention mechanism. This mask is applied in standard self-attention computation. :
[0060] In this way, the model computes attention only between high-quality patches and between high-quality patches and the tokens of the sequence. This not only avoids noise interference but also ensures that the tokens of the sequence... It absorbs contextual information from high-quality patches, thus refining it to be more accurate.
[0061] It should be noted that this embodiment uses the refined sequence of tokens for replacement. Other replacement schemes can also be used, such as: Local information replacement: Replace with the average, weighted average, or interpolated value of the high-quality neighboring tokens around the filtered token.
[0062] Mask vector replacement: Instead of replacing the content, a fixed or learnable mask vector is used to fill the filtered-out positions, allowing the model to learn how to handle these missing information.
[0063] In one embodiment, a linear dimensionality reduction operation is performed on the reconstructed token sequence before the prediction head.
[0064] The specific execution process of this embodiment is as follows: The flat head is replaced to complete the final information repair and prediction. After masked attention interaction, features incorporating refined information are obtained. The first token is the optimized final sequence of tokens. .
[0065] Use this refined token This replaces the positions of all low-quality patch tokens identified and filtered out in the automated token filter, thereby restoring the information discontinuity in the sequence caused by the filtering operation.
[0066] To improve efficiency, the complete token sequence after replacement can be... Perform a linear feature reduction.
[0067] Finally, the processed token sequence is flattened and passed through a final linear layer to obtain the prediction result. .
[0068] In one embodiment, the raw multi-channel time series data to be predicted includes raw multi-channel time series data of traffic flow and raw multi-channel time series data of power transformers.
[0069] The following provides experimental results comparing the performance of multivariate time series prediction in general scenarios.
[0070] To verify the superiority of the SEER framework in standard time series forecasting tasks, experiments were conducted on publicly available datasets such as Traffic (traffic flow) and ETTh1 (electric transformer temperature). SEER (experimental group) was compared with state-of-the-art baseline models such as DUET, iTransformer, and PatchTST (control group).
[0071] The experimental parameters are set as follows: Input length: 96.
[0072] Predictive Horizon: Covers four different lengths: 96,192,336,720.
[0073] Evaluation metrics: Mean Squared Error (MSE) and Mean Absolute Error (MAE), with lower values indicating better performance.
[0074] Specific experimental data (using the Traffic dataset as an example): The experimental data for traffic flow prediction (Traffic), a dataset with complex dependencies, is shown in Table 1 below: Table 1. Performance Comparison of Multivariate Time Series Prediction in General Scenarios
[0075] As shown in Table 1, the SEER model of this invention achieved optimal results for all prediction step sizes. In particular, SEER demonstrated a significant advantage in long sequence prediction (step size 720), proving the ability of the enhanced embedding module to capture long dependencies.
[0076] The following provides experimental results comparing the robustness of multivariate time series prediction in general scenarios with low-quality data.
[0077] To verify the technical effectiveness of this invention for low-quality data (including noise, anomalies, and missing values), a test scenario was constructed that included white noise, anomalies, distribution shift, and missing values, and compared with baseline models with robust designs (such as DUET and iTransformer equipped with RobustTSF).
[0078] The specific experimental data (comprehensive robustness test) is shown in Table 2 below, which illustrates the model's average performance (MSE / MAE) under different low-quality data interference: Table 2 Comparison of average model performance under different low-quality data interference.
[0079] As shown in Table 2, the experimental results show that in four common low-quality data scenarios, SEER outperforms existing state-of-the-art models (such as DUET) in robustness through its unique automatic filtering and replacement mechanism, and the average MSE is significantly reduced, which confirms the effectiveness of this technical solution in dealing with imperfect data in real-world scenarios.
[0080] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a robust time series forecasting method based on automated patching enhancement and replacement.
[0081] This invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the program to implement a robust time series prediction method based on automated patching enhancement and replacement.
[0082] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0083] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A robust time series forecasting method based on automated patching enhancement and replacement, characterized in that, Includes the following steps: S1: Obtain the original multi-channel time series data to be predicted and perform standardization processing; S2: Divide the standardized multi-channel time series raw data into multiple time series patches. Based on the enhanced embedding mechanism, generate semantic enhancement patch tokens corresponding to each time series patch, obtain a set of semantic enhancement patch tokens, and generate sequence-level tokens for global information representation corresponding to the multi-channel time series raw data. S3: Dynamically evaluate the quality score of each semantic enhancement patch token using a learnable token quality evaluation mechanism, and filter out semantic enhancement patch tokens in the set whose quality scores do not meet the requirements to obtain a retained token set; The reserved token set and the sequence-level tokens are interacted through a mask attention mechanism to obtain a refined sequence-level token. The refined sequence-level token is then used to replace the positions corresponding to the filtered semantic enhancement patch tokens in the semantic enhancement patch token set, thereby reconstructing the complete token sequence. S4: Based on the reconstructed complete token sequence, output the final time series prediction result through the prediction header.
2. The robust time series forecasting method based on automated patching enhancement and replacement according to claim 1, characterized in that, The enhanced embedding mechanism in step S2 includes the following steps: The time series patch is embedded using an expert hybrid model consisting of a shared expert and multiple specialized experts; wherein, The shared expert obtains a general semantic representation of all time series patches, while the multiple specialized experts each learn different time series pattern features. The gating weights of the multiple specialized experts are dynamically allocated based on the content of the current time series patch using a gating network; The linear embedding outputs of the shared expert and multiple specialized experts are weighted and fused according to gating weights to generate the semantic enhancement patch token.
3. The robust time series forecasting method based on automated patching enhancement and replacement according to claim 1, characterized in that, The enhanced embedding mechanism in step S2 includes the following steps: The initial embedding representation of the original time series data of each channel is obtained, and a global representation including common features of all channels is extracted based on the initial embedding representation. The global representation is then fused with the initial embedding representation of each channel to generate the sequence-level token.
4. The robust time series forecasting method based on automated patching enhancement and replacement according to claim 3, characterized in that, The steps in step S2 to generate sequence-level tokens include: The first linear layer processes each channel of the input time series raw data to obtain the initial embedding representation of each channel; An aggregation operation is used to process the initial embedding representations of all channels to generate a global representation that includes the common features of all channels. The global representation is copied and expanded to a number of copies equal to the number of channels, and each copy is then concatenated with the initial embedded representation of the corresponding channel. The initial embedded representation after splicing is nonlinearly transformed and fused using a second multilayer perceptron to generate a sequence-level token for each channel.
5. The robust time series forecasting method based on automated patching enhancement and replacement according to claim 1, characterized in that, In step S3, the learnable token quality assessment mechanism performs the following steps: A quality score is calculated for each patch token using a linear layer and an activation function. The quality score is binarized and compared with a preset threshold to generate a binary indicator that indicates whether the patch token should be retained or filtered out. A gradient propagation mechanism is employed, in which the reciprocal of the quality fraction after gradient separation is multiplied by the quality fraction, and used as a selection signal in the forward propagation, allowing the gradient to propagate backward through the quality fraction.
6. The robust time series forecasting method based on automated patching enhancement and replacement according to claim 1, characterized in that, In step S3, the mask attention mechanism performs the following steps: An attention mask is constructed based on the binary indicator. In the mask multi-head self-attention mechanism, attention calculation is only allowed between the retained patch tokens and between the retained patch tokens and the sequence token to obtain the refined sequence-level token.
7. The robust time series forecasting method based on automated patching enhancement and replacement according to claim 1, characterized in that, The process also includes linear dimensionality reduction of the reconstructed token sequence before the prediction head.
8. The robust time series forecasting method based on automated patching enhancement and replacement according to claim 1, characterized in that, The original multi-channel time series data to be predicted includes original multi-channel time series data of traffic flow and original multi-channel time series data of power transformers.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the robust time series forecasting method based on automated patching enhancement and replacement as described in any one of claims 1 to 8.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the robust time series forecasting method based on automated patching enhancement and replacement as described in any one of claims 1 to 8.