Power grid agent electricity purchasing load concept drift prediction method and system based on meta learning

CN122553124APending Publication Date: 2026-08-11MARKETING SERVICE CENT OF STATE GRID HENAN ELECTRIC POWER CO
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-20
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0002]电网代理购电是电力市场化改革的核心环节,其负荷预测的准确性直接关系到购电代理的经济效益与市场风险管控,随着新型电力系统建设的推进,高比例可再生能源的接入、多元化负荷(如电动汽车、分布式光伏)的激增以及电力市场规则的动态调整,使得代理购电负荷序列呈现出高度的非线性、时变性和不确定性;在此背景下,传统负荷预测模型在面对由极端天气等外部因素引发的负荷内在规律突变(即概念漂移)时,其预测性能会急剧恶化,导致购电策略失准,给代理方带来巨大的偏差考核罚款与电量市场风险;因此,迫切需要一种能够快速识别并自适应负荷概念漂移的智能预测系统,以保障购电决策的实时性与鲁棒性,目前,电网代理购电负荷预测主要依赖于以下两类技术,它们在应对概念漂移问题时均存在明显的局限性:

Benefits of technology

[0050] 1. Achieve rapid adaptation to concept drift within seconds: Based on the meta-learning framework, the system learns "how to learn quickly" from historical drift; after detecting drift online, it only needs to use a small amount of the latest data to complete the model update within seconds, compressing the adaptation response time from hours/days in traditional methods to seconds, solving the core pain point of delayed response of prediction models in the market environment;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122553124A_ABST
    Figure CN122553124A_ABST
Patent Text Reader

Abstract

This invention relates to a method and system for predicting load concept drift in power grid agency purchases based on meta-learning, comprising: multi-source heterogeneous data integration and meta-training task construction: acquiring multi-source data and performing fusion and preprocessing; identifying historical concept drift points in the preprocessed data and constructing a meta-training task set for simulating drift tasks; meta-learning prediction model construction and training: using a TCN-GRU hybrid neural network to construct a hierarchical load prediction model based on the MAML framework, and training it through the meta-training task set; online drift detection and rapid adaptation: achieving real-time perception of new concepts and instantaneous adjustment of the model, introducing an EWC mechanism to avoid catastrophic forgetting; adaptive load prediction and risk quantification output: using the adaptively updated model to perform rolling load prediction and assessing power purchase risks; this invention has the advantages of deeply combining meta-learning and load prediction, achieving rapid response and accurate prediction, and improving robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of power market data analysis and adaptive machine learning technology, specifically involving a method and system for predicting the concept drift of power grid agent power purchase load based on meta-learning. Background Technology

[0002] Power grid agency power purchase is a core component of power market reform. The accuracy of its load forecasting directly affects the economic benefits and market risk management of power purchase agencies. With the advancement of new power system construction, the integration of high proportions of renewable energy, the surge in diversified loads (such as electric vehicles and distributed photovoltaics), and the dynamic adjustment of power market rules, the load sequence of agency power purchase exhibits high nonlinearity, time-varying nature, and uncertainty. Against this backdrop, traditional load forecasting models suffer a sharp decline in performance when faced with sudden changes in the inherent load patterns (i.e., concept drift) caused by external factors such as extreme weather, leading to inaccurate power purchase strategies and resulting in significant deviation penalties and market risks for agents. Therefore, there is an urgent need for an intelligent forecasting system capable of quickly identifying and adapting to load concept drift to ensure the real-time nature and robustness of power purchase decisions. Currently, power grid agency power purchase load forecasting mainly relies on two types of technologies, both of which have significant limitations in addressing the concept drift problem:

[0003] One approach is the forecasting method based on traditional time series models and physical statistics. This method relies on the inherent statistical characteristics of load, such as periodicity and trends, and combines these with circadian rhythms and meteorological factors to construct a regression model. This type of method has a clear model structure and is effective in small-scale, steady-state scenarios. However, its shortcomings are as follows: First, the model has poor flexibility and struggles to capture the nonlinear mapping relationship between load and various complex external factors. Second, its adaptive capability is weak; once the model parameters are determined, they are relatively fixed. When conceptual drift occurs, it is necessary to rely on expert experience to manually remodel and adjust the parameters, resulting in a severe lag in response and failing to meet the real-time requirements of market transactions. Finally, its ability to characterize sudden and non-periodic drift is almost zero.

