Monthly electric quantity prediction method based on future online user group agent electricity purchasing service

By adopting machine learning methods and support vector regression models in the future power purchase business of online user group agents, combining meteorological data to predict, and filling in the historical data loss through reverse prediction, the problem of difficult to capture short-term mutations of electricity consumption curves and local optimal solutions in the existing technology is solved, which significantly improves the prediction accuracy and robustness.

CN120124818AActive Publication Date: 2025-06-10STATE GRID ZHEJIANG ELECTRIC POWER CO MARKETING SERVICE CENT
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510601382.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-12
Publication Date
2025-06-10
Estimated Expiration
2045-05-12

AI Technical Summary

Technical Problem

When the existing technology conducts future power purchase predictions by the online user group agent, it is difficult to effectively capture the short-term mutation of the power consumption curve caused by the dynamic withdrawal of the network behavior of users, and the optimization of the genetic algorithm model parameter is prone to fall into the local optimal solution, resulting in limited prediction accuracy.

Method used

Using a machine learning-based monthly power prediction method, we use a support vector regression (SVR) model to predict by constructing a historical power consumption data set for the future online user group, combining meteorological data, and filling in the loss of historical data through reverse prediction to enhance data integrity.

Benefits of technology

It significantly improves the accuracy and robustness of agency power purchase prediction, can accurately capture the nonlinear characteristics and short-term fluctuations caused by changes in user groups' behavior, reduces prediction risks, and improves the reliability and efficiency of power services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120124818A_ABST
    Figure CN120124818A_ABST
Patent Text Reader

Abstract

The invention relates to a monthly electric quantity prediction method based on future online user group agent electricity purchase service, belongs to the field of electric quantity prediction, and provides the following steps for solving the problem that the result obtained by the existing mode is not ideal: constructing a future online user set, and obtaining an electric quantity data set and meteorological data; setting a detection item, and arranging the electric quantity data and the temperature data according to a time inverted sequence to form a future online user group historical data set; abnormal data in the detection items are recognized and repaired, and a repaired data set is obtained; obtaining a power utilization change trend of the online agent power purchase user group, and repairing missing historical data of the detection item to obtain a repaired data set; obtaining a relationship between weather and electric quantity; modeling is carried out on the extracted features, then a model is trained and tested, and a tested model is obtained; using the model to predict the electric quantity in a period of time in the future. The data integrity is enhanced, the prediction model is optimized, the prediction risk is effectively reduced, and the reliability and efficiency of power service are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electricity consumption prediction, and particularly to a monthly electricity consumption prediction method based on the proxy electricity purchase service for future in-network user groups. Background Art

[0002] Since the electricity demand is affected by various factors, such as the electricity consumption habits of user groups, economic environment, policy orientation, etc., and for the electricity consumption situation of the proxy industrial and commercial electricity purchase user group, the dynamic off-grid and on-grid behaviors of users will bring short-term mutations to the electricity consumption curve that cannot be directly predicted, and traditional prediction methods often have difficulty capturing these dynamic changes.

[0003] When predicting the proxy electricity purchase for future in-network user groups, given the significant differences in the electricity consumption behaviors and demand characteristics of different user groups, using detailed user profile information and historical electricity consumption data to classify and analyze and predict the electricity demand by user group has become the key to improving the prediction accuracy. With the popularization of smart grids and the rapid development of big data technology, the accumulated massive user electricity consumption data, social and economic data, and policy orientation data provide the possibility to deeply understand the electricity consumption characteristics of each user group and their driving factors, which in turn helps to improve the accuracy and timeliness of proxy electricity purchase prediction.

[0004] Currently, the technical solution closest to the present invention is "a prediction method for proxy electricity purchase" (Publication No.: CN119341130A). The working process of this system includes: First, clarify the prediction object, collect relevant historical data and external influencing factor data (such as policies, weather, etc.), and identify and correct outliers in the massive data; Second, establish a prediction model library covering various prediction models, select an appropriate model according to the historical rules of the prediction object, and use methods such as genetic algorithms to iteratively optimize the model parameters; Then, based on multiple optimized models, construct a comprehensive prediction model, integrate the advantages of different models through weighted or ensemble methods, and generate a more accurate proxy electricity purchase electricity consumption prediction result; Finally, conduct a post-evaluation of the prediction result of the comprehensive prediction model, analyze the prediction error and feedback it to the model, and continuously improve the model performance through iterative optimization to ensure the continuous optimization of the prediction method.

