Power prediction method and system based on demand situation awareness fusion model

By constructing a power prediction system based on a demand -based sense of awareness of the integration model, the problem of poor prediction reliability caused by a single prediction of electrical index factors in existing technologies has been solved, and more efficient and comprehensive power demand forecasts are achieved.

CN119357856AInactive Publication Date: 2025-01-24LVLIANG POWER SUPPLY CO OF STATE GRID SHANXI ELECTRIC POWER CO

Patent Information

Application Number
CN202411381135.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing power prediction model considers a single power consumption index factor, which leads to poor reliability of the prediction model and the inability to effectively analyze users' electricity consumption behavior, resulting in difficult prediction of power demand, unreliable results, and low accuracy.

Method used

A power forecasting method based on the demand situation awareness fusion model is adopted. By sampling and segmenting the power consumption behavior data and environmental power consumption data, a training set and a test set are obtained, and technologies such as base learners and dynamic clustering are used to construct demand situation awareness. Fusion of models and calibration of the model using correction factors.

Benefits of technology

It has significantly improved the learning and generalization of predictive models, enhanced the accuracy and reliability of electricity prediction, and comprehensively considered the impact of user electricity behavior and environmental factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357856A_ABST
    Figure CN119357856A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power prediction method based on a demand situation awareness fusion model, and relates to the technical field of electric power demand prediction, and the method comprises the steps: S1, carrying out the sampling of power consumption behavior data and environment power consumption data in a region, and carrying out the segmentation of the data, and obtaining a training set and a test set; s2, carrying out abnormal value processing on the training set, and taking the processed training set as the input of a base learner to obtain a first training feature; s3, performing dynamic clustering on the first training features, selecting an optimal feature to perform feature fusion with a target variable to obtain a target feature, and training a meta-learner through the target feature to construct a demand situation awareness fusion model; s4, the demand situation awareness fusion model responds to the test set to obtain a correction factor, and the model is corrected according to the correction factor to obtain a target demand situation awareness fusion model; s5, the target demand situation awareness fusion model responds to the real-time feature data to obtain a regional power demand result; and the power consumption prediction precision and reliability are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power demand forecasting, and in particular to a power forecasting method and system based on a demand situation awareness fusion model. Background Art

[0002] Accurate analysis of power demand characteristics is an important part of the production, operation and planning management of power companies. The effective application of power big data can better reflect the influencing factors and internal laws of power demand. There are a large number of influencing factors in power demand forecasting, including economic prosperity, climate, population density, etc., and in the existing power forecasting technology, most of the research objects are concentrated on the industry, industry, and even regional levels, which makes it impossible to extract a lot of information about users, and it is even more impossible to analyze the power consumption behavior of users in a specific and accurate manner. In addition, the hybrid CatBoost-PPSO model is usually used for model selection, or the meteorological factors affecting power demand are selected through data cleaning and deep residual convolutional neural network to predict power demand through weather changes, or the meteorological factors with great influence on load are selected based on the fusion of classification regression algorithm and Stacking model to predict short-term bus load. Due to the lack of full consideration of indicators such as user power characteristics, industry attributes, weather, and industry power characteristics, the established prediction model has insufficient learning ability, poor effectiveness and applicability, and cannot effectively predict the overall and partial power consumption of the region reliably, which leads to problems such as difficulty in power demand forecasting, unreliable prediction results, and low accuracy. Summary of the invention

[0003] The present invention aims at the problem that the existing power forecasting model considers a single index factor, resulting in poor reliability of power consumption forecasting; proposes a power forecasting method and system based on a demand situation awareness fusion model, obtains a training set and a test set by sampling and segmenting power consumption behavior data and environmental power consumption data; trains the training set through a base learner to obtain a first training feature and dynamically clusters it to obtain an optimal feature; fuses the optimal feature with a target variable to obtain a target feature; obtains a demand situation awareness fusion model based on target feature training; obtains a correction factor in response to a test set to calibrate the model to obtain a demand situation awareness fusion model. The present application comprehensively considers the impact of user power consumption behavior and various environmental factors on power consumption, overcomes the problem that the construction of the power forecasting model leads to poor reliability of the forecasting model due to the single power consumption index factor considered, significantly improves the comprehensive performance of the forecasting model learning and generalization, and further improves the accuracy and reliability of power consumption forecasting.

[0004] To solve the above technical problems, according to a first aspect of an embodiment of the present invention, a power forecasting method based on a demand situation awareness fusion model is provided, comprising the following steps: S1. Sampling the electricity consumption behavior data and the environmental electricity consumption data in the area and segmenting them to obtain a training set and a test set; S2. Processing the training set for outliers and using it as the input of the base learner to obtain the first training feature; S3, dynamically clustering the first training features, selecting the optimal features and the target variables for feature fusion to obtain target features, and training the meta-learner through the target features to build a demand situation awareness fusion model; S4, the demand situation awareness fusion model responds to the test set to obtain a correction factor, and the model is corrected according to the correction factor to obtain a target demand situation awareness fusion model; S5. The target demand situation awareness fusion model responds to real-time feature data to obtain regional power demand results.