[0004] Second, there are prediction models based on traditional machine learning and deep learning: these methods, such as Support Vector Machines (SVM), Gradient Boosting Trees (GBDT), and Recurrent Neural Networks (RNN / LSTM), can automatically learn complex load change patterns from massive historical data and perform well under stable data distributions. However, they also have bottlenecks when dealing with concept drift: First, the problem of catastrophic forgetting is prominent. When the model is incrementally updated with new data, it will overfit the new samples and quickly forget the load patterns (such as seasonal patterns) that were learned in the past and may still be effective in the future, leading to a decline in the model's long-term generalization ability. Second, the adaptation efficiency is low. After each concept drift occurs, a large amount of new data needs to be collected to retrain the entire model, which is computationally expensive and time-consuming, making it difficult to achieve "rapid adaptation". Finally, the perception of drift is passive. Usually, the problem can only be discovered after the prediction error has increased significantly, lacking an active and forward-looking detection and adaptation mechanism for drift.

[0005] Meta-learning, as a cutting-edge branch of machine learning, aims to enable models to "learn how to learn," thus achieving the ability to quickly adapt to new tasks with only a small number of samples. This provides a solution to the aforementioned problem of concept drift adaptation. However, transforming meta-learning technology into a mature system that can effectively serve the high-risk, real-time-critical business of power grid agent load forecasting still faces a series of key challenges: ① How to construct a meta-training task set that can fully simulate various historical concept drift scenarios to train a meta-learner with strong generalization capabilities; ② How to design an efficient online drift detection and fast adaptation algorithm process to ensure that the system can complete model adjustment with minimal computational overhead and in the shortest time after detecting a drift; ③ How to balance rapid adaptation and long-term memory to avoid the model losing important basic load patterns when adapting to new drifts. Therefore, it is essential to provide a meta-learning-based method and system for predicting concept drift of power grid agent load that deeply integrates meta-learning and load forecasting, achieves rapid response and accurate prediction, solves the problems of catastrophic forgetting and adaptation lag, and improves robustness. Summary of the Invention

[0006] (a) Technical issues

[0007] In view of the above-mentioned existing technology, this application mainly addresses the following technical problems:

[0008] 1. The sharp deterioration in the predictive performance of traditional load forecasting models has led to inaccurate power purchase strategies, resulting in huge deviation assessment penalties and electricity market risks for agents;

[0009] 2. Prediction methods based on traditional time series models and physical statistics have poor flexibility and weak adaptability, and their ability to characterize sudden and non-periodic drifts is almost zero.

[0010] 3. Predictive models based on traditional machine learning and deep learning suffer from catastrophic forgetting problems, which lead to a decline in the model's long-term generalization ability, low adaptation efficiency, and a lack of proactive and forward-looking detection and adaptation mechanisms for drift.

[0011] (II) Technical Solution

[0012] The purpose of this invention is to overcome the shortcomings of the prior art and provide a meta-learning-based method and system for predicting load concept drift in power grid agent purchasing, which deeply integrates meta-learning and load forecasting, achieves rapid response and accurate forecasting, solves the problems of catastrophic forgetting and adaptive lag, and improves robustness.

[0013] The objective of this invention is achieved as follows: Firstly, a method for predicting the concept drift of power grid agent-purchased load based on meta-learning, the method comprising:

[0014] Step 1: Multi-source heterogeneous data integration and meta-training task construction: acquire multi-source data and perform fusion and preprocessing; identify historical concept drift points on the preprocessed data and construct a meta-training task set for simulating drift tasks;

[0015] Step 2: Meta-learning prediction model construction and training: A hierarchical load prediction model based on the MAML framework is constructed using a TCN-GRU hybrid neural network, and trained on the model using the meta-training task set to obtain the meta-learning initialization parameters;

[0016] Step 3: Online drift detection and adaptive update: By monitoring the prediction error changes of the latest load data stream in real time, the system can realize real-time perception of new concepts and instantaneous adjustment of the meta-learning prediction model, obtain meta-learning parameters adapted to the current new data distribution, and introduce the EWC mechanism to constrain the parameter update amplitude, so as to avoid forgetting important basic load patterns during the rapid adaptation process.

[0017] Step 4: Adaptive load forecasting and risk quantification output: Rolling load forecasting is performed using the adaptively updated meta-learning forecasting model, outputting the predicted load point values ​​for a certain future period. Then, risk indicators are calculated based on the predicted load probability distribution to assess the electricity purchase risk and output the risk quantification results.

[0018] Furthermore, the multi-source data in step 1 is data related to the agent's electricity purchase load forecast, which is obtained synchronously from the power grid information platform, the power trading platform, and the meteorological department; the preprocessing of the obtained multi-source data includes: data cleaning.

[0019] Furthermore, the multi-source data includes: load time-series data, external feature data, and event annotation data;

[0020] The load time series data includes historical and real-time active load sequence data of the agent power purchaser;

[0021] The external feature data includes: refined meteorological data, calendar information, and real-time node electricity prices; wherein, the refined meteorological data includes temperature data, humidity data, and wind speed data; the calendar information includes whether it is a weekday or holiday data;

[0022] The event labeling data includes time window data and type label data for recording extreme weather events.