[0005] There are two key problems in the existing technology: One is that the optimization of genetic algorithm model parameters is prone to falling into local optimal solutions, resulting in limited prediction accuracy; The other is that the existing methods are difficult to effectively cope with the short-term mutation problem of the electricity consumption curve caused by the dynamic off-grid and on-grid behaviors of users. Summary of the Invention

[0006] Aiming at the problem that the results obtained by the existing methods are not ideal, this application provides a monthly electricity consumption prediction method for the proxy power purchase business of future in-network user groups. By introducing advanced machine learning algorithms, it can not only break through the local optimal limit of traditional optimization algorithms, but also accurately capture the non-linear characteristics and short-term fluctuations brought by the changes in the behavior of user groups, significantly improving the accuracy and robustness of proxy power purchase prediction.

[0007] A monthly electricity consumption prediction method for the proxy power purchase business of future in-network user groups, comprising the following steps: S1. Based on the current in-network proxy power purchase user group, construct a future in-network user set, process the historical electricity consumption data of the objects involved in the future in-network user set, and obtain the historical electricity consumption data set of the future in-network user set; and obtain the temperature data in the meteorological data through the API interface. S2. Set the monthly maximum temperature and monthly electricity consumption as the detection items, arrange the electricity consumption data obtained in S1 and the temperature data in the meteorological data in reverse chronological order to form the historical data set of the future in-network user group; identify the abnormal data in the detection items in the historical data set of the future in-network user group, and repair the detected abnormal data to obtain the repaired data set; to ensure the integrity of the data and provide data support for subsequent model training and electricity consumption prediction. S3. Obtain the electricity consumption change trend of the in-network proxy power purchase user group through the result of S2. For the situation where the historical data is incomplete due to users newly entering the market, adopt the reverse prediction filling method, combine the electricity consumption change trend of the existing time period, and based on the result of S2, repair the missing historical data of the detection items to obtain the repaired data set. S4. Based on the result of S3, obtain the relationship between meteorology and electricity through Pearson correlation coefficient analysis. S5. Based on the result of S4, extract the features of the relationship between meteorology and electricity, and the extracted features include the monthly maximum temperature and monthly electricity consumption features; divide the repaired data set obtained in S3 into a training set, a validation set, and a test set; use the training set to model the extracted features, and adopt the cross-validation technique, use the validation set to evaluate and select the optimal model parameters to obtain the trained model; use the test set to test the trained model, evaluate the prediction performance of the model, and obtain the tested model. S6. Use the tested model to predict the electricity consumption in a future period of time to obtain the prediction result.

[0008] Further, the specific process of step S1 is as follows: The constructed future in-network user set includes stable users, future off-network users, and future on-network users. By excluding the historical electricity consumption data of future off-network users and adding the historical electricity consumption data of future on-network users, the historical electricity consumption data set of the future in-network user set is constructed.

[0009] Regarding the electricity consumption of the user group purchasing electricity on behalf of industrial and commercial enterprises, since the dynamic disconnection and connection behaviors of users will bring short-term mutations that cannot be directly predicted to the electricity consumption curve, it is necessary to consider splitting the current online user group purchasing electricity on behalf into the following three categories: (1) Stable user group: Users who continuously stay online and have relatively stable electricity consumption behaviors.

[0010] (2) Future disconnection users: Users who are expected to disconnect from the network within a certain period in the future.

[0011] (3) Future connection users: Users who are expected to connect to the network within a certain period in the future.

[0012] Further, the specific method of step S2 is as follows: S2.1, According to the determined prediction object, extract the electricity quantity data and temperature data, and arrange the electricity quantity data and temperature data in reverse chronological order for subsequent reverse chronological prediction; S2.2, Identify the anomalies in the electricity quantity data in the data and the temperature data in the meteorology (such as data missing or mutation values) through the sliding window method, and use the interpolation method for repair: For the situation of missing air temperature, use the mean value of the same detection item in adjacent months for interpolation; For the situation of missing electricity quantity data, perform linear interpolation based on the recent electricity consumption trend of this user; If a mutation value is detected, after determining the anomaly through a threshold, use the sliding window mean value or trend fitting for correction; S2.3, Obtain the repaired data set.