[0005] In this scheme, by sampling and splitting the original data, it is possible to effectively avoid the situation of data sampling imbalance in the process of dividing the training set and the test set, and avoid the overfitting phenomenon caused by continuous similar features during batch training, and ensure that the sample data can fully reflect the complex relationship between electricity consumption behavior and environmental factors, improve the representativeness and reliability of the data, and thus ensure that the trained demand situation awareness fusion model has efficient and comprehensive learning and generalization capabilities; by training the training set through the base learner, it is possible to fully utilize the data processing advantages of each model in the base learner, such as avoiding overfitting, avoiding local features of the data, etc., so that the first training feature obtained by training can clearly express the key points in the data. key information, providing a high-quality data foundation for subsequent modeling; dynamic clustering can obtain the optimal features, eliminate redundant information caused by the correlation between different feature sets, and use the fused features as the input features of the meta-learner for training, thereby improving the accuracy of the model while avoiding the singleness of the base learner selected by dynamic clustering, improving the robustness and reliability of the model, and effectively solving the problem that the existing technology does not fully consider the user's electricity consumption behavior, cannot specifically and accurately analyze the user's electricity consumption behavior, and the construction of the power forecasting model has poor reliability due to the single electricity consumption indicator factor considered. It significantly improves the comprehensive performance of the forecasting model learning and generalization, and further improves the accuracy and reliability of electricity consumption prediction.

[0006] Preferably, the S1 comprises the following sub-steps: S11. Based on the power consumption behavior of the power industry in the region and the power environment indicators that affect the power consumption situation, power consumption behavior data and environmental power consumption data are obtained, and the power consumption behavior data and environmental power consumption data are merged into original feature data; S12, dividing the original feature data into a plurality of data sets according to the attribute groups of the original feature data; S13, cutting and segmenting the data samples of each data set according to the training time step of the regression selection algorithm to obtain a plurality of segmented samples; S14. The ratio of the number of the segmented samples extracted to the number of the data set extracted in a single time is used as the sampling target number, and the systematic sampling method is used to extract samples based on the sampling target number, and the extracted samples are combined to form the training set and the test set.

[0007] Preferably, the original characteristic data at least includes power consumption characteristic data, weather characteristic data, industry characteristic data and power consumption time zone characteristic data; wherein: The power consumption characteristic data at least include: power consumption mean, power consumption dispersion coefficient, power consumption standard deviation, power consumption extreme value, power consumption growth rate and historical power consumption of different industries in the same period; The weather characteristic data at least include: period average temperature, period temperature extreme value and period average humidity; The industry characteristic data at least include: industry attributes, regional gross domestic product, user consumer price index and industrial added value; the electricity consumption time zone characteristic data at least include: electricity consumption time domain.

[0008] Preferably, S2 comprises the following sub-steps: S21. Based on the power forecasting business needs, the vector regression model combined with the random forest model and the classification regression algorithm is used to establish the initial base learner; S22, filling in the missing parts of the power consumption characteristic data in the training set, and deleting some extreme values ​​of the power consumption characteristic data in the training set; S23, using the training set after outlier processing as input parameters of the initial base learner, training to obtain the base learner, and outputting the first training feature of the original feature data.

[0009] Preferably, S3 includes the following sub-steps: S31, using the first training feature as a dynamic clustering sample, and dividing it into a plurality of feature clusters according to the distance values ​​between the dynamic clustering samples; S32, calculating the feature cluster by a silhouette coefficient method to obtain a silhouette coefficient of the first training feature, and selecting a feature cluster corresponding to a maximum value of the silhouette coefficient as an optimal feature cluster for clustering; S33, based on the optimal feature cluster that has completed clustering, calculate the minimum distance cluster, and take the optimal feature cluster with the highest reward value in each round of clustering as the optimal cluster; S34, dynamically rewarding the minimum distance cluster and the optimal cluster in each round of clustering based on a reward function, and outputting the optimal feature; S35, using the original feature data as the input of the LASSO regression model, outputting the target variable, and fusing the target variable with the optimal feature to obtain the target feature; S36. Establish a meta-learner based on the LightGBM model, input the target features into the meta-learner for training, so as to construct the demand situation awareness fusion model.

[0010] Preferably, the target variables include: historical electricity consumption characteristic variables, weather characteristic variables, economic characteristic variables, industry attribute variables and electricity consumption time zone characteristic variables.

[0011] Preferably, the S34 includes the following sub-steps: Calculate the distance between the cluster center of each optimal feature cluster and the target variable, and take the optimal cluster corresponding to the minimum distance as the minimum distance cluster; When the optimal cluster is equal to the minimum distance cluster, a positive reward is given to the reward value of the optimal cluster; When the optimal cluster is not equal to the minimum distance cluster, the minimum distance cluster is given a negative reward; Complete the clustering of all the optimal feature clusters and output the optimal features corresponding to the latest optimal cluster.

[0012] Preferably, S4 includes the following sub-steps: Input the test set into the target demand situation awareness fusion model for prediction, obtain the predicted values ​​in sequence according to the test time sequence to construct a predicted value sequence, and construct a true value sequence based on the true value; According to the prediction time series, the prediction sequence and the real value sequence are fused and calculated bit by bit to obtain the error value sequence, and the error value and error direction of each sequence bit in the error value sequence are abnormally obtained to construct a correction factor; the correction factor is used as the loss function of the demand situation awareness fusion model; Taking minimizing the loss function as the parameter adjustment goal, the target parameters are obtained by performing gradient calculation on the base learner and the meta learner through the gradient descent algorithm; The base learner and the meta learner are iteratively adjusted in parameters based on the target parameters to complete the calibration of the demand situation awareness fusion model and obtain the target demand situation awareness fusion model.

