Virtual power plant load prediction method and system based on machine learning

By generating a sequence of characteristic vectors with the same frequency, performing time-series correlation analysis, and applying drift adjustment criteria, the problem of prediction curve drift caused by multiple inputs in virtual power plants was solved, thereby improving the stability and adaptability of load forecasting.

CN121886375BActive Publication Date: 2026-05-19DONGFANG ELECTRONICS CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DONGFANG ELECTRONICS CO LTD
Filing Date
2026-03-23
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

The synchronization relationship of multiple inputs in existing technologies in virtual power plants is easily affected by changes in electricity price forecasts, day-ahead planning curves, and weather forecasts, resulting in segmented drift of the forecast curve after strategy adjustments, which is difficult to identify and correct in a timely manner.

Method used

By integrating multi-source load, electricity market and meteorological data to generate a co-frequency feature vector sequence, performing time-series correlation analysis, performing feature difference reconstruction, previous value preservation and jump point sample isolation, a load prediction model is constructed, and a drift adjustment criterion is constructed by using the actual load and predicted load within the observation window, performing segmented correction and backup curve replacement, realizing the model stability determination and drift sample backflow training closed loop.

Benefits of technology

It effectively suppresses the pseudo-steady-state correlation of multi-source inputs, ensures the continuity and adaptability of the prediction curve, solves the drift problem of the prediction curve after policy adjustment, and improves the stability of the output and its ability to adapt to new scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121886375B_ABST
    Figure CN121886375B_ABST
Patent Text Reader

Abstract

The application discloses a virtual power plant load prediction method and system based on machine learning, and relates to the technical field of situation prediction. The virtual power plant load prediction method and system based on machine learning comprises the following steps: S1, preprocessing of integrated multi-source load, power market and weather data, and storage for constructing a virtual power plant prediction database; S2, time series correlation analysis of adjacent time slice same frequency feature vector data; S3, construction of a load prediction model based on training samples of fused multi-layer feature expression and output of time slice level predicted load value; S4, segmented correction and backup curve replacement according to the drift adjustment result, and completion of archiving marking; and S5, window deviation evolution evaluation based on the predicted load sequence, the actual load sequence and the drift adjustment sequence, and promotion of the drift sample backflow training closed loop. The problems that multi-source input same frequency resonance causes pseudo-stable correlation, that the predicted curve drifts after strategy adjustment, and that it is difficult to identify and correct in time are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of situation prediction technology, specifically to a virtual power plant load prediction method and system based on machine learning. Background Technology

[0002] Virtual power plants, as an aggregation form of distributed power sources, controllable loads, and energy storage units, are becoming increasingly common in electricity spot trading, ancillary service trading, and demand response scenarios. In this scenario, load forecasting is not only related to electricity purchase and sale strategies and clearing revenue, but also to the output arrangement of distributed resources and safety margin assessment. It is necessary to provide a forecast curve that is as smooth and executable as possible over a long forecasting time domain.

[0003] For example, Chinese invention patent CN110796303A discloses a short-term power load forecasting method based on EWT and ODBSCAN. First, EWT is used to decompose the load, obtaining different intrinsic mode components. Second, appropriate methods are used to forecast each component. Specifically, low-frequency and mid-frequency components are predicted using IRF; high-frequency components have uncertainty, so ODBSCAN is used for clustering based on meteorological factors such as temperature and humidity, and then a processing method is selected based on the sample characteristics of each cluster. Finally, the forecast results of each component are superimposed to obtain the overall forecast result.

[0004] For example, Chinese invention patent CN116523193A discloses a virtual power plant energy storage scheduling method, device, electronic device, and storage medium, which can acquire historical data of virtual power plant energy storage scheduling; predict the energy storage-related parameters of the virtual power plant within a preset time period based on the historical data of virtual power plant energy storage scheduling; construct a charging and discharging energy storage scheduling target model based on the energy storage-related parameters of the virtual power plant; and solve the charging and discharging energy storage scheduling target model to obtain the optimal decision for charging and discharging energy storage scheduling.

[0005] However, in actual operation, electricity price forecasting, day-ahead planning curves, available capacity estimation, and weather forecasting are often jointly influenced by calendar rules, trading rules, and scheduling strategies, easily forming an input sequence with almost synchronous peaks and troughs on the timeline. Existing methods treat this synchronous fluctuation as a stable dependency during the training phase, and the model parameters converge towards this form. Once the electricity price forecasting service changes providers, the planning curve generation logic is adjusted, the capacity assessment model is updated, or the weather forecasting algorithm is upgraded, the synchronous relationship of the multi-source inputs may change abruptly, the dependency formed during the training phase is difficult to maintain, and the forecast curve shows a significant shift over a period of time.

[0006] Therefore, in order to address the above problems, there is an urgent need for a virtual power plant load forecasting method and system based on machine learning. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides a virtual power plant load forecasting method and system based on machine learning, which solves the problem that pseudo-steady-state correlation caused by multi-source input resonance leads to segmented drift of the forecast curve after strategy adjustment, which is difficult to identify and correct in a timely manner.

[0008] To achieve the above objectives, this invention provides the following technical solution: a virtual power plant load forecasting method and system based on machine learning, comprising: S1, integrating multi-source load, electricity market, and meteorological data, preprocessing them, generating a sequence of co-frequency feature vectors by time slices, storing them, and constructing a virtual power plant forecasting database; S2, performing time-series correlation analysis on the co-frequency feature vector data of adjacent time slices, and performing feature difference reconstruction, previous value preservation, and isolation and freezing operations on jump point samples based on the correlation analysis results; S3, constructing a load forecasting model based on training samples fused with multi-layer feature expressions and outputting time-slice-level predicted load values; S4, constructing drift adjustment criteria by using actual load, predicted load, and historical resonance records within the observation window, performing segmented correction and backup curve replacement based on the drift adjustment results, and completing archiving marking; S5, conducting window deviation evolution evaluation based on the predicted load sequence, actual load sequence, and drift adjustment sequence, and completing output interval stability determination, model branch arbitration, and version rollback based on the deviation evolution results, and promoting the return training closed loop of drift samples.

[0009] Further, the specific measures for integrating multi-source load, electricity market, and meteorological data, preprocessing them, generating a time-sliced ​​sequence of in-frequency feature vectors, and storing them to construct a virtual power plant forecast database are as follows: Collecting load measurement data: Obtaining active power data, reactive power data, and cumulative electricity values ​​through access point energy meters; obtaining key controllable load and distributed power output data through equipment-level power monitoring devices; binding each measurement value with the sampling time and recording the actual load value according to time slices; arranging the actual load value sequence in chronological order; Collecting electricity market business data: Obtaining day-ahead clearing prices and real-time price forecasts through the trading platform interface; recording day-ahead planned load curves through operation plan management; recording available capacity estimates through capacity management; and attaching time information to price records, plan records, and capacity records; Collecting meteorological data: Obtaining temperature, humidity, wind speed, and radiation intensity data through meteorological acquisition units; Collecting observation window duration configuration values: Reading the drift observation window duration field through the parameter configuration table to obtain the configuration effective time and version. This identifier is used to bind the observation window duration configuration value and the version identifier to the observation window parameter record; the time slice granularity duration is collected by reading the time slice granularity duration field through the time slice division rule table, obtaining the division rule version identifier, and binding the time slice granularity duration and rule version identifier to the time slice parameter record; outlier removal and missing segment completion are performed on the collected load measurement data, power market business data, and meteorological data. Missing segment completion adopts the linear interpolation method of adjacent sampling time and marks the interpolation interval. The maximum and minimum value normalization method is used to scale the load, electricity price, plan, capacity, and meteorological related numerical fields to a unified interval to unify the value range. Under the unified time granularity, the normalized meteorological data, day-ahead plan, electricity price forecast, and available capacity are concatenated in a fixed field order to form a synchronous frequency feature vector, and the time slice identifier, data source version, and key field value range are added to the record; the feature values ​​and actual load values ​​after anomaly processing and normalization are stored to construct a virtual power plant forecast database.

