Virtual power plant personalized load prediction method and system based on composite feature engineering

CN122697293APending Publication Date: 2026-09-04JIANGSU WOTAIRUI CHU NEW ENERGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610842428.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-11
Publication Date
2026-09-04

AI Technical Summary

Technical Problem

其一,原始负荷数据存在随机噪声与异常波动,单一特征下噪声易被放大,引发预测偏差,影响后续特征构建有效性

Benefits of technology

1.本发明通过在负荷预测流程的起始阶段引入中心对称滑动窗口中位数滤波机制,对虚拟电厂的原始负荷时间序列进行系统性数据预处理,从而有效抑制原始负荷数据中的随机噪声与异常波动。本发明利用前后对称的局部时间窗口构建稳定的局部负荷结构,并通过中位数替换方式消除极端数值对后续特征计算的干扰,使平滑负荷序列能够更加真实地反映用户用电行为变化趋势。相较于直接使用原始负荷数据进行建模的传统方法,本发明在特征构建前实现数据质量优化,从源头降低噪声放大效应,提高后续特征工程与模型训练的稳定性,从而显著提升负荷预测模型的整体精度与鲁棒性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122697293A_ABST
    Figure CN122697293A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of virtual power plant load prediction, and provides a virtual power plant individualized load prediction method and system based on composite feature engineering, which comprises the following steps: obtaining original load data, generating a smooth load sequence by using a center-symmetrical sliding window median filter and a local deviation judgment mechanism; constructing two-dimensional time period features, cross-day / cross-week lag correlation features and daily cumulative electricity consumption features, and generating cumulative growth rate features and trend period features; and inputting the multi-dimensional features into an integrated learning model to output load prediction values at each sampling time. Through systematic feature engineering, the present application effectively suppresses data noise, accurately depicts the periodicity of user electricity consumption, long-period correlation and intraday trend changes, solves the problem of insufficient prediction accuracy caused by single features in the prior art, significantly improves the accuracy and robustness of virtual power plant load prediction, and provides reliable data support for dispatching optimization and demand response.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of virtual power plant load forecasting technology, specifically relating to a personalized load forecasting method and system for virtual power plants based on composite feature engineering. Background Technology

[0002] With the development of new power systems, the proportion of distributed energy resources, energy storage systems, and adjustable loads in the power grid continues to increase, and virtual power plants (VPS) are gradually becoming an important technological form for realizing unified dispatch and coordinated control of distributed resources. VPS aggregates and manages dispersed generation units, energy storage devices, and adjustable loads on the user side through information and communication technologies, making it appear as a dispatchable whole power source at the dispatch level, thus participating in electricity market transactions and grid dispatch control. During the operation of VPS, load forecasting is a crucial foundation for achieving dispatch optimization, demand response management, and power balance control. High-precision load forecasting can provide VPS with reliable load change trend information, thereby supporting the formulation of energy storage charging and discharging strategies, the arrangement of distributed energy output, and the dispatch of demand response resources. Therefore, constructing load forecasting methods that can accurately characterize user electricity consumption behavior has become an important research direction in the fields of power system data analysis and energy management.

[0003] In existing technologies, to improve load forecasting accuracy, historical load data is typically trained using machine learning or ensemble learning models, and then combined with meteorological factors or other external variables for predictive analysis. A search revealed Chinese patent application number CN202310589935.7, which provides a power load forecasting method based on the SSA-Random Forest algorithm. This method first acquires and preprocesses the original dataset, then constructs a random forest load forecasting model optimized using a sparrow search algorithm. The model is trained using historical load data and meteorological data, and the trained model is used to predict future power load. The difference between the predicted results and the actual load is evaluated to continuously optimize the model's prediction performance. This method optimizes the random forest model parameters using a sparrow search algorithm, reducing errors caused by manual parameter settings. Simultaneously, by using meteorological data and historical load data as both inputs to the model, it improves the accuracy of power load forecasting to a certain extent, providing data support for distribution network planning and operation scheduling.

[0004] While the aforementioned technologies have improved load forecasting capabilities in terms of model parameter optimization and meteorological factor fusion, their feature engineering structure still primarily relies on baseline load data and external meteorological variables. They lack a systematic modeling mechanism for the periodic characteristics, cross-period correlation characteristics, and intraday trend characteristics within load time series, resulting in limitations in depicting user electricity consumption behavior patterns. These limitations are mainly reflected in the following aspects: First, the original load data contains random noise and abnormal fluctuations. Noise is easily amplified under a single feature, causing prediction bias and affecting the effectiveness of subsequent feature construction.

[0005] Secondly, the time characteristics were not periodically encoded, making it impossible to accurately express the periodic structure of intraday load changes and difficult to identify intraday electricity consumption cycle patterns.

[0006] Third, historical load characteristics only focus on recent data and lack long-term behavioral correlation modeling across days and weeks, making it impossible to capture stable electricity consumption cycle patterns.

[0007] Fourth, the model lacks an effective way to express the cumulative daily electricity consumption trend, making it difficult for it to perceive the direction and trend of load changes. Furthermore, models with single feature inputs have poor generalization ability, ultimately leading to insufficient stability and accuracy in load forecasting results, and failing to provide reliable load data support for tasks such as virtual power plant dispatch optimization. Summary of the Invention