[0013] According to another aspect of an embodiment of the present invention, there is provided a power forecasting system based on a demand situation awareness fusion model, comprising: a data acquisition module, a data processing module and a learner; The data acquisition module is used to collect the original characteristic data of power consumption behavior and environment, and transmit it to the data processing module; the data processing module is used to sample the original characteristic data using a dynamic balance algorithm to obtain a training set and a test set; The learner is used to perform feature calculation on the training set to obtain the optimal feature, and to construct a demand situation awareness fusion model after feature fusion of the optimal feature and the target variable, and to correct the model by obtaining the model correction factor in response to the test set to obtain the target demand situation awareness fusion model.

[0014] Preferably, the learner comprises a dynamic clustering unit, a base learner, a meta learner and a model calibration unit; The base learner is used to train the training set and output the first training feature of the original feature data; The meta-learner is used to train the fused features and construct the demand situation awareness fusion model; The model calibration unit is used to respond to the test set and output a correction factor to correct the demand situation awareness fusion model to obtain the target demand situation awareness fusion model; The dynamic clustering unit is used to calculate the silhouette coefficient of the first training feature, dynamically select the feature cluster corresponding to the maximum silhouette coefficient as the optimal feature cluster for clustering, and dynamically reward the minimum distance cluster and the optimal cluster of the optimal feature cluster obtained in each round of clustering calculation based on the reward function, and output the optimal feature.

[0015] In this solution, by collecting the original feature data of electricity consumption behavior and environment and analyzing and processing them using the dynamic balanced sampling algorithm, it can effectively avoid the imbalance of data sampling in the process of dividing the training set and the test set, and avoid the overfitting phenomenon caused by continuous similar features during batch training, and ensure that the sample data can fully reflect the complex relationship between electricity consumption behavior and environmental factors, improve the representativeness and reliability of the data, and thus ensure that the demand situation awareness fusion model obtained by training has efficient and comprehensive learning and generalization capabilities; the base learner calculates the features of the training set to obtain the first training feature, which can clearly show the key points in the data. key information, providing a high-quality data foundation for subsequent modeling; dynamic clustering can calculate the optimal feature in the first training feature, which helps to more effectively fuse features and eliminate redundant information caused by the correlation between different feature sets; the fused features are used as input features of the meta-learner for training, so as to improve the accuracy of the model while avoiding the singleness of the base learner selected by dynamic clustering, thereby improving the robustness and reliability of the model, and effectively solving the problem that the existing technology does not fully consider the user's electricity consumption behavior, cannot specifically and accurately analyze the user's electricity consumption behavior, resulting in poor effectiveness and applicability of the prediction model, and then leads to low accuracy and poor reliability of electricity consumption prediction.

[0016] Beneficial effects of the present invention: 1. The dynamic balanced sampling algorithm is used to analyze and process the collected original feature data, which can effectively avoid the imbalance of data sampling in the process of dividing the training set and the test set, and avoid the overfitting phenomenon caused by continuous similar features during batch training, ensuring that the sample data can fully reflect the complex relationship between electricity consumption behavior and environmental factors, and improve the representativeness and reliability of the data; 2. Dynamic clustering can obtain the optimal features in the training set, which helps to reflect the dynamic relationship between user behavior and features, including the changing characteristics over time, weather and other factors; achieve more efficient feature fusion, avoid too much parameter adjustment and feature selection during model training, improve model learning effect and shorten calculation time; 3. By training with the fused features, the demand situation awareness fusion model is obtained, which can fully consider the user's electricity consumption behavior and the influence of various environmental factors when predicting the industry's electricity consumption, thereby improving the model's learning ability for user electricity consumption behavior and generalization ability for random changes in environmental factors; at the same time, the model is corrected according to the prediction error, which improves the accuracy and reliability of the demand situation awareness fusion model in predicting electricity demand. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the drawings to represent the same parts.

[0018] Figure 1 This is a flow chart of a power forecasting method based on a demand situation awareness fusion model of this embodiment.

[0019] Figure 2 This is a flow chart of a Stacking algorithm based on dynamic clustering in this embodiment.

[0020] Figure 3 This is a dynamic clustering flow chart of this embodiment.

[0021] Figure 4 This is a module diagram of a power forecasting system based on a demand situation awareness fusion model of this embodiment.

[0022] Figure 5 This is a learner module diagram of this embodiment.

[0023] Figure 6 This is a schematic diagram of an industry electricity sales trend in this embodiment. DETAILED DESCRIPTION

[0024] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation method described herein is only an optimal embodiment of the present invention, which is only used to explain the present invention and does not limit the scope of protection of the present invention. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0025] Example 1: Figure 1 and Figure 2 As shown, a power forecasting method based on a demand situation awareness fusion model includes steps S1-S5, wherein: S1. Sample the electricity consumption behavior data and environmental electricity consumption data in the area and split them into training sets and test sets.

