A Prompt-Based Dynamic Multi-Scale Coding Source Load Prediction Method and System
By combining dynamic multi-scale coding and hysteresis kernels, the problems of adaptive modeling scale and handling of exogenous variables in power system source-load forecasting are solved, improving forecast accuracy and interpretability, and reducing model migration costs.
Patent Information
- Application Number
- CN202511670564.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2045-11-14
AI Technical Summary
Existing power system source-load forecasting technologies struggle to adaptively switch modeling scales when facing short-term fluctuations, exogenous shocks, and the lagged effects of exogenous variables. This leads to information dilution and decreased forecasting accuracy. Furthermore, the lack of explicit parameterized modeling of exogenous variables makes it difficult to achieve accurate temporal causal alignment and interpretability.
We employ a prompt-based large-scale pre-trained model, using dynamic multi-scale encoding and hysteresis kernels, combined with a lightweight adapter and context-adaptive router, to explicitly model the multi-hysteresis causal effects of exogenous variables. We parameterize the hysteresis kernels using Gaussian mixture form, and perform parameter optimization during the freezing and fine-tuning phases of the shared backbone network in the pre-training phase.
It improves the accuracy and interpretability of source load prediction, reduces model transfer costs, enhances adaptability and robustness in heterogeneous scenarios, and achieves accurate prediction in exogenous driven scenarios.
Smart Images