[0008] The purpose of this invention is to overcome the existing defects and provide a virtual power plant personalized load forecasting method and system based on composite feature engineering. By integrating systematic feature engineering with machine learning models, the load forecasting model can be improved to comprehensively characterize cyclical patterns, historical correlations and trend changes.

[0009] To solve the above-mentioned technical problems, the present invention provides the following technical solution: The first objective of this invention is to provide a virtual power plant personalized load forecasting method based on composite feature engineering, comprising the following steps: The raw load data of the virtual power plant is obtained, and a median filtering operation is performed using a centrally symmetric sliding window. A local load deviation judgment mechanism is introduced to remove random noise and outliers and generate a smooth load sequence. The number of minutes at each sampling moment is encoded to convert the one-dimensional time value into a two-dimensional time period feature, and then combined with the load period coupling function to generate periodic modulation features. The feature extraction step size is defined based on the number of minutes at the sampling time, and cross-day and cross-week lag load features are extracted according to the extraction step size. The cycle correlation features are generated by combining the cycle difference function and the cycle correlation enhancement function. The cumulative electricity consumption characteristics for the day are constructed by accumulating the smoothed load sequence from 0:00 to the current sampling time over a natural day, and the cumulative growth rate characteristics and trend cycle characteristics are generated by using the cumulative growth rate function and the trend cycle coupling function. The smoothed load sequence, time period features, cross-day lag load features, cross-week lag load features, periodic correlation features, daily cumulative electricity consumption features, and cumulative growth rate features are dimensionally concatenated to construct a virtual power plant load prediction feature matrix. The feature matrix is ​​then input into a trained ensemble learning model to output the load prediction values ​​at each sampling time.

[0010] Furthermore, the median filtering operation performed using a centrally symmetric sliding window specifically includes: A centrally symmetric sliding window with a fixed length of 9 is constructed with the current sampling time as the center, and four adjacent sampling points before and after are selected to form the window load set; The load values ​​within the window load set are sorted, and the value at the middle position is selected as the filtered load value to replace the original data load value.

[0011] Furthermore, the local load deviation determination mechanism includes: Calculate the absolute difference between the original load at the current sampling point and the median in the window, and divide it by the average absolute deviation of the load values ​​within the window relative to the median to obtain the load deviation coefficient; When the load deviation coefficient is greater than the preset threshold, the current sampling point is determined to be an abnormal spike, and a median replacement operation is performed.

[0012] Furthermore, the conversion of one-dimensional time values ​​into two-dimensional time periodic features specifically includes: Perform a periodic mapping operation on the minute position of the sampling time in a day, and map the number of minutes to a circular space by constructing a time angle function to generate a time phase value; The time phase value is projected onto a two-dimensional periodic space, and periodic feature pairs are constructed using sine and cosine functions to generate sine periodic feature values ​​and cosine periodic feature values.

[0013] Furthermore, the extraction steps for the inter-day and inter-week lagged load characteristics include: Based on the position of the current sampling time in the smoothed load sequence, a complete daily electricity consumption cycle and a complete weekly cycle are traced back from the current sampling time in the historical smoothed load sequence. The cross-day load value and cross-week load value are extracted respectively to construct the basic lagging load characteristics.

[0014] Furthermore, the generation of periodic correlation features by combining the periodic difference function and the periodic correlation enhancement function specifically includes: Calculate the variation amplitude between the current filtered load value and the inter-day lag load characteristics and the inter-week lag load characteristics, respectively, and generate periodic difference characteristics; The inter-day and inter-week lagging load characteristics are multiplied by the sine and cosine periodic characteristic values, respectively, and then summed to generate periodic correlation characteristics.

[0015] Furthermore, the generation of cumulative growth rate features and trend cycle features through the cumulative growth rate function and the trend cycle coupling function specifically includes: The cumulative daily electricity consumption characteristic value is calculated by difference between two adjacent sampling times to obtain the cumulative growth rate characteristic value; The cumulative electricity consumption characteristic value and the cumulative growth rate characteristic value of the day are weighted and fused with the sine cycle characteristic value and the cosine cycle characteristic value respectively to generate the trend cycle characteristic.

[0016] Another object of the present invention is to provide a virtual power plant personalized load forecasting system based on composite feature engineering, comprising: The data preprocessing module is used to acquire the raw load data of the virtual power plant, perform median filtering operation using a centrally symmetric sliding window, introduce a local load deviation judgment mechanism, remove random noise and outliers, and generate a smooth load sequence. The time period feature construction module is used to encode the number of minutes at each sampling moment, convert the one-dimensional time value into a two-dimensional time period feature, and generate periodic modulation features by combining the load period coupling function. The cross-time lag feature construction module is used to define the feature extraction step size based on the number of minutes at the sampling time, and extract cross-day lag load features and cross-week lag load features according to the extraction step size. It also combines the period difference function and the period correlation enhancement function to generate period correlation features. The daily cumulative trend feature construction module is used to accumulate the smooth load sequence from 0:00 to the current sampling time according to the natural day to construct the daily cumulative electricity consumption feature, and generate the cumulative growth rate feature and trend period feature through the cumulative growth rate function and the trend period coupling function. The load forecasting execution module is used to concatenate the smoothed load sequence, time period features, cross-day lagging load features, cross-week lagging load features, periodic correlation features, daily cumulative electricity consumption features, and cumulative growth rate features to construct a virtual power plant load forecasting feature matrix. The feature matrix is ​​then input into the trained ensemble learning model, and the load forecast values ​​at each sampling time are output.