[0026] Specifically, S1 includes the following sub-steps: S11. Based on the power consumption behavior of the power industry in the region and the power environment indicators that affect the power consumption situation, power consumption behavior data and environmental power consumption data are obtained, and the power consumption behavior data and environmental power consumption data are merged into original feature data; S12, dividing the original feature data into several data sets according to the attribute grouping of the original feature data; S13, segmenting the data samples of each data set according to the training time step of the regression selection algorithm to obtain a number of segmented samples; S14. The ratio of the number of extracted segmented samples to the number of single-extracted data sets is used as the sampling target number. Based on the sampling target number, a systematic sampling method is used to extract samples, and the extracted samples are combined to form a training set and a test set.

[0027] Specifically, the original characteristic data includes at least power consumption characteristic data, weather characteristic data, industry characteristic data, and power consumption time zone characteristic data; wherein: The electricity consumption characteristic data shall at least include: the mean electricity consumption, the coefficient of dispersion of electricity consumption, the standard deviation of electricity consumption, the extreme value of electricity consumption, the growth rate of electricity consumption and the historical electricity consumption of different industries in the same period; The weather characteristic data include at least: period average temperature, period temperature extremes and period average humidity; The industry characteristic data shall at least include: industry attributes, regional gross domestic product, user consumer price index and industrial added value; the electricity consumption time zone characteristic data shall at least include: electricity consumption time domain.

[0028] In this embodiment, the historical electricity consumption characteristic variable can describe the industry's electricity consumption behavior from five aspects: the industry's average electricity consumption in different periods, the dispersion coefficient of electricity consumption in different periods, the maximum and minimum electricity consumption in different periods, the recent electricity consumption growth rate, and the industry's historical electricity consumption in the same period.

[0029] Among them, the mean electricity consumption in different periods describes the absolute level of electricity consumption in the industry, the dispersion coefficient of the mean electricity consumption in different periods describes the degree of dispersion of electricity consumption in the industry, the maximum and minimum values ​​of electricity consumption in different periods reflect the upper and lower boundaries of electricity consumption in the industry in different periods, the recent electricity consumption growth rate describes the growth trend of electricity consumption in the industry, and the electricity consumption in the same period in history describes the electricity consumption behavior in the same period in history.

[0030] As an implementation method, the data set is divided into N sets according to attribute grouping, and the data samples of each set are segmented according to the training time step T; then, according to the number of samples S and the number of sets extracted in a single time K, a systematic sampling method is used to extract S / K number of samples from the corresponding set k; finally, the extracted samples are combined to form batch training sets and test sets.

[0031] Furthermore, the dynamic balanced sampling algorithm is performed in a no-replacement manner, and attention should be paid to sample boundary issues during use.

[0032] S2. Process the training set for outliers and use it as the input of the base learner to obtain the first training feature.

[0033] Specifically, S2 includes the following sub-steps: S21. Based on the power forecasting business needs, the vector regression model combined with the random forest model and the classification regression algorithm is used to establish the initial base learner; S22, filling in the missing parts of the power consumption characteristic data in the training set, and deleting some extreme values ​​of the power consumption characteristic data in the training set; S23, using the training set after outlier processing as the input parameter of the initial base learner, training to obtain the base learner, and outputting the first training feature of the original feature data.

[0034] It can be understood that the integrated model of classification and regression tree, support vector regression and random forest algorithm are used to establish the base learner, which is used as the first layer structure of the demand situation awareness fusion model; among them, the integrated model of classification and regression tree can process large-scale original feature data in parallel, and can effectively prevent data overfitting. For complex historical electricity consumption data, meteorological data, etc., regularization terms are added to the objective function through iterative optimization, and the situation that the training data is sparse can be considered. The default direction of the branch can be specified for missing values ​​or specified values, which provides more concise and reliable data support for the subsequent training of the demand situation awareness fusion model and reduces the amount of calculation; support vector regression can find the optimal features in the original data and select support vectors that only account for a small part of the training sample set. These support vectors contain important information required for classification. The classification of support vectors is equivalent to the classification of all training samples, which improves the model training efficiency; random forest constructs multiple decision trees and votes or averages the prediction results of the training set, and uses the bootstrap sampling method with replacement to extract the training samples of each decision tree to obtain the final prediction, thereby improving the prediction accuracy and generalization ability of the model.

[0035] S3. Dynamically cluster the first training feature, select the optimal feature and the target variable for feature fusion to obtain the target feature, and train the meta-learner through the target feature to build a demand situation awareness fusion model.

[0036] Specifically, S3 includes the following sub-steps: S31, using the first training feature as a dynamic clustering sample, and dividing it into a plurality of feature clusters according to the distance values ​​between the dynamic clustering samples; S32, calculating the feature clusters by using the silhouette coefficient method to obtain the silhouette coefficient of the first training feature, and selecting the feature cluster corresponding to the maximum value of the silhouette coefficient as the optimal feature cluster for clustering; S33, based on the optimal feature cluster that has completed clustering, calculate the minimum distance cluster, and take the optimal feature cluster with the highest reward value in each round of clustering as the optimal cluster; S34, dynamically rewarding the minimum distance cluster and the optimal cluster in each round of clustering based on the reward function, and outputting the optimal feature; S35, the original feature data is used as the input of the LASSO regression model, the target variable is output, and the target variable is fused with the optimal feature to obtain the target feature; S36. Establish a meta-learner based on the LightGBM model, input the target features into the meta-learner for training, and build a demand situation awareness fusion model.

[0037] Specifically, the target variables include: historical electricity consumption characteristic variables, weather characteristic variables, economic characteristic variables, industry attribute variables, and electricity consumption time zone characteristic variables.