[0023] Furthermore, the construction of the meta-training task set in step 1 specifically involves: constructing a training task set for meta-learning based on the cleaned and aligned long-term time-series data. Each meta-task The method for simulating a complete concept drift and adaptation process is as follows:

[0024] First, identify events from historical data using event-labeled data or based on statistical change point detection. The point where concept drift occurs ;

[0025] For each drift point Cut off lengths of 100 mm from both the front and back of the cut. The data and length of the "pre-drift stationary period" are The "post-drift adaptation period" data together form the data source for a task.

[0026] Furthermore, the meta-task Divided into:

[0027] Support set This includes a small number of samples from the initial stage of the post-drift adaptation period, used to simulate rapid adaptation to new available data in an online environment; the sample format is as follows: ,in, For a small sample size; It is a feature vector that includes load hysteresis terms and external features; The future load value to be predicted;

[0028] query set : Contains the remaining data from the data source for this task, used to evaluate the generalization performance of the model after rapid adaptation.

[0029] Furthermore, the construction and training of the meta-learning prediction model in step 2 are as follows:

[0030] Meta-learning predictor construction: Construct a predictor with parameters as Basic predictor The base predictor is used for mapping from input features to load values. It employs a temporal convolutional network and a gated recurrent unit to capture long-term dependencies and local temporal patterns.

[0031] Meta-learning predictor training: the base predictor Through any new task Support set A small number of gradient updates are performed to finally obtain meta-learning initialization parameters with fast adaptability.

[0032] Furthermore, the training process of the meta-learning predictor includes inner layer adaptation and outer layer update, wherein:

[0033] Inner adaptation: For each task From the current meta-parameter Departure, utilizing its support set Calculate loss Then, perform one or more gradient descent steps to obtain task-specific parameters. ;

[0034] Outer layer update: Evaluate the adapted parameters across multiple tasks. In their respective query sets Performance on the surface.

[0035] Furthermore, the online drift detection and adaptive update in step 3 are as follows:

[0036] Online drift detection: The system continuously receives the latest load data stream. The detection unit is based on the sliding window mechanism, calculates the prediction error sequence or hidden layer feature distribution of the model in the current window, and compares it with the corresponding statistics of the reference window. The Page-Hinkley test is used to determine the drift.

[0037] Fast adaptive triggering and execution: Once drift is detected, the system immediately organizes the data from the most recent time period into the current new task. Starting with the support set, utilizing The model parameters were adjusted according to the inner layer adaptation rule. Step-by-step gradient updates quickly yield model parameters adapted to the new data distribution. ;

[0038] Long-term memory protection mechanism: To prevent the forgetting of important basic load patterns during rapid adaptation, the system introduces elastic weights to consolidate regularization terms; when optimizing the outer layer loss, constraints on changes in important parameters are added to constrain the parameter update magnitude.

[0039] Furthermore, the adaptive load forecasting and risk quantification output in step 4 are as follows:

[0040] Adaptive prediction: Input the latest feature sequence Output the predicted load point value for a certain future period. ;

[0041] Uncertainty quantification: Monte Carlo dropout or adaptive kernel density estimation methods are used to generate the probability distribution of the prediction results. And give the confidence interval. ;

[0042] Risk quantification: By combining the predicted load distribution with the market-clearing electricity price forecast, the potential electricity purchase cost distribution is calculated; then, the value at risk and conditional value at risk indicators are calculated.

[0043] Secondly, a meta-learning-based load concept drift prediction system for power grid agent power purchase is provided. This system executes the meta-learning-based load concept drift prediction method for power grid agent power purchase as described above, and pushes the prediction results and risk indicators obtained from executing this method to the power purchase decision support platform in real time. The system includes a data integration and task library management module, a meta-learning model training and deployment platform, an online drift detection and adaptive engine, a load prediction service and risk calculation module, and a human-computer interaction and visualization monitoring center.

[0044] The data integration and task library management module is used to acquire multi-source data and perform fusion and preprocessing; identify historical concept drift points in the preprocessed data and construct a meta-training task set for simulating drift tasks.

[0045] The meta-learning model training and deployment platform is used to construct a hierarchical load prediction model based on the MAML framework using a TCN-GRU hybrid neural network, and to train it through the meta-training task set to obtain meta-learning initialization parameters.

[0046] The online drift detection and adaptive engine is used to achieve real-time perception of new concepts and instantaneous adjustment of the meta-learning prediction model by monitoring the prediction error changes of the latest load data stream in real time. It obtains meta-learning parameters adapted to the current new data distribution and introduces the EWC mechanism to constrain the parameter update magnitude, so as to avoid forgetting important basic load patterns during the rapid adaptation process.