[0010] Furthermore, the specific measures for time series correlation analysis using the same-frequency feature vector data of adjacent time slices are as follows: obtain the same-frequency feature vector of the i-th time slice and the same-frequency feature vector of the i-th minus one time slice; calculate the mean of the two same-frequency feature vectors in each field dimension and obtain the mean-reduced vector components; perform field-by-field product on the two mean-reduced vector components and sum them to obtain the covariance numerator; square the mean-reduced vector components of the i-th time slice, sum them and take the square root to obtain the standard deviation of the vector of the i-th time slice; square the mean-reduced vector components of the i-th minus one time slice, sum them and take the square root to obtain the standard deviation of the vector of the i-th minus one time slice; divide the covariance numerator by the product of the two standard deviations to obtain the vector correlation coefficient; square the vector correlation coefficient to obtain the correlation squared term; add the correlation squared term to a factor to obtain the denominator and take the reciprocal to obtain the attenuation term; subtract the attenuation term from the factor to obtain the resonance correction value of the i-th time slice.

[0011] Furthermore, based on the correlation analysis results, the specific measures for performing feature difference reconstruction, previous value preservation, and jump point sample isolation and freezing operations are as follows: By comparing the resonance correction value and the correction threshold in real time, when the resonance correction value is less than the correction threshold, the original feature link is used, and the feature sequence is written in, recording the time slice, data source version, and key feature value range. The training side continues to use conventional sliding window samples without additional removal. When the resonance correction value is greater than or equal to the correction threshold, the trigger feature is switched from the original value to the differential expression of adjacent time slices, and the historical residual expression of the same period is generated synchronously to replace the original value in the model, weakening the synchronization of multi-source features at the same time. Previous value preservation is enabled for four types of synchronous items: weather forecast, day-ahead plan, electricity price expectation, and available capacity. Only historical lagging versions are allowed to enter inference for n consecutive time slices. Window samples containing trigger points are included in the jump point set and removed from the main training set, and parameter updates are frozen. This trigger is written into the resonance event table and drives the retraining task to be enqueued. The training data only selects a period of time before and after the trigger. The feature sequence is updated after replaying and verifying that the resonance correction value is less than the correction threshold.

[0012] Furthermore, the specific measures for constructing a load prediction model based on training samples that integrate multi-layer feature representations and outputting time-slice-level predicted load values ​​are as follows: The feature sequence is used as a feature vector input to a sliding window to generate training samples with time-series dependent features. The feature sequence includes adjacent time-slice difference representation features, historical residual representation features for the same time period, field previous value preservation features, and resonance correction values. A Long Short-Term Memory (LSTM) network and a gated recurrent unit (GRU) network are used to learn the long-term dependence and trend of the load at intraday and cross-day scales. Extreme gradient boosting trees and lightweight gradient boosting machines are used to characterize the relationships between multi-source features within the same time slice. To address the nonlinear coupling relationship, a converter network is used to perform time-series encoding of multi-source heterogeneous feature sequences, and attention allocation is used to reduce the interference of co-frequency resonant related input components on the output. A load prediction model is constructed based on training samples. During the training phase, supervised learning is used to jointly train the load prediction model. Multiple task output heads are set to synchronously output device-level predicted load sequences, aggregation-level predicted load sequences, and multi-step predicted load sequences. Consistency constraints are used to ensure the coordination of different levels of output in terms of shape and amplitude. During the running phase, the latest feature sequence is input into the load prediction model to obtain time-slice-level predicted load values ​​and written into the predicted load value sequence.

[0013] Furthermore, the specific measures for constructing the drift adjustment criterion using the actual load, predicted load, and historical resonance records within the observation window are as follows: Obtain the actual load value, predicted load value, observation window duration configuration value, and time slice granularity duration at time t; divide the observation window duration by the time slice granularity duration to obtain the number of time slices included in the observation window, and then round down to obtain the backtracking time length; construct the drift adjustment criterion using the actual load value, predicted load value, and backtracking time length: take the absolute value of the actual load value to obtain the absolute value of the actual load; subtract the predicted load value from the actual load value to obtain the offset difference; divide the offset difference by the absolute value of the actual load to obtain the normalized offset; obtain the resonance correction value sequence for each time slice within the interval from time t minus the backtracking time length to time t; accumulate the resonance correction value sequence to obtain the resonance cumulative term; multiply the normalized offset term by the resonance cumulative term to finally obtain the drift adjustment value at time t.

[0014] Further, the specific measures for performing segmented correction and backup curve replacement and completing archiving marking based on the drift adjustment results are as follows: By comparing the drift adjustment value and the drift threshold in real time, when the absolute value of the drift adjustment value is less than the drift threshold, the predicted load result directly enters the error drift detection calculation. At the same time, the drift adjustment value, predicted load value, and actual load are archived in the virtual power plant prediction database by time slice for playback to locate the drift start point and duration. When the absolute value of the drift adjustment value is greater than or equal to the drift threshold, and the drift adjustment value is positive, it is determined that the predicted baseline is too small and the actual load is too large. The absolute value of the actual load in the previous time slice is multiplied by the drift adjustment value to obtain the correction amount, which is added to the current predicted load to perform output correction. The previous value is maintained for the day-ahead plan field and the electricity price expectation field. The differential expression and the historical residual expression of the same period continue to be used as input features and fed into the load prediction model. The synchronous jump check adopts the method of comparing the absolute difference sequence of the predicted load sequence in adjacent time slices within the trigger interval. When the maximum value and median of the corrected absolute difference sequence decrease, it is determined that the synchronous jump has been suppressed. In parallel, in the post-processing stage, based on the current observations A linear regression is performed between the time slice sequence within the window and the pre-correction predicted load value to obtain the slope and intercept. The regression estimate sequence is calculated according to the time slice index and used as the slope extrapolation backup curve. If the deviation between the corrected predicted load and the backup curve is greater than the deviation threshold, the corresponding time slice output is replaced with the backup curve, and the trigger interval is written into the drift sample list. When the drift adjustment value is not positive, it is determined that the predicted baseline is too large and the actual load is too small. The corresponding time period is included in the negative drift sample pool. The correction amount is obtained by multiplying the absolute value of the actual load of the previous time slice by the absolute value of the drift adjustment value. The day-ahead planning field and the electricity price expectation field continue to be included in the model to reduce the short-term meteorological deviation and raise the baseline. In parallel, the actual load records corresponding to the current observation window time position are retrieved from the historical data of multiple days in the post-processing stage. The median of these samples is calculated for each time slice. The median sequence arranged by time slice is used as the median backup curve for the same time period. If the deviation between the corrected predicted load and the backup curve is greater than the deviation threshold, the corresponding time slice output is replaced with the backup curve, and the trigger interval is written into the drift sample list.

[0015] Furthermore, the specific measures for evaluating the window deviation evolution based on the predicted load sequence, actual load sequence, and drift adjustment sequence are as follows: Obtain the predicted load value sequence, actual load value sequence, and drift adjustment value sequence for each time slot; conduct deviation evolution evaluation for each time slot within the window: calculate the absolute error between the predicted load value and the actual load value to obtain the absolute error term; add the predicted load value and the actual load value for the same time slot to obtain the sum term; divide the absolute error term by the sum term to obtain the relative error term; subtract the drift adjustment value for the same time slot from the relative error term to obtain the deviation difference term; take the absolute value of the deviation difference term to obtain the absolute deviation term; accumulate the absolute deviation terms for all time slots within the window to obtain the cumulative deviation term; divide the cumulative deviation term by the error monitoring window length to obtain the mean term, and finally obtain the error drift detection value at time t.

[0016] Furthermore, the specific measures for completing the output interval stability determination, model branch arbitration and version rollback, and promoting the backflow training of drift samples based on the deviation evolution results are as follows: By comparing the error drift detection value and the error threshold in real time, when the error drift detection value is less than the error threshold, the monitoring window is determined to be in the error stable zone. The predicted load after drift correction is retained as an effective output and continuously published. The corresponding time period is marked as the error stable zone, and the prediction results, along with the actual load value and drift adjustment value, are archived to the virtual power plant prediction database by time slice. When the error drift detection value is greater than or equal to the error threshold, the monitoring window is determined to be in the error drift zone. The data samples of the corresponding time window are labeled with drift and entered into the drift sample pool. The extraction ratio is increased to improve the identification and fitting ability of the load prediction model. The branch arbitration process involves: statistically analyzing the error drift detection values ​​of the gated recurrent unit branch, the extreme gradient boosting tree branch, and the converter network branch within the most recent evaluation window; selecting the branch output with the smallest detection value as the temporary main output; if all branch detection values ​​are greater than the convergence threshold, reverting to the historical load prediction model version output corresponding to the most recent stable sample segment; simultaneously generating a drift sample list and submitting a load prediction model update task request; and replaying verification until the error drift detection value falls below the error threshold, at which point arbitration is lifted and the main output version is restored. The main feature distributions of the drift segments are then filtered, sorted in descending order of feature distribution difference to obtain the feature set, and the drift feature list and distribution change summary are archived in the virtual power plant prediction database for subsequent version replay comparison to achieve a closed-loop reflow training.