[0038] In this embodiment, the LightGBM model is used as the third-layer structure of the demand situation awareness fusion model, and the efficient gradient boosting decision tree framework (Light Gradient Boosting Machine, LightGBM) is adopted as the meta-learner of the Stacking algorithm. Its characteristics of supporting category features and parallel execution can be utilized to make the demand situation awareness fusion model run faster and occupy less memory.

[0039] Specifically, S34 includes the following sub-steps: Calculate the distance between the cluster center of each optimal feature cluster and the target variable, and take the optimal cluster corresponding to the minimum distance as the minimum distance cluster; when the optimal cluster is equal to the minimum distance cluster, give a positive reward to the reward value of the optimal cluster; When the optimal cluster is not equal to the cluster with the smallest distance, the cluster with the smallest distance receives a negative reward; Complete the clustering of all optimal feature clusters and output the optimal features corresponding to the latest optimal cluster.

[0040] As an implementation method, Figure 3 As shown, for the dynamic clustering sample X = {x1, x2, ..., x n}, and divide them into k feature clusters {C1, C2, ..., C k}, so that the minimum square error Je from each object to each cluster center is minimized. The calculation formula for minimizing the square error Je is as follows: In the formula, μ i Cluster C i The mean vector, i.e., the centroid; in this embodiment, the silhouette coefficient S is calculated for the results of n base learners with different k (2≤k≤n) by the silhouette coefficient method, and the k with the maximum S is dynamically selected as the optimal k for this round of clustering to perform k-means clustering. The calculation formula of the silhouette coefficient S is as follows: Where a(i) is the average value of the dissimilarity between sample i and other points in the same cluster; b(i) is the minimum value of the average dissimilarity between sample i and other clusters; For the k optimal feature clusters {C1, C2, ..., C k}, define the cluster with the highest reward value as the optimal cluster (OPtimal Cluster, OPC), and the cluster with the smallest error with the label value obtained by each clustering is the smallest distance cluster (SmallestDistance Cluster, SDC). After each round of training, the distance between each cluster center and the label value is calculated. If OPC and SDC are the same in the current clustering result, the reward value of OPC is positively rewarded; if OPC and SDC are different, OPC is negatively rewarded and SDC is positively rewarded. After each round of clustering is completed, the cluster with the largest reward value is updated to the optimal cluster of the algorithm, and the feature data corresponding to the optimal cluster is output as the optimal feature; the reward function RF calculation formula is as follows: Its dynamic clustering is used as the second-layer structure of the demand situation awareness fusion model. After obtaining the optimal feature through dynamic clustering, the original feature data is trained based on the LASSO regression algorithm to obtain the strongly correlated feature (target variable) of the first training feature and fuse it with the optimal feature to obtain the target feature. The target feature is used as the input feature of the meta-learner for model training to obtain the demand situation awareness fusion model.

[0041] Furthermore, LASSO regression adds a penalty term to the loss function, so that the size of the coefficient is constrained in the process of parameter solution; at the same time, the feature coefficient with less influence is decayed to 0 by setting the reduction coefficient, and only important features are retained to achieve the purpose of feature selection; compared with the loss function of ordinary regression, LASSO regression adds constraints on β in its solution process. Under the constraint of the first norm, a part of the coefficients decay to 0 in the regression process, so that it can be better applied to feature selection; therefore, this embodiment selects LASSO regression to train the original features, selects the target variable, and fuses it with the optimal feature obtained by dynamic clustering, and uses the fused target feature as the input feature of the meta-learner, while further improving the accuracy of the algorithm and avoiding the singleness of the base learner selected by dynamic clustering, thereby improving the robustness and reliability of the algorithm, that is, improving the accuracy, robustness and reliability of the demand situation awareness fusion model.

[0042] S4. The demand situation awareness fusion model responds to the test set to obtain the correction factor, and the model is corrected according to the correction factor to obtain the target demand situation awareness fusion model.

[0043] Specifically, S4 includes the following sub-steps: The test set is input into the target demand situation awareness fusion model for prediction, and the predicted values ​​are obtained in sequence according to the test time sequence to construct a predicted value sequence, and a true value sequence is constructed based on the true value; According to the prediction time series, the prediction sequence and the true value sequence are fused and calculated bit by bit to obtain the error value sequence. The error value and error direction of each sequence bit in the error value sequence are abnormally obtained to construct the correction factor; the correction factor is used as the loss function of the demand situation awareness fusion model; Taking minimizing the loss function as the parameter adjustment goal, the target parameters are obtained by calculating the gradients of the base learner and the meta learner through the gradient descent algorithm; Based on the target parameters, the base learner and the meta learner are iteratively adjusted to complete the calibration of the demand situation awareness fusion model and obtain the target demand situation awareness fusion model.

[0044] As an implementation method, the test set is input into the target demand situation awareness fusion model for prediction to obtain the prediction value sequence The real value sequence is Y = {y1, y2, ..., y n}, then the error value sequence is E = {e1, e2, ..., e n},in, The error direction is expressed as: According to the error value sequence and error direction, the correction factor can be expressed as: The correction factor is used as the loss function of the target demand situation awareness fusion model. The loss function is expressed as follows: Among them, λ poes represents the weight factor for positive errors, λ neg Represents the weight factor for negative errors. Both weight factors can be set according to actual needs. For example, if the model needs to be more sensitive to positive errors (predicted values ​​are smaller than true values), you can set λ poes >1; if more sensitive to negative errors, set λ neg >1; Finally, by minimizing the loss function L, the gradient descent algorithm is used to iteratively adjust the parameters of the base learner and the meta-learner to complete the calibration of the demand situation awareness fusion model.