[0017] Another object of the present invention is to provide an electronic device, including a processor and a memory storing a computer program, wherein the processor executes the computer program to implement the virtual power plant personalized load forecasting method based on composite feature engineering provided by the first object of the present invention.

[0018] Another object of the present invention is to provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the virtual power plant personalized load forecasting method based on composite feature engineering provided by the first object of the present invention.

[0019] In combination with the above technical solutions, the beneficial effects of the present invention compared with the prior art are as follows: 1. This invention introduces a centrally symmetric sliding window median filtering mechanism at the beginning of the load forecasting process to systematically preprocess the original load time series of a virtual power plant, thereby effectively suppressing random noise and abnormal fluctuations in the original load data. This invention utilizes symmetrical local time windows to construct a stable local load structure and eliminates the interference of extreme values ​​on subsequent feature calculations through median replacement, enabling the smoothed load series to more realistically reflect the changing trends of user electricity consumption behavior. Compared to traditional methods that directly use original load data for modeling, this invention optimizes data quality before feature construction, reducing noise amplification effects from the source and improving the stability of subsequent feature engineering and model training, thus significantly improving the overall accuracy and robustness of the load forecasting model.

[0020] 2. This invention constructs a two-dimensional time-cycle feature encoding mechanism based on sine and cosine functions, transforming the original one-dimensional time numerical information into time phase features with a periodic structure. This enables the virtual power plant load forecasting model to accurately identify the periodic patterns of users' daily electricity consumption behavior. The periodic modulation feature integrates the time-cycle features with smoothed load sequences, enhancing the responsiveness of the periodic features to load changes and strengthening the model's ability to identify the periodic structure of users' daily electricity consumption. This periodic encoding method maps a day to a continuous periodic space, ensuring a consistent periodic representation of the same time location across different dates, avoiding the discontinuity problem at daily cycle boundaries that occurs with traditional numerical time features. Through this periodic representation structure, the model can more accurately capture the periodic variation features of the morning peak, midday load phase, and nighttime load phase, thereby improving the model's ability to identify users' daily electricity consumption patterns and enhancing the stability and accuracy of short-cycle load forecasting.

[0021] 3. This invention introduces inter-day and inter-weekly lagging load characteristics to construct a long-term historical load correlation mechanism, thereby supplementing the shortcomings of traditional load forecasting models that rely solely on short-term historical data. By extracting historical load information from inter-day and inter-weekly load values, the model can simultaneously obtain users' historical daily and weekly electricity consumption levels at the same time location, thus establishing a stable correlation between electricity consumption behavior across time periods. This feature structure can effectively characterize the differences in users' electricity consumption between weekdays and weekends, and between different dates and the same time period, allowing the model to refer to historical cyclical behavior during the forecasting process, thereby significantly improving the predictive ability for long-term regular load changes.

[0022] 4. This invention establishes a trend-based feature expression mechanism for load time series by constructing daily cumulative electricity consumption characteristics. By accumulating all filtered load values ​​from midnight to the current sampling time, a continuously growing electricity consumption trajectory is formed, enabling the model to identify the evolution trend of intraday electricity consumption activities along the time axis. Compared with traditional prediction methods that rely solely on instantaneous load values, this cumulative feature reflects the overall development state of intraday electricity consumption behavior, allowing the model to identify different stages of load change—gradual growth, rapid increase, and gradual stabilization—thereby enhancing the model's ability to perceive the direction of load changes. This solves the problem in existing technologies where the lack of trend-based features makes it difficult for prediction models to accurately depict load change trends. The trend cycle feature integrates daily cumulative electricity consumption characteristics, cumulative growth rate characteristics, and time cycle characteristics, strengthening the correlation between electricity consumption trends and cyclical structures. This allows the model to better identify the evolution trend of users' intraday electricity consumption behavior, providing more consistent feature support for subsequent feature splicing and ensemble learning model prediction.

[0023] 5. This invention constructs a complete multi-dimensional feature matrix by uniformly concatenating filtered load features, time period features, cross-time period lag features, and daily cumulative features. This enables the load forecasting model to simultaneously utilize data quality information, time period information, historical behavior information, and trend change information, achieving collaborative expression of multi-scale features. This composite feature engineering system overcomes the limitations of traditional load forecasting methods that rely solely on a single type of feature. It allows the model to comprehensively analyze user electricity consumption patterns from multiple dimensions, thereby improving the information representation capability of the feature space. This provides richer and more structured input data for subsequent machine learning models, further enhancing the generalization ability and stability of the forecasting model.

[0024] 6. This invention constructs an ensemble learning prediction framework by introducing a random forest regression algorithm into the model layer. It learns load variation patterns in different feature subspaces in parallel using multiple decision trees and integrates the prediction results of all decision trees, thereby reducing the sensitivity of a single decision tree model to local data noise and individual outliers. This ensemble learning mechanism effectively reduces model prediction variance, enhances the model's adaptability to complex load variation patterns, and ensures that the virtual power plant load prediction model maintains high prediction stability across different time periods and electricity consumption scenarios. This provides more reliable load prediction data support for virtual power plant scheduling optimization, demand response management, and energy management decisions. Attached Figure Description