[0013] Further, the specific process of step S2.1 includes: S2.1.1, According to the monthly electricity quantity prediction requirements of the electricity purchasing agency business, select the total electricity quantity as the prediction object, and set the overall electricity consumption as the total electricity quantity to reflect the overall electricity demand.

[0014] S2.1.2, Determine the available features: The available features are the factors affecting the prediction object. Select the temperature data in the meteorological data as the available feature because there is a clear correlation between it and the electricity demand; S2.1.3, Arrange the electricity quantity data and temperature data in reverse chronological order to organize the electricity quantity data and temperature data and form the historical data set of the future online user group.

[0015] Further, the specific process of step S4 includes: S4.1, Based on the repaired data set in S3, use statistical analysis and machine learning methods to extract the non-linear relationship between meteorological factors and electricity quantity through the Pearson correlation coefficient. Its mathematical expression is: (1) Wherein: r is the Pearson correlation coefficient, with a value range of [-1, 1]. When r = 1, it is a perfect positive correlation. When r = -1, it is a perfect negative correlation. When r = 0, there is no linear correlation; is the independent variable, representing the variables that affect electricity consumption prediction, such as temperature; is the dependent variable, representing the monthly electricity consumption of the future in-network user group's proxy electricity purchase service to be predicted; and are the means of the two variables.

[0016] S4.2. Based on the Pearson correlation coefficient analysis results in S4.1, extract the association rules between meteorology and electricity consumption.

[0017] Furthermore, the rules between meteorology and electricity consumption, the specific rules include: Summer (June - August) and winter (December - February) are typical peak electricity consumption periods, and the electricity consumption characteristics show a significant correlation with temperature changes. Specifically, in summer, the temperature and electricity consumption are positively correlated. When the temperature exceeds 28°C, the demand for air conditioning refrigeration surges, and the electricity consumption increases significantly. In winter, the electricity load is negatively correlated with the temperature. When the temperature is below 5°C, the heating demand increases significantly, resulting in a climb in electricity consumption. During spring and autumn (March - May, September - November), due to the suitable temperature, the electricity consumption fluctuates relatively smoothly.

[0018] Furthermore, since the electricity consumption changes in special months are significantly different from those in normal months, specifically including: (1) Special seasonal months: In summer (June - August) and winter (December - February), the electricity consumption changes are greatly affected by temperature characteristics (2) Special holiday months: During the Spring Festival and 15 days before and after the festival, the electricity consumption will decrease significantly, mainly affected by date characteristics.

[0019] For special months, a rule-based model is used for prediction, and the electricity consumption is adjusted based on historical experience and business rules. The electricity consumption changes in normal months are relatively stable, mainly affected by conventional meteorology and electricity consumption behavior.

[0020] Use Support Vector Regression (SVR) to model and train the extracted features, and adopt the method of cross-validation to select the optimal model parameters to improve the generalization ability and robustness of the model. Among them, the selection and optimization of the kernel function are relatively special steps. The selection of the kernel function directly affects the nonlinear mapping ability and prediction performance of the model, while the optimization of the kernel function parameters requires fine-tuning through the cross-validation method. This step not only needs to select a suitable kernel function type (such as RBF kernel, polynomial kernel, etc.) in combination with the characteristics of the specific problem, but also needs to determine the optimal kernel function parameters through experiments to ensure the best performance of the model in the high-dimensional feature space.

[0021] Furthermore, the specific process of step S5 is as follows: S5.1, divide the S3 patched dataset into a training set, a validation set, and a test set; S5.2, select the monthly maximum temperature and monthly electricity consumption monthly feature vectors in the historical data as the input features of the model; S5.3, distinguish special months and normal months through the set judgment conditions; for special months, use a rule-based model for prediction; for normal months, construct a support vector regression prediction model for prediction; S5.4, construct a loss function and an optimization objective; introduce slack variables to construct the original problem of SVR; S5.5, use the Lagrange multiplier and the Karush-Kuhn-Tucker conditions to transform the original problem of SVR into a dual form; S5.6, find the support vectors by calculating the Lagrange multiplier and in the expansion, and use the kernel function to replace the dot product.