[0045] In this embodiment, the relative error of the prediction result is used as the loss function to correct the model error. The smaller the loss function, the more accurate the model prediction, which significantly improves the accuracy of the model prediction results. Among them, the vector composed of the partial derivatives of the model parameters is calculated, that is, the gradient of the base learner and the meta learner is calculated. Along the opposite direction of the gradient, that is, the direction where the loss function value decreases fastest, the minimum value of the loss function (target parameter) can be quickly found, and the gradient of the base learner and the meta learner is updated with the target parameter to ensure the accuracy of the target demand situation awareness fusion model in predicting real-time feature data.

[0046] S5. The target demand situation awareness fusion model responds to real-time feature data to obtain regional power demand results.

[0047] Embodiment 2, as Figure 4 As shown, a power forecasting system based on a demand situation awareness fusion model includes: a data acquisition module, a data processing module and a learner; The data acquisition module is used to collect the original characteristic data of electricity consumption behavior and environment, and transmit it to the data processing module; The data processing module is used to sample the original feature data using a dynamic balance algorithm to obtain a training set and a test set; The learner is used to calculate the features of the training set, obtain the optimal features, and fuse the optimal features with the target variables to construct a demand situation awareness fusion model, and to correct the model by obtaining the model correction factor in response to the test set to obtain the target demand situation awareness fusion model.

[0048] Specifically, Figure 5 As shown, the learner includes a dynamic clustering unit, a base learner, a meta learner, and a model calibration unit; The base learner is used to train the training set and output the first training feature of the original feature data; The meta-learner is used to train the fused features and build a demand situation awareness fusion model; The model calibration unit is used to respond to the test set and output the correction factor to correct the demand situation awareness fusion model to obtain the target demand situation awareness fusion model; The dynamic clustering unit is used to calculate the silhouette coefficient of the first training feature, dynamically select the feature cluster corresponding to the maximum silhouette coefficient as the optimal feature cluster for clustering, and dynamically reward the minimum distance cluster and the optimal cluster of the optimal feature cluster calculated in each round of clustering based on the reward function, and output the optimal feature.

[0049] As a specific implementation method, variables can be selected from the provincial power grid marketing business system, disaster prevention and mitigation system and third-party economic data website from five aspects, including industry historical power consumption, weather, economy, industry attributes and holidays, to collect original feature data; this embodiment collects relevant power and weather information from the basic data platform of a power supply company in a certain province of China through data access; wherein, the historical power consumption feature variables are shown in Table 1, the weather feature variables are shown in Table 2, the economic feature variables are shown in Table 3, the industry attribute variables are shown in Table 4, and the power consumption time zone feature variables are shown in Table 5; Table 1 Historical electricity consumption characteristic variables Table 2 Weather characteristic variables Weather characteristics Remark MAXLAPSERATE Maximum temperature of the month MINLAPSERATE Monthly minimum temperature AVGLAPSERATE Average monthly temperature AVGHUMIDITY Average monthly humidity SUMPRECIIPITATION FALL Monthly cumulative rainfall SUM10MMPRECIIPITATIONFALL Monthly cumulative rainfall less than 10 mm days SUM25MMPRECIIPITATIONFALL Monthly cumulative rainfall of 10-24.9 mm days SUM50MMPRECIIPITATIONFALL Number of days with monthly cumulative rainfall of 25-49.9 OVER50MMPRECIIPITATIONFALL Monthly cumulative rainfall of more than 50 mm Table 3 Economic characteristic variables Economic characteristics Remark GDP Gross Regional Product PMI Manufacturing Purchasing Managers Index PPI Industrial Product Producer Price Index CPI Consumer Price Index EVA Industrial added value above designated size TRSCG Total retail sales of consumer goods Table 4 Industry attribute variables Industry Characteristics Remark HYLB Secondary industry categories SFY Whether industrial HYFQ Industry Group Number Table 5. Characteristic variables of electricity consumption time zone feature Remark Year years Mon month Season season Holiday Holiday days Since the electricity consumption of the industry has sudden increases and decreases, it has a great impact on the model prediction ability during model training. Therefore, it is necessary to process such outliers, that is, to use the mean before and after to fill in the missing part of the electricity consumption in the training set; The training data extracted by the dynamic balanced sampling algorithm are input into the base learners for training to obtain new features (the first training features); the results of the base learners are dynamically clustered with the label data, and multiple base learners with the best performance for the current data samples are selected to obtain the optimal features. After feature selection using LASSO, the optimal features are fused and the fused features are input into the meta learner to obtain the demand situation awareness fusion model; the model is used to predict the industry electricity sales of 12 key industries in a province. The prediction results are shown in Table 6. Table 6 Average accuracy of key industries industry error Accuracy Leather, fur, feathers and their products and footwear 0.090076 90.99% Chemical fiber manufacturing industry 0.058129 94.19% Metal products industry 0.031269 96.87% Computer, communication and other electronic equipment manufacturing 0.031424 96.86% Rubber and plastic products industry 0.034145 96.59% Textile Industry 0.049736 95.03% Non-metallic mineral products industry 0.080194 91.98% Ferrous metal smelting and rolling processing industry 0.016387 98.36% Agricultural and sideline food processing industry 0.059671 94.03% Wood processing and wood, bamboo, rattan, palm and grass products industry 0.021945 97.81% Non-ferrous metal smelting and rolling processing industry 0.043053 95.69% Chemical raw materials and chemical products manufacturing industry 0.044843 95.52% As shown in the table, the errors in the leather, fur, feather and their products and shoemaking industries mainly come from a city in the province. The trend of electricity sales is as follows: Figure 6 As shown in the figure, the trend of electricity sales is obviously abnormal, and the accuracy can reach 95.46% after removing the data of this city, which proves the feasibility of the demand situation awareness fusion model in this embodiment.