[0025] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1This is a flowchart of the virtual power plant personalized load forecasting method based on composite feature engineering provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the method logic provided in the embodiments of the present invention; Figure 3 This is a flowchart of the center-symmetric sliding window mid-value filtering provided in an embodiment of the present invention; Figure 4 This is a flowchart of the time period feature construction provided in the embodiments of the present invention; Figure 5 This is a flowchart illustrating the construction of cross-time period lag characteristics and daily cumulative electricity consumption characteristics provided in this embodiment of the invention; Figure 6 This is a diagram of the random forest ensemble prediction architecture provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of the virtual power plant personalized load forecasting system based on composite feature engineering provided in an embodiment of the present invention. Detailed Implementation

[0026] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0027] Example 1:

[0028] like Figure 1 The image shows an embodiment of the virtual power plant personalized load forecasting method based on composite feature engineering provided by the present invention, which includes the following steps: S1: Obtain the raw load data of the virtual power plant, perform median filtering using a centrally symmetric sliding window, introduce a local load deviation judgment mechanism, remove random noise and outliers, and generate a smooth load sequence; S2: Encode the number of minutes at each sampling time, convert the one-dimensional time value into a two-dimensional time period feature, and combine it with the load period coupling function to generate periodic modulation features; S3: Define the feature extraction step size based on the number of minutes at the sampling time, and extract cross-day lag load features and cross-week lag load features according to the extraction step size. Combine the periodic difference function and the periodic correlation enhancement function to generate periodic correlation features. S4: Construct the cumulative electricity consumption characteristics for the day by accumulating the smoothed load sequence from 0:00 to the current sampling time according to the natural days, and generate the cumulative growth rate characteristics and trend period characteristics through the cumulative growth rate function and the trend period coupling function; S5: The smoothed load sequence, time period features, cross-day lag load features, cross-week lag load features, periodic correlation features, daily cumulative electricity consumption features, and cumulative growth rate features are dimensionally concatenated to construct a virtual power plant load prediction feature matrix. The feature matrix is ​​then input into the trained ensemble learning model to output the load prediction values ​​at each sampling time.

[0029] The following is in conjunction with the appendix Figures 2 to 6 The implementation details of the technical solution of the present invention will be further explained below.

[0030] Step 1: For the raw load data with a 5-minute sampling granularity of the virtual power plant, a 9-point centrally symmetric sliding window is used to perform median filtering. Each data point in the load time series is traversed, and four adjacent sampling points are selected before and after the data point. The median of the nine sampling points is calculated and replaced with the original data point to remove random noise and outliers in the load data. This solves the problem of prediction bias caused by noise amplification under a single feature and improves the feature effectiveness of the raw load data. Step 1 addresses the issues of strong noise interference and frequent abnormal fluctuations in the raw load data during virtual power plant load forecasting tasks. It performs center-symmetric sliding window midpoint filtering on the 5-minute sampling granularity load time series. First, the raw load time series of the virtual power plant is defined as a load sequence. ,in This represents the total sampling length of the load time series. Indicates the first The original load values ​​at each 5-minute sampling time point are obtained by traversing the entire load time series, with the current sampling time as the starting point. A centrally symmetric sliding window with a fixed length of 9 is constructed as the center. The first 4 sampling points and the last 4 sampling points are selected within the window to form a local load sequence, thus forming a window load set. Its mathematical expression is: in, Indicates the first A set of sliding windows centered on each sampling time point. Indicates the number of samples before the current sampling point. The load value at each sampling time. Indicates the number of samples after the current sampling point. The load value at each sampling time. This represents the relative time step within the sliding window, with a value range of [value missing]. to The aforementioned window construction mechanism ensures that the filtering calculation at each sampling time includes load information from the symmetrical time neighborhood, thus fully reflecting the load fluctuation structure within the local time range at that time, and obtaining the window load set. Then, a sorting operation is performed on all load values ​​within the window to generate an ordered sequence arranged by numerical value. Then, the median of the sequence is calculated and the filter load value is generated. The calculation expression is as follows: in, Indicates the first The filter load value at each sampling time. The median calculation operator is represented by the value from the window set. The median load value is selected as the middle value after sorting and used as the output result, replacing the original load value. Forming a new smooth load sequence Because median operations are inherently robust to extreme values, the median remains stable even when there are individual abnormally high or low values ​​within the window, effectively suppressing random spike noise in the load data. To further enhance the filtering process's ability to identify the stability of local load structures, a local load deviation judgment mechanism is introduced during the median replacement process. This mechanism calculates the deviation coefficient between the original load at the current sampling point and the median within the window, constructing a load noise identification function, the expression of which is: in, Indicates the first The load deviation coefficient at each sampling time. This represents the absolute difference between the current raw load value and the windowed mean value. This represents the average absolute deviation of all load values ​​within the window relative to the median, used to characterize the overall intensity of load fluctuations within a local time window. Maintaining a small value indicates a high degree of consistency between the current sampling point and the local load structure, meaning the filtered load value can stably retain the true load change trend. An increase in the value indicates a significant deviation between the current sampling point and the local load structure. The median replacement operation can effectively eliminate the interference of abnormal peaks on subsequent feature construction. Through the above-mentioned centrally symmetric sliding window filtering and deviation identification mechanism, a stable and smooth load sequence is formed. This provides high-quality basic data input for constructing time period characteristics and cross-period lag load characteristics in subsequent steps.