[0017] Furthermore, the second aspect of this invention provides a machine learning-based virtual power plant load forecasting system, which applies a machine learning-based virtual power plant load forecasting method, including: a data access and preprocessing module, used to integrate multi-source load, electricity market and meteorological data, preprocess them to generate a sequence of co-frequency feature vectors by time slices, and store them to construct a virtual power plant forecasting database; a feature construction and enhancement module, used to perform time-series correlation analysis on co-frequency feature vector data of adjacent time slices, and perform feature difference reconstruction, previous value preservation and jump point sample isolation and freezing operations according to the correlation analysis results; a multi-source load forecasting learning module, used to construct a load forecasting model based on training samples fused with multi-layer feature expressions and output time-slice-level predicted load values; a deviation correction module, used to construct drift adjustment criteria by actual load, predicted load and historical resonance records within the observation window, and perform segmented correction and backup curve replacement and complete archiving marking according to the drift adjustment results; and a result evaluation and feedback module, used to conduct window deviation evolution evaluation based on the predicted load sequence, actual load sequence and drift adjustment sequence, and complete output interval stability determination, model branch arbitration and version rollback according to the deviation evolution results and promote drift sample backflow training closed loop.

[0018] The present invention has the following beneficial effects:

[0019] (1) In this invention, the feature difference reconstruction and previous value preservation are driven by the temporal correlation analysis of the same frequency feature vectors of adjacent time slices, thereby achieving the effect of de-resonance of synchronous fluctuation terms and suppression of pseudo-correlation. This effectively solves the problem of curve segment drift after caliber change caused by the learning of same frequency alignment as steady-state correlation in the prior art.

[0020] (2) This invention completes the stability judgment, model branch arbitration and historical version rollback through window bias evolution evaluation and promotes the return training closed loop of drift samples, thereby achieving the effect of output continuity guarantee and new scene adaptation capability improvement, effectively solving the problem of repeated errors caused by the lack of closed loop constraints in the drift scene in the prior art.

[0021] (3) This invention constructs a load prediction model by fusing training samples with multi-layer feature expressions and outputs time-slice level predicted load values, thereby achieving the effect of simultaneously depicting long-term dependence and multi-source nonlinear coupling. It effectively solves the problem that the single modeling paradigm in the prior art cannot simultaneously cover cross-day trends and same-slice coupling, resulting in insufficient generalization.

[0022] (4) This invention constructs a drift adjustment criterion by observing the actual load, predicted load and historical resonance records within the observation window and performs segmented correction and backup curve replacement, thereby achieving the effect of controlled output deviation and rollback of abnormal segments, effectively solving the problem of continuous distortion in local segments caused by the expansion of prediction error on the time axis in the prior art.

[0023] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0024] Figure 1 This is a flowchart of the virtual power plant load forecasting method based on machine learning according to the present invention.

[0025] Figure 2 This is a structural diagram of the machine learning-based virtual power plant load forecasting system of the present invention;

[0026] Figure 3 This is a flowchart of the resonance correction triggering and feature update decision-making process of the present invention;

[0027] Figure 4 This is a time series comparison diagram of virtual power plant load prediction based on resonance correction and drift adjustment according to the present invention. Detailed Implementation

[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0029] Please see Figures 1-4 This invention provides a technical solution: a virtual power plant load forecasting method and system based on machine learning, comprising: S1, integrating multi-source load, electricity market and meteorological data, preprocessing them to generate a sequence of co-frequency feature vectors by time slices, storing them and constructing a virtual power plant forecasting database; S2, performing time-series correlation analysis on the co-frequency feature vector data of adjacent time slices, and performing feature difference reconstruction, previous value preservation and jump point sample isolation and freezing operations based on the correlation analysis results; S3, constructing a load forecasting model based on training samples fused with multi-layer feature expressions and outputting time-slice-level predicted load values; S4, constructing a drift adjustment criterion by using the actual load, predicted load and historical resonance records within the observation window, performing segmented correction and backup curve replacement based on the drift adjustment results and completing archiving marking; S5, conducting window deviation evolution evaluation based on the predicted load sequence, actual load sequence and drift adjustment sequence, completing output interval stability determination, model branch arbitration and version rollback based on the deviation evolution results, and promoting the return training closed loop of drift samples.

[0030] Specifically, the measures for integrating multi-source load, electricity market, and meteorological data, preprocessing them, generating a sequence of in-frequency feature vectors by time slices, storing them, and then constructing a virtual power plant forecast database are as follows: Collecting load measurement data: Obtaining active power data, reactive power data, and cumulative electricity consumption values ​​through access point energy meters; obtaining key controllable load and distributed power output data through equipment-level power monitoring devices; binding each measurement value with the sampling time and recording the actual load value by time slices; and arranging them in chronological order to form an actual load value sequence; Collecting electricity market business data: Obtaining day-ahead clearing prices and real-time price forecasts through the trading platform interface; the real-time price forecast is returned by the trading platform and carried... With a forecast version identifier, the system records the day-ahead planned load curve through operation plan management and the available capacity estimate through capacity management. The available capacity estimate is output by the capacity management process and carries a capacity version identifier. Time information is appended to electricity price records, plan records, and capacity records and synchronously written to the data source version. Meteorological data is collected: temperature, humidity, wind speed, and radiation intensity data are obtained through meteorological acquisition units. The system also collects observation window duration configuration values: the drift observation window duration field is read from the parameter configuration table to obtain the configuration effective time and version identifier, and the observation window duration configuration value and version identifier are bound and written to the observation window parameter record. Finally, the system collects time slice granular duration: through time... The time slice granularity duration field is read from the slice partitioning rule table to obtain the partitioning rule version identifier, and the time slice granularity duration and rule version identifier are bound and written into the time slice parameter record. Outlier removal and missing segment completion are performed on the collected load measurement data, electricity market business data, and meteorological data. Missing segment completion uses linear interpolation between adjacent sampling times and marks the interpolation interval, which is written into the interpolation mark field. The interpolated segment is taken as the interpolated segment, and the non-interpolated segment is taken as the original segment. The maximum and minimum value normalization method is used to scale the load, electricity price, planning, capacity, and meteorological related numerical fields to a unified interval to unify the value range. The normalization caliber is statistically analyzed by field during the training phase. The minimum and maximum values ​​are recorded in the normalized parameter record and bound to the data source version. During the inference phase, normalized parameter records with the same data source version are matched according to time slices and scaling is performed. Under a unified time granularity, the normalized meteorological data, day-ahead plans, electricity price forecasts, and available capacity are concatenated in a fixed field order to form a frequency-coordinated feature vector. The fixed field order is as follows: temperature, humidity, wind speed, radiation intensity, day-ahead planned load curve, day-ahead clearing price, real-time electricity price forecast, and available capacity estimate. The time slice identifier, data source version, and key field value range are appended. The feature values ​​and actual load values ​​after anomaly handling and normalization are stored to construct a virtual power plant forecast database.

[0031] In this implementation scheme, load measurement data, electricity market business data, and meteorological data are collected and aligned at a unified time granularity, anomaly removal is performed, and missing segments are filled in. An interpolation marker field is used to retain traceable differences between the interpolated segments and the original segments. Normalized parameter records generated during the training phase and bound to the data source version are used to support consistent scaling in the inference phase. At the same time, the fixed field order of the same-frequency feature vector is defined and time slice identifiers and data source version information are added. This forms a time slice-level same-frequency feature vector sequence and actual load value sequence that can be directly used for subsequent same-frequency correlation analysis and load forecasting modeling, thereby improving the reproducibility, consistency, and version playback capability of the input link.