[0050] Beneficial effects of the embodiment: taking into account single enterprise users, the data collection granularity is finer than that at the industry, sector and regional levels, so that the analysis of user electricity consumption behavior can be realized, and prediction correction and analysis can be performed for users with extremely large prediction errors in the prediction results, which will greatly improve the accuracy of the model. By collecting the original feature data of electricity consumption behavior and the environment, and analyzing and processing it using a dynamic balanced sampling algorithm, it can effectively avoid the situation of data sampling imbalance in the process of dividing the training set and the test set, and avoid overfitting caused by continuous similar features during batch training, and ensure that the sample data can fully reflect the complex relationship between electricity consumption behavior and environmental factors, improve the representativeness and reliability of the data, and thus ensure that the demand situation awareness fusion model obtained by training has efficient and comprehensive learning and generalization capabilities; the base learner is used to calculate the features of the training set to obtain the first training feature, which can clearly express the key information in the data and provide a high-quality data foundation for subsequent modeling; the optimal feature in the first training feature can be calculated through dynamic clustering, and the LASS O regression is used to train the original features, and the features that show strong correlation with the target problem are selected and fused with the optimal features, so as to more efficiently eliminate the redundant information caused by the correlation between different feature sets; LightGBM is used as the meta-learner of the Stacking algorithm, and the fused features are used as the input features of the meta-learner for training, so as to realize the construction of the fusion model based on dynamic clustering Stacking technology, which improves the accuracy of the model while avoiding the singleness of the base learner selected by dynamic clustering, improves the robustness and reliability of the model, and effectively solves the problem of poor reliability of the prediction model due to the single electricity consumption index factor considered in the construction of the power prediction model, significantly improves the comprehensive performance of the prediction model learning and generalization, and further improves the accuracy and reliability of electricity consumption prediction.

[0051] The above specific embodiments are preferred embodiments of the present invention, and are not intended to limit the specific implementation scope of the present invention. The scope of the present invention includes but is not limited to the present specific embodiments. All equivalent changes made in accordance with the shape, structure, and method of the present invention are within the protection scope of the present invention.

Claims

1. The power forecasting method based on the demand situation awareness fusion model is characterized by: The steps include: S1. Sample the electricity consumption behavior data and environmental electricity consumption data in the area and split them into training sets and test sets; S2, performing outlier processing on the training set and using it as input of a base learner to obtain a first training feature; S3, dynamically clustering the first training features, selecting the optimal features and the target variables for feature fusion to obtain target features, and training the meta-learner through the target features to build a demand situation awareness fusion model; S4, the demand situation awareness fusion model responds to the test set to obtain a correction factor, and the model is corrected according to the correction factor to obtain a target demand situation awareness fusion model; S5. The target demand situation awareness fusion model responds to real-time feature data to obtain regional power demand results.

2. The power forecasting method based on the demand situation awareness fusion model according to claim 1 is characterized in that: The S1 comprises the following sub-steps: S11. Based on the power consumption behavior of the power industry in the region and the power environment indicators that affect the power consumption situation, power consumption behavior data and environmental power consumption data are obtained, and the power consumption behavior data and environmental power consumption data are merged into original feature data; S12, dividing the original feature data into a plurality of data sets according to the attribute groups of the original feature data; S13, cutting and segmenting the data samples of each data set according to the training time step of the regression selection algorithm to obtain a plurality of segmented samples; S14. The ratio of the number of the segmented samples extracted to the number of the data set extracted in a single time is used as the sampling target number, and the systematic sampling method is used to extract samples based on the sampling target number, and the extracted samples are combined to form the training set and the test set.

3. The power forecasting method based on the demand situation awareness fusion model according to claim 2 is characterized in that: The original characteristic data at least includes power consumption characteristic data, weather characteristic data, industry characteristic data and power consumption time zone characteristic data; wherein: The power consumption characteristic data at least include: power consumption mean, power consumption dispersion coefficient, power consumption standard deviation, power consumption extreme value, power consumption growth rate and historical power consumption of different industries in the same period; The weather characteristic data at least include: period average temperature, period temperature extreme value and period average humidity; The industry characteristic data at least include: industry attributes, regional gross domestic product, user consumer price index and industrial added value; the electricity consumption time zone characteristic data at least include: electricity consumption time domain.