[0031] Step 2: Based on the 5-minute time granularity of the virtual power plant load forecast, the number of minutes at each sampling moment is processed by sine and cosine encoding to convert the one-dimensional time numerical feature into a two-dimensional periodic feature. This breaks through the limitation that traditional numerical time features cannot reflect the daily electricity consumption cycle, and accurately depicts the periodic pattern of users' daily electricity consumption behavior. Step 2 involves obtaining the smoothed load sequence generated in Step 1. Subsequently, time periodic features are constructed for each 5-minute sampling time, and the electricity consumption cycle pattern of virtual power plant users on an intraday scale is characterized by time coding. First, the first... The minute position of each sampling moment within a day is defined as the time index. ,in This represents the cumulative number of minutes since midnight of the day. Since the load data sampling interval is 5 minutes, therefore... The value sequence increases with a fixed step size to ensure a one-to-one correspondence between the time series and the load sampling sequence. After constructing the time index, in order to transform the linear time variable into a periodic structural variable, a periodic mapping operation is performed on the time index. By constructing a time angle function, the number of minutes is mapped to a circular space to generate the time phase value. Its calculation expression is as follows: in, Indicates the first The time phase value corresponding to each sampling moment. Indicates the first The sampling time is located at the minute position of the day, and 1440 represents the total number of minutes in a day. Representing the complete periodic angle, this time phase mapping mechanism ensures that adjacent dates at the same time point have consistent phase values, thereby eliminating numerical breaks between the beginning and end of the time series and giving the time variable continuous periodic properties. After obtaining the time phase values, they are projected onto a two-dimensional periodic space, and periodic feature pairs are constructed using sine and cosine functions to generate a two-dimensional time periodic feature vector. Its calculation expression is as follows: in, Indicates the first The sinusoidal periodic characteristic value at each sampling time. Indicates the first The cosine periodic characteristic value at each sampling time. The time phase value, mapped from the minute index, is represented by a joint sine and cosine encoding mechanism, ensuring a stable representation of the periodic distance between any two time points in two-dimensional space. This accurately depicts the periodic electricity consumption behavior of users during morning peak hours, midday load periods, and nighttime load periods. After generating the two-dimensional periodic feature, to enhance its responsiveness to smooth load sequence changes, a load period coupling function is introduced, combining the time periodic feature with the filtered load value generated in step 1. A fusion operation is performed to generate periodic modulation features, the calculation expression of which is: in, Indicates the first The periodic modulation characteristic value at each sampling time, This represents the filter load value obtained in step 1. Represents the periodic eigenvalues ​​of a sine wave. This represents the cosine periodic characteristic value. Through this periodic modulation mechanism, the load sequence forms differentiated periodic response intensities at different time phase positions, thereby enhancing the model's ability to identify intraday periodic structures. After constructing the time periodic characteristics and periodic modulation characteristics, [the following will be implemented]. and As a two-dimensional time-cycle feature input to the subsequent feature construction stage, it together with the cross-day lagging load features extracted in the next step to form the multi-dimensional feature basis of the virtual power plant load prediction model.

[0032] Step 3: Define the feature extraction step size based on the 5-minute sampling granularity, extract the lagged load features of the t-288 step size and the t-2016 step size in the load time series, associate them with the user's electricity consumption behavior patterns across days and weeks, make up for the shortcomings of traditional lagged features that only select recent time data and do not associate with long-term electricity consumption patterns, and supplement the cross-time period correlation feature dimension of load data. Step 3: Smooth load sequence obtained in Step 1 and the two-dimensional time periodic features generated in step 2 and Based on this, cross-time-lapse load characteristics are constructed. A long-term correlation structure is established by utilizing the continuity of electricity consumption behavior of virtual power plant users at different time scales. Since the load data sampling granularity is 5 minutes, a day contains 288 sampling points, and a week contains 2016 sampling points. Historical load sequences are traced back through a fixed time step. The daily and weekly load values ​​are extracted at each sampling time to construct the basic lagging load characteristics, the mathematical expression of which is: in, Indicates the first The characteristic value of the inter-day lagging load at each sampling time, This indicates the filter load value corresponding to 288 sampling steps backward from the current sampling time. Indicates the first The characteristic value of the cross-cycle lag load at each sampling time. This represents the filtered load value corresponding to 2016 sampling steps backward from the current sampling time. This cross-day and cross-week lag structure allows the model to directly obtain the historical electricity consumption level of users at the same time location, thereby capturing stable daily and weekly electricity consumption patterns. After obtaining the basic lagging load characteristics, to enhance the ability of lagging load information to express the current load change trend, a cross-cycle load difference function is introduced. This function is used to calculate the current filtered load value. The variation amplitude between the lagging load characteristics and the periodic difference characteristics is calculated as follows: in, Indicates the first The periodic difference characteristic value at each sampling time, This represents the filter load value at the current sampling time. This represents the characteristic value of the inter-day lagging load. This represents the characteristic value of the inter-week lagging load. This represents absolute value operations. By quantifying the difference between the current load and the historical cycle load, the model can identify the degree of change in current electricity consumption behavior relative to the historical cycle structure, thereby enhancing the load forecasting model's ability to identify abnormal load fluctuations and cycle shifts. After the cycle difference features are constructed, to further strengthen the coupling relationship between long-cycle electricity consumption behavior and the time cycle structure, a cycle correlation enhancement function is introduced to enhance the time cycle features generated in step 2. and By jointly modulating with the cross-day lagging load characteristics, a periodic correlation characteristic is generated, the expression of which is: in, Indicates the first Periodic correlation feature values ​​at each sampling time, This represents the characteristic value of the inter-day lagging load. This represents the characteristic value of the inter-week lagging load. Represents the periodic eigenvalues ​​of a sine wave. This represents the cosine periodic characteristic value. Through this periodic correlation enhancement mechanism, a stable mapping relationship is established between historical load information and the current time phase, thereby strengthening the model's ability to identify user's cross-day and cross-week electricity consumption patterns. After constructing the cross-day and cross-week lagging load characteristics, and As a cross-time period correlation feature input to the next step, it together with the cumulative electricity consumption feature of the day constructed subsequently forms the multi-dimensional feature structure of the virtual power plant load prediction model.