[0032] Specifically, the measures for time-series correlation analysis using the same-frequency feature vector data of adjacent time slots are as follows: Obtain the same-frequency feature vector of the i-th time slot and the same-frequency feature vector of the i-th minus one time slot. The same-frequency feature vector is formed by concatenating the meteorological forecast field, day-ahead plan field, electricity price forecast field, and available capacity field in a fixed field order after anomaly removal and normalization at a unified time granularity. This is used to characterize the synchronous fluctuation state of multi-source driving inputs in the corresponding time slot under the same calendar and scheduling rules. The mean of the two same-frequency feature vectors is calculated for each field dimension, and the mean-reduced vector components are obtained. During the mean-reduction process, the time slot identifier and data source version information are retained to ensure that subsequent correlation analysis can trace back to the specific source and value range. The mean-reduced vector components of the two time slots are multiplied field-by-field and summed to obtain the covariance numerator. The covariance numerator is used to quantify the linkage strength of the two time slots on the same field. The mean-reduced vector components of the i-th time slot are squared and summed to obtain the covariance numerator. The standard deviation term of the i-th time slice vector is obtained by squaring the vector, which reflects the dispersion amplitude of the same-frequency feature vector in the current time slice across various field dimensions. The standard deviation term of the i-th minus-one time slice vector is obtained by squaring the mean vector component, summing the components, and taking the square root, which reflects the dispersion amplitude of the same-frequency feature vector in the previous time slice. The vector correlation coefficient is obtained by dividing the covariance numerator by the product of the two standard deviations, which compresses the overall synchronization degree of the two same-frequency feature vectors across multiple field dimensions into a single scalar. The correlation square term is obtained by squaring the vector correlation coefficient, which enhances the sensitivity to strong resonance cases where the synchronization amplitude is close to one. The correlation square term is added to one to obtain the denominator term and the reciprocal is taken to obtain the attenuation term, which transforms the correlation square term into a suppression factor in numerical terms. The resonance correction value of the i-th time slice is obtained by subtracting the attenuation term from one. The closer the resonance correction value is to one, the closer the same-frequency feature vectors in adjacent time slices are to a strong resonance state, providing a quantitative basis for subsequent triggering of feature difference reconstruction, previous value preservation, and isolation and freezing of jump point samples.

[0033] The specific formula for calculating the resonance correction value is as follows:

[0034] ;

[0035] In the formula, Represents the resonance correction value, used for quantifying characteristics. and its previous moment characteristics The impact of correlation on model learning; Indicates the first The same frequency feature vector of each time slice is obtained by concatenating the meteorological forecast feature, the day-ahead plan feature, the electricity price expectation feature, and the available capacity feature in a fixed field order. Indicates the first The same frequency eigenvector of a time slice represents the same eigenvalue in the previous time step; Represents the vector correlation coefficient at the current time. and the previous moment Pearson correlation coefficient between features.

[0036] In this implementation scheme, by performing mean, covariance, and standard deviation operations on the co-frequency feature vectors of adjacent time slices and constructing a vector correlation coefficient, the synchronization intensity of multiple inputs such as weather forecasts, day-ahead plans, electricity price forecasts, and available capacity on the time axis is compressed into a single resonance correction value. This achieves a quantitative characterization of whether adjacent time slices are in a resonance state, providing a criterion basis for subsequent feature difference reconstruction, previous value preservation, and jump point sample isolation and freezing in resonance triggering scenarios. Thus, the pre-identification and fine-grained quantification of multi-source synchronous resonance risk are completed before the features enter the load prediction model for learning.

[0037] Specifically, the specific measures for performing feature difference reconstruction, previous value preservation and jump point sample isolation and freezing operations based on the correlation analysis results are as follows: by comparing the resonance correction value and the correction threshold in real time, such as... Figure 3This is a flowchart of the resonance correction triggering and feature update decision-making process in this embodiment. When the resonance correction value is less than the correction threshold, the original feature chain is used, and the feature sequence is written simultaneously, recording the time slice, data source version, and key feature value range. The training side continues to use conventional sliding window samples without additional removal. When the resonance correction value is greater than or equal to the correction threshold, the trigger feature is switched from the original value to the differential expression of adjacent time slices, and the historical residual expression of the same time period is generated synchronously to replace the original value in the model, so as to weaken the synchronization of multi-source features at the same time. In this case, the previous value is maintained for the four types of co-frequency items: weather forecast, day-ahead plan, electricity price expectation, and available capacity. Only historical lagging versions are allowed to enter inference for n consecutive time slices. The specific number of n time slices is configured by the business parameters and determined according to the average duration of the resonance event's impact. It is recommended to set the initial value to 5-10 time slices, which can be fine-tuned according to the actual effect. During the period when the historical lagging version is enabled, only the data within the time period from tn to t-1 is taken as the input of co-frequency items, and the co-frequency features of the current time period are masked to avoid over-synchronization. The window samples containing the trigger point are added to the jump point set and removed from the main training set. The criterion for freezing parameter updates is that when the proportion of samples in the jump point set reaches 1% of the total number of samples, gradient updates are paused during training. Parameter updates are resumed only after a new round of replay verification shows that the resonance correction value has recovered to below the correction threshold. This trigger is written into the resonance event table and drives the retraining task to be enqueued. The training data only selects a period of time before and after the trigger. It is recommended that the backtracking interval be 3-5 times the length of n segments to facilitate the location and resolution of resonance effects. The feature sequence is updated only after the replay verification shows that the resonance correction value is less than the correction threshold.

[0038] This implementation scheme achieves dynamic identification and response to the risk of synchronous resonance of multi-source features. By introducing a correction threshold as a criterion, when the resonance between features is weak, the original feature chain and training mechanism are maintained to ensure the sensitivity of the load forecasting model to changes in real features. When the resonance correction value is detected to exceed the threshold, the scheme automatically switches to desynchronized features such as differential expression and historical residual expression to effectively suppress the interference of multi-source synchronous input on the learning of the load forecasting model. At the same time, the scheme adopts the previous value preservation and historical lag strategy to further isolate the influence of co-frequency terms. Through jump point set management and parameter update freezing mechanism, the scheme prevents data in the resonance-affected interval from participating in the training of the load forecasting model. Combined with the resonance event table and the targeted retraining process, the scheme continuously tracks and eliminates potential resonance errors, thereby enhancing the robustness and generalization ability of the load forecasting model in complex scenarios.

[0039] Specifically, the measures for constructing a load prediction model based on training samples that integrate multi-layer feature representations and outputting time-slice-level predicted load values ​​are as follows: The feature sequence is input as a feature vector into a sliding window. Training samples with time-series-dependent features are generated by segmenting the window according to the sliding window length and sliding step size. The feature sequence includes adjacent time-slice difference representation features, historical residual representation features from the same time period, field previous value preservation features, and resonance correction values. The sliding window length is 8 to 96 time slices, and the sliding step size is 1 to 4 time slices. The training samples are divided into training sets according to time order. The validation set and a long short-term memory network (LSTM) and gated recurrent unit network (GRU) were used to learn the long-term dependence and trend of the workload on intraday and cross-day scales. The number of network layers ranged from 1 to 4, the number of hidden units from 32 to 512, the dropout rate from 0 to 30%, the learning rate from 0.0001 to 0.01, the batch size from 32 to 1024, and the number of iterations from 20 to 200. The stopping criterion was triggered by the validation set loss not decreasing for several consecutive iterations. Extreme gradient boosting trees and lightweight gradient boosting machines were used to characterize the nonlinear coupling relationship between multi-source features within the same time slice. The number of trees was set to 100. Up to 2000, the tree depth was set to 3 to 12, the number of leaves to 31 to 512, the sampling ratio to 50% to 100%, and the learning rate to 0.005 to 0.02. A transformer network was used to temporally encode multi-source heterogeneous feature sequences, and attention allocation was used to reduce the interference of co-frequency resonant related input components on the output. The number of encoding layers was set to 2 to 8, the number of attention heads to 2 to 16, the representation dimension to 64 to 512, and the feedforward layer dimension to be 2 to 8 times the representation dimension. A load prediction model was constructed based on the training samples, and supervised learning was used to jointly train the load prediction model during the training phase. The test model sets up multiple task output heads to synchronously output device-level predicted load sequences, aggregate-level predicted load sequences, and multi-step predicted load sequences. Consistency constraints are used to ensure the coordination of different levels of output in terms of form and amplitude. During the verification phase, the error index and the degree of violation of consistency constraints are evaluated in parallel on the verification set, and parameter combinations and model versions are selected. During the operation phase, the latest feature sequence fragment is taken according to the same sliding window caliber and input into the load prediction model to obtain time-slice-level predicted load values, which are written into the predicted load value sequence. At the same time, the model version identifier and data source version are recorded for playback comparison.