Figure CN121124038B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power system source-load prediction, and specifically relates to a prompt-based dynamic multi-scale coding source-load prediction method and system. Background Technology
[0002] Power system source-load forecasting is a core foundational technology supporting the safe, economical, and low-carbon operation of modern power systems, providing strong guarantees for the accuracy of dispatch decisions and the stability of operation control. With the integration of a large number of new energy sources into the grid, the uncertainty faced by the system's power source side has significantly increased. Furthermore, with the increasing ownership of electric vehicles and the development of new load types such as household energy storage, the uncertainty on the system's load side is also growing.
[0003] The published paper "Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting" uses a fixed window and decomposition mechanism to capture trend and seasonal information, but lacks dynamic context selection capabilities. This makes it difficult to adaptively switch appropriate modeling scales in different forecasting scenarios (such as when short-term fluctuations are significant or exogenous shocks are obvious). At the same time, Autoformer has limited handling of exogenous variables and fails to model the impact of exogenous variables at different lags, resulting in insufficient prediction accuracy in exogenously driven scenarios.
[0004] Chinese patent "A Method for Constructing a Pre-trained Model for Power System Source-Load Prediction" proposes a source-load prediction method based on a hybrid expert model, including a spatiotemporal model hybrid expert sub-model and a forecast information hybrid expert sub-model. The spatiotemporal model hybrid expert sub-model employs a multi-degree-of-freedom hybrid expert student T-distribution output head to fit power load data with different distribution characteristics. The forecast information hybrid expert sub-model uses a two-stage routing network design. In the first stage, the main routing network selects expert model groups based on data type, and in the second stage, the sub-routing network further selects the optimal expert model for prediction. Finally, through pre-training on open-source data and real power system source-load data, a generalizable prediction model is obtained. However, the routing mechanism in this patent is primarily based on data type and lacks awareness of multi-scale time dependencies. The main / sub-routes assign inputs to expert groups based on data identifiers or types, but do not explicitly perform strategic routing between short-term / seasonal / long-term scales. Therefore, it is difficult to adaptively select the most informative historical scale in cross-period or mixed-scale scenarios. The student T output head can fit a heavy-tailed distribution with frequent extreme values, but it does not provide a parameterized characterization of the strength of different lag effects of exogenous variables, which limits the ability to explain the temporal causality of exogenous driving events. In this patent, the multiple expert group structures are independent, resulting in high computational and data costs when retraining / transferring to new scenarios, and there is a lack of a unified pre-training-fine-tuning path driven by prompts.
[0005] Therefore, in existing technologies for power system source-load forecasting in engineering applications, fixed or implicit time windows and decomposition strategies are typically used. These strategies cannot adaptively switch the modeling scale according to short-term fluctuations, periodic intensity, or exogenous shocks, leading to information dilution and decreased forecast accuracy. Secondly, the processing of exogenous variables is mostly simple splicing or synchronous input, lacking explicit parameterized modeling of exogenous quantities under different lags, making it difficult to achieve accurate temporal causal alignment and interpretability. Summary of the Invention
[0006] The present invention proposes a dynamic multi-scale coding source load prediction method based on a cue-driven large-scale pre-trained model, aiming to improve the accuracy and interpretability of source load prediction through cue-driven multi-scale routing and hysteresis kernel techniques.
[0007] This invention includes the following technical solutions:
[0008] Firstly, a prompt-based dynamic multi-scale coded source load prediction method includes:
[0009] Step 1: Perform engineering preprocessing on historical source load data to obtain the decomposition of endogenous variables in the source load data;
[0010] Step 2: Map historical source load data to embeddings in a time-series large model, and simultaneously calculate engineering statistics for context routing. The time-series large model adopts an encoder-decoder architecture.
[0011] Step 3: Construct a prior modulation mask from the trend and seasonal components of the endogenous variables in the source load data through a mask generation network, and map the prior modulation mask into a dynamic bias matrix for multi-head self-attention.
[0012] Step 4: Inject the dynamic bias matrix into the multi-head self-attention calculation of the large-scale temporal model to modulate the attention distribution in the large-scale temporal model;
[0013] Step 5: Use the embedding amount and positional encoding of the temporal large model as input data for the improved temporal large model to complete the prompt-based dynamic multi-scale encoding source load prediction.
[0014] The improved temporal large model is obtained by improving the attention-allocation modulated temporal large model: while maintaining or not being limited by the original heavy decoder, the decoder adopts a lightweight two-layer feedforward network as the decoder for output prediction; the feedforward network of each layer in the encoder is replaced with a three-branch structure composed of three lightweight bottleneck adapters (short-term, seasonal, and long-term) (three sets of adapter parameters exist in parallel for each layer), and a time-dimensional convergence operation module is set at the output of the encoder to obtain vectorized representations for routing fusion; in the pre-training stage, the shared backbone network, adapter, hysteresis kernel, and router of the improved temporal large model are jointly trained; in the fine-tuning stage, the shared backbone network is frozen first, and only the three lightweight bottleneck adapters, hysteresis kernels, and routers are unfrozen and fine-tuned; the weights of the three-branch structure are obtained by combining the engineering statistics and embedding of context routing for context routing.
[0015] The Adapter retains the nonlinear expressive power of FFN with a residual structure of dimensionality reduction-nonlinearity-dimensionality increase. It preserves an independent small parameter set for each scale, enabling the model to learn specialization transformations at different time scales without destroying the shared representation. It is creatively applied to large time series models, achieving specialization at each scale while sharing the backbone, significantly reducing the number of fine-tuning parameters, improving cross-site transfer efficiency, and maintaining nonlinear expressive power and interpretability.
[0016] Furthermore, in step 1, a time prior is introduced, and the source payload data is decomposed as follows:
[0017] ;
[0018] in, This represents the endogenous variable of the source load data at time t. As a trend component, The components are seasonal / cyclical, with the cyclical components including short-term and long-term components. The short-term components reflect high-frequency cyclical changes on hourly or daily scales, while the long-term components reflect low-frequency cyclical changes on monthly or quarterly scales. This is the residual term.
[0019] Furthermore, the dynamic bias matrix refers to the relative position bias vector generated by using trend and seasonal components (i.e., using a mask network to generate a modulation mask), and then strengthening the bias at typical periodic homogeneous points (i.e., using a modulation mask for mapping processing).
[0020] The specific process of injecting the dynamic bias matrix into the multi-head self-attention calculation of the large-scale temporal model to modulate the attention allocation in the large-scale temporal model is as follows:
[0021] First, the dynamic bias matrix is normalized using tanh, then added to the standard scoring items, and finally subjected to softmax operation to obtain the modulated attention distribution.
[0022] The standard scoring items are ;
[0023] To ensure numerical stability, the value of the dynamic bias matrix is normalized using tanh to avoid excessive bias affecting training convergence.
[0024] The design proposed in this invention is to directly drive the dynamic bias with the decomposition results and strengthen it at the homogeneous point, and to integrate it with the three-branch / routing / hysteresis core. This is not a known approach that simply combines the results.
[0025] The mask generation network employs several layers of one-dimensional causal convolutions and two layers of fully connected structures to ensure that the output depends only on the historical and current inputs. This method improves the ability to focus periodic information and long-term prediction accuracy, while ensuring causality and training stability. It can be adjusted or turned off by hyperparameters to meet engineering safety requirements.
[0026] Furthermore, the embedding amount of the aforementioned time-series large model also includes cue embedding vectors: ,Right now The prompt embedding vector obtained by MLP is the prompt identifier p representing the site and data;
[0027] Load embedding Using causal 1D convolution projection to dimension ,get ;
[0028] Each exogenous channel Obtained through shared projection ;
[0029] Represents a historical source payload data sequence. for Endogenous variables of source load data at time step. For the first Exogenous quantity in The observed value at time, A prompt identifier indicating a site or data;
[0030] Furthermore, the context routing is a context adaptive router. And the input is the recent volatility. Periodic intensity Exogenous significance Embedded with prompts The concatenated vector is processed by a temperature-controlled softmax classifier to output three-branch fusion weights. In the training of the context-adaptive router, it is combined with entropy regularization and routing temperature annealing. During training, the temperature coefficient is gradually reduced with iteration to achieve a smooth evolution from soft routing to near-hard routing.
[0031] The context-adaptive router consists of three fully connected layers, with a dropout layer added in the middle layer:
[0032] ;
[0033] in, Let represent the input vector of the context-adaptive router, and n represent the hidden layer number of the context-adaptive router. Let n be the hidden representation vector of the nth layer. Let n be the weight matrix of the nth layer. Let n be the bias vector of the nth layer. This serves as the second-layer hidden representation, acting as the final intermediate representation for the context-adaptive router. The weight matrix of the output layer is projected onto the weight space of the three branches. For output layer bias; Represents the router output vector Component index, The three components output by the context-adaptive router correspond to the short-term, seasonal, and long-term branches, respectively.
[0034] Three-branch fusion routing weight : ;
[0035] Where c is the temperature coefficient;
[0036] Introducing the aforementioned entropy regularization term:
[0037]
[0038] in, The regularization coefficient;
[0039] The regularization constraint encourages diversity in branch weights, ensuring that short-term, seasonal, and long-term branches are optimized in the early training phase, thereby enhancing overall robustness.
[0040] To prevent the router from prematurely biased towards a single branch during training, an entropy regularization term is introduced;
[0041] Recent volatility A window to history Sample variance on:
[0042] ;
[0043] ;
[0044] Where Var represents the unbiased variance of the sample, and τ represents the sample size used to calculate recent statistics. Indicates from time Time The most recent of this sequence A sample set consisting of 10 samples Represents the sequence in time The specific moment A historical sample value, This indicates the aforementioned recent window The sample mean of all samples within the range;
[0045] The periodic intensity The single-sided spectral energy ratio is used to measure the proportion of a certain period in the past window:
[0046] ;
[0047] , ;
[0048] This represents the sampled sequence of exogenous variables within a time window of length N. Indicates length is The exogenous variable sampling sequence within the time window, Represents the complex spectral coefficients. The power spectrum represents the frequency spectrum. Indicates energy bands, , Indicates bandwidth. ε is a small positive constant used for numerical stability. This indicates that the statistical window length is, Indicates the corresponding target period The discrete spectrum index where the dominant frequency component is located; , , Indicates the sampling interval. Indicates the sampling interval The number of steps within;
[0049] The exogenous significance :
[0050] ;
[0051] ;
[0052] ;
[0053] in, Indicates the sample standard deviation. Indicates the first The mean of each scale window, This indicates that the maximum standard deviation among all exogenous channels is taken as the significance index, where L is the length of the input sequence. Indicates the use of calculating the first The effective number of samples with standard deviation of the off-path channel sample, where k represents the channel number label.
[0054] The concatenated vector includes the volatility, periodicity, and exogenous driving significance of the original time series, as well as the contextual prior brought by the cueing mechanism, enabling the router to adjust its decisions more finely under different operating conditions.
[0055] Furthermore, the decoder of the improved temporal large model employs a lightweight predictive decoder with a two-layer feedforward structure for decoding and prediction.
[0056] ;
[0057] in, , These are the weight matrices for the first and second layer feedforward structures, respectively. , These are the biases for the first-layer feedforward structure and the second-layer feedforward structure, respectively. The final predicted sequence has a length of H. This indicates that the fused vector is used as the input to the decoder. , For the three-branch fusion routing weight, Let be the vectors for each branch, and GELU represent the activation function.
[0058] Furthermore, a parameterizable lag influence kernel is learned for the exogenous variables of the source load data. The lag influence kernel is modeled using a Gaussian mixture form to model the historical lag effect of the exogenous variables, which is used to characterize the dynamic influence strength of the exogenous variables on the endogenous target under different lags. The historical sequence of the exogenous variables is aligned with the lag influence kernel through causal convolution to obtain a time-aligned exogenous view. The exogenous view and the prior modulation mask are then input into the multi-head attention mechanism of the encoder in the improved time-series large model. The lag influence kernel determines different lag centers and influence widths through learnable parameters, and regularization and smoothing constraints are introduced during training.
[0059] By utilizing exogenous views and prior modulation masks as inputs to the multi-head attention mechanism, we can explicitly model the multi-hysteresis causal effects of exogenous factors and improve the accuracy and interpretability of source load prediction. Regularization and smoothing constraints are introduced during training to ensure the stability and physical rationality of the kernel morphology.
[0060] To explicitly model the lagged effects of exogenous variables on endogenous objectives, for each exogenous variable... Learning parameterizable hysteresis kernel Using a Gaussian mixture model, the learned kernel is used to perform causal alignment of exogenous sequences, generating aligned exogenous views. This is used as the Key / Value of cross-attention, explicitly reflecting the contribution of exogenous factors to the target under different lags.
[0061] For the Each exogenous variable corresponds to an independent mixture Gaussian hysteresis kernel. This indicates the number of Gaussian mixture components used for the k-th exogenous variable;
[0062] Nuclear with continuous lag The Gaussian mixture representation:
[0063] ;
[0064] in , representing the weight of the m-th Gaussian component, to ensure The nonnegativity and normalization of the unnormalized weights Do : To ensure that causality does not use future lag, Let be the mean of the m-th Gaussian component, representing the lag center location. Nonnegative parameterization is used. ; Let be the standard deviation of the m-th Gaussian component, representing the width of the hysteresis range. Similarly, for... Nonnegative parameterization is used, and a smoothing term ε is taken as a constant. , ,in .
[0065] Discretize the continuous kernel on integer lag into a length of... vector To control computation and latency, take The discretization of the Gaussian mixture form is defined as follows:
[0066] ;
[0067] Where n represents the discrete lag step index, corresponding to the value of the continuous lag τ at integer sampling points, and the mixed weights. It satisfies the constraints of non-negativity and normalization. During implementation, the original parameters... Perform differentiable transformations to satisfy physical constraints and facilitate optimization: through get: Softplus is used to ensure non-negativity of the mean and standard deviation. Normalization is performed on the discretization results to ensure numerical stability.
[0068] ;
[0069] Where ε is a small constant. Normalized Causal convolution is defined as follows: (The kernel is used to align the exogenous sequence.)
[0070] ;
[0071] Will By using linear projection as the key / value for cross-attention, the encoder explicitly perceives the distribution of exogenous influences under different lags, thus affecting the first... Branching introduces a learning scaling factor. This allows the same core to have different levels of influence in different branches.
[0072] To prevent nuclear parameters from becoming extreme and to avoid learning noisy spikes, the following regularization and smoothing terms are added during training:
[0073] ;
[0074] ;
[0075] in, For the complete set of learnable primitive parameters of the exogenous kernel, , These are hyperparameters that control kernel parameter regularization and kernel smoothness, respectively. The kernel value is the discretized and normalized value.
[0076] The aforementioned regularization terms, together with the parameterization of softmax, constrain the kernel shape and improve training stability.
[0077] For each exogenous variable, a Gaussian mixture parameterized lag kernel is learned and discretized on integer lags into causal convolution kernels aligned with the exogenous sequence for cross-attention. This design can explicitly capture the impact of exogenous variables on the target under multimodal lags, improving prediction accuracy and interpretability in exogenous-driven scenarios, while controlling stability through L2 and smoothing regularization.
[0078] Furthermore, pre-training is performed on large-scale heterogeneous datasets to train and construct a fine-tuned temporal model containing a shared backbone network (i.e., a shared encoder in the temporal model), an adapter, hysteresis kernels, and a context router. The cue vectors are also randomized during pre-training. To improve generalization capabilities across multiple scenarios, the fine-tuning phase prioritizes freezing the shared backbone network at the target site, only unfreezing the Adapter, router, and hysteresis core. The entire training process employs a hybrid loss function. :
[0079] ;
[0080] in, To adjust the hyperparameters, different loss terms are controlled. , , , The weights in the overall optimization objective The predicted loss is expressed using the mean squared error. This represents the entropy regularization of the context router. This is used to control routing sparsity; Indicates kernel regularization terms and This represents the smoothing term, which together constrains the kernel parameters.
[0081] Secondly, a prediction system employing the aforementioned prompt-based dynamic multi-scale coding source load prediction method includes:
[0082] Decomposition module: Performs engineering preprocessing on historical source load data to obtain the decomposition quantity of endogenous variables in the source load data;
[0083] Mapping and Engineering Statistics Calculation Module: Maps historical source load data into embedded quantities of the time series large model, and calculates engineering statistics for context routing. The time series large model adopts an encoder-decoder architecture.
[0084] Dynamic bias matrix generation module: The trend component and seasonal component in the decomposition of the endogenous variables of the source load data are used to construct a prior modulation mask through a mask generation network, and the prior modulation mask is mapped to a dynamic bias matrix for multi-head self-attention.
[0085] Attention Allocation Modulation Module: Injects the dynamic bias matrix into the multi-head self-attention computation of the large-scale temporal model to modulate the attention allocation in the large-scale temporal model;
[0086] Source-load prediction module: It uses the embedding amount and positional encoding of the temporal large model as input data for the improved temporal large model to complete the prompt-based dynamic multi-scale coding source-load prediction.
[0087] Improved Temporal Large Model Construction and Training Module: The improved temporal large model is obtained by improving the attention-allocation modulated temporal large model. While maintaining or not being limited by the original heavy decoder, the decoder adopts a lightweight two-layer feedforward network as the decoder for output prediction. The feedforward network of each layer in the encoder is replaced with a three-branch structure composed of three lightweight bottleneck adapters (short-term, seasonal, and long-term) (three sets of adapter parameters exist in parallel for each layer), and a time-dimensional convergence operation module is set at the output of the encoder to obtain vectorized representations for routing fusion. In the pre-training stage, the shared backbone network, adapter, hysteresis kernel, and router of the improved temporal large model are jointly trained. In the fine-tuning stage, the shared backbone network is frozen first, and only the three lightweight bottleneck adapters, hysteresis kernels, and routers are unfrozen and fine-tuned. The weights of the three-branch structure are obtained by combining the engineering statistics and embedding of context routing for context routing.
[0088] Thirdly, a computer-readable storage medium storing a computer program that is invoked by a processor to implement:
[0089] The above-described steps of the prompt-based dynamic multi-scale coding source load prediction method are described.
[0090] Beneficial effects
[0091] Compared with the prior art, this application has the following advantages:
[0092] 1. The technical solution of this invention replaces the FFN with a lightweight bottleneck adapter in each encoder layer of a large temporal model using an encoder-decoder architecture, and configures independent branch adapters for the three time scales of short-term, seasonal and long-term. It can achieve scale specialization of each layer with extremely low parameter cost while maintaining the sharing of the attention backbone, improve transfer efficiency and enhance the adaptability and interpretability of the model in heterogeneous scenarios.
[0093] 2. To address the requirement that time-series samples should employ different historical depths under varying operating conditions, this invention proposes a context-adaptive router. The router has recent fluctuations. Periodic intensity Exogenous significance Embedded with prompts The concatenated vector is used as input, processed by a small MLP, and then the three-branch routing weights are output using a Softmax function with a temperature parameter for dynamically fusing multi-scale modeling results. During training, an entropy regularization term and a routing temperature annealing mechanism are introduced to ensure the temperature coefficient... The model scale gradually decreases with each iteration, enabling a smooth evolution from soft routing to near-hard routing. This improved technique allows the model to automatically select the most suitable modeling scale under sudden disturbances, strong periodicity, or stationary conditions, effectively improving prediction accuracy and generalization robustness. The router directly utilizes statistics and cue information that characterize the scene, giving the weights physical interpretability; temperature annealing and entropy regularization ensure sufficient exploration in the early stages of training and explicit decision-making in the later stages, thus balancing stability and interpretability.
[0094] 3. The technical solution of this invention involves learning the parameterized lag effects of each exogenous quantity, employing a Gaussian mixture model (GaJM). An aligned view is obtained through causal one-dimensional convolution, and this view is used as the key / value for cross-attention. This achieves explicit modeling of the multi-modal effects of exogenous quantities, including immediate, short-lag, and periodic lags, improving prediction accuracy and interpretability in exogenous-driven scenarios. The GaJM parameterization can express multi-modal lags and is differentiable for optimization. Causal convolution ensures that future information is not used and smoothly extends the exogenous signal to different lags, allowing the attention mechanism to weigh the contributions of different lags in the time dimension. Smoothing regularization prevents overfitting and noise amplification.
[0095] 4. The technical solution of this invention proposes to use prompt vectors. The large-scale pre-training and fine-tuning specification for input involves joint pre-training on heterogeneous datasets with cue augmentation to obtain a general shared backbone. During the target site fine-tuning phase, the shared backbone is frozen, and only the three branches—Adapter, hysteresis kernel, and router—are unfrozen and fine-tuned. This reduces the number of parameters and data required for fine-tuning, decreases model update costs, and facilitates rolling rollback and fine-grained upgrades. The shared backbone carries a general temporal representation, the Adapter and kernel serve as a small number of adjustable parameters for learning scene specializations, and the router and cue help the model efficiently transform to the target distribution during fine-tuning, thereby achieving efficient parameter transfer and engineering controllability. Attached Figure Description
[0096] Figure 1 This is a schematic diagram of the overall framework of the method described in the technical solution of the present invention;
[0097] Figure 2 This is a schematic diagram of parameterized exogenous hysteresis kernel and causal convolution alignment in the technical solution of this invention;
[0098] Figure 3 This is a schematic diagram of the multi-head attention mechanism based on prior modulation used in the technical solution of this invention;
[0099] Figure 4 This is a flowchart illustrating the method described in the technical solution of the present invention. Detailed Implementation
[0100] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. The technical features involved in the various embodiments of the invention described below can be combined with each other as long as they do not conflict with each other.
[0101] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0102] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0103] Example 1
[0104] like Figure 1 and Figure 4 As shown, a prompt-based dynamic multi-scale coding source load prediction method includes:
[0105] Step 1: Perform engineering preprocessing on historical source load data to obtain the decomposition of endogenous variables in the source load data;
[0106] Introducing a temporal prior, the source payload data is decomposed as follows:
[0107] ;
[0108] in, This represents the endogenous variable of the source load data at time t. As a trend component, The components are seasonal / cyclical, with the cyclical components including short-term and long-term components. The short-term components reflect high-frequency cyclical changes on hourly or daily scales, while the long-term components reflect low-frequency cyclical changes on monthly or quarterly scales. This is the residual term.
[0109] A parameterizable lag influence kernel is learned for the exogenous variables of the source load data. The lag influence kernel is modeled using a Gaussian mixture form to model the historical lag effect of the exogenous variables, which is used to characterize the dynamic influence strength of the exogenous variables on the endogenous target under different lags. The historical sequence of the exogenous variables is aligned with the lag influence kernel through causal convolution to obtain a time-aligned exogenous view. The exogenous view and the prior modulation mask are then input into the multi-head attention mechanism of the encoder in the improved time-series large model. The lag influence kernel determines different lag centers and influence widths through learnable parameters, and regularization and smoothing constraints are introduced during training.
[0110] By utilizing exogenous views and prior modulation masks as inputs to the multi-head attention mechanism, we can explicitly model the multi-hysteresis causal effects of exogenous factors and improve the accuracy and interpretability of source load prediction. Regularization and smoothing constraints are introduced during training to ensure the stability and physical rationality of the kernel morphology.
[0111] like Figure 2 As shown, this illustrates the lagged effects of exogenous variables on endogenous objectives in explicit modeling, where each exogenous variable represents a different path. Learning parameterizable hysteresis kernel Using a Gaussian mixture model, the learned kernel is used to perform causal alignment of exogenous sequences, generating aligned exogenous views. This is used as the Key / Value of cross-attention, explicitly reflecting the contribution of exogenous factors to the target under different lags.
[0112] For the Each exogenous variable corresponds to an independent mixture Gaussian hysteresis kernel. This indicates the number of Gaussian mixture components used for the k-th exogenous variable;
[0113] Nuclear with continuous lag The Gaussian mixture representation:
[0114] ;
[0115] in , representing the weight of the m-th Gaussian component, to ensure The nonnegativity and normalization of the unnormalized weights Do : To ensure that causality does not use future lag, Let be the mean of the m-th Gaussian component, representing the lag center location. Nonnegative parameterization is used. ; Let be the standard deviation of the m-th Gaussian component, representing the width of the hysteresis range. Similarly, for... Nonnegative parameterization is used, and a smoothing term ε is taken as a constant. , ,in .
[0116] Discretize the continuous kernel on integer lag into a length of... vector To control computation and latency, take The discretization of the Gaussian mixture form is defined as follows:
[0117] ;
[0118] Where n represents the discrete lag step index, corresponding to the value of the continuous lag τ at integer sampling points, and the mixed weights. It satisfies the constraints of non-negativity and normalization. During implementation, the original parameters... Perform differentiable transformations to satisfy physical constraints and facilitate optimization: through get: Softplus is used to ensure non-negativity of the mean and standard deviation. Normalization is performed on the discretization results to ensure numerical stability.
[0119] ;
[0120] Where ε is a small constant, after normalization Causal convolution is defined as follows: (The kernel is used to align the exogenous sequence.)
[0121] ;
[0122] Will By using linear projection as the key / value for cross-attention, the encoder explicitly perceives the distribution of exogenous influences under different lags, thus affecting the first... Branching introduces a learning scaling factor. This allows the same core to have different levels of influence in different branches.
[0123] To prevent nuclear parameters from becoming extreme and to avoid learning noisy spikes, the following regularization and smoothing terms are added during training:
[0124] ;
[0125] ;
[0126] in, For the complete set of learnable primitive parameters of the exogenous kernel, , These are hyperparameters that control kernel parameter regularization and kernel smoothness, respectively. The kernel value is the discretized and normalized value.
[0127] The aforementioned regularization terms, together with the parameterization of softmax, constrain the kernel shape and improve training stability.
[0128] For each exogenous variable, a Gaussian mixture parameterized lag kernel is learned and discretized on integer lags into causal convolution kernels aligned with the exogenous sequence for cross-attention. This design can explicitly capture the impact of exogenous variables on the target under multimodal lags, improving prediction accuracy and interpretability in exogenous-driven scenarios, while controlling stability through L2 and smoothing regularization.
[0129] Step 2: Map historical source load data to embeddings in a time-series large model, and simultaneously calculate engineering statistics for context routing. The time-series large model adopts an encoder-decoder architecture.
[0130] The embedding amount of the large temporal model also includes cue embedding vectors: ,Right now The prompt embedding vector obtained by MLP is the prompt identifier p representing the site and data;
[0131] Load embedding Using causal 1D convolution projection to dimension ,get ;
[0132] Each exogenous channel Obtained through shared projection ;
[0133] Represents a historical source payload data sequence. for Endogenous variables of source load data at time step. For the first Exogenous quantity in The observed value at time, A prompt identifier indicating a site or data;
[0134] The context routing is a context adaptive router. And the input is the recent volatility. Periodic intensity Exogenous significance Embedded with prompts The concatenated vector is processed by a temperature-controlled softmax classifier to output three-branch fusion weights. In the training of the context-adaptive router, it is combined with entropy regularization and routing temperature annealing. During training, the temperature coefficient is gradually reduced with iteration to achieve a smooth evolution from soft routing to near-hard routing.
[0135] The context-adaptive router consists of three fully connected layers, with a dropout layer added in the middle layer:
[0136] ;
[0137] in, Let represent the input vector of the context-adaptive router, and n represent the hidden layer number of the context-adaptive router. Let n be the hidden representation vector of the nth layer. Let n be the weight matrix of the nth layer. Let n be the bias vector of the nth layer. This serves as the second-layer hidden representation, acting as the final intermediate representation for the context-adaptive router. The weight matrix of the output layer is projected onto the weight space of the three branches. For output layer bias; Represents the router output vector Component index, The three components output by the context-adaptive router correspond to the short-term, seasonal, and long-term branches, respectively.
[0138] Three-branch fusion routing weight : ;
[0139] Where c is the temperature coefficient;
[0140] Introducing the aforementioned entropy regularization term:
[0141] ;
[0142] in, The regularization coefficient;
[0143] The regularization constraint encourages diversity in branch weights, ensuring that short-term, seasonal, and long-term branches are optimized in the early training phase, thereby enhancing overall robustness.
[0144] To prevent the router from prematurely biased towards a single branch during training, an entropy regularization term is introduced;
[0145] Recent volatility A window to history Sample variance on:
[0146] ;
[0147] ;
[0148] Where Var represents the unbiased variance of the sample, and τ represents the sample size used to calculate recent statistics. Indicates from time Time The most recent of this sequence A sample set consisting of 10 samples Represents the sequence in time The specific moment A historical sample value, This indicates the aforementioned recent window The sample mean of all samples within the range;
[0149] The periodic intensity The single-sided spectral energy ratio is used to measure the proportion of a certain period in the past window:
[0150] ;
[0151] , ;
[0152] This represents the sampled sequence of exogenous variables within a time window of length N. Indicates length is The exogenous variable sampling sequence within the time window, Represents the complex spectral coefficients. The power spectrum represents the frequency spectrum. Indicates energy bands, , Indicates bandwidth. ε is a small positive constant used for numerical stability. This indicates that the statistical window length is, Indicates the corresponding target period The discrete spectrum index where the dominant frequency component is located; , , Indicates the sampling interval. Indicates the sampling interval The number of steps within;
[0153] The exogenous significance :
[0154] ;
[0155] ;
[0156] ;
[0157] in, Indicates the sample standard deviation. Indicates the first The mean of each scale window, This indicates that the maximum standard deviation among all exogenous channels is taken as the significance index, where L is the length of the input sequence. Indicates the use of calculating the first The effective number of samples with standard deviation of the off-path channel sample, where k represents the channel number label.
[0158] The concatenated vector includes the volatility, periodicity, and exogenous driving significance of the original time series, as well as the contextual prior brought by the cueing mechanism, enabling the router to adjust its decisions more finely under different operating conditions.
[0159] Step 3: Using a mask generation network, construct a prior modulation mask from the trend and seasonal components of the endogenous variables in the source payload data. Then, map the prior modulation mask to a dynamic bias matrix B for multi-head self-attention, as shown below. Figure 3 As shown;
[0160] The dynamic bias matrix refers to the relative position bias vector generated by using trend and seasonal components (i.e., using a mask network to generate a modulation mask), and the bias is strengthened at typical periodic homogeneous points (i.e., using a modulation mask for mapping processing).
[0161] The specific process of injecting the dynamic bias matrix into the multi-head self-attention calculation of the large-scale temporal model to modulate the attention allocation in the large-scale temporal model is as follows:
[0162] First, the dynamic bias matrix is normalized using tanh, then added to the standard scoring items, and finally subjected to softmax operation to obtain the modulated attention distribution.
[0163] The standard scoring items are ;
[0164] To ensure numerical stability, the value of B is normalized using tanh to avoid excessive bias affecting training convergence.
[0165] The design proposed in this invention is to directly drive the dynamic bias with the decomposition results and strengthen it at the homogeneous point, and to integrate it with the three-branch / routing / hysteresis core. This is not a known approach that simply combines the results.
[0166] The mask generation network employs several layers of one-dimensional causal convolutions and two layers of fully connected structures to ensure that the output depends only on the historical and current inputs. This method improves the ability to focus periodic information and long-term prediction accuracy, while ensuring causality and training stability. It can be adjusted or turned off by hyperparameters to meet engineering safety requirements.
[0167] Step 4: Inject the dynamic bias matrix into the multi-head self-attention calculation of the large-scale temporal model to modulate the attention distribution in the large-scale temporal model;
[0168] Step 5: Use the embedding amount and positional encoding of the temporal large model as input data for the improved temporal large model to complete the prompt-based dynamic multi-scale encoding source load prediction.
[0169] The improved temporal large model is obtained by improving the attention-allocation modulated temporal large model: while maintaining or not being limited by the original heavy decoder, the decoder adopts a lightweight two-layer feedforward network as the decoder for output prediction; the feedforward network of each layer in the encoder is replaced with a three-branch structure composed of three lightweight bottleneck adapters (short-term, seasonal, and long-term) (three sets of adapter parameters exist in parallel for each layer), and a time-dimensional convergence operation module is set at the output of the encoder to obtain vectorized representations for routing fusion; in the pre-training stage, the shared backbone network, adapter, hysteresis kernel, and router of the improved temporal large model are jointly trained; in the fine-tuning stage, the shared backbone network is frozen first, and only the three lightweight bottleneck adapters, hysteresis kernels, and routers are unfrozen and fine-tuned; the weights of the three-branch structure are obtained by combining the engineering statistics and embedding of context routing for context routing.
[0170] The decoder of the improved temporal large model uses a lightweight predictive decoder with a two-layer feedforward structure for decoding and prediction.
[0171] ;
[0172] in, , These are the weight matrices for the first and second layer feedforward structures, respectively. , These are the biases for the first-layer feedforward structure and the second-layer feedforward structure, respectively. The final predicted sequence has a length of H. This indicates that the fused vector is used as the input to the decoder. , For the three-branch fusion routing weight, Let be the vectors for each branch, and GELU represent the activation function.
[0173] Pre-training is performed on large-scale heterogeneous datasets to fine-tune the shared backbone network (i.e., the shared encoder, adapter, hysteresis kernel, and context router in the constructed temporal model, and the cue vectors are randomized during pre-training. To improve generalization capabilities across multiple scenarios, the fine-tuning phase prioritizes freezing the shared backbone network at the target site, only unfreezing the Adapter, router, and hysteresis core. The entire training process employs a hybrid loss function. :
[0174] ;
[0175] in, To adjust the hyperparameters, different loss terms are controlled. , , , The weights in the overall optimization objective The predicted loss is expressed using the mean squared error. This represents the entropy regularization of the context router. This is used to control routing sparsity; Indicates kernel regularization terms and This represents the smoothing term, which together constrains the kernel parameters.
[0176] This invention's technical solution example constructs a three-branch encoder with short window, seasonal window, and long window. Through prompting and fine-tuning, and by fine-tuning the encoder's feedforward network, three different branches are achieved. Lightweight gate output branch weights with sparse regularization enable dynamic context selection and interpretability display in different scenarios. A Gaussian kernel is used to learn parameterized lag kernels for the exogenous channel. One-dimensional convolutional alignment maps the exogenous data to multiple views according to lag distribution and feeds them into a cross-attention mechanism, thus explicitly modeling the influence strength of the exogenous data on the endogenous data at different lags, improving causal alignment capabilities. Trend / seasonal channels are separated at the embedding layer, and attention bias terms are generated using both as prior inputs. A alignment bias is applied to seasonal alignment points, enhancing periodic alignment and interpretability.
[0177] Within the pre-training and fine-tuning framework, a lightweight router is used to guide the weighting of three branches: short window, seasonal window, and long window. Each branch can share the backbone encoder and differs only at the adapter layer, thus balancing parameter efficiency and multi-scale modeling capabilities. The router incorporates sparsity / entropy regularization to improve interpretability and avoid overfitting. Exogenous and endogenous hysteresis kernels are integrated as learnable modules into the pre-training process. During pre-training, the hysteresis distributions of different exogenous channels are learned, and during fine-tuning, these kernels work in conjunction with the router to achieve scale alignment and stride effect modeling, enhancing the temporal causal explanation capability for exogenous driving events.
[0178] Example 2
[0179] A prediction system employing the above-mentioned prompt-based dynamic multi-scale coding source load prediction method includes:
[0180] Decomposition module: Performs engineering preprocessing on historical source load data to obtain the decomposition quantity of endogenous variables in the source load data;
[0181] Mapping and Engineering Statistics Calculation Module: Maps historical source load data into embedded quantities of the time series large model, and calculates engineering statistics for context routing. The time series large model adopts an encoder-decoder architecture.
[0182] Dynamic bias matrix generation module: The trend component and seasonal component in the decomposition of the endogenous variables of the source load data are used to construct a prior modulation mask through a mask generation network, and the prior modulation mask is mapped to a dynamic bias matrix for multi-head self-attention.
[0183] Attention Allocation Modulation Module: Injects the dynamic bias matrix into the multi-head self-attention computation of the large-scale temporal model to modulate the attention allocation in the large-scale temporal model;
[0184] Source-load prediction module: It uses the embedding amount and positional encoding of the temporal large model as input data for the improved temporal large model to complete the prompt-based dynamic multi-scale coding source-load prediction.
[0185] Improved Temporal Large Model Construction and Training Module: The improved temporal large model is obtained by improving the attention-allocation modulated temporal large model. While maintaining or not being limited by the original heavy decoder, the decoder adopts a lightweight two-layer feedforward network as the decoder for output prediction. The feedforward network of each layer in the encoder is replaced with a three-branch structure composed of three lightweight bottleneck adapters (short-term, seasonal, and long-term) (three sets of adapter parameters exist in parallel for each layer), and a time-dimensional convergence operation module is set at the output of the encoder to obtain vectorized representations for routing fusion. In the pre-training stage, the shared backbone network, adapter, hysteresis kernel, and router of the improved temporal large model are jointly trained. In the fine-tuning stage, the shared backbone network is frozen first, and only the three lightweight bottleneck adapters, hysteresis kernels, and routers are unfrozen and fine-tuned. The weights of the three-branch structure are obtained by combining the engineering statistics and embedding of context routing for context routing.
[0186] Please refer to the explanation of the method above for the specific implementation process of each step.
[0187] For the specific implementation process of each module, please refer to the above method content. This invention will not repeat it here. The above division of functional modules is only for illustrative purposes. In some embodiments, some functional modules can be merged and some functional modules can be split. Each functional module can be implemented in software, hardware, or a combination of software and hardware. Among them, software and hardware devices include, but are not limited to, general-purpose computer equipment, programmable gate arrays, digital signal processors, microprocessors and their corresponding programming or burning software.
[0188] Example 3
[0189] A computer-readable storage medium storing a computer program that is invoked by a processor to implement:
[0190] The above-described steps of the prompt-based dynamic multi-scale coding source load prediction method are described.
[0191] Please refer to the explanation of the method above for the specific implementation process of each step.
[0192] The readable storage medium is a computer-readable storage medium, which can be an internal storage unit of the hardware and software device described in any of the foregoing embodiments, such as the hard drive or memory of the controller. The readable storage medium can also be an external storage device of the controller, such as a plug-in hard drive, Smart MediaCard (SMC), Secure Digital (SD) card, or Flash Card equipped on the controller. Further, the readable storage medium can include both internal storage units and external storage devices of the controller. The readable storage medium is used to store the computer program and other programs and data required by the controller. The readable storage medium can also be used to temporarily store data that has been output or will be output.
[0193] Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0194] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application refers to flowchart illustrations and / or instructions executed by a processor of a method, apparatus (system), and computer program product according to embodiments of this application to create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams. These computer program instructions may also be stored in a computer-readable storage medium capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowchart illustrations and / or one or more block diagrams. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more blocks of a block diagram.
[0195] It should be emphasized that the examples described in this invention are illustrative rather than limiting. Therefore, this invention is not limited to the examples described in the specific embodiments. Any other embodiments derived by those skilled in the art based on the technical solutions of this invention, without departing from the spirit and scope of this invention, whether modifications or substitutions, are also within the protection scope of this invention.
Claims
1. A hint-based dynamic multi-scale coding source-payload prediction method, characterized in that, Comprise: Step 1: engineering pretreatment of historical source load data, get the decomposition of endogenous variables of source load data; Step 2: map the historical source load data to the embedding of the time series large model, while calculating the engineering statistics for context routing, the time series large model adopts the encoder-decoder architecture; Step 3: the trend component and seasonal component in the decomposition of endogenous variables of source load data are constructed into prior modulation mask through mask generation network, and the prior modulation mask is mapped into dynamic bias matrix for multi-head self-attention; Step 4: inject the dynamic bias matrix into the multi-head self-attention calculation of the time series large model to modulate the attention allocation in the time series large model; Step 5: the embedding and position encoding of the time series large model are used as input data of the improved time series large model to complete the dynamic multi-scale coding source load prediction based on prompt; The improved time series large model is obtained by improving the time series large model after attention allocation modulation: under the premise of keeping or not being limited by the original heavy decoder, the decoder adopts a lightweight two-layer feedforward network as the decoder for output prediction; replace the feedforward network of each layer in the encoder with a three-branch structure composed of short-term, seasonal, and long-term three-way lightweight bottleneck Adapter, and set a time dimension convergence operation module at the output end of the encoder to obtain a vectorized representation for routing fusion; In the pre-training stage, jointly train the shared backbone network, Adapter, lag kernel and router of the improved time series large model, and in the fine-tuning stage, preferentially freeze the shared backbone network, and only unfreeze and fine-tune the three-way lightweight bottleneck Adapter, lag kernel and router; wherein the weight of the three-branch structure is combined with the engineering statistics and embedding of the context routing to obtain the context routing; The embedding quantity of the timing large model further includes a prompt embedding vector: That is The prompt identifier p representing the site, data, and the prompt embedding vector obtained by the MLP; The context router is a context adaptive router , and the input is a splicing vector composed of the recent fluctuation degree , the cycle intensity , the exogenous salience , and the prompt embedding . The splicing vector is output by a softmax classifier with temperature to obtain a three-branch fusion weight, and is combined with entropy regularization and routing temperature annealing in the training of the context adaptive router. During training, the temperature coefficient is gradually reduced with iterations to realize smooth evolution from soft routing to near hard routing. The context adaptive router is composed of three fully connected layers, and a dropout layer is added in the middle layer: ; wherein, represents the input vector of the contextual adaptive router, n represents the number of the hidden layer of the contextual adaptive router, is the hidden representation vector of the nth layer, is the weight matrix of the nth layer, is the bias vector of the nth layer, is the second layer hidden representation, as the last intermediate representation of the contextual adaptive router, is the weight matrix of the output layer, projecting the hidden dimension to the 3 branch weight space, is the output layer bias; is the three components of the contextual adaptive router output, the three components respectively correspond to the short-term, seasonal and long-term branches, represents the component index of the router output vector . Three-branch fusion routing weights : ; Wherein, c is the temperature coefficient.
2. The method of claim 1, wherein, In step 1, the time prior is introduced, and the source load data is decomposed as follows: ; wherein, is an endogenous variable representing the source load data at time t, is a trend component, is a seasonal / cyclical component, said cyclical component comprising a short-term component reflecting high frequency cyclical variations at hourly or daily scales and a long-term component reflecting low frequency cyclical variations at monthly or quarterly scales, is a residual term.
3. The method of claim 1, wherein, The dynamic bias matrix refers to generating a relative position bias vector using the trend and seasonal components, and strengthening the bias at the typical cycle alignment point to obtain; The specific process of injecting the dynamic bias matrix into the multi-head self-attention calculation of the time series large model to modulate the attention allocation in the time series large model is as follows: First, the dynamic bias matrix is normalized by tanh, then added to the standard scoring item, and then subjected to softmax operation, so as to obtain the modulated attention distribution.
4. The method of claim 1, wherein, The entropy regularization term is introduced: ; wherein is a regular coefficient; the recent volatility is the sample variance over the historical window is the sample variance over the historical window ; ; where Var denotes the unbiased variance of the sample, τ denotes the number of samples used to compute the recent statistic, denotes the sample set consisting of the most recent samples of the sequence from time to time , denotes the specific th historical sample value of the sequence at time , denotes the sample mean over all samples within ; The periodic intensity The single-sided spectral energy ratio is used to measure the proportion of a certain period in the past window: ; , ; denotes a sequence of exogenous variable samples within a time window of length denotes a complex spectral coefficient, denotes a power spectrum of a spectrum, denotes an energy band, denotes a bandwidth, , ε is a positive small constant for numerical stability, denotes a statistical window length of denotes a discrete spectral index where a dominant frequency component corresponding to a target period denotes a sampling interval, denotes a step number within a sampling interval The exogenous salience : ; ; ; wherein, denotes the sample standard deviation, denotes the mean value of the scale window, denotes taking the maximum value of the standard deviations of all extrinsic channels as the saliency indicator, L is the length of the input sequence, denotes the effective sample number for calculating the road extrinsic channel sample standard deviation, k denotes the road number label of the channel.
5. The method of claim 1, wherein, The decoder of the improved time series large model adopts a lightweight prediction decoder with a two-layer feedforward structure for decoding prediction; ; wherein, , are the weight matrices of the first and second layer feed-forward structure, respectively, , are the biases of the first and second layer feed-forward structure, respectively, is the final predicted sequence of length H, denotes the fusion vector as input to the decoder, , is the three-branch fusion routing weight, are the respective branch vectors, and GELU denotes the activation function.
6. The method of claim 1, wherein, The exogenous variable learning of the source-load data can parameterize a lag influence kernel, which models the historical lag effect of the exogenous variable in a mixed Gaussian form to represent the dynamic influence strength of the exogenous variable on the endogenous target at different lags; the historical sequence of the exogenous variable is aligned with the lag influence kernel through causal convolution to obtain a time-aligned exogenous view, which is then input into the encoder multi-head attention mechanism of the improved time series large model together with a priori modulation mask; wherein the lag influence kernel determines different lag centers and influence widths through learnable parameters, and introduces regular and smoothing constraints in training.
7. The method of claim 1, wherein, Pre-training on large-scale heterogeneous datasets, training the shared backbone network, Adapter, lag kernel and context router in the constructed fine-tuning time series large model, and randomizing the prompt vector in pre-training To improve the generalization ability to multiple scenes, the shared backbone network is preferentially frozen in the target site during the fine-tuning stage, and only the Adapter, router and lag kernel are unfrozen. The whole training process uses a hybrid loss function : ; wherein, is a tunable hyper-parameter, controlling different loss terms , , , is a weight in the total optimization objective, denotes the prediction loss, using mean squared error, denotes the entropy regularization of the context router, , for controlling the routing sparsity; denotes the kernel regularization term and denotes the smoothing term, jointly constraining the kernel parameters.
8. A prediction system employing the prompt-based dynamic multiscale coding source-hold prediction method of any one of claims 1-7, characterized in that, Comprise: Decomposition module: engineering pretreatment of historical source-load data to obtain decomposition of endogenous variables of source-load data; Mapping and engineering statistics calculation module: mapping historical source-load data into embedding of time series large model, while calculating engineering statistics for context routing, the time series large model adopts encoder-decoder architecture; Dynamic bias matrix generation module: constructing a priori modulation mask through a mask generation network for trend components and seasonal components in the decomposition of endogenous variables of source-load data, and mapping the priori modulation mask into a dynamic bias matrix for multi-head self-attention; Attention allocation modulation module: injecting the dynamic bias matrix into the multi-head self-attention calculation of the time series large model to modulate the attention allocation in the time series large model; Source-load prediction module: taking the embedding of the time series large model and the position encoding as the input data of the improved time series large model to complete the dynamic multi-scale coding source-load prediction based on prompts; Improved time series large model construction and training module: the improved time series large model is obtained by improving the time series large model after attention allocation modulation, under the premise of keeping or not being limited by the original heavy decoder, the decoder uses a lightweight two-layer feedforward network as the decoder for output prediction; replace the feedforward network of each layer in the encoder with a three-branch structure composed of short-term, seasonal, and long-term three-way lightweight bottleneck adapters, and set a time dimension convergence operation module at the output end of the encoder to obtain a vectorized representation for routing fusion; in the pre-training phase, jointly train the shared backbone network, Adapter, lag kernel and router of the improved time series large model, and in the fine-tuning phase, preferentially freeze the shared backbone network, only unfreeze and fine-tune the three-way lightweight bottleneck Adapter, lag kernel and router; wherein the weights of the three-branch structure are obtained by combining the context routing engineering statistics and embedding.
9. A computer-readable storage medium, characterized in that: A computer program is stored, which is called by a processor to implement: The steps of the method of any one of claims 1-7. The steps of the method of any one of claims 1-7.