[0022] All kernel functions that satisfy the theorem are admissible kernels. Before using SVR to estimate and the regression parameter vector, it is important to select appropriate regularization parameters 、loss function parameters and the selected kernel parameters.

[0023] Furthermore, the specific process of S5.3 is: S5.3.1, the judgment conditions include months where there are legal long holidays, months with frequent historical extreme climates (such as continuous high temperatures in July), etc. that are set as special months, and the rest are normal months; S5.3.2, for special months, use a rule-based model for prediction, and its expression is: (2) In the formula: is the predicted electricity consumption; is the intercept term; is the th non - holiday feature variable's value at time t ; is the corresponding regression coefficient; is the j th holiday effect variable's indicator function at time t , with a value of 0 or 1; is the corresponding holiday effect coefficient; is the error term; S5.3.3. For normal months, construct a support vector regression prediction model for prediction. The expression of the support vector regression prediction model is: (3) In the formula: is the predicted output value, that is, the predicted electricity consumption of the target month, is the weight vector of the regression hyperplane, that is, the feature coefficient, which determines the contribution degree of each input feature to the electricity consumption prediction; is the non - linear mapping function that maps the input from the space to a higher - dimensional space ; is the bias term, which is a constant used to adjust the intercept of the regression hyperplane, is the -dimensional mapping space, and the dimension may be much higher than the original input space.

[0024] Beneficial effects: This application is a monthly electricity consumption prediction method for the proxy power purchase business based on the future in - network user group. By constructing a historical electricity consumption dataset of the "future in - network" proxy power purchase user group and combining "reverse" prediction to fill in the missing historical data, this method can comprehensively reflect the user's electricity consumption trend, improve the accuracy and stability of monthly proxy power purchase prediction. This method not only enhances data integrity but also optimizes the prediction model, provides a scientific basis for power dispatching and power purchase strategies, effectively reduces prediction risks, and improves the reliability and efficiency of power services. Brief Description of the Drawings

[0025] Figure 1 is the flow diagram of the embodiment of this application; Figure 2 is the recognition result diagram of Table 1; Figure 3 is Figure 2 's filling result diagram; Figure 4 is the correlation diagram between meteorology and electricity consumption; Figure 5 is the correlation diagram between sensitivity and electricity consumption; Figure 6This is the error distribution diagram of the training results. Specific implementation mode

[0026] The technical solutions of the embodiments of the present invention will be explained and described below. However, the following embodiments are only the preferred embodiments of the present invention, not all of them. Based on the embodiments in the implementation mode, other embodiments obtained by those skilled in the art without creative work all belong to the protection scope of the present invention.

[0027] The monthly electricity consumption prediction method for the proxy electricity purchase business based on the future in-network user group in this embodiment has a flowchart as Figure 1 shown and includes the following steps: Implement the monthly electricity sales data of a certain power company, conduct calculations based on the data from 2022 to 2024, and the implementation process and results are as follows: S1. Construct a future in-network user set based on the current in-network proxy electricity purchase user group, process the historical electricity consumption situation data of the objects involved in the future in-network user set, and obtain the historical electricity consumption situation data set of the future in-network user set; the constructed future in-network user set includes stable users, future off-network users, and future on-network users. By excluding the historical electricity consumption data of future off-network users and adding the historical electricity consumption data of future on-network users, construct the historical electricity consumption situation data set of the future in-network user set.

[0028] Regarding the electricity consumption situation of the proxy industrial and commercial electricity purchase user group, since the dynamic off-network and on-network behaviors of users will bring short-term mutations that cannot be directly predicted to the electricity consumption curve, it is necessary to consider splitting the current in-network proxy electricity purchase user group into the following three categories: Stable user group: Users who continuously stay in the network and have relatively stable electricity consumption behaviors.

[0029] Future off-network users: Users who are expected to go off the network within a certain period in the future.

[0030] Future on-network users: Users who are expected to join the network within a certain period in the future.

[0031] Construct a data set of the historical electricity consumption situation of the new future in-network proxy electricity purchase user group, and its expression is:

[0032] where is the historical electricity consumption data of the stable user group, is the historical electricity consumption data of the future on-network users, is the historical electricity consumption data of the future off-network users. By excluding the historical electricity consumption data of future off-network users and adding the historical electricity consumption data of future on-network users, accurately reflect the electricity consumption situation of the future in-network user group.