[0033] Step 4: Group the filtered load data by natural day, accumulate all load values ​​from 0:00 to the current sampling time, construct the cumulative feature of the cumulative electricity consumption for the day, and supplement the trend feature of the load time series by the real-time change trend of the cumulative value, solve the problem that the existing technology lacks electricity consumption trend features, which makes it impossible to capture the direction of load change in the prediction, and improve the feature dimension system. Step 4: Smooth load sequence obtained in Step 1 and the time periodic features generated in step 2 and and the inter-time lag load characteristics constructed in step 3 and Based on this, the cumulative electricity consumption characteristics of the day are constructed. By characterizing the cumulative growth structure of load on the intraday time axis, a trend-based feature expression is established. First, the smoothed load sequence is grouped by time according to the natural day. The natural log corresponding to each sampling time is And record the sampling time corresponding to midnight of that natural day as Based on this, all filtered load values ​​from midnight to the current sampling time within the same natural day are gradually accumulated to construct the cumulative electricity consumption characteristics for the day, the mathematical expression of which is: in, Indicates the first The cumulative daily electricity consumption characteristic value at each sampling time. This indicates the generation of the first step in step 1. The filter load value at each sampling time. This represents the sampling time index corresponding to midnight of the current calendar day. This represents the index of the current sampling time. Through this cumulative calculation, a continuously increasing electricity consumption trajectory is formed, thus comprehensively describing the cumulative growth state of daily electricity consumption activity on the time axis. This enables the model to identify the overall trend structure of the rapid load increase phase during the morning peak and the stable load phase at night. After obtaining the cumulative electricity consumption characteristics for the day, to enhance the expressive power of these characteristics for real-time load change trends, a cumulative growth rate function is introduced. The trend change intensity is obtained by differential calculation of the cumulative electricity consumption values ​​at adjacent sampling times. Its calculation expression is: in, Indicates the first The cumulative growth rate characteristic value at each sampling time. This represents the cumulative daily electricity consumption characteristic value at the current sampling time. This represents the cumulative electricity consumption characteristic value of the previous sampling time. Through this difference operation, the trend change characteristic directly reflects the contribution of the current load to the cumulative electricity consumption curve, enabling the model to identify the load growth rate changes at different stages of the day. After the cumulative growth rate is constructed, to further strengthen the correlation between the trend characteristic and the periodic structure, a trend-period coupling function is introduced to fuse the cumulative electricity consumption characteristic of the day with the time periodic characteristic obtained in step 2, thereby forming the trend-period characteristic, the expression of which is: in, Indicates the first The trend periodic characteristic value at each sampling time. This represents the cumulative electricity consumption characteristic value for the day. This represents the characteristic value of the cumulative growth rate. Represents the periodic eigenvalues ​​of a sine wave. This represents the cosine periodic characteristic value. Through this trend-period coupling mechanism, a stable mapping relationship is established between the cumulative electricity consumption trajectory and the time-period structure, thereby enhancing the model's ability to identify the evolution trend of users' daily electricity consumption behavior. After completing the construction of the daily cumulative electricity consumption characteristics, As a trend-based feature input to the next step, it is combined with the previously constructed smooth load features, time period features, and cross-period lag load features in a unified dimension and then input into the random forest model to perform load prediction calculations.

[0034] Step 5: Concatenate the filtered load basic features, time period features, cross-time period lag features, and daily cumulative features to construct an 8-dimensional feature matrix. Input the matrix into a random forest regressor containing 100 decision trees, a maximum depth of 8, and a random seed of 42 to complete model training. Use ensemble learning to reduce the variance of individual decision trees and solve the problem of poor generalization of the model when a single feature is input. Finally, output the load prediction values ​​at each 5-minute sampling time.