[0040] In this implementation scheme, feature sequences containing differential representation features of adjacent time slices, historical residual representation features of the same time period, field previous value preservation features, and resonance correction values ​​are transformed into sliding window training samples. A combination of long short-term memory networks and gated recurrent unit networks, extreme gradient boosting trees and lightweight gradient boosting machines, and a transformer network are used to complete time-series dependency learning, characterization of nonlinear coupling within the same time slice, and suppression of multi-source heterogeneous coding. Then, a multi-task output head is used to synchronously form device-level predicted load sequences, aggregate-level predicted load sequences, and multi-step predicted load sequences, and consistency constraints are used to suppress hierarchical output deviations. Finally, during the operation phase, a time-slice-level predicted load value sequence traceable to the time slice identifier and data source version is stably produced, providing continuous input for subsequent drift adjustment criteria and window bias evolution evaluation.

[0041] Specifically, the measures for constructing a drift adjustment criterion using the actual load, predicted load, and historical resonance records within the observation window are as follows: Obtain the actual load value, predicted load value, observation window duration configuration value, and time slice granularity duration at time t. Divide the observation window duration by the time slice granularity duration to obtain the number of time slices contained in the observation window. Round down the number of time slices contained in the observation window and limit it to no less than one to obtain the backtracking time length. When the number of available time slices before time t is insufficient to obtain the backtracking time length, adjust the backtracking starting point to the first time slice index in the actual load sequence. Construct a drift adjustment criterion using the actual load value, predicted load, and backtracking time length. Take the absolute value of the actual load value to obtain the actual load. The absolute value term is obtained by subtracting the predicted load value from the actual load value. When the absolute value term of the actual load is not zero, the offset difference term is divided by the absolute value term of the actual load to obtain the normalized offset term. When the absolute value term of the actual load is zero, the normalized offset term is directly set to zero and a zero load mark is added to the drift adjustment record to avoid division by zero anomalies. The resonance correction value sequence of each time slice in the interval from time t minus the backtracking time length to time t is obtained. The resonance correction value sequence is accumulated to obtain the resonance cumulative term. The normalized offset term is multiplied by the resonance cumulative term to finally obtain the drift adjustment value at time t. This value is used in subsequent steps to characterize the offset intensity and resonance effect superposition between the predicted curve and the actual load in the current observation window.

[0042] The specific formula for calculating the drift adjustment value is as follows:

[0043] ;

[0044] In the formula, The drift adjustment value at time t is used to characterize the degree of deviation between the predicted load and the actual load. The actual load value at time t is used to reflect the real operating power consumption level; This represents the predicted load value at time t, which is the output record given by the load prediction model at that time. Indicates from time slice t The resonance correction value sequence of each time slice within the interval from T to time slice t is used to comprehensively consider the influence of historical resonance during the deviation correction process; T represents the backtracking time length used for drift correction, which is determined by converting the observation window duration configured on the business side into the number of time slices.

[0045] In this embodiment, the actual load at time step one is 85.42, the predicted load is 82.15, the resonance correction is 0.82, the cumulative resonance value is 3.05, and the drift adjustment is +0.074, resulting in an adjusted predicted load of 87.66. The actual load at time step two is 68.73, the predicted load is 73.24, the resonance correction is 0.65, the cumulative resonance value is 2.41, and the drift adjustment is -0.164, resulting in an adjusted predicted load of 66.73. The actual load at time step three is 92.56, the predicted load is 89.83, and the resonance correction is 0.45. The cumulative resonance value is 1.89, the drift adjustment value is +0.056, and the calculated adjusted predicted load value is 93.15. The actual load at time step four is 78.92, the predicted load value is 75.68, the resonance correction value is 0.88, the cumulative resonance value is 3.12, the drift adjustment value is +0.129, and the calculated adjusted predicted load value is 83.87. The actual load at time step five is 54.38, the predicted load value is 57.91, the resonance correction value is 0.32, the cumulative resonance value is 1.45, the drift adjustment value is -0.093, and the calculated adjusted predicted load value is 53.92.

[0046] Table 1 Data Table of Virtual Power Plant Load Prediction Resonance Drift Correction Implementation Example

[0047]

[0048] like Figure 4 As shown in Table 1, this is a time series comparison diagram of virtual power plant load forecasting based on resonance correction and drift adjustment provided in the embodiments of this application. Figure 4It can be seen that the load forecast values ​​at different time steps are closer to the actual load values ​​after resonance correction and drift adjustment. When the resonance correction value for time step four is 0.88, the drift adjustment value reaches +0.129, and the adjusted forecast load value increases from 75.68 to 83.87, significantly reducing the deviation from the actual load of 78.92. Conversely, when the resonance correction value for time step two is 0.65 and the drift adjustment value is -0.164, the adjusted forecast load value decreases from 73.24 to 66.73, which is closer to the actual load of 68.73. This indicates that the magnitude of the resonance correction value is positively correlated with the adjustment range of the forecast deviation; a higher resonance correction value often corresponds to a larger drift adjustment requirement. Furthermore, the resonance correction value for time step five is relatively low at 0.32, and the drift adjustment value is only -0.093. After adjustment, the forecast load value decreases from 57.91 to 53.92, which is basically consistent with the actual load of 54.38. This phenomenon demonstrates that the resonance correction mechanism can effectively identify prediction deviations and quantify the adjustment magnitude, making the load forecast values ​​closer to the actual operating level. Therefore, the accuracy of load forecasting not only depends on the output of the original load forecasting model but also benefits from the synergistic effect of resonance-triggered feature rewriting and drift correction mechanisms. By calculating resonance correction values ​​and drift adjustment values ​​in real time, prediction deviations can be dynamically corrected, significantly improving the accuracy and robustness of virtual power plant load forecasting. This principle provides a basis for optimizing virtual power plant load forecasting systems, allowing for dynamic adjustment of load forecasting model parameters based on real-time monitored resonance characteristics. This ensures accurate load forecasts under different operating conditions and provides reliable data support for electricity market transactions and dispatch decisions.

[0049] In this implementation scheme, by combining the actual load value, predicted load value, observation window duration, and time slice granularity at time t, and introducing the backtracking time length and historical resonance correction value sequence, the normalized offset at the current time is coupled with the cumulative resonance intensity over a period of time to form a drift adjustment criterion that can simultaneously reflect the magnitude of the prediction deviation and the influence of the same-frequency resonance background. Thus, the comprehensive drift degree of the current prediction output deviating from the actual load is centrally characterized in a single drift adjustment value, providing a unified quantitative basis for subsequent segmented correction, backup curve replacement, and drift sample labeling.