[0033] Taking September 2024 as the prediction target, obtain the characteristic information data of the proxy power purchase users in that month, including the monthly proxy power purchase user files and operating capacity. Based on this user list, construct a sample set using historical user data. This sample set is based on the proxy power purchase user group in November 2024 to construct a future-state sample set from January 2022 to August 2024, as shown in Table 1.

[0034] Table 1

[0035] Through the API interface, obtain the historical meteorological data of a certain province from January 2022 to August 2024, as shown in Table 2.

[0036] Table 2

[0037] S2. Set the monthly maximum temperature and monthly electricity consumption as the detection items. Arrange the electricity consumption data obtained in S1 and the temperature data in the meteorological data in reverse chronological order to form a historical data set of the future in-network user group. Based on the historical data set of the future in-network user group, identify the outliers (such as missing or mutated values) of the detection items through the sliding window method, and use the interpolation method to repair the detection items to obtain a repaired data set; the specific method is as follows: S2.1. According to the determined prediction object, extract the electricity consumption data and temperature data, and arrange the electricity consumption data and temperature data in reverse chronological order for subsequent reverse chronological prediction; the specific process includes: S2.1.1. According to the monthly electricity consumption prediction requirements of the proxy power purchase business, select the total electricity consumption data as the prediction object, and set the overall electricity consumption as the total electricity consumption to reflect the overall power demand; S2.1.2. Determine the available features: The available features are the factors affecting the prediction object. Select the temperature data in the meteorological data as the available feature because there is a clear correlation between it and the electricity demand; S2.1.3. Arrange the electricity consumption data and temperature data in reverse chronological order to organize the electricity consumption data and temperature data and form a historical data set of the future in-network user group.

[0038] S2.2. Identify the anomalies (such as missing or mutated values) of the electricity consumption data and the temperature data in the meteorological data in the historical data of the future in-network user group through the sliding window method, and use the interpolation method for repair: For the situation of missing temperature, use the mean value of the same detection item in adjacent months for interpolation; For the situation of missing electricity consumption data, perform linear interpolation based on the recent electricity consumption trend of this user; If a mutated value is detected, after determining the anomaly through the threshold, use the sliding window mean value or trend fitting for correction; S2.3, obtain the repaired dataset.

[0039] Detect all the data in the future-state sample dataset, identify and process the user-dimension data, including electricity consumption and meteorological data. Identify issues such as missing data and data mutations. The identification results are as Figure 2 shown.

[0040] After identification, perform automatic repair. Use the interpolation method to cover the data, and fill it according to the historical data mean logic. The results after filling are as Figure 3 shown.

[0041] S3. Based on the results of S2 (the repaired dataset), obtain the electricity consumption change trend of the on-grid proxy electricity purchase user group in the existing data. For the situation where the historical data is incomplete due to users newly entering the market, adopt the reverse prediction filling method. Combine the electricity consumption change trend in the existing time period, and based on the results of S2 (the repaired dataset), repair the missing historical data of the detection items to obtain the repaired dataset; The filling logic is based on the electricity consumption data generated by users and the recent electricity consumption data to reverse infer the historical long-term electricity consumption data. The filling results are shown in Table 3 (the bold numbers are the filled data).

[0042] Table 3

[0043] S4. Based on the results of S3 (the repaired dataset), obtain the relationship between meteorology and electricity through Pearson correlation coefficient analysis; The specific process of step S4 includes: S4.1. Based on the results of S3 (the repaired dataset), use statistical analysis and machine learning methods to extract the non-linear relationship between meteorological factors and electricity consumption. Its mathematical expression is: (1) In the formula: r is the Pearson correlation coefficient, and its value range is [-1, 1]; when r = 1, it is a perfect positive correlation; when r = -1, it is a perfect negative correlation; when r = 0, there is no linear correlation; is the independent variable, representing the variable that affects electricity consumption prediction; is the dependent variable, representing the monthly electricity consumption of the future on-grid user group's proxy electricity purchase business to be predicted; and are the means of the two variables, is the total number of training samples.

[0044] S4.2. Based on the Pearson correlation coefficient analysis results in S4.1, extract the association rule between meteorology and electricity consumption.

[0045] Conduct correlation analysis between meteorological data and electricity consumption data through the Pearson correlation coefficient to assist in supporting algorithm feature engineering and coding. Convert meteorological data into analytical data through algorithms and apply it in a standardized form, such as Figure 4 and Figure 5 as shown.