[0035] Step 5: Smooth load sequence obtained in Step 1 Step 2 generates time periodic features and Step 3: Construction of cross-time lag load characteristics and and the daily cumulative electricity consumption characteristics formed in step 4 Based on this, a unified feature fusion is performed by indexing various features according to a unified time period. Dimensional splicing is performed to construct the virtual power plant load prediction feature matrix. Each sampling time point forms a complete feature vector, whose mathematical expression is: in, Indicates the first Feature vectors at each sampling time This represents the filter load value generated in step 1. and This represents the two-dimensional time periodic feature generated in step 2. and This represents the inter-day lag load characteristics and inter-week lag load characteristics generated in step 3. and This represents the daily cumulative electricity consumption characteristics and cumulative growth rate characteristics generated in step 4. The periodic correlation features generated in step 3 are represented by the eight features mentioned above, which are then concatenated to form an 8-dimensional feature vector, thereby constructing a complete feature matrix. After constructing the feature matrix, it is input into the random forest regression model for training. The random forest consists of 100 decision trees, and each decision tree generates an independent training subset by randomly sampling training samples, thereby constructing a multi-model parallel learning structure. In each decision tree, a non-linear partition is performed on the feature vectors, and the prediction result of a single tree is output. The calculation expression is as follows: in, Indicates the first The sampling time at the ... Predicted load values ​​on each decision tree Indicates the first The nonlinear regression function corresponding to each decision tree This represents the input 8-dimensional feature vector. Represent the decision tree index number and satisfy The single-tree prediction mechanism described above enables different decision trees to form diverse learning structures in the random feature subspace. After all decision trees have completed their prediction calculations, an ensemble aggregation operation is performed on the outputs of each tree to obtain the final load prediction value. The calculation expression is as follows: in, Indicates the first The final load forecast value at each sampling time point, Indicates the first The prediction results of the decision tree This indicates that the prediction results of all 100 decision trees are averaged and aggregated. This integrated computation mechanism reduces the sensitivity of individual decision trees to local feature noise, thereby effectively reducing model prediction variance and improving load prediction stability. After completing the random forest model training and prediction calculation, the load prediction sequence for each 5-minute sampling time is output. This completes the personalized load forecasting process for the virtual power plant.

[0036] It should be noted that in the data preprocessing stage of this embodiment, the 9-point centrally symmetric sliding window can be replaced with a 5-point or 11-point window of the same type to perform median filtering, adapting to load data with different noise distributions while still achieving noise suppression. At the model training level, the random forest regressor can be replaced with a gradient boosting decision tree or an extreme random tree. These ensemble learning models can reduce the variance of a single model and adapt to the learning needs of multi-dimensional features. When constructing time-periodic features, Fourier transform encoding can be used instead of sine and cosine encoding, still achieving accurate characterization of time-periodic patterns. In the feature fusion stage, feature weighting can be used instead of direct dimensional concatenation, allocating weights according to feature importance to ensure effective collaborative expression of multi-dimensional features.

[0037] Example 2:

[0038] like Figure 7 As shown, this embodiment provides a virtual power plant personalized load forecasting system based on composite feature engineering, including: The data preprocessing module is used to acquire the raw load data of the virtual power plant, perform median filtering operation using a centrally symmetric sliding window, introduce a local load deviation judgment mechanism, remove random noise and outliers, and generate a smooth load sequence. The time period feature construction module is used to encode the number of minutes at each sampling moment, convert the one-dimensional time value into a two-dimensional time period feature, and generate periodic modulation features by combining the load period coupling function. The cross-time lag feature construction module is used to define the feature extraction step size based on the number of minutes at the sampling time, and extract cross-day lag load features and cross-week lag load features according to the extraction step size. It also combines the period difference function and the period correlation enhancement function to generate period correlation features. The daily cumulative trend feature construction module is used to accumulate the smooth load sequence from 0:00 to the current sampling time according to the natural day to construct the daily cumulative electricity consumption feature, and generate the cumulative growth rate feature and trend period feature through the cumulative growth rate function and the trend period coupling function. The load forecasting execution module is used to concatenate the smoothed load sequence, time period features, cross-day lagging load features, cross-week lagging load features, periodic correlation features, daily cumulative electricity consumption features, and cumulative growth rate features to construct a virtual power plant load forecasting feature matrix. The feature matrix is ​​then input into the trained ensemble learning model, and the load forecast values ​​at each sampling time are output.

[0039] Example 3:

[0040] This embodiment provides an electronic device, including a processor and a memory storing a computer program. When the processor executes the computer program, it implements the virtual power plant personalized load forecasting method based on composite feature engineering provided by the first objective of this invention.

[0041] Example 4:

[0042] This embodiment provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the virtual power plant personalized load forecasting method based on composite feature engineering provided by the first objective of this invention.