[0050] Specifically, the measures for performing segmented correction and backup curve replacement and completing archiving marking based on the drift adjustment results are as follows: By comparing the drift adjustment value and the drift threshold in real time, when the absolute value of the drift adjustment value is less than the drift threshold, the predicted load result directly enters the error drift detection calculation. At the same time, the drift adjustment value, the predicted load value, and the actual load are archived in the virtual power plant prediction database according to time slices for playback to locate the drift start point and duration, which is convenient for subsequent backtracking analysis. If the absolute value of the drift adjustment is greater than or equal to the drift threshold, and the drift adjustment is positive, indicating that the predicted baseline is too small and the actual load is too large, then the absolute value of the actual load in the previous time slot is multiplied by the drift adjustment to obtain the correction amount, which is added to the current predicted load as the output correction. The previous values ​​are maintained for the day-ahead planning field and the electricity price expectation field, and the difference expression and the historical residual expression for the same period continue to be used as input features in the load prediction model. At this time, the synchronization jump check is evaluated by comparing the absolute difference sequences of adjacent time slots within the trigger interval of the predicted load sequence. When the maximum value and median of the corrected absolute difference sequence both decrease, it is determined that the synchronization jump has been effectively suppressed. In parallel, in the post-processing stage, linear regression is performed based on the time slot order within the current observation window and the predicted load value before correction. The slope and intercept are calculated, and a regression estimate sequence is generated according to the time slot index, which is used as a slope extrapolation backup curve. If the deviation between the corrected predicted load and the backup curve is greater than the deviation threshold, the corresponding time slot output is replaced with the backup curve, and the trigger interval is written into the drift sample list. If the drift adjustment value is not positive, indicating that the predicted baseline is too high and the actual load is too low, the corresponding time period is included in the negative drift sample pool. The correction amount is obtained by multiplying the absolute value of the actual load of the previous time slice by the absolute value of the drift adjustment value, and the day-ahead planning field and the electricity price expectation field are continued to be included in the model to reduce the impact of short-term meteorological deviations raising the baseline. In parallel, a median backup curve for the same time period is generated. Specifically, in the post-processing stage, the actual load records corresponding one-to-one with the current observation window time position are retrieved from historical multiple days. The median of these samples is calculated for each time slice, and the median sequence is arranged by time slice to form the median backup curve for the same time period. If the deviation between the corrected predicted load and the backup curve is greater than the deviation threshold, the corresponding time slice output is replaced with the backup curve, and the trigger interval is written into the drift sample list.

[0051] This implementation scheme dynamically determines the degree of deviation between predicted and actual loads by real-time monitoring of the relationship between drift adjustment values ​​and drift thresholds, enabling targeted corrections for different drift scenarios. When the drift adjustment value is within the drift threshold range, the prediction results are archived and backtracked in a timely manner, improving the traceability of anomaly location. When the drift adjustment value exceeds the drift threshold, the prediction results are corrected by linking historical loads with the current deviation. Synchronous jumps are suppressed through differential and residual feature inputs and previous value preservation. Combined with double verification using slope extrapolation backup curves and median backup curves, abnormal intervals that might be missed by a single method are effectively avoided, ensuring the stability and reliability of the prediction output. Simultaneously, key interval samples are incorporated into the virtual power plant prediction database, providing rich data support for subsequent load prediction model optimization and drift pattern analysis.

[0052] Specifically, the specific measures for evaluating window deviation evolution based on the predicted load sequence, actual load sequence, and drift adjustment sequence are as follows: Obtain the predicted load value sequence, actual load value sequence, and drift adjustment value sequence for each time slot; obtain the error monitoring window length corresponding to time t and determine the start and end time slot range of the window; use the sequence slices within the start and end time slot range of the window as evaluation input; conduct deviation evolution evaluation for each time slot within the window: calculate the absolute error between the predicted load value and the actual load value to obtain the absolute error term, and bind the absolute error term with the corresponding time slot identifier to locate the time slot where the error peak occurs; add the predicted load value and the actual load value of the same time slot to obtain the sum term, and write the time slot when the sum term is zero. An anomaly list is used to avoid denominator anomalies; the absolute error term is divided by the sum term to obtain the relative error term, making the error measurement comparable across different load amplitude ranges; the drift adjustment value of the same time slice is subtracted from the relative error term to obtain the deviation difference term, so that the deviation evolution assessment reflects both error changes and drift adjustment residues; the absolute value of the deviation difference term is taken to obtain the absolute deviation term; the absolute deviation terms of all time slices within the window are summed to obtain the cumulative deviation term, and the data source version corresponding to the cumulative deviation term is recorded to support cross-version comparison; the cumulative deviation term is divided by the error monitoring window length to obtain the mean term, and finally the error drift detection value at time t is obtained and written into the error assessment record for subsequent error threshold comparison and drift sample backflow training closed-loop triggering.

[0053] The specific formula for calculating the error drift detection value is as follows:

[0054] ;

[0055] In the formula, The error drift detection value at time t is used to characterize the change in prediction error within the monitoring window; Indicates from time slice t The sequence of predicted load values ​​for each time slot within the interval from N to time slot t is a continuous output record of the load prediction model within the monitoring window. This represents the sequence of actual load values ​​for the corresponding time slice, used for comparison with... Perform point-by-point error comparison; N represents the number of time slices, reflecting the time span covered by error statistics and the degree of accumulation of historical information by drift detection.

[0056] In this implementation scheme, the predicted load value sequence, the actual load value sequence, and the drift adjustment value sequence are aggregated within a time slice limited by the error monitoring window length. The deviation difference is formed by calculating the relative error on a time slice basis and deducting the drift adjustment residue. The absolute values ​​of the deviations within the window are then accumulated and averaged to obtain the time-scale error drift detection value. This unifies the short-term error spikes, persistent deviations, and residual effects after drift correction into comparable window indicators. At the same time, the time slice identifier, the anomaly list, and the data source version information are retained to support the subsequent drift segment location and sample return training closed loop.

[0057] Specifically, the measures for completing the output interval stability determination, model branch arbitration, and version rollback based on the deviation evolution results, and promoting the return of drift samples to the training closed loop are as follows: By comparing the error drift detection value and the error threshold in real time, when the error drift detection value is less than the error threshold, the monitoring window is determined to be in the error stable zone. The predicted load after drift correction is retained as an effective output and continuously published. The corresponding time period is marked as the error stable zone, and the prediction results, along with the actual load value and drift adjustment value, are archived to the virtual power plant prediction database by time slice. When the error drift detection value is greater than or equal to the error threshold, the monitoring window is determined to be in the error drift zone. The data samples of the corresponding time window are labeled with drift and written into the drift sample pool. In the subsequent load prediction model training stage, the proportion of drift samples is increased from the basic proportion to twice the basic proportion to enhance the load prediction model's fitting ability to drift scenarios. At the same time, the model branch arbitration process is triggered to determine the length of the drift sample. The error drift detection values ​​of the time memory network gated recurrent unit branch, extreme gradient boosting tree branch, and transformer network branch within the most recent complete evaluation window are averaged over time slices, and the branch output with the smallest average value is selected as the temporary main output. If the average values ​​of the three branches are all greater than the convergence threshold, the historical windows marked as error stable regions are sorted from the nearest to the furthest time from the end time of the current time, and the historical load forecasting model version archived in the first window of the sort is selected as the rollback version output. At the same time, a drift sample list containing time range and dominant feature distribution information is generated and a load forecasting model update task application is submitted. The drift samples are centrally replayed in subsequent training. The time slices in the error drift region are filtered in descending order of feature distribution difference to obtain the feature set, forming a drift feature list and distribution change summary, which are archived in the virtual power plant forecasting database for subsequent load forecasting model version replay comparison and to complete the drift sample backflow training closed loop.

[0058] In this implementation scheme, the monitoring period is divided into an error stability zone and an error drift zone by comparing the error drift detection value with the error threshold. In the stability zone, the predicted load after drift correction is retained and finely archived. In the error drift zone, the drift sample weighted extraction, load prediction model branch arbitration output and historical version rollback are uniformly triggered. At the same time, the drift sample list and drift feature distribution summary are accumulated and fed back for training. Thus, when the prediction accuracy deviates continuously, the output channel, training data and load prediction model version can be coordinated and traceable.