[0046] S5. Based on the results of S4, extract features of the relationship between meteorology and electricity consumption. The extracted features include monthly maximum temperature and monthly electricity consumption characteristics. Divide the repaired data set obtained in S3 into a training set, a validation set, and a test set. Use the training set to build a model for the extracted features, and adopt cross-validation technology. Use the validation set to evaluate and select the optimal model parameters to obtain the trained model. Use the test set to test the trained model and evaluate the prediction performance of the model to obtain the tested model. The specific process is as follows: S5.1. Divide the repaired data set in S3 into a training set, a validation set, and a test set. S5.2. Select monthly feature vectors including monthly maximum temperature, monthly minimum temperature, monthly electricity consumption, etc. in historical data as the input features of the model. In the formula: is The input feature vector of the th month (in transposed form); is the monthly maximum temperature of the th

[0047] month, and

[0048] is the

[0049] monthly electricity consumption of the th month; (2) In the formula: is the predicted electricity consumption; is the intercept term; is the value of the th non - holiday feature variable at time t ; is the corresponding regression coefficient; is the j th holiday effect variable's indicator function at time t , with a value of 0 or 1; is the corresponding holiday effect coefficient; is the error term; S5.3.3. For normal months, construct a support vector regression prediction model for prediction. The expression of the support vector regression prediction model is: (3) In the formula: is the predicted output value, that is, the predicted electricity consumption of the target month, is the weight vector of the regression hyperplane, that is, the feature coefficient, which determines the contribution degree of each input feature to the electricity consumption prediction; is the non - linear mapping function that maps the input from the space to a higher - dimensional space ; is the bias term, which is a constant used to adjust the intercept of the regression hyperplane, is the - dimensional mapped space, and the dimension may be much higher than the original input space.

[0050] S5.4. Construct a loss function and an optimization objective; introduce slack variables to construct the primal problem of SVR; in order to measure the gap between the actual value and the predicted value, Vapnik introduced the insensitive loss function . The purpose is to find a function that has at least a deviation from the output scalar , where and can be obtained by minimizing the following regularization function : (4) In the formula: is the weight vector of the regression hyperplane (i.e., the feature coefficient); is the penalty coefficient, which is the weight used to balance the model complexity and the training error; is the total number of training samples.

[0051] (5) In the formula: is the error tolerance threshold; is the The true power value of a sample; For the model to the predicted power value of the sample; The input feature vector of the sample. Is insensitive to the loss function. Only when the observed values are on or outside the insensitive region can they be used as the support vectors for constructing the decision function . To indicate the error outside the insensitive region, slack variables are introduced. The original problem of constructing SVR is expressed as: (6) In the formula: is the weight vector of the regression hyperplane (i.e., the feature coefficient); is the square of the norm of the weight vector; is the penalty coefficient; , are slack variables, corresponding to the upper and lower boundary errors respectively; is the total number of training samples; is the true power value of the th sample; The input feature vector of the th sample; is the non - linear mapping function; is the bias term (constant); is the error tolerance threshold.

[0052] S5.5, Use Lagrange multipliers and Karush - Kuhn - Tucker conditions to transform the original problem of SVR into the dual form; The quadratic programming and the linear constraints of the original problem ensure that SVR will always achieve the global optimal solution. Among them represents the complexity of the model; the parameter represents the balance between the complexity of the function and the training error (if takes too large a value, the algorithm will overfit the data and the generalization ability will become low); the parameter controls the width of the insensitive region, the higher it is, the fewer support vectors are selected; and represent the original parameters of SVR, which are generally determined by cross - validation. Lagrange multipliers and Karush - Kuhn - Tucker conditions can be used to transform the above problem into the dual form: (7) In the formula: and are dual variables, corresponding to the constraints of and in the original problem respectively; represents the dot product in the feature space ; is the true power value of the -th sample; The -th sample's input feature vector; is the error tolerance threshold; is the total number of training samples; is the penalty coefficient.

[0053] By calculating the Lagrange multipliers and finding the support vectors in the expansion: . From the method of solving the dual problem, the function can be written as: (8) In the formula: and are dual variables, corresponding to the constraints of and in the original problem respectively; represents the dot product in the feature space ; is the bias term (constant).