[0047] The load forecasting service and risk calculation module: uses an adaptively updated meta-learning forecasting model to perform rolling load forecasting, outputs the predicted load point value for a certain period in the future, and then calculates risk indicators based on the predicted load probability distribution to assess the power purchase risk and output the risk quantification result.

[0048] The human-computer interaction and visualization monitoring center is used to push the prediction results and risk indicators to the power purchase decision support platform in real time.

[0049] (III) Beneficial Effects

[0050] 1. Achieve rapid adaptation to concept drift within seconds: Based on the meta-learning framework, the system learns "how to learn quickly" from historical drift; after detecting drift online, it only needs to use a small amount of the latest data to complete the model update within seconds, compressing the adaptation response time from hours / days in traditional methods to seconds, solving the core pain point of delayed response of prediction models in the market environment;

[0051] 2. Balancing rapid adaptation and long-term memory to overcome catastrophic forgetting: By introducing mechanisms such as elastic weight consolidation, the system can quickly fit new drift patterns while effectively protecting the basic load patterns (such as seasonal and periodic patterns) learned from long-term historical data, thus ensuring the stability and long-term generalization ability of the model across all time scales.

[0052] 3. Possesses strong generalization ability to unknown drifts: Meta-training covers diverse drift scenarios, enabling the model to master general "adaptation methods" rather than fixed mappings; therefore, when faced with novel or complex drifts that have never appeared in history, the system can still exhibit excellent adaptive robustness and generalization.

[0053] 4. Provides quantitative risk support and directly serves electricity purchase decisions: The system not only outputs accurate point forecasts, but also provides the probability distribution and confidence interval of the forecast results, and calculates key market risk indicators such as value at risk based on these results. This elevates the technical output from a single forecast value to a decision-making basis that can be directly used for risk-return trade-offs, significantly enhancing the system's practical value and decision support capabilities. Attached Figure Description

[0054] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0055] This invention relates to the intersection of power market data analysis and adaptive machine learning technology, and in particular to a power grid agent-purchased electricity load concept drift prediction system based on meta-learning and rapid adaptation. This system is used to quickly identify and accurately predict the inherent regular changes in the electricity load undertaken by agents in the power market environment caused by extreme weather events, etc., and provides key technical support for the dynamic optimization of electricity purchase strategies and the effective avoidance of market risks.

[0056] The present invention will be further described below with reference to the embodiments and / or accompanying drawings.

[0057] Example 1

[0058] like Figure 1 As shown, a method for predicting the concept drift of power grid agent-purchased load based on meta-learning is described, the method comprising:

[0059] Step 1: Multi-source heterogeneous data integration and meta-training task construction: Simultaneously acquire multi-source data related to agent power purchase load forecasting from the power grid information platform, power trading platform and meteorological department, and perform fusion and preprocessing; identify historical concept drift points on the preprocessed data, and construct a meta-training task set for simulating drift tasks;

[0060] In this embodiment, the multi-source data in this step includes:

[0061] ① Load time series data: Historical and real-time active load sequences of the electricity purchasing agent The sampling frequency is typically 15 minutes or 1 hour, of which For time indexing.

[0062] ② External characteristic data: including refined meteorological data (temperature) ,humidity Wind speed Calendar information (whether it is a working day) Holiday labels and real-time node electricity prices .

[0063] ③ Event labeling data: Records the time window of extreme weather events. and type tags .

[0064] in, This refers to the starting point at which extreme weather events begin to affect the power grid load. This marks the point at which the impact of extreme weather events on the power grid load essentially disappears.

[0065] As a concrete implementation method, the construction of the meta-training task set specifically involves: based on cleaned and aligned long-term time-series data, the core function of this step is to construct a training task set for meta-learning. Each meta-task The method for simulating a complete concept drift and adaptation process is as follows:

[0066] First, identify events from historical data using event-labeled data or based on statistical change point detection (such as the PELT algorithm). The point where concept drift occurs For each drift point Cut off lengths of 100 mm from both the front and back of the cut. The data and length of the "pre-drift stationary period" are The "post-drift adaptation period" data, together, form a data source for a task; this task Divided into:

[0067] ① Support set This includes a small sample size from the initial stage of the post-drift adaptation period (e.g., data from 24-48 hours after the drift occurs) to simulate rapid adaptation to new available data in an online environment; the sample format is as follows: ,in, For a small sample size; It is a feature vector that includes load hysteresis terms and external features; This represents the future load value to be predicted.

[0068] ②Query set : Contains the remaining data from the data source for this task, used to evaluate the generalization performance of the model after rapid adaptation.

[0069] Task Set It needs to cover different event types Initiated, with different drift intensities Diverse scenarios (which can be calculated using distribution difference measures such as Wasserstein distance) are used to ensure the generalization ability of the meta-learner.

