Source-load prediction model testing and optimization method, system, device and medium based on double-channel bias correction and risk consistency calibration
By employing dual-channel deviation correction and risk consistency calibration, the error decomposition and stability issues of the source-load prediction model under different scenarios were resolved, thereby improving the accuracy of the prediction results and the safety of the power system, and a closed-loop optimization mechanism was constructed.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ELECTRIC POWER RES INST OF STATE GRID ZHEJIANG ELECTRIC POWER COMAPNY
- Filing Date
- 2026-05-21
- Publication Date
- 2026-06-19
AI Technical Summary
Existing source load forecasting models exhibit significant differences in error distribution under different meteorological scenarios and operational conditions. They lack systematic evaluation and error decomposition analysis, making it difficult to identify key influencing factors. Furthermore, they lack risk consistency calibration and model stability assurance, resulting in inaccurate and unreliable forecasting results.
A dual-channel deviation correction and risk consistency calibration method is adopted. Through error decomposition and dual-channel processing, systematic deviations and random residuals are corrected. Risk consistency calibration and concept drift monitoring are introduced to ensure that the prediction results meet the power system risk threshold and power balance, and a closed-loop optimization mechanism is constructed.
It improves the stability and reliability of the source-load prediction model under different scenarios, reduces the impact of extreme error events, ensures the accuracy of prediction results and the safety of the power system, and enables continuous monitoring and optimization of the model.
Smart Images