[0054] S5.6. By calculating the Lagrange multipliers and finding the support vectors in the expansion, use the kernel function to replace the dot product. To avoid calculating the complex , use the kernel function to replace the dot product, as shown in Equation (9): (9) In the formula: is the training data; is the input data, is the kernel function, and the kernel function , which is important for the prediction ability of SVR; is the bias term (constant). All kernel functions that satisfy the theorem are admissible kernels. Before using SVR to estimate and regression parameter vectors, it is important to select appropriate regularization parameters , loss function parameters and the selected kernel parameters.

[0055] All kernel functions that satisfy the theorem are admissible kernels. Before using SVR to estimate and Before the regression parameter vector, it is important to select appropriate regularization parameters , loss function parameters and the selected kernel parameters.

[0056] Divide the data from January 2022 to December 2024 into datasets. The data from January 2022 to January 2024 is the training set, the data from February 2024 to May 2024 is the validation set, and the data from June 2024 to August 2024 is the test set.

[0057] For the monthly prediction demand of proxy power purchase, the SVR (Support Vector Regression) algorithm is selected for prediction, and the main parameter configurations are shown in Table 5.

[0058] Table 5

[0059] The error distribution of the training results using the sample data is as Figure 6 shown.

[0060] S5, based on the results of S4, extract the features of the relationship between meteorology and electricity consumption. The extracted features include the monthly maximum temperature and the monthly electricity consumption characteristics; divide the repaired dataset obtained in S3 into a training set, a validation set, and a test set; use the training set to model the extracted features, and adopt the cross-validation technique to evaluate and select the optimal model parameters using the validation set to obtain the trained model; use the test set to test the trained model to evaluate the prediction performance of the model and obtain the tested model; The test set is the data from June 2024 to August 2024, and the model test verification effect is shown in Table 6.

[0061] Table 6

[0062] S6, use the tested model to predict the electricity consumption in the future for a period of time to obtain the prediction results. Predict the monthly electricity consumption of proxy industrial and commercial users in a certain province in September 2024, and the prediction results are shown in Table 7.

[0063] Table 7

[0064] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art can still modify or equivalently replace the specific implementation manners of the present invention. Any modification or equivalent replacement without departing from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.

Claims

1. A method for predicting monthly electricity consumption based on the future electricity purchasing business of online user groups, characterized in that: The following steps are involved: S1, build a future online user set based on the current online agent power purchasing user group, obtain the power data set of the historical power consumption of the future online user set, and obtain meteorological data through the API interface; S2, set the monthly maximum temperature and monthly power as detection items, arrange the power data obtained in S1 and the temperature data in the meteorological data in reverse chronological order, and form a historical data set of the future online user group; identify abnormal data in the detection items, and repair the detected abnormal data to obtain a repair data set; S3, using the results of S2 to obtain the electricity consumption trend of the online power purchasing agent user group, and using the reverse prediction filling method to repair the missing historical data of the detection items to obtain the repair data set; S4, based on the results of S3, the relationship between meteorology and electricity was obtained through Pearson correlation coefficient analysis; S5, extracting features based on the results of S4; modeling the extracted features based on the results of S3, and using cross-validation technology to evaluate and select the optimal model parameters to train the model, and testing the trained model to obtain a tested model; S6, using the tested model to predict the power consumption in the future to obtain a prediction result.

2. The monthly electricity consumption prediction method based on the future online user group proxy electricity purchasing business according to claim 1 is characterized in that: The specific process of step S1 is as follows: the future online user set constructed includes stable users, future offline users and future online users. By removing the historical electricity consumption data of future offline users and adding the historical electricity consumption data of future online users, a historical electricity consumption data set of the future online user set is constructed; at the same time, the historical meteorological data of the user's area is obtained through the API interface.

3. The monthly electricity consumption prediction method based on the future online user group proxy electricity purchasing business according to claim 1 is characterized in that: The specific method of step S2 is: S2.1, extracting power data and temperature data according to the determined prediction object, and arranging the power data and temperature data in reverse chronological order; S2.2, use the sliding window method to identify the abnormalities in the power data and temperature data in the meteorological data, and use the interpolation method to repair them: In the case of missing temperature, the mean of the same detection item in adjacent months is used for interpolation; In case of missing electricity data, linear interpolation is performed based on the user's recent electricity consumption trend; If a sudden change value is detected, it is corrected by using the sliding window mean or trend fitting after judging the abnormality through the threshold; S2.3, obtain the repaired dataset.