[0059] Specifically, this embodiment provides a machine learning-based virtual power plant load forecasting system, applied to a machine learning-based virtual power plant load forecasting method. It includes a data access and preprocessing module for integrating multi-source load, electricity market, and meteorological data. This module collects load measurement data, including active power, reactive power, and cumulative electricity consumption obtained from access point electricity meters, and key controllable loads and distributed power output obtained from equipment-level power monitoring devices. It also combines day-ahead clearing prices, real-time price forecasts, planned load curves, and capacity estimates obtained from the trading platform interface, as well as temperature, humidity, wind speed, and radiation intensity obtained from meteorological data collection units. The system performs outlier removal and missing segment completion on all collected data, and uses a maximum / minimum value normalization method for data normalization. The data is then concatenated into a co-frequency feature vector at a unified time granularity according to a fixed field order and stored in the virtual power plant forecasting database. This provides time-consistent and traceable basic data for downstream modeling. The feature construction and enhancement module performs temporal correlation analysis using feature vector data from adjacent time slices with the same frequency. It identifies synchronous resonance risk in real time based on resonance correction values ​​and thresholds, and automatically switches feature paths according to the identification results. This includes performing feature difference reconstruction, pre-value preservation, and historical residual representation. For resonance trigger intervals, samples are assigned to a jump point set and parameter updates are frozen. Combined with a resonance event table-driven retraining process, it ensures the temporal consistency and anti-resonance capability of training samples and load prediction model parameters. The multi-source load prediction learning module, based on training samples that integrate multi-layer feature representations such as difference representation, residual representation, pre-value preservation, and resonance correction values, uses a joint modeling approach employing Long Short-Term Memory (LSTM) networks, gated recurrent unit (GRU) networks, extreme gradient boosting trees, lightweight gradient boosters, and transformer networks to achieve time-slice-level, multi-level, and multi-step load output prediction. Supervised learning and consistency constraints improve prediction accuracy and multi-dimensional robustness. The deviation correction module calculates drift adjustment values ​​based on actual load, predicted load, and historical resonance records within the observation window, achieving segmented response. When necessary, it constructs slope extrapolation backup curves and median backup curves based on historical data for prediction correction, and archives and marks results for key intervals, enhancing the adaptive adjustment capability of the prediction output to anomalies such as strategy switching and data drift. The result evaluation and feedback module conducts window deviation evolution evaluation based on the predicted load sequence, actual load sequence, and drift adjustment sequence. It manages samples by partitioning them using error drift detection values ​​and error thresholds, dynamically adjusts the load prediction model training sample extraction strategy, triggers model branch arbitration, output interval stability determination, and load prediction model version rollback, and automatically archives drift sample lists and feature distribution change summaries, promoting a drift sample backflow training closed loop and continuously improving the robustness and self-learning capability of the virtual power plant load prediction system.

[0060] This implementation plan achieves full-process control from multi-source data acquisition, feature synchronization and construction, load forecasting modeling, dynamic deviation correction to intelligent result evaluation through multi-module collaboration. It can efficiently integrate multi-dimensional data from load, electricity market, and meteorology, dynamically identify and segmentally correct complex interferences such as time-series resonance and feature drift, and improve the timeliness and accuracy of output by using multi-layer feature representation and load forecasting model joint prediction. At the same time, relying on multi-dimensional error detection and branch arbitration mechanism, it promptly archives and recycles abnormal section samples, ensuring the adaptability and self-evolution capability of the forecasting system under multiple scenarios such as strategy changes and data anomalies. Thus, it provides a solid data and load forecasting model foundation for the refined management of virtual power plants and intelligent load forecasting.

[0061] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0062] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims

1. A virtual power plant load forecasting method based on machine learning, characterized in that, Includes the following steps: S1 integrates multi-source load, electricity market and meteorological data, preprocesses them to generate a sequence of co-frequency feature vectors according to time slices, and stores them to build a virtual power plant prediction database; S2 performs time-series correlation analysis using the same frequency feature vector data of adjacent time slices, and performs feature difference reconstruction, previous value preservation and jump point sample isolation and freezing operations based on the correlation analysis results; S3, constructs a load prediction model based on training samples that fuse multi-layer feature representations and outputs time-slice level predicted load values; S4 constructs drift adjustment criteria by using the actual load, predicted load and historical resonance records within the observation window, performs segmented correction and backup curve replacement based on the drift adjustment results and completes the archiving mark; S5 performs window deviation evolution evaluation based on predicted load sequence, actual load sequence and drift adjustment sequence, and completes output interval stability determination, model branch arbitration and version rollback based on deviation evolution results, and promotes drift sample backflow training closed loop.

2. The virtual power plant load forecasting method based on machine learning according to claim 1, characterized in that: The specific measures for preprocessing the integrated multi-source load, electricity market, and meteorological data to generate a sequence of co-frequency feature vectors according to time slices, and storing this sequence to construct a virtual power plant forecasting database are as follows: Load measurement data collection: Active power data, reactive power data, and cumulative electricity consumption are obtained through the energy meters at the access points. Data on key controllable loads and distributed power generation output are obtained through equipment-level power monitoring devices. After binding each measurement value with the sampling time, the actual load value is recorded according to time slices and arranged in chronological order to form an actual load value sequence. Electricity market business data collection: Day-ahead clearing prices and real-time price forecasts are obtained through the trading platform interface. Day-ahead planned load curves are recorded through operation plan management. Available capacity estimates are recorded through capacity management. Time information is added to the price records, plan records, and capacity records. Meteorological data collection: Acquire temperature, humidity, wind speed, and radiation intensity data through meteorological data acquisition units; Collect observation window duration configuration value: Read the drift observation window duration field through the parameter configuration table, obtain the configuration effective time and version identifier, and bind the observation window duration configuration value and version identifier to the observation window parameter record; Collect time slice granular duration: Read the time slice granular duration field through the time slice division rule table, obtain the division rule version identifier, and bind the time slice granular duration and rule version identifier to the time slice parameter record; Outlier removal and missing segment completion are performed on the collected load measurement data, electricity market business data and meteorological data. Missing segment completion adopts the linear interpolation method of adjacent sampling time and the interpolation interval is marked. The maximum and minimum value normalization method is used to scale the load, electricity price, plan, capacity and meteorological related numerical fields to a unified interval to unify the value range. Under the unified time granularity, the normalized meteorological data, day-ahead plan, electricity price forecast and available capacity are concatenated in a fixed field order to form a synchronous feature vector, and the recording time slice identifier, data source version and key field value range are added. The characteristic values ​​and actual load values ​​after anomaly handling and normalization are stored to construct a virtual power plant prediction database.

3. The virtual power plant load forecasting method based on machine learning according to claim 1, characterized in that: The specific measures for performing time series correlation analysis using the same-frequency feature vector data of adjacent time slices are as follows: Obtain the same-frequency feature vector of the i-th time slice and the same-frequency feature vector of the i-th minus one time slice; calculate the mean of the two same-frequency feature vectors in each field dimension and obtain the mean-removed vector components; perform field-by-field product on the two mean-removed vector components and sum them to obtain the covariance numerator; square the mean-removed vector components of the i-th time slice, sum them and take the square root to obtain the standard deviation of the vector of the i-th time slice; The standard deviation term of the vector in the i-th minus one time slice is obtained by squaring the mean vector components, summing them, and taking the square root. The vector correlation coefficient is obtained by dividing the numerator of the covariance term by the product of the two standard deviations. The correlation coefficient is squared to obtain the correlation square term. The correlation square term is added to a factor to obtain the denominator term, and the reciprocal is taken to obtain the attenuation term. The resonance correction value of the i-th time slice is obtained by subtracting the attenuation term from the factor.

4. The virtual power plant load forecasting method based on machine learning according to claim 1, characterized in that: The specific measures for performing feature difference reconstruction, previous value preservation and jump point sample isolation and freezing operations based on the correlation analysis results are as follows: By comparing the resonance correction value and the correction threshold in real time, when the resonance correction value is less than the correction threshold, the original feature chain is used and the feature sequence is written at the same time. The time slice, data source version, and key feature value range are recorded. The training side continues to use conventional sliding window samples without additional removal. When the resonance correction value is greater than or equal to the correction threshold, the trigger feature is switched from its original value to the differential expression of adjacent time slices, and the historical residual expression of the same period is generated synchronously to replace the original value in the model, weakening the synchronicity of multi-source features at the same time. For the four types of synchronous items, weather forecast, day-ahead plan, electricity price expectation, and available capacity, previous value preservation is enabled, and only historical lagging versions are allowed to enter the inference for n consecutive time slices. The window samples containing the trigger point are included in the jump point set and removed from the main training set, and the parameter update is frozen. The trigger is written into the resonance event table and drives the retraining task to be enqueued. The training data is only selected for a period of time before and after the trigger. The feature sequence is updated after the replay verification shows that the resonance correction value is less than the correction threshold.