Figure CN122242296A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power system source-load prediction technology, specifically relating to a method, system, equipment, and medium for testing and optimizing source-load prediction models based on dual-channel deviation correction and risk consistency calibration. Background Technology
[0002] With the continuous increase in the proportion of new energy power generation, the volatility and uncertainty of stochastic power sources such as wind power and photovoltaics have significantly increased. Source-load forecasting has become a key link in power system operation and dispatch, and accurate and reliable forecasting results directly affect the safe operation and risk control of the power grid. In recent years, machine learning-based forecasting models have been widely used in the fields of wind power, photovoltaics, and load forecasting, but there are still many technical shortcomings in practical engineering applications.
[0003] Existing forecasting models exhibit significant differences in error distribution under various meteorological scenarios and operational conditions. They are prone to large systematic biases under extreme weather conditions or sudden load changes. Current evaluation methods often focus on overall error indicators, lacking a systematic assessment of model performance under different scenarios and making it difficult to identify the model's error characteristics under specific conditions. Furthermore, existing technologies lack decomposition and attribution analysis of forecasting errors, failing to distinguish the contribution of systematic biases and random fluctuations to the error, and struggling to accurately identify key influencing factors leading to forecast inaccuracies, resulting in a lack of clear direction for model optimization. In addition, existing forecast results typically do not adequately consider the risk constraints and physical consistency of power system operation. Forecast intervals lack alignment calibration with actual risk thresholds, and there is a lack of physical constraints on power balance relationships between wind power, solar power, and load forecasts, reducing the engineering usability of the forecast results. More importantly, existing technologies lack effective monitoring and management mechanisms for the operational status of models after deployment. When data distribution changes, real-time responses are difficult, and there are no safeguards for safe model deployment and rapid rollback, making it difficult to guarantee the stability and reliability of models in long-term operation. Summary of the Invention
[0004] Based on the aforementioned shortcomings and deficiencies in the existing technology, one of the objectives of this invention is to at least solve one or more of the aforementioned problems in the existing technology. In other words, one of the objectives of this invention is to provide a method, system, device, and medium for testing and optimizing source load prediction models based on dual-channel deviation correction and risk consistency calibration that meets one or more of the aforementioned requirements, so as to improve the prediction stability, risk controllability, and deployment security of source load prediction models under different meteorological scenarios.
[0005] To achieve the above-mentioned objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for testing and optimizing a source load prediction model based on dual-channel deviation correction and risk consistency calibration, comprising the following steps: S1. Acquire multi-source time series data of the power system and construct a standardized dataset, wherein the multi-source time series data includes wind power output data, photovoltaic power output data, load data, meteorological data and calendar features; S2. Input the standardized dataset into the model to be tested for playback testing, and statistically analyze the prediction error and interval coverage index under each scenario. By decomposing the prediction error, obtain the systematic deviation component that represents the long-term trend deviation and the random residual component that represents the short-term volatility. Based on the decomposition results, identify the key influencing factors and high-risk scenarios that lead to inaccurate predictions. S3. Based on the systematic deviation component and the random residual component, a dual-channel deviation correction model is constructed. The systematic deviation between the prediction result and the true distribution is corrected by the low-frequency correction channel, and the random fluctuation component in the prediction residual is compensated by the high-frequency compensation channel. The outputs of the two channels are fused to obtain the corrected prediction result. The training priority of extreme error samples is strengthened by tail enhancement weights to reduce the impact of large error events on power grid dispatch. S4. Perform risk consistency calibration and source-load consistency constraint verification on the corrected prediction results to ensure that the prediction interval meets the risk threshold of power system operation and that the corrected prediction results meet the power balance relationship. Achieve closed-loop optimization and safe deployment of the model through concept drift monitoring and gray-scale online governance.
[0006] As a preferred approach, step S1 involves constructing a standardized dataset, including: S11. Perform unified time granularity alignment and resampling processing on the wind power output data, the photovoltaic output data, the load data, the meteorological data, and the calendar features to construct a sample set under a unified time index; S12. Perform anomaly detection and missing value repair processing on each variable sequence in the sample set. Identify outliers and replace and repair them using a sliding window robust statistical method to obtain the repaired sample set. S13. Based on seasonal characteristics, meteorological conditions and load levels, the repaired sample set is grouped into scenarios, and scenario labels are constructed for each time point to obtain a sample set with scenario labels. S14. Select representative time segments from the sample set with context labels to construct a fixed playback dataset for model version consistency comparison testing.
[0007] As a preferred embodiment, step S2 includes: S21. Input the fixed playback dataset constructed in step S14 into the model to be tested for playback testing, and record the difference between the calculated prediction result and the actual observation value as the prediction error. S22. Based on the sample set with scenario labels constructed in step S13, calculate the mean absolute error, standard deviation of error, and prediction interval coverage for each scenario. S23. Perform error decomposition and attribution analysis on the prediction error. Use conditional variance decomposition to decompose the prediction error into systematic deviation components and random residual components, and calculate the proportion of systematic deviation to the total error. S24. Identify key factors affecting prediction errors and high-risk scenarios through feature sensitivity indicators.
[0008] As a preferred embodiment, step S3 includes: S31. Low-frequency bias correction is performed using the distribution mapping method. By establishing a mapping relationship between the predicted distribution and the true distribution, the prediction results of the model to be tested are mapped to the true observed distribution. S32. Construct a residual learning model to perform high-frequency residual compensation, using the current prediction results, the meteorological data, and the load data as inputs, and output the compensation value for the prediction residuals; S33. Based on the proportion of systematic deviation to the total error, the low-frequency correction results and residual compensation results are weighted and fused to obtain the correction prediction results. S34. Apply enhanced weights to the samples at the tail of the error distribution so that samples whose absolute error value exceeds the quantile threshold receive higher training weights than regular samples, thereby reducing the probability of extreme error events.
[0009] As a preferred embodiment, step S4 includes: S41. Perform risk consistency calibration on the prediction interval of the corrected prediction result. By scaling and shifting the prediction interval, the interval coverage meets the target risk threshold for power system operation. S42. Construct a joint optimization objective that includes risk default penalty terms and consistency constraint penalty terms, and optimize the parameters of the risk consistency calibration to balance prediction accuracy and risk control. S43. Apply source-load physical consistency constraints to the calibrated prediction results to ensure that the wind power prediction, photovoltaic prediction and load prediction values satisfy the power balance relationship. S44. Construct a concept drift monitoring function to detect changes in the distribution of input data or predict the distribution of residuals by calculating the drift index. When the drift index exceeds a preset threshold, governance is triggered. S45. Perform gray-scale deployment and rollback management of the model, and perform fast rollback when a risk alarm is triggered; S46. When model performance degradation or concept drift is detected, trigger the model retraining loop, retrain the dual-channel bias correction model and update the risk calibration parameters, and repeat steps S2 to S4.
[0010] As a preferred option: In step S42, the joint optimization objective includes a robust training loss function, a risk default penalty term, and a consistency constraint penalty term. The prediction accuracy and risk control are balanced by adjusting the weight parameters.
[0011] As a preferred option, the power balance consistency constraint in step S43 satisfies: The difference between the load forecast and the sum of the wind power forecast and the photovoltaic forecast equals the balance residual term.
[0012] Secondly, the present invention provides a source load prediction model testing and optimization system based on dual-channel deviation correction and risk consistency calibration, for implementing the source load prediction model testing and optimization method as described in the first aspect.
[0013] Thirdly, the present invention provides an electronic device, the computer device including a memory, a processor and a computer program, wherein when the computer program is executed by the processor, it implements the source-load prediction model testing and optimization method as described in the first aspect.
[0014] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the source-load prediction model testing and optimization method as described in the first aspect.
[0015] Compared with the prior art, the present invention has the following beneficial effects: By using a unified time index, scenario labeling, and error index statistics, this invention enables a systematic evaluation of the stability, accuracy, and risk characteristics of source-load prediction models under different operating scenarios. Compared to traditional methods that rely solely on single-prediction accuracy evaluation, this invention provides a repeatable and comparable model testing process, improving the objectivity and reliability of prediction model evaluation results and providing a unified testing benchmark for model optimization.
[0016] This invention proposes a dual-channel bias correction mechanism, which decomposes prediction errors into a systematic bias component representing long-term trend bias and a random residual component representing short-term volatility. These components are then processed separately through a low-frequency correction channel and a high-frequency compensation channel, respectively, before being weighted and fused to obtain the corrected prediction result. Compared to traditional single-bias correction methods, this invention can simultaneously correct long-term trend bias and short-term volatility errors, maintaining high accuracy across different time scales. Furthermore, by using tail-enhancing weights to prioritize extreme error samples during training, it effectively reduces the impact of large error events on power grid dispatching.
[0017] A risk consistency calibration mechanism is introduced, which adjusts the prediction interval by scaling and translation to align the interval coverage with the target risk threshold for power system operation. Furthermore, the accuracy of the target balance prediction and risk control are jointly optimized. Simultaneously, this invention applies source-load physical consistency constraints to ensure that wind power predictions, photovoltaic predictions, and load predictions satisfy the power balance relationship, thereby improving the reliability and engineering usability of the prediction results in power system operation.
[0018] A closed-loop mechanism for concept drift monitoring and gray-scale deployment governance is constructed. This mechanism calculates a drift index to detect changes in the distribution of input data or the distribution of predicted residuals in real time, triggering governance when the drift index exceeds a preset threshold. Secure deployment is achieved by gradually increasing the proportion of new model traffic, and a rapid rollback is executed when a risk alarm is triggered, forming a closed-loop process of model testing, optimization, and operational monitoring. Compared to existing methods that only perform offline prediction optimization, this invention can continuously monitor the model's operational status and update model parameters in a timely manner, thereby improving the stability and long-term applicability of the prediction system.
[0019] Further or more detailed beneficial effects will be described in conjunction with specific embodiments in the detailed implementation. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart illustrating the source load prediction model testing and optimization method described in Embodiment 1 of the present invention.
[0022] Figure 2 This is a schematic diagram of the source load prediction model testing and optimization system described in Embodiment 2 of the present invention.
[0023] Figure 3 This is a structural diagram of the electronic device described in Embodiment 3 of the present invention.
[0024] Icon labels: 300. Electronic devices; 301. Processor; 302. Communication bus; 303. User interface; 304. Network interface; 305. Memory. Detailed Implementation
[0025] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0026] In the following description, several embodiments of the present invention are provided. Different embodiments can be substituted or combined. Therefore, the present invention can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present invention should also be considered to include embodiments containing one or more other possible combinations of A, B, C, and D, even if such embodiments are not explicitly described in the following text.
[0027] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the function and arrangement of the described elements without departing from the scope of the invention. Various processes or components may be appropriately omitted, substituted, or added to the various examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
[0028] To facilitate a better understanding of the embodiments of the present invention, its application scenarios will be explained before providing a detailed explanation of the specific implementation methods.
[0029] The source-load prediction model testing and optimization methods described in the embodiments of this specification are applied to new energy power systems, specifically including wind power prediction scenarios, photovoltaic power prediction scenarios, and power load prediction scenarios. In these scenarios, the application of the source-load prediction model testing and optimization methods aims to identify the error characteristics of the prediction model under different meteorological conditions and operating states by conducting scenario-based evaluation and error attribution; reducing systematic bias and random fluctuations in the prediction results through dual-channel bias correction; ensuring that the prediction interval meets the risk threshold requirements for power system operation through risk consistency calibration; guaranteeing that the wind power, photovoltaic, and load prediction results meet the power balance relationship through source-load consistency constraints; and achieving safe deployment and continuous optimization of the model through concept drift monitoring and gray-scale online governance, thereby improving the prediction robustness, risk controllability, and deployment security of the source-load prediction model in actual operating environments.
[0030] The following is a brief explanation of the source load prediction, multi-source time series data, scenarios, systematic bias components, random residual components, dual-channel bias correction, risk consistency calibration, source load consistency constraints, concept drift, gray-scale online governance, fixed playback datasets, and tail enhancement weights involved in the various embodiments of this specification: Source-load forecasting refers to the technology of predicting the power output (wind power, photovoltaic, etc.) and load (electricity demand) of a power system. In this specification, source-load forecasting includes wind power forecasting, photovoltaic power forecasting, and electricity load forecasting.
[0031] Multi-source time series data refers to various types of data that originate from different acquisition systems and have a time sequence. This specification specifically includes wind power output data, photovoltaic power output data, load data, meteorological data (such as temperature, irradiance, wind speed, humidity, etc.), and calendar features (such as seasons, months, holidays, etc.).
[0032] A scenario refers to specific operating conditions categorized based on seasonal characteristics, meteorological conditions, and load levels. Examples include a "summer high temperature" scenario, a "winter strong wind" scenario, and a "weekday" scenario. Scenarios are used to evaluate prediction models across different scenarios and identify differences in model performance under varying conditions.
[0033] The systematic bias component refers to the long-term, regular deviation within the prediction error. This component characterizes the systematic shift between the predicted results and the actual observed values, such as predictions being generally too high or too low. Systematic bias is typically related to factors such as model structure and the distribution of training data.
[0034] The random residual component refers to the irregular, randomly fluctuating part of the prediction error. This component characterizes the short-term fluctuation error in the prediction result that cannot be explained by systematic bias, and is usually related to factors such as data noise and random events.
[0035] Dual-channel bias correction refers to a method that corrects systematic bias and random residuals in prediction errors using two independent processing channels. The low-frequency correction channel corrects long-term trend biases, while the high-frequency compensation channel compensates for short-term random fluctuations. The corrected prediction result is obtained by fusing the outputs of the two channels.
[0036] Risk consistency calibration refers to the process of scaling and shifting the forecast interval to ensure that the actual coverage of the forecast interval is consistent with the preset target risk threshold. Through risk consistency calibration, reliable probabilistic coverage of the forecast interval can be ensured, meeting the risk management requirements of power system operation.
[0037] Source-load consistency constraint refers to the physical constraint imposed on wind power forecasts, photovoltaic forecasts, and load forecasts, requiring that the three satisfy a power balance relationship, that is, the load forecast is approximately equal to the sum of the wind power forecast and the photovoltaic forecast plus the balance residual term. This constraint ensures that the forecast results conform to the basic physical laws of the power system.
[0038] Concept drift refers to the phenomenon where the distribution of model input data or prediction residuals changes over time. When data distribution drifts, the predictive performance of the model may gradually degrade, requiring a monitoring mechanism to detect and trigger model updates in a timely manner.
[0039] Gray-scale deployment governance refers to a strategy of gradually increasing the proportion of business traffic when deploying a new model. For example, the new model initially handles 5% of the traffic, and after confirming stability, it is gradually increased to 10%, 20%, and eventually 100%. If problems are discovered, it can be quickly rolled back to the old model to control deployment risks.
[0040] A fixed replay dataset refers to a dataset consisting of representative time segments selected from historical data, used for consistency comparison testing of model versions. Using a fixed replay dataset ensures that different model versions can be repeatedly evaluated on the same data slice, guaranteeing the objectivity and comparability of test results.
[0041] Tail augmentation refers to applying higher weights to extreme error samples with larger absolute error values than to regular samples during model training. This makes the model pay more attention to these "difficult samples" during training, thereby reducing the probability of extreme error events.
[0042] Example 1: like Figure 1 As shown, this embodiment provides a method for testing and optimizing source load prediction models based on dual-channel deviation correction and risk consistency calibration. This method is used to perform repeatable evaluation, error attribution, deviation correction, and risk consistency calibration on source load prediction models such as wind power, photovoltaics, and loads, and forms a closed-loop safety deployment that includes concept drift monitoring and gray-scale online governance. The method specifically includes the following steps: Step S1, data preprocessing and standardization, includes: Step S11: Obtain multi-source time series data of the power system, including wind power output data, photovoltaic power output data, load data, meteorological data, and calendar features. Perform unified time granularity alignment and resampling on the above data to eliminate the sampling frequency differences of multi-source data, and construct a sample set under a unified time index, the construction of which satisfies: , In the formula, Represents a standardized sample set; Indicates the first A time index; Indicates time The corresponding input feature vector; Indicates time The corresponding actual observed value; This indicates the total number of samples in the sample set.
[0043] Step S12: Perform anomaly detection and missing value repair on each variable sequence in the standardized sample set constructed in step S11. Outliers are identified and replaced using a sliding window robust statistical method to ensure the continuity and statistical stability of the data sequence, satisfying the following: , , , When satisfied Replacement and repair are performed at the specified time; where, Indicated by time A set of sliding windows centered on the center; Indicates the half-width of the sliding window; Indicates the first in the window Each sample value; Represents the median operator; This represents the median of the window samples; 1.4826 represents the median absolute deviation (MAD); 1.4826 represents the proportional gain of the median absolute deviation normalized to the standard deviation. This represents the anomaly detection threshold coefficient.
[0044] Step S13: Based on seasonal characteristics, meteorological conditions, and load levels, the repaired samples are grouped into scenarios and a scenario label set is constructed to support scenario-based evaluation and error attribution. The construction of this set satisfies the following: , , In the formula, Indicates time Corresponding scenario tags; This represents the scenario mapping function, used to map multidimensional scenario factors to discrete scenario numbers; Indicates calendar context factors such as seasons, months, and holidays; These represent meteorological scenario factors, including temperature, irradiance, wind speed, and their statistics; This represents the load level binning factor, which is obtained by dividing the load quantile interval or a preset threshold. Describing a scenario A set of time indices for subsequent use in... The above statistical error and risk indicators.
[0045] Step S14: Select representative time segments from the scenario-labeled sample set to construct a fixed playback dataset, enabling reproducible evaluation of different model versions on consistent data slices. Its construction satisfies: , In the formula, Represents a fixed set of replay samples; Indicates the first A time index for each replay sample; This represents the input feature vector of the replay sample; This indicates the actual observed values of the replay sample; This indicates the number of replay samples; the fixed replay dataset is used for model version consistency comparison testing.
[0046] Step S2, model evaluation and error attribution, includes: Step S21: Input the fixed playback dataset constructed in step S14 into the model to be tested for playback testing, and calculate the difference between the prediction result and the actual observed value as the prediction error. The calculation formula is as follows: , , In the formula, Indicates time The prediction error; This represents the predicted value output by the model under test; Represents the actual observed value; Describing a scenario A collection of time indexes; This indicates the number of samples in the sample set with context labels; Describing a scenario Lower mean absolute error.
[0047] Step S22: Calculate the stability index of the prediction error and the prediction interval coverage index using the scenario-labeled sample set constructed in step S13 to evaluate the robustness of the model under different scenarios. The calculation formula is as follows: , , In the formula, Describing a scenario Lower error stability index (error standard deviation); Describing a scenario Lower mean error; Describing a scenario Lower forecast interval coverage; This indicates an indicator function that takes the value 1 if the condition is true and 0 otherwise. and They represent time respectively The lower and upper bounds of the prediction interval.
[0048] Step S23: Perform error decomposition and statistical attribution analysis on the prediction error to identify the sources of systematic bias and key influencing factors. The calculation formula is as follows: , , In the formula, Represents systematic deviation components; Represents random residual components; Represents a set of scenario groups; This represents the mathematical expectation operator.
[0049] Error attribution is achieved using conditional variance decomposition: , In the formula, Represents the variance operator; This represents the input feature vector; Indicates the contribution of random fluctuations; This indicates the contribution of systematic bias.
[0050] The formula for calculating the proportion of systematic deviation is: , In the formula, It represents the proportion of systematic deviation to the total error and is used to guide the strength of dual-channel correction.
[0051] Step S24: Identify the key factors affecting prediction error through the feature sensitivity index, the calculation formula of which is: , In the formula, Indicates the first The standardized sensitivity of each characteristic variable to error; Represents the covariance operator; Indicates the first One characteristic in time The value of .
[0052] Step S3, dual-channel bias correction, includes: Step S31: Construct a dual-channel bias correction model based on the systematic bias component and the random residual component. Perform low-frequency bias correction based on the mapping relationship between the historical observation distribution and the model prediction distribution. The calculation formula is as follows: , In the formula, This represents the model's output distribution function; Represents the true distribution function; Represents the inverse distribution function; This indicates the low-frequency correction result.
[0053] Step S32: Construct a residual learning model to perform high-frequency compensation on the prediction residuals to correct short-term prediction errors. The calculation formula is as follows: (The model is constructed using the current prediction results, the meteorological data, and the load data as inputs.) , , In the formula, This represents the input features for residual compensation; This represents the residual compensation function.
[0054] Step S33: Based on the proportion of systematic bias to the total error, the low-frequency correction results and residual compensation results are weighted and fused to obtain the final correction prediction result. The calculation formula is as follows: , In the formula, Indicates the proportion of systematic deviations; This indicates the result of residual compensation.
[0055] Step S34: Apply enhanced weights to the tail samples of the error distribution and construct a robust training objective to increase the model's fitting priority under extreme error samples, thereby reducing the probability of large error events. This satisfies the following: , , In the formula, Indicates sample weights; Indicates the tail enhancement factor; This represents the absolute value quantile threshold of the error; Indicates an indicator function; This represents the loss function.
[0056] Step S4, risk calibration and governance closed loop, includes: Step S41: Perform risk consistency calibration on the prediction interval of the corrected prediction results. By scaling and shifting the prediction interval, ensure that the interval coverage meets the target risk threshold for power system operation. The calculation formula is as follows: , , In the formula, Indicates the lower bound of the prediction interval; Indicates the upper bound of the prediction interval; Indicates the lower bound of the calibrated prediction interval; Indicates the upper bound of the calibrated prediction interval; Indicates the scaling factor; This represents the translation parameter.
[0057] Step S42: Construct a joint optimization objective for the risk penalty term and the consistency constraint term, and optimize the parameters of the risk consistency calibration to balance prediction accuracy and risk control. The calculation formula is as follows: , , In the formula, This represents the robust training loss function; Indicates penalties for defaulting on risk; This indicates a consistency constraint penalty term; and Indicates the weighting parameter; This represents the set of evaluation time indices.
[0058] Step S43: Physical consistency verification is achieved by applying power balance consistency constraints to the source-side prediction and the load-side prediction, which satisfies: , In the formula, This indicates a consistency constraint penalty term; Indicates time The load forecast or the calibrated load forecast; Indicates time The wind power output forecast or the calibrated wind power forecast; Indicates time The photovoltaic power output forecast or the calibrated photovoltaic power output forecast; This represents the balanced residual term, used to characterize line loss, controllable power supply regulation, or other un-explicitly modeled terms; This represents the set of evaluation time indices.
[0059] Step S44: Construct a concept drift monitoring function using statistical indicators to detect changes in the input distribution or residual distribution. The calculation formula is as follows: , when Time-triggered governance; where, Indicates the drift index; Indicators representing distribution stability; Indicators representing the difference in kernel mean values; Represents residual statistics; Indicates the weighting coefficient; This represents the normalization parameter.
[0060] Step S45: Perform model canary release and rollback management to control the risk of model deployment, which satisfies the following: , , In the formula, Indicates the first The proportion of business traffic handled by the new model (referring to the model under test that has been optimized and deployed after S3 dual-channel correction and S4 risk calibration) during the second gray release; This indicates the proportion of business traffic handled by the new model during the next phase of canary release; This indicates the percentage increase in traffic during each round of canary releases; This represents the minimum value operator; Indicates the time when the risk alarm was triggered; Indicates the time of the execution model rollback; This indicates the maximum allowed rollback response time.
[0061] Step S46: When model performance degradation or concept drift is detected, trigger the model retraining loop, retrain the dual-channel bias correction model and update the risk calibration parameters, and repeat steps S2 to S4.
[0062] Example 2: like Figure 2 As shown, this embodiment provides a source load prediction model testing and optimization system based on dual-channel deviation correction and risk consistency calibration, used to implement the source load prediction model testing and optimization method as described in Embodiment 1, including: The data preprocessing module acquires multi-source time series data of the power system and constructs a standardized dataset. The multi-source time series data includes wind power output data, photovoltaic power output data, load data, meteorological data, and calendar features. The model evaluation and error analysis module is used to input the standardized dataset into the model under test for playback testing, statistically analyze the prediction error and interval coverage index under each scenario, obtain the systematic deviation component representing long-term trend deviation and the random residual component representing short-term volatility by decomposing the prediction error, and identify the key influencing factors and high-risk scenarios that lead to prediction inaccuracy based on the decomposition results. The deviation correction module is used to construct a dual-channel deviation correction model based on the systematic deviation component and the random residual component. It corrects the systematic deviation between the prediction result and the actual distribution through the low-frequency correction channel and compensates the random fluctuation component in the prediction residual through the high-frequency compensation channel. It fuses the outputs of the two channels to obtain the corrected prediction result and strengthens the training priority of extreme error samples with tail enhancement weights to reduce the impact of large error events on power grid dispatch. The risk consistency calibration module is used to perform risk consistency calibration and source-load consistency constraint verification on the corrected prediction results, so that the prediction interval meets the risk threshold of power system operation and the corrected prediction results meet the power balance relationship. The module achieves closed-loop optimization and safe deployment of the model through concept drift monitoring and gray-scale online governance.
[0063] Example 3: like Figure 3 As shown, this embodiment provides an electronic device, which may include: at least one processor, at least one network interface, a user interface, a memory, and at least one communication bus.
[0064] The communication bus can be used to enable communication between the various components mentioned above.
[0065] The user interface may include buttons, and optional user interfaces may also include standard wired interfaces and wireless interfaces.
[0066] The network interface may include, but is not limited to, Bluetooth modules, NFC modules, Wi-Fi modules, etc.
[0067] The processor may include one or more processing cores. It connects various parts of the electronic device via various interfaces and lines, executing instructions, programs, code sets, or instruction sets stored in memory, and accessing data stored in memory to perform various functions and process data. Optionally, the processor can be implemented using at least one hardware form of DSP, FPGA, or PLA. The processor may integrate one or more of the following: CPU, GPU, and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor.
[0068] The memory may include RAM or ROM. Optionally, the memory may include a non-transitory computer-readable medium. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor. The memory, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and testing and optimization applications. The processor can be used to call the testing and optimization applications stored in the memory and execute the steps of the source-load prediction model testing and optimization method mentioned in the foregoing embodiments.
[0069] Example 4: This embodiment provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform the above-described instructions. Figure 1 One or more steps in the illustrated embodiment. If the constituent modules of the above-described electronic device are implemented as software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium.
[0070] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this specification are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).
[0071] Those skilled in the art will understand that all or part of the processes in the method of Embodiment 1 described above can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks. Unless otherwise specified, the technical features of this embodiment and the implementation scheme can be combined arbitrarily.
[0072] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0073] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0074] The above description is merely an exemplary embodiment of the present invention and should not be construed as limiting the scope of the invention. Any equivalent changes and modifications made in accordance with the teachings of this invention are still within the scope of this invention. Those skilled in the art will readily conceive of embodiments of the invention upon considering the specification and practicing the disclosure herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of the invention are defined by the claims.
Claims
1. A method for testing and optimizing a source-load prediction model based on dual-channel deviation correction and risk consistency calibration, characterized in that, Including the following steps: S1. Acquire multi-source time series data of the power system and construct a standardized dataset, wherein the multi-source time series data includes wind power output data, photovoltaic power output data, load data, meteorological data and calendar features; S2. Input the standardized dataset into the model to be tested for playback testing, and statistically analyze the prediction error and interval coverage index under each scenario. By decomposing the prediction error, obtain the systematic deviation component that represents the long-term trend deviation and the random residual component that represents the short-term volatility. Based on the decomposition results, identify the key influencing factors and high-risk scenarios that lead to inaccurate predictions. S3. Based on the systematic deviation component and the random residual component, a dual-channel deviation correction model is constructed. The systematic deviation between the prediction result and the true distribution is corrected by the low-frequency correction channel, and the random fluctuation component in the prediction residual is compensated by the high-frequency compensation channel. The outputs of the two channels are fused to obtain the corrected prediction result. The training priority of extreme error samples is strengthened by tail enhancement weights to reduce the impact of large error events on power grid dispatch. S4. Perform risk consistency calibration and source-load consistency constraint verification on the corrected prediction results to ensure that the prediction interval meets the risk threshold of power system operation and that the corrected prediction results meet the power balance relationship. Achieve closed-loop optimization and safe deployment of the model through concept drift monitoring and gray-scale online governance.
2. The method for testing and optimizing a source-load prediction model based on dual-channel deviation correction and risk consistency calibration according to claim 1, characterized in that, Step S1 involves constructing a standardized dataset, including: S11. Perform unified time granularity alignment and resampling processing on the wind power output data, the photovoltaic output data, the load data, the meteorological data, and the calendar features to construct a sample set under a unified time index; S12. Perform anomaly detection and missing value repair processing on each variable sequence in the sample set. Identify outliers and replace and repair them using a sliding window robust statistical method to obtain the repaired sample set. S13. Based on seasonal characteristics, meteorological conditions and load levels, the repaired sample set is grouped into scenarios, and scenario labels are constructed for each time point to obtain a sample set with scenario labels. S14. Select representative time segments from the sample set with context labels to construct a fixed playback dataset for model version consistency comparison testing.
3. The method for testing and optimizing a source load prediction model based on dual-channel deviation correction and risk consistency calibration according to claim 2, characterized in that, Step S2 includes: S21. Input the fixed playback dataset constructed in step S14 into the model to be tested for playback testing, and record the difference between the calculated prediction result and the actual observation value as the prediction error. S22. Based on the sample set with scenario labels constructed in step S13, calculate the mean absolute error, standard deviation of error, and prediction interval coverage for each scenario. S23. Perform error decomposition and attribution analysis on the prediction error. Use conditional variance decomposition to decompose the prediction error into systematic deviation components and random residual components, and calculate the proportion of systematic deviation to the total error. S24. Identify key factors affecting prediction errors and high-risk scenarios through feature sensitivity indicators.
4. The method for testing and optimizing a source load prediction model based on dual-channel deviation correction and risk consistency calibration according to claim 3, characterized in that, Step S3 includes: S31. Low-frequency bias correction is performed using the distribution mapping method. By establishing a mapping relationship between the predicted distribution and the true distribution, the prediction results of the model to be tested are mapped to the true observed distribution. S32. Construct a residual learning model to perform high-frequency residual compensation, using the current prediction results, the meteorological data, and the load data as inputs, and output the compensation value for the prediction residuals; S33. Based on the proportion of systematic deviation to the total error, the low-frequency correction results and residual compensation results are weighted and fused to obtain the correction prediction results. S34. Apply enhanced weights to the samples at the tail of the error distribution so that samples whose absolute error value exceeds the quantile threshold receive higher training weights than regular samples, thereby reducing the probability of extreme error events.
5. The method for testing and optimizing a source-load prediction model based on dual-channel deviation correction and risk consistency calibration according to claim 4, characterized in that, Step S4 includes: S41. Perform risk consistency calibration on the prediction interval of the corrected prediction result, and adjust the prediction interval by scaling and translation so that the interval coverage meets the target risk threshold for power system operation. S42. Construct a joint optimization objective that includes risk default penalty terms and consistency constraint penalty terms, and optimize the parameters of the risk consistency calibration to balance prediction accuracy and risk control. S43. Apply source-load physical consistency constraints to the calibrated prediction results to ensure that the wind power prediction, photovoltaic prediction and load prediction values satisfy the power balance relationship. S44. Construct a concept drift monitoring function to detect changes in the distribution of input data or predict the distribution of residuals by calculating the drift index. When the drift index exceeds a preset threshold, governance is triggered. S45. Perform gray-scale deployment and rollback management of the model, and perform fast rollback when a risk alarm is triggered; S46. When model performance degradation or concept drift is detected, trigger the model retraining loop, retrain the dual-channel bias correction model and update the risk calibration parameters, and repeat steps S2 to S4.
6. The method for testing and optimizing a source load prediction model based on dual-channel deviation correction and risk consistency calibration according to claim 5, characterized in that: In step S42, the joint optimization objective includes a robust training loss function, a risk default penalty term, and a consistency constraint penalty term. The prediction accuracy and risk control are balanced by adjusting the weight parameters.
7. The method for testing and optimizing a source-load prediction model based on dual-channel deviation correction and risk consistency calibration according to claim 5, characterized in that, The power balance consistency constraint in step S43 is satisfied as follows: The difference between the load forecast and the sum of the wind power forecast and the photovoltaic forecast equals the balance residual term.
8. A source-load prediction model testing and optimization system based on dual-channel deviation correction and risk consistency calibration, characterized in that, Used to implement the source load prediction model testing and optimization method as described in any one of claims 1 to 7.
9. A computer device, the computer device comprising a memory, a processor, and a computer program, characterized in that, When the computer program is executed by the processor, it implements the source load prediction model testing and optimization method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the source load prediction model testing and optimization method as described in any one of claims 1 to 7.