4. The monthly electricity consumption prediction method based on the future online user group proxy electricity purchasing business according to claim 3 is characterized in that: The specific process of step S2.1 includes: S2.1.1, based on the monthly electricity forecast demand of the power purchasing agent business, the total electricity data is selected as the forecast object, and the overall electricity consumption is set as the total electricity; S2.1.2, select temperature data from meteorological data as available features; S2.1.3, arrange the power data and temperature data in reverse chronological order to organize the power data and temperature data to form a historical data set for future online user groups.

5. The monthly electricity consumption prediction method based on the future online user group proxy electricity purchasing business according to claim 1 is characterized in that: The specific process of step S4 includes: S4.1, based on the S3 patched data set, uses statistical analysis and machine learning methods to extract the nonlinear relationship between meteorological factors and power through the Pearson correlation coefficient; S4.2, based on the Pearson correlation coefficient analysis results in S4.1, extract the correlation between meteorology and electricity.

6. The monthly electricity consumption prediction method based on the future online user group proxy electricity purchasing business according to claim 5 is characterized in that: The mathematical expression of the nonlinear relationship between meteorological factors and electricity is: Where: r is the Pearson correlation coefficient, and its value range is [-1,1]; when r = 1, it is completely positively correlated. r = -1 is completely negative correlation. r =0 when there is no linear correlation; is the independent variable, representing the variable that affects the power forecast; is the dependent variable, representing the monthly electricity consumption of the future online user group's proxy electricity purchasing business to be predicted; and is the mean of the two variables, is the total number of training samples.

7. The monthly electricity consumption prediction method based on the future online user group proxy electricity purchasing business according to claim 3 is characterized in that: The specific process of step S5 is as follows: S5.1, divide the S3 patching data set into a training set, a validation set, and a test set; S5.2, select the monthly feature vectors including the monthly maximum temperature and monthly electricity consumption in the historical data as the input features of the model; S5.3, distinguish special months from normal months by setting judgment conditions; for special months, use rule model for prediction; for normal months, build support vector regression prediction model for prediction; S5.4, construct the loss function and optimization objective; introduce slack variables and construct the original problem of SVR; S5.5, using Lagrange multipliers and Karush-Kuhn-Tucker conditions to transform the original SVR problem into its dual form; S5.6, replace the dot product with a kernel function by computing the Lagrange multipliers and finding the support vectors in the expansion.

8. The monthly electricity consumption prediction method based on the future online user group proxy electricity purchasing business according to claim 7 is characterized in that: The specific process of S5.3 is as follows: S5.3.1, the criteria include the month of the statutory long holiday and the month with frequent extreme weather events in history as special months, and the rest as normal months; S5.3.2, for special months, the rule model is used for prediction, and its expression is: Where: is the predicted power; is the intercept term; For the Non-holiday characteristic variables in time t The value of is the corresponding regression coefficient; For the j Holiday effect variables in time t The indicator function takes the value of 0 or 1; is the corresponding holiday effect coefficient; is the error term; S5.3.3, for normal months, a support vector regression prediction model is constructed for prediction. The expression of the support vector regression prediction model is: Where: is the predicted output value, i.e. the predicted electricity consumption in the target month, is the weight vector of the regression hyperplane, i.e., the characteristic coefficient, which determines the contribution of each input feature to the power prediction; is a nonlinear mapping function, and the input from Space transformation to higher dimensional space ; is the bias term, which is a constant used to adjust the intercept of the regression hyperplane. for dimensional mapping space, the dimensionality may be much higher than the original input space.

Citation Information

Patent Citations

  • Subordinate power grid electric quantity prediction method based on data integration

    CN116663726A

  • Prediction method for electricity quantity of proxy electricity purchase

    CN117236487A

  • Short-term load prediction method and device considering agent power purchase of low-power grid

    CN118013466A

  • Agent electricity purchasing user electricity utilization evaluation model construction method based on fuzzy weight matrix

    CN118536060A

  • Clustering and transfer learning-based proxy electricity purchasing user load prediction method and system

    CN118554424A