5. The virtual power plant load forecasting method based on machine learning according to claim 1, characterized in that: The specific measures for constructing a load prediction model based on training samples fused with multi-layer feature representations and outputting time-slice-level predicted load values ​​are as follows: The feature sequence is used as the feature vector input sliding window to generate training samples with time-series dependent features. The feature sequence includes the difference expression features of adjacent time slices, the historical residual expression features of the same time period, the field previous value preservation features, and the resonance correction value. The long short-term memory network and the gated recurrent unit network are used to learn the long-term dependence and trend of the load on the intraday and cross-day scales. The extreme gradient boosting tree and the lightweight gradient boosting machine are used to characterize the nonlinear coupling relationship between multi-source features in the same time slice. The transformer network is used to perform time-series encoding of multi-source heterogeneous feature sequences, and attention allocation is used to reduce the interference of co-frequency resonance related input components on the output. A load prediction model is constructed based on training samples. During the training phase, supervised learning is used to jointly train the load prediction model. Multiple task output heads are set to synchronously output device-level predicted load sequences, aggregate-level predicted load sequences, and multi-step predicted load sequences. Consistency constraints are used to ensure the coordination of different levels of output in terms of form and amplitude. During the operation phase, the latest feature sequence is input into the load prediction model to obtain time-slice-level predicted load values ​​and written into the predicted load value sequence.

6. The virtual power plant load forecasting method based on machine learning according to claim 1, characterized in that: The specific measures for constructing the drift adjustment criterion using the actual load, predicted load, and historical resonance records within the observation window are as follows: Obtain the actual load value, predicted load value, observation window duration configuration value, and time slice granularity duration at time t; divide the observation window duration by the time slice granularity duration to obtain the number of time slices contained in the observation window, and then round down to obtain the backtracking time length; A drift adjustment criterion is constructed by taking the absolute value of the actual load value, the predicted load value, and the backtracking time: the absolute value of the actual load value is obtained by taking the absolute value of the actual load value. Subtract the predicted load value from the actual load value to obtain the offset difference term; divide the offset difference term by the absolute value of the actual load to obtain the normalized offset term; obtain the resonance correction value sequence of each time slice in the interval from time t minus the backtracking time length to time t. The resonance correction value sequence is accumulated to obtain the resonance cumulative term; the normalized offset term is multiplied by the resonance cumulative term to finally obtain the drift adjustment value at time t.

7. The virtual power plant load forecasting method based on machine learning according to claim 1, characterized in that: The specific measures for performing segmented correction and backup curve replacement based on the drift adjustment results and completing the archiving marking are as follows: By comparing the drift adjustment value and the drift threshold in real time, when the absolute value of the drift adjustment value is less than the drift threshold, the predicted load result is directly entered into the error drift detection calculation. At the same time, the drift adjustment value, the predicted load value, and the actual load are archived into the virtual power plant prediction database according to time slices for playback to locate the drift start point and duration. When the absolute value of the drift adjustment is greater than or equal to the drift threshold, and the drift adjustment is positive, it is determined that the predicted baseline is too small and the actual load is too large. The absolute value of the actual load in the previous time slot is multiplied by the drift adjustment to obtain the correction amount, which is then added to the current predicted load to perform output correction. The previous values ​​of the day-ahead planning field and the electricity price expectation field are maintained. The differential expression and the historical residual expression of the same period continue to be used as input features and fed into the load prediction model. Synchronous jump verification adopts the method of comparing the absolute difference sequence of the predicted load sequence in adjacent time slots within the trigger interval. When the maximum value and median of the corrected absolute difference sequence decrease, it is determined that the synchronous jump has been suppressed. In parallel, in the post-processing stage, a linear regression is performed based on the time slot order in the current observation window and the predicted load value before correction to obtain the slope and intercept. The regression estimate sequence is calculated according to the time slot index, and the regression estimate sequence is used as the slope extrapolation backup curve. If If the deviation between the corrected predicted load and the backup curve exceeds the deviation threshold, the corresponding time slot output is replaced with the backup curve, and the trigger interval is written into the drift sample list. If the drift adjustment value is not positive, it is determined that the predicted baseline is too large and the actual load is too small. The corresponding time period is included in the negative drift sample pool. The correction amount is obtained by multiplying the absolute value of the actual load of the previous time slot by the absolute value of the drift adjustment value, and the day-ahead planning field and the electricity price expectation field are continued to be included in the model to reduce the short-term meteorological deviation and raise the baseline. In parallel, the actual load records corresponding to the current observation window time position in the historical multi-day period are retrieved in the post-processing stage. The median of these samples is calculated in each time slot. The median sequence arranged by time slot is used as the median backup curve for the same time period. If the deviation between the corrected predicted load and the backup curve exceeds the deviation threshold, the corresponding time slot output is replaced with the backup curve, and the trigger interval is written into the drift sample list.

8. The virtual power plant load forecasting method based on machine learning according to claim 1, characterized in that: The specific measures for evaluating the evolution of window bias based on the predicted load sequence, the actual load sequence, and the drift adjustment sequence are as follows: Obtain the predicted load value sequence, actual load value sequence, and drift adjustment value sequence for each time slot; For each time slice within the window, a deviation evolution assessment is performed: the absolute error term is obtained by calculating the absolute error between the predicted load value and the actual load value; the sum term is obtained by adding the predicted load value and the actual load value for the same time slice; the relative error term is obtained by dividing the absolute error term by the sum term; the deviation difference term is obtained by subtracting the drift adjustment value for the same time slice from the relative error term; the absolute value of the deviation difference term is obtained by taking the absolute value of the deviation difference term; the deviation absolute value terms for all time slices within the window are accumulated to obtain the cumulative deviation term; the mean term is obtained by dividing the cumulative deviation term by the length of the error monitoring window, and finally, the error drift detection value at time t is obtained.

9. The virtual power plant load forecasting method based on machine learning according to claim 1, characterized in that: The specific measures for completing the output interval stability determination, model branch arbitration and version rollback based on the deviation evolution results, and promoting the closed loop of drift sample backflow training are as follows: By comparing the error drift detection value and the error threshold in real time, when the error drift detection value is less than the error threshold, the monitoring window is determined to be in the error stable zone. The predicted load after drift correction is retained as an effective output and continuously published. The corresponding time period is marked as the error stable zone. The prediction results, together with the actual load value and the drift adjustment value, are archived to the virtual power plant prediction database by time slice. When the error drift detection value is greater than or equal to the error threshold, the monitoring window is determined to be in the error drift zone. The data samples of the corresponding time window are labeled with drift and entered into the drift sample pool. The extraction ratio is increased to improve the identification and fitting ability of the load forecasting model. The model branch arbitration process is triggered: the error drift detection values ​​of the gated recurrent unit branch of the long short-term memory network, the extreme gradient boosting tree branch, and the converter network branch in the most recent evaluation window are counted respectively. The branch output with the smallest detection value is selected as the temporary main output. If the branch detection values ​​are all greater than the convergence threshold, the output of the historical load forecasting model version corresponding to the most recent stable sample segment is rolled back. At the same time, a drift sample list is generated and a load forecasting model update task application is submitted. The replay verification is performed until the error drift detection value falls back to less than the error threshold. The arbitration is then lifted and the main output version is restored. The main feature distribution of the drift segment is screened and sorted in descending order of feature distribution difference to obtain the feature set. The drift feature list and distribution change summary are output and archived in the virtual power plant forecasting database for subsequent version replay comparison to achieve a closed loop of reflow training.

10. A machine learning-based virtual power plant load forecasting system, employing the machine learning-based virtual power plant load forecasting method according to any one of claims 1-9, characterized in that, include: The data access and preprocessing module is used to integrate multi-source load, electricity market and meteorological data, preprocess them to generate the same frequency feature vector sequence according to time slices, and store them to build a virtual power plant prediction database; The feature construction and enhancement module is used to perform temporal correlation analysis using feature vector data of the same frequency in adjacent time slices, and to perform feature difference reconstruction, previous value preservation and jump point sample isolation and freezing operations based on the correlation analysis results. The multi-source load forecasting learning module is used to build a load forecasting model based on training samples that fuse multi-layer feature representations and output time-slice-level predicted load values. The deviation correction module is used to construct drift adjustment criteria by using the actual load, predicted load and historical resonance records within the observation window, and to perform segmented correction and backup curve replacement based on the drift adjustment results, and complete the archiving marking. The results evaluation and feedback module is used to evaluate the evolution of window bias based on the predicted load sequence, the actual load sequence, and the drift adjustment sequence. Based on the bias evolution results, it completes the output interval stability determination, model branch arbitration, and version rollback, and promotes the return of drift samples to the training closed loop.