4. The power forecasting method based on the demand situation awareness fusion model according to claim 1 is characterized in that: The S2 comprises the following sub-steps: S21. Based on the power forecasting business needs, the vector regression model combined with the random forest model and the classification regression algorithm is used to establish the initial base learner; S22, filling in the missing parts of the power consumption characteristic data in the training set, and deleting some extreme values ​​of the power consumption characteristic data in the training set; S23, using the training set after outlier processing as input parameters of the initial base learner, training to obtain the base learner, and outputting the first training feature of the original feature data.

5. The power forecasting method based on the demand situation awareness fusion model according to claim 2 is characterized in that: The S3 comprises the following sub-steps: S31, using the first training feature as a dynamic clustering sample, and dividing it into a plurality of feature clusters according to the distance values ​​between the dynamic clustering samples; S32, calculating the feature cluster by a silhouette coefficient method to obtain a silhouette coefficient of the first training feature, and selecting a feature cluster corresponding to a maximum value of the silhouette coefficient as an optimal feature cluster for clustering; S33, based on the optimal feature cluster that has completed clustering, calculate the minimum distance cluster, and take the optimal feature cluster with the highest reward value in each round of clustering as the optimal cluster; S34, dynamically rewarding the minimum distance cluster and the optimal cluster in each round of clustering based on a reward function, and outputting the optimal feature; S35, the original feature data is used as the input of the LASSO regression model, the target variable is output, and the target variable is merged with the optimal feature to obtain the target feature; S36. Establish a meta-learner based on the LightGBM model, input the target features into the meta-learner for training, so as to construct the demand situation awareness fusion model.

6. The power forecasting method based on the demand situation awareness fusion model according to claim 5 is characterized in that: The target variables include: historical electricity consumption characteristic variables, weather characteristic variables, economic characteristic variables, industry attribute variables and electricity consumption time zone characteristic variables.

7. The power forecasting method based on the demand situation awareness fusion model according to claim 6 is characterized in that: The S34 comprises the following sub-steps: Calculate the distance between the cluster center of each optimal feature cluster and the target variable, and take the optimal cluster corresponding to the minimum distance as the minimum distance cluster; When the optimal cluster is equal to the minimum distance cluster, a positive reward is given to the reward value of the optimal cluster; When the optimal cluster is not equal to the minimum distance cluster, the minimum distance cluster is given a negative reward; Complete the clustering of all the optimal feature clusters and output the optimal features corresponding to the latest optimal cluster.

8. The power forecasting method based on the demand situation awareness fusion model according to claim 1 is characterized in that: The S4 comprises the following sub-steps: Input the test set into the target demand situation awareness fusion model for prediction, obtain the predicted values ​​in sequence according to the test time sequence to construct a predicted value sequence, and construct a true value sequence based on the true value; According to the prediction time series, the prediction sequence and the real value sequence are fused and calculated bit by bit to obtain the error value sequence, and the error value and error direction of each sequence bit in the error value sequence are abnormally obtained to construct a correction factor; the correction factor is used as the loss function of the demand situation awareness fusion model; Taking minimizing the loss function as the parameter adjustment goal, the target parameters are obtained by performing gradient calculation on the base learner and the meta learner through the gradient descent algorithm; The base learner and the meta learner are iteratively adjusted in parameters based on the target parameters to complete the calibration of the demand situation awareness fusion model and obtain the target demand situation awareness fusion model.

9. The power forecasting system based on the demand situation awareness fusion model is applicable to the power forecasting method based on the demand situation awareness fusion model as claimed in any one of claims 1 to 8, characterized in that: include: Data acquisition module, data processing module and learner; The data acquisition module is used to collect the original characteristic data of power consumption behavior and environment, and transmit it to the data processing module; the data processing module is used to sample the original characteristic data using a dynamic balance algorithm to obtain a training set and a test set; The learner is used to perform feature calculation on the training set to obtain the optimal feature, and to construct a demand situation awareness fusion model after feature fusion of the optimal feature and the target variable, and to correct the model by obtaining the model correction factor in response to the test set to obtain the target demand situation awareness fusion model.

10. The power forecasting system based on demand situation awareness fusion model according to claim 9 is characterized in that: The learner includes a dynamic clustering unit, a base learner, a meta learner and a model calibration unit; The base learner is used to train the training set and output the first training feature of the original feature data; The meta-learner is used to train the fused features and construct the demand situation awareness fusion model; The model calibration unit is used to respond to the test set and output a correction factor to correct the demand situation awareness fusion model to obtain the target demand situation awareness fusion model; The dynamic clustering unit is used to calculate the silhouette coefficient of the first training feature, dynamically select the feature cluster corresponding to the maximum silhouette coefficient as the optimal feature cluster for clustering, and dynamically reward the minimum distance cluster and the optimal cluster of the optimal feature cluster obtained in each round of clustering calculation based on the reward function, and output the optimal feature.

Citation Information

Patent Citations

  • Polypropylene melt index hybrid modeling method based on dynamic error compensation mechanism

    CN110322933A

  • Multi-factor power demand medium and short term prediction method based on multi-model fusion

    CN115130741A

  • Thyroid ultrasound image region-of-interest positioning method based on CSAI-Grid RCNN

    CN116309806A

  • Power load prediction method for realizing error correction mechanism based on LSTM-XGBoost

    CN116739118A

  • Supply chain purchase demand intelligent integrated prediction method and system

    CN117217820A

Cited By

  • Intelligent classification method based on rainfall sensitivity and decision tree

    CN120974287A

  • Large user power load prediction method based on machine learning and deep learning

    CN121435194A