[0070] Step 2: Meta-learning prediction model construction and training: A hierarchical load prediction model based on the MAML framework is constructed using a TCN-GRU hybrid neural network, and trained on the model using the meta-training task set to obtain the meta-learning initialization parameters;

[0071] In this embodiment, the specific steps are as follows:

[0072] 2.1 Meta-learning predictor construction: basic predictor It is a parameter of The deep neural network is responsible for learning the mapping from input features to load values; its structure adopts a hybrid architecture of temporal convolutional network (TCN) with attention mechanism and gated recurrent unit (GRU) to capture long-term dependencies and local temporal patterns at the same time.

[0073] Specifically, for the input sequence window ,in The set length of the input feature time window determines the backtracking step size for modeling historical dependencies; This represents the feature vector at the start time of the window; For a moment The multidimensional feature vector; its output is the future. Step load forecast The dilation convolution operation of the TCN layer can be represented as: ,in, Indicates the first Layer TCN at time The output feature vector; The first term of the neural network layer; and The first Layer convolution kernel in the th The weight parameters at each position and the bias parameters of that layer; The modified linear unit activation function is defined as follows: , used to introduce nonlinearity into the network; For the first The layer (i.e., the output of the previous layer) at time The input feature vector, whose subscripts are... This is the expansion factor of this layer. The index is within the convolution kernel; this expression selectively accesses features from historical moments through the dilated convolution mechanism to expand the model's receptive field, thereby effectively capturing long-term dependencies. This represents the size of the convolution kernel.

[0074] Specifically, the GRU layer is used to further capture sequence dynamics, and its update gate... and reset door The calculation formula is: , ,in, This represents the Sigmoid activation function, which maps the input to the (0,1) interval and is used to generate the gate signal; and These are the learnable weight matrices corresponding to the update gate and the reset gate, respectively; This represents the hidden state vector from the previous time step. With the input feature vector at the current time Performs concatenation (vector joining) operations; · represents matrix multiplication operations.

[0075] Candidate hidden state ,in, This represents the hyperbolic tangent activation function, which maps the input to the interval (-1, 1); It is a learnable weight matrix used to compute candidate hidden states; This indicates that the door will be reset. Compared to the previous hidden state The element-wise multiplication (Hadamard product) operation controls how much past information is retained in the current calculation; This means multiplying the above element-wise by the current input. Then reassemble.

[0076] Ultimately, the hidden state at the current moment The following is obtained by weighting and combining past states and candidate states using the update gate: , where ⊙ represents element-wise multiplication (Hadamard product). This means using a weight of (1 - update gate) to preserve the hidden state (i.e., historical information) from the previous time step. This means using the weights of the update gate to incorporate the candidate hidden states (i.e., new information) calculated at the current time step.

[0077] 2.2 Meta-learning predictor training (outer layer optimization): The goal of the meta-learner is to learn a set of optimal model initialization parameters. This makes the basic predictor When facing any new task It can be supported by this task set The small number of gradient updates performed on the surface quickly adapt to the new data distribution; the meta-training process is a two-layer optimization problem:

[0078] ① Inner layer adaptation: For each task From the current meta-parameter Departure, utilizing its support set Calculate loss (Typically the mean squared error MSE), and perform one or more gradient descent steps to obtain task-specific parameters. : ,in, The inner learning rate; The gradient operator indicates the operation on the meta-parameters. Find the partial derivative; For loss function Regarding model parameters The gradient vector, whose direction points to the loss function at... The steepest upward direction at that point.

[0079] ② Outer layer update: Evaluate the adapted parameters on multiple tasks. In their respective query sets Performance on: In the formula, Indicates the meta-parameter Optimize to minimize the subsequent summation; It is emphasized that the tasks are sampled from the distribution to ensure that meta-training covers diverse drift scenarios; It is a task The query set loss is used to evaluate the task-specific parameters obtained after inner adaptation. On this task query set The prediction error.

[0080] Meta-parameters The update objective is to minimize the overall query loss after adaptation across all tasks.

[0081] By sampling a batch of tasks, the above loss is calculated for the meta-parameters. The gradient (involving the second derivative) is updated using an optimizer (such as Adam). : ,in, The outer learning rate is used; after sufficient training, the final meta-learning initialization parameters with rapid adaptability are obtained. .

[0082] Step 3: Online drift detection and adaptive update: By monitoring the prediction error changes of the latest load data stream in real time, the system can realize real-time perception of new concepts and instantaneous adjustment of the meta-learning prediction model, obtain meta-learning parameters adapted to the current new data distribution, and introduce the EWC mechanism to constrain the parameter update amplitude, so as to avoid forgetting important basic load patterns during the rapid adaptation process.

[0083] In this embodiment, the specific steps are as follows:

[0084] 3.1 Online Drift Detection: The system continuously receives the latest load data stream; the detection unit is based on a sliding window mechanism, and the calculation model operates within the current window. On the prediction error sequence Or the distribution of hidden layer features, and with reference window The corresponding statistics (representing recent stable states) were compared; the Page-Hinkley (PH) test was used to determine drift, and its test statistic was... With decision threshold The calculation is as follows: , , , , In the formula, The current time index indicates the number of times the system has run. A point in time; The index variable in the summation represents the time from the first time step to the current time step. At any point in between; This is the cumulative deviation statistic, representing the cumulative deviation between the error and the average error up to time t. The average error up to the current moment; It is a small positive number used to control the sensitivity to small, slow drifts; This is the Page-Hinkley statistic; an increase in its value indicates a significant change in the error distribution. This is an estimate of the standard deviation of recent forecast errors, reflecting the level of error fluctuation. The sensitivity coefficient (usually taken as 2-5) is determined by adjusting the historical validation set. This is the baseline threshold used to ensure detection stability under extremely low fluctuations.

[0085] when When the threshold is reached, a concept drift alarm is triggered; threshold It can adaptively adjust according to the historical error fluctuation level.

[0086] 3.2 Rapid Adaptive Triggering and Execution: Once drift is detected, the system immediately organizes the latest data (e.g., 12-36 hours before and after the detection point) into the current new task. Starting with the support set, utilizing The model parameters were adjusted according to the inner layer adaptation rule. step( Gradient updates (using small integers) quickly yield model parameters adapted to the new data distribution. This process is lightweight and can be completed in seconds.

[0087] 3.3 Long-term memory protection mechanism: To prevent the forgetting of important basic load patterns (such as annual cycles and workday patterns) during rapid adaptation, the system introduces an elastic weighted consolidation (EWC) regularization term; when optimizing the outer layer loss, constraints on changes in important parameters are added, and the modified outer layer loss is as follows: ,in, These are the basic model parameters (which can be obtained through training on the entire historical dataset or periodically reinforced). It is a parameter The Fisher information diagonal matrix characterizes its importance to the historical task; It is a regularization coefficient that balances the strength of new and old knowledge; when adapting quickly online, a similar regularization term can also be added to the loss to constrain the magnitude of parameter updates.

[0088] Step 4: Adaptive load forecasting and risk quantification output: Rolling load forecasting is performed using the adaptively updated meta-learning forecasting model, and the predicted load values ​​for a certain period in the future are output. Then, risk indicators are calculated based on the predicted load probability distribution, the power purchase risk is assessed, and the risk quantification results are output and pushed to the power purchase decision support platform in real time.

[0089] In this embodiment, the specific steps are as follows:

[0090] 4.1 Adaptive Prediction: Input the latest feature sequence Output the predicted load point value for a certain future period (e.g., the next 24 hours). .

[0091] 4.2 Uncertainty Quantification: Monte Carlo dropout or adaptive kernel density estimation methods are used to generate the probability distribution of the prediction results. And give the confidence interval. ; This represents the lower bound (minimum possible value) of the load forecast at a given confidence level. This represents the upper limit (maximum possible value) of the load forecast at a given confidence level.

[0092] 4.3 Risk Quantification: Combining the predicted load distribution with the market-clearing electricity price forecast (or scenario), calculate the potential electricity purchase cost distribution; then calculate indicators such as Value at Risk (VaR) and Conditional VaR (CVaR); for example, at a confidence level... Electricity purchase cost VaR is defined as: ,in, To be at confidence level Below, the maximum possible loss limit; Let be a real number candidate value, representing the "loss threshold" being considered; This indicates the probability of the event occurring; It is the set of real numbers; It represents the infimum, that is, the greatest lower bound of the set.

[0093] The system pushes these prediction results and risk indicators to the electricity purchase decision support platform in real time.

[0094] This invention relates to a method and system for predicting load concept drift in power grid proxy purchases based on meta-learning. The invention aims to deeply integrate the meta-learning framework with load forecasting tasks, endowing the forecasting model with the ability to "learn and adapt quickly" from multiple historical concept drifts. This enables real-time detection, rapid response, and accurate prediction of sudden load pattern changes caused by weather events, etc. The system effectively solves the problems of catastrophic forgetting and adaptive lag faced by traditional models, significantly improving the robustness, adaptability, and practicality of proxy power purchase load forecasting in complex and volatile market environments. It provides more reliable technical support for power purchase decisions, ultimately achieving the goals of reducing market risks and ensuring economic benefits. This invention has the advantages of deeply integrating meta-learning with load forecasting, achieving rapid response and accurate prediction, solving the problems of catastrophic forgetting and adaptive lag, and improving robustness.

[0095] Example 2

[0096] The system is a meta-learning-based load concept drift prediction system for power grid agent power purchases. This system executes the meta-learning-based load concept drift prediction method described above and pushes the prediction results and risk indicators obtained from this method to the power purchase decision support platform in real time. The system includes a data integration and task library management module, a meta-learning model training and deployment platform, an online drift detection and adaptive engine, a load prediction service and risk calculation module, and a human-computer interaction and visualization monitoring center.

[0097] The data integration and task library management module is used to acquire multi-source data and perform fusion and preprocessing; identify historical concept drift points in the preprocessed data and construct a meta-training task set for simulating drift tasks.

[0098] The meta-learning model training and deployment platform is used to construct a hierarchical load prediction model based on the MAML framework using a TCN-GRU hybrid neural network, and to train it through the meta-training task set to obtain meta-learning initialization parameters.

[0099] The online drift detection and adaptive engine is used to achieve real-time perception of new concepts and instantaneous adjustment of the meta-learning prediction model by monitoring the prediction error changes of the latest load data stream in real time. It obtains meta-learning parameters adapted to the current new data distribution and introduces the EWC mechanism to constrain the parameter update magnitude, so as to avoid forgetting important basic load patterns during the rapid adaptation process.

[0100] The load forecasting service and risk calculation module is used to perform rolling load forecasting using the adaptively updated meta-learning forecasting model, output the predicted load point value for a certain period in the future, and then calculate the risk index based on the predicted load probability distribution to assess the power purchase risk and output the risk quantification result.

[0101] The core function of the human-computer interaction and visualization monitoring center is to transform the complex algorithm processes, data status, and calculation results within the system into intuitive, operable, and monitorable information.

[0102] This invention relates to a method and system for predicting load concept drift in power grid proxy purchases based on meta-learning. The invention aims to deeply integrate the meta-learning framework with load forecasting tasks, endowing the forecasting model with the ability to "learn and adapt quickly" from multiple historical concept drifts. This enables real-time detection, rapid response, and accurate prediction of sudden load pattern changes caused by weather events, etc. The system effectively solves the problems of catastrophic forgetting and adaptive lag faced by traditional models, significantly improving the robustness, adaptability, and practicality of proxy power purchase load forecasting in complex and volatile market environments. It provides more reliable technical support for power purchase decisions, ultimately achieving the goals of reducing market risks and ensuring economic benefits. This invention has the advantages of deeply integrating meta-learning with load forecasting, achieving rapid response and accurate prediction, solving the problems of catastrophic forgetting and adaptive lag, and improving robustness.

Claims

1. A meta-learning based power grid agent electricity purchasing load concept drift prediction method, characterized in that: The method includes: Step 1: Multi-source heterogeneous data integration and meta-training task construction: acquire multi-source data and perform fusion and preprocessing; identify historical concept drift points on the preprocessed data and construct a meta-training task set for simulating drift tasks; Step 2: Meta-learning prediction model construction and training: A hierarchical load prediction model based on the MAML framework is constructed using a TCN-GRU hybrid neural network, and trained on the model using the meta-training task set to obtain the meta-learning initialization parameters; Step 3: Online drift detection and adaptive update: By monitoring the prediction error changes of the latest load data stream in real time, the system can realize real-time perception of new concepts and instantaneous adjustment of the meta-learning prediction model, obtain meta-learning parameters adapted to the current new data distribution, and introduce the EWC mechanism to constrain the parameter update amplitude, so as to avoid forgetting important basic load patterns during the rapid adaptation process. Step 4: Adaptive load forecasting and risk quantification output: Rolling load forecasting is performed using the adaptively updated meta-learning forecasting model, outputting the predicted load point values ​​for a certain future period. Then, risk indicators are calculated based on the predicted load probability distribution to assess the electricity purchase risk and output the risk quantification results.

2. The meta-learning based power grid agent procurement load concept drift prediction method of claim 1, wherein: The multi-source data in step 1 is data related to the forecast of agent power purchase load obtained synchronously from the power grid information platform, the power trading platform and the meteorological department. The preprocessing of the acquired multi-source data includes at least: data cleaning.

3. The meta-learning based power grid agent procurement load concept drift prediction method of claim 2, wherein: The multi-source data includes: load time-series data, external feature data, and event annotation data; The load time series data includes historical and real-time active load sequence data of the agent power purchaser; The external feature data includes: refined meteorological data, calendar information, and real-time node electricity prices; the refined meteorological data includes temperature data, humidity data, and wind speed data; the calendar information includes whether it is a weekday or holiday data. The event labeling data includes time window data and type label data for recording extreme weather events.

4. The method for predicting the concept drift of power grid agent-purchased load based on meta-learning as described in claim 2, characterized in that: The construction of the meta-training task set in step 1 specifically involves: constructing a training task set for meta-learning based on the cleaned and aligned long-term time-series data. Each meta-task The method for simulating a complete concept drift and adaptation process is as follows: First, identify events from historical data using event-labeled data or based on statistical change point detection. The point where concept drift occurs ; For each drift point Cut off lengths of 100 mm from both the front and back of the cut. The data and length of the "pre-drift stationary period" are The "post-drift adaptation period" data together form the data source for a task.

5. The method for predicting the concept drift of power grid agent-purchased load based on meta-learning as described in claim 4, characterized in that: The meta-task Divided into: Support set : Contains a small number of samples from the initial stage of the post-drift adaptation period, used to simulate rapid adaptation to new available data in an online environment; Its sample format is ,in, For a small sample size; It is a feature vector that includes load hysteresis terms and external features; The future load value to be predicted; query set : Contains the remaining data from the data source for this task, used to evaluate the generalization performance of the model after rapid adaptation.

6. The method for predicting the concept drift of power grid agent-purchased load based on meta-learning as described in claim 1, characterized in that: The construction and training of the meta-learning prediction model in step 2 are as follows: Meta-learning predictor construction: Construct a predictor with parameters as Basic predictor The base predictor is used for mapping from input features to load values. It employs a temporal convolutional network and a gated recurrent unit to capture long-term dependencies and local temporal patterns. Meta-learning predictor training: the base predictor Through any new task Support set A small number of gradient updates are performed to finally obtain meta-learning initialization parameters with fast adaptability.

7. The method for predicting the concept drift of power grid agent-purchased load based on meta-learning as described in claim 6, characterized in that: The training process of the meta-learning predictor includes inner layer adaptation and outer layer update, wherein: Inner adaptation: For each task From the current meta-parameter Departure, utilizing its support set Calculate loss Then, perform one or more gradient descent steps to obtain task-specific parameters. ; Outer layer update: Evaluate the adapted parameters across multiple tasks. In their respective query sets Performance on the surface.

8. The method for predicting the concept drift of power grid agent-purchased load based on meta-learning as described in claim 1, characterized in that: The online drift detection and adaptive update in step 3 are as follows: Online drift detection: The system continuously receives the latest load data stream. The detection unit is based on the sliding window mechanism, calculates the prediction error sequence or hidden layer feature distribution of the model in the current window, and compares it with the corresponding statistics of the reference window. The Page-Hinkley test is used to determine the drift. Fast adaptive triggering and execution: Once drift is detected, the system immediately organizes the data from the most recent time period into the current new task. Starting with the support set, utilizing The model parameters were adjusted according to the inner layer adaptation rule. Step-by-step gradient updates quickly yield model parameters adapted to the new data distribution. ; Long-term memory protection mechanism: To prevent the forgetting of important basic load patterns during rapid adaptation, the system introduces elastic weights to consolidate regularization terms; when optimizing the outer layer loss, constraints on changes in important parameters are added to constrain the parameter update magnitude.

9. The method for predicting the concept drift of power grid agent-purchased load based on meta-learning as described in claim 1, characterized in that: The adaptive load forecasting and risk quantification output in step 4 are as follows: Adaptive prediction: Input the latest feature sequence Output the predicted load point value for a certain future period. ; Uncertainty quantification: Monte Carlo dropout or adaptive kernel density estimation methods are used to generate the probability distribution of the prediction results. And give the confidence interval. ; Risk quantification: By combining the predicted load distribution with the market-clearing electricity price forecast, the potential electricity purchase cost distribution is calculated; then, the value at risk and conditional value at risk indicators are calculated.

10. A power grid agent-based load concept drift prediction system based on meta-learning, characterized in that: The meta-learning-based power grid agent power purchase load concept drift prediction system is used to execute the meta-learning-based power grid agent power purchase load concept drift prediction method as described in any one of claims 1-9, and pushes the prediction results and risk indicators obtained by executing the method to the power purchase decision support platform in real time; the system includes a data integration and task library management module, a meta-learning model training and deployment platform, an online drift detection and adaptive engine, a load prediction service and risk calculation module, and a human-computer interaction and visualization monitoring center; The data integration and task library management module is used to acquire multi-source data and perform fusion and preprocessing; identify historical concept drift points in the preprocessed data and construct a meta-training task set for simulating drift tasks. The meta-learning model training and deployment platform is used to construct a hierarchical load prediction model based on the MAML framework using a TCN-GRU hybrid neural network, and to train it using the meta-training task set. The online drift detection and adaptive engine is used to achieve real-time perception of new concepts and instantaneous adjustment of the model by monitoring changes in prediction error in real time, and introduces the EWC mechanism to avoid forgetting important basic load patterns during rapid adaptation. The load forecasting service and risk calculation module is used to perform rolling load forecasting using an adaptively updated model and to assess electricity purchase risks. The human-computer interaction and visualization monitoring center is used to push the prediction results and risk indicators to the power purchase decision support platform in real time.