[0043] It should be understood that although the steps in the flowcharts of the various embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated in the present invention, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some steps in the various embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0044] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0045] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A virtual power plant personalized load forecasting method based on composite feature engineering, characterized in that, The method includes the following steps: The raw load data of the virtual power plant is obtained, and a median filtering operation is performed using a centrally symmetric sliding window. A local load deviation judgment mechanism is introduced to remove random noise and outliers and generate a smooth load sequence. The number of minutes at each sampling moment is encoded to convert the one-dimensional time value into a two-dimensional time period feature, and then combined with the load period coupling function to generate periodic modulation features. The feature extraction step size is defined based on the number of minutes at the sampling time, and cross-day and cross-week lag load features are extracted according to the extraction step size. The cycle correlation features are generated by combining the cycle difference function and the cycle correlation enhancement function. The cumulative electricity consumption characteristics for the day are constructed by accumulating the smoothed load sequence from 0:00 to the current sampling time over a natural day, and the cumulative growth rate characteristics and trend cycle characteristics are generated by using the cumulative growth rate function and the trend cycle coupling function. The smoothed load sequence, time period features, cross-day lag load features, cross-week lag load features, periodic correlation features, daily cumulative electricity consumption features, and cumulative growth rate features are dimensionally concatenated to construct a virtual power plant load prediction feature matrix. The feature matrix is ​​then input into a trained ensemble learning model to output the load prediction values ​​at each sampling time.

2. The virtual power plant personalized load forecasting method based on composite feature engineering according to claim 1, characterized in that, The median filtering operation performed using a centrally symmetric sliding window specifically includes: A centrally symmetric sliding window with a fixed length of 9 is constructed with the current sampling time as the center, and four adjacent sampling points before and after are selected to form the window load set; The load values ​​within the window load set are sorted, and the value at the middle position is selected as the filtered load value to replace the original data load value.

3. The virtual power plant personalized load forecasting method based on composite feature engineering according to claim 2, characterized in that, The local load deviation determination mechanism includes: Calculate the absolute difference between the original load at the current sampling point and the median in the window, and divide it by the average absolute deviation of the load values ​​within the window relative to the median to obtain the load deviation coefficient; When the load deviation coefficient is greater than the preset threshold, the current sampling point is determined to be an abnormal spike, and a median replacement operation is performed.

4. The virtual power plant personalized load forecasting method based on composite feature engineering according to claim 1, characterized in that, The conversion of one-dimensional time values ​​into two-dimensional time periodic features specifically includes: Perform a periodic mapping operation on the minute position of the sampling time in a day, and map the number of minutes to a circular space by constructing a time angle function to generate a time phase value; The time phase value is projected onto a two-dimensional periodic space, and periodic feature pairs are constructed using sine and cosine functions to generate sine periodic feature values ​​and cosine periodic feature values.

5. The virtual power plant personalized load forecasting method based on composite feature engineering according to claim 1, characterized in that, The extraction steps for the inter-day and inter-week lagged load characteristics include: Based on the position of the current sampling time in the smoothed load sequence, a complete daily electricity consumption cycle and a complete weekly cycle are traced back from the current sampling time in the historical smoothed load sequence. The cross-day load value and cross-week load value are extracted respectively to construct the basic lagging load characteristics.

6. The virtual power plant personalized load forecasting method based on composite feature engineering according to claim 1, characterized in that, The generation of periodic correlation features by combining the periodic difference function and the periodic correlation enhancement function specifically includes: Calculate the variation amplitude between the current filtered load value and the inter-day lag load characteristics and the inter-week lag load characteristics, respectively, and generate periodic difference characteristics; The inter-day and inter-week lagging load characteristics are multiplied by the sine and cosine periodic characteristic values, respectively, and then summed to generate periodic correlation characteristics.

7. The virtual power plant personalized load forecasting method based on composite feature engineering according to claim 1, characterized in that, The generation of cumulative growth rate features and trend cycle features through the cumulative growth rate function and trend cycle coupling function specifically includes: The cumulative daily electricity consumption characteristic value is obtained by performing differential calculation on the characteristic values ​​of two adjacent sampling times; The cumulative electricity consumption characteristic value and the cumulative growth rate characteristic value of the day are weighted and fused with the sine cycle characteristic value and the cosine cycle characteristic value respectively to generate the trend cycle characteristic.

8. A virtual power plant personalized load forecasting system based on composite feature engineering, characterized in that, The system includes: The data preprocessing module is used to acquire the raw load data of the virtual power plant, perform median filtering operation using a centrally symmetric sliding window, introduce a local load deviation judgment mechanism, remove random noise and outliers, and generate a smooth load sequence. The time period feature construction module is used to encode the number of minutes at each sampling moment, convert the one-dimensional time value into a two-dimensional time period feature, and generate periodic modulation features by combining the load period coupling function. The cross-time lag feature construction module is used to define the feature extraction step size based on the number of minutes at the sampling time, and extract cross-day lag load features and cross-week lag load features according to the extraction step size. It also combines the period difference function and the period correlation enhancement function to generate period correlation features. The daily cumulative trend feature construction module is used to accumulate the smooth load sequence from 0:00 to the current sampling time according to the natural day to construct the daily cumulative electricity consumption feature, and generate the cumulative growth rate feature and trend period feature through the cumulative growth rate function and the trend period coupling function. The load forecasting execution module is used to concatenate the smoothed load sequence, time period features, cross-day lagging load features, cross-week lagging load features, periodic correlation features, daily cumulative electricity consumption features, and cumulative growth rate features to construct a virtual power plant load forecasting feature matrix. The feature matrix is ​​then input into the trained ensemble learning model, and the load forecast values ​​at each sampling time are output.

9. An electronic device comprising a processor and a memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the virtual power plant personalized load forecasting method based on composite feature engineering as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the virtual power plant personalized load forecasting method based on composite feature engineering as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Power load prediction method based on SSA-random forest algorithm

    